modify map loading

This commit is contained in:
2025-11-06 12:06:32 -05:00
parent 36b8f0d0c4
commit 8784428c07
2 changed files with 3 additions and 11 deletions
-8
View File
@@ -14,14 +14,6 @@
using json = nlohmann::json;
struct TileMapData {
std::vector<int> tiles;
unsigned int width;
unsigned int height;
unsigned int tileSize;
};
class TileMap : public sf::Drawable, public sf::Transformable {
public:
std::vector<int> tiles;
+3 -3
View File
@@ -22,8 +22,8 @@ int main()
return -1;
}
TileMap map;
if (!map.load("assets/maze32.png",
//TileMap map;
if (!mazeMap.load("assets/maze32.png",
{mazeMap.tileSize, mazeMap.tileSize},
mazeMap.tiles.data(),
mazeMap.width,
@@ -105,7 +105,7 @@ int main()
window.clear();
window.draw(map);
window.draw(mazeMap);
window.draw(currTile);
window.draw(tileX);
window.draw(tileY);