diff --git a/.DS_Store b/.DS_Store index e632dd3..16f2591 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/src/ecs/TileMapComponent.h b/src/ecs/TileMapComponent.h index 1973083..3dba7cf 100644 --- a/src/ecs/TileMapComponent.h +++ b/src/ecs/TileMapComponent.h @@ -46,8 +46,8 @@ public: { // TILESON ~~~~~~~~~~~ - //const std::filesystem::path jsonPath = std::filesystem::u8path(mapPath); - const std::filesystem::path jsonPath = std::filesystem::u8path("/Users/ayoungblood/Projects/KaijuSaveEarth/assets/maps/kaiju-city-map.json"); + const std::filesystem::path jsonPath = std::filesystem::u8path(mapPath); + //const std::filesystem::path jsonPath = std::filesystem::u8path("/Users/ayoungblood/Projects/KaijuSaveEarth/assets/maps/kaiju-city-map.json"); map = t.parse(jsonPath); //std::cout << "Trying to load json tile map from: " << jsonPath << std::endl; if(map->getStatus() == tson::ParseStatus::OK) diff --git a/src/game/Game.cpp b/src/game/Game.cpp index 3f4dc24..54ce1b9 100644 --- a/src/game/Game.cpp +++ b/src/game/Game.cpp @@ -191,7 +191,8 @@ void Game::init(const char *title, int width, int height, bool fullscreen, int g levelMap.y = 0; // printf("Trying to load Tilemap\n"); - gameScene.addComponent("assets/maps/kaiju-city-map.json","kaiju-city","Tile Layer 1","Collision",gScale,player.getComponent().position.x+player.getComponent().width/2,player.getComponent().position.y+player.getComponent().height/2); //150,100 + std::string mapPath = Game::projPath + "assets/maps/kaiju-city-map.json"; + gameScene.addComponent(mapPath,"kaiju-city","Tile Layer 1","Collision",gScale,player.getComponent().position.x+player.getComponent().width/2,player.getComponent().position.y+player.getComponent().height/2); //150,100 gameScene.addGroup(groupMap); // printf("Completed loading Tilemap\n");