Fixed overlapping Quads
This commit is contained in:
parent
ea72294a3e
commit
e856e2c054
2 changed files with 3 additions and 4 deletions
1
assets
Submodule
1
assets
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit e0659b2375682b03bb5b9fb2b565a9c5975853e8
|
|
@ -63,8 +63,8 @@ MapError Map::populate_vertex_array() {
|
||||||
if (atlas_tile >= atlas.wall_tiles + atlas.other_tiles) return {"Map: [Loading] Invalid tile! Tile type does not have a texture", 3};
|
if (atlas_tile >= atlas.wall_tiles + atlas.other_tiles) return {"Map: [Loading] Invalid tile! Tile type does not have a texture", 3};
|
||||||
|
|
||||||
// add the vertices
|
// add the vertices
|
||||||
const auto xf = static_cast<float>(x);
|
const auto xf = static_cast<float>(x * atlas.tile_size.x);
|
||||||
const auto yf = static_cast<float>(y);
|
const auto yf = static_cast<float>(y * atlas.tile_size.y);
|
||||||
const uint32_t tile_x = atlas_tile % atlas.tile_count.x;
|
const uint32_t tile_x = atlas_tile % atlas.tile_count.x;
|
||||||
const uint32_t tile_y = atlas_tile / atlas.tile_count.x;
|
const uint32_t tile_y = atlas_tile / atlas.tile_count.x;
|
||||||
const auto tex_x = static_cast<float>(tile_x * atlas.tile_size.x);
|
const auto tex_x = static_cast<float>(tile_x * atlas.tile_size.x);
|
||||||
|
@ -85,8 +85,6 @@ MapError Map::populate_vertex_array() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return {"Map: [Loading] Success", 0};
|
return {"Map: [Loading] Success", 0};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue