diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2016-10-13 21:28:35 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2016-10-13 21:28:35 -0400 |
commit | e4f5224b70dd938d5872ff00fa73ac11dac2bb42 (patch) | |
tree | b196dd22c79e53e136d0e3cae67329b3bfce248f /main.cpp | |
parent | 1493986b6b22d83cf6c1641a02202bd7b36258a1 (diff) |
worldsystem snags drawing, theme stuff
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -194,7 +194,7 @@ int main(int argc, char *argv[]) } if (worldDontReallyRun) - return 0; + goto EXIT_ROUTINE; if (!worldActuallyUseThisXMLFile.empty()) { delete currentWorld; @@ -219,6 +219,8 @@ int main(int argc, char *argv[]) ui::menu::init(); game::events.emit<BGMToggleEvent>(currentWorld->bgm); + game::engine.getSystem<WorldSystem>()->setWorld(currentWorld); + // spawn the arena arena = new Arena(); arena->setStyle(""); @@ -248,6 +250,8 @@ int main(int argc, char *argv[]) render(); } +EXIT_ROUTINE: + // put away the brice for later game::briceSave(); @@ -264,6 +268,8 @@ int main(int argc, char *argv[]) delete arena; //delete currentWorld; + game::engine.getSystem<WindowSystem>()->die(); + return 0; // Calls everything passed to atexit } @@ -336,8 +342,9 @@ void render() { Render::worldShader.unuse(); // draw the world and player + game::engine.getSystem<WorldSystem>()->render(); currentWorld->draw(player); - + // draw the player's inventory player->inv->draw(); |