summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/game.cpp5
-rw-r--r--src/game.h2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/game.cpp b/src/game.cpp index 7ec4460..1ff3f4f 100644 --- a/src/game.cpp +++ b/src/game.cpp
@@ -19,9 +19,10 @@ Game::Game()
19 auto player_anim = std::make_shared<PlayerSpriteComponent>(); 19 auto player_anim = std::make_shared<PlayerSpriteComponent>();
20 player->addComponent(player_anim); 20 player->addComponent(player_anim);
21 21
22 save = {&m, player->position}; 22 Map& startingMap = Map::getNamedMap("embarass");
23 save = {&startingMap, player->position};
23 24
24 loadMap(m); 25 loadMap(startingMap);
25} 26}
26 27
27void key_callback(GLFWwindow* window, int key, int, int action, int) 28void key_callback(GLFWwindow* window, int key, int, int action, int)
diff --git a/src/game.h b/src/game.h index 33d1965..ab8b906 100644 --- a/src/game.h +++ b/src/game.h
@@ -40,8 +40,6 @@ class Game {
40 std::list<std::shared_ptr<Entity>> nextEntities; 40 std::list<std::shared_ptr<Entity>> nextEntities;
41 bool newWorld; 41 bool newWorld;
42 std::shared_ptr<Entity> player; 42 std::shared_ptr<Entity> player;
43 Map m {Map::getNamedMap("embarass")};
44 Map m2 {Map::getNamedMap("second")};
45 Savefile save; 43 Savefile save;
46 std::list<std::pair<double, std::function<void ()>>> scheduled; 44 std::list<std::pair<double, std::function<void ()>>> scheduled;
47 bool shouldQuit = false; 45 bool shouldQuit = false;