summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2015-03-14 16:21:50 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2015-03-14 16:21:50 -0400
commit6cd202153bb61e14f9968845c43ca966ceab1e05 (patch)
treeeb1b445ef5ae0c04da3a8c18566cc91dc74bb2ff
parent44324ba5d6cac01048cc5cbecbff255ee56f2fc0 (diff)
downloadtherapy-6cd202153bb61e14f9968845c43ca966ceab1e05.tar.gz
therapy-6cd202153bb61e14f9968845c43ca966ceab1e05.tar.bz2
therapy-6cd202153bb61e14f9968845c43ca966ceab1e05.zip
Removed explicit map loading from Game since maps load each other now
-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;