There's a bug where the last item in tiles.json draws a black square, which is why I named ceiling_blue to zceiling_blue to temporarily solve it.

This commit is contained in:
Zed A. Shaw 2025-07-11 01:02:27 -04:00
parent b2a6262964
commit 5e01eb29a9
7 changed files with 116 additions and 102 deletions

View file

@ -96,7 +96,7 @@ TEST_CASE("map image test", "[map-sprite]") {
auto &walls = level.map->tiles();
auto &tile_set = textures::get_map_tile_set();
sf::Vector2i size{32,32};
sf::Vector2i size{64,64};
matrix::dump("TILES?", walls);
std::unordered_map<wchar_t, sf::Vector2i> sprite_coord;
@ -140,8 +140,6 @@ TEST_CASE("map image test", "[map-sprite]") {
REQUIRE(sprite_coord.contains(entity_glyph.display));
auto sprite = render_sprite(sprite_coord, size, entity_glyph.display, map_sprites);
sprite.setColor({255,150,150,255});
sprite.setPosition({float(pos.location.x * size.x), float(pos.location.y * size.y)});
render.draw(sprite);
});