summary refs log tree commit diff stats
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp index af66068..6564da6 100644 --- a/src/game.cpp +++ b/src/game.cpp
@@ -3,6 +3,7 @@
3#include "animation_system.h" 3#include "animation_system.h"
4#include "character_system.h" 4#include "character_system.h"
5#include "camera_system.h" 5#include "camera_system.h"
6#include "script_system.h"
6 7
7int Game::emplaceSprite(std::string alias) { 8int Game::emplaceSprite(std::string alias) {
8 int id; 9 int id;
@@ -84,4 +85,9 @@ void Game::loadMap(std::string filename) {
84 getSystem<TransformSystem>().setUpCollision(spriteId, {0, 0}, t.size, false); 85 getSystem<TransformSystem>().setUpCollision(spriteId, {0, 0}, t.size, false);
85 getSprite(spriteId).walkthroughScript = t.script; 86 getSprite(spriteId).walkthroughScript = t.script;
86 } 87 }
88
89 // Run the map's init script.
90 if (getSystem<ScriptSystem>().mapHasScript(map_->getName(), "init")) {
91 getSystem<ScriptSystem>().runScript(map_->getName(), "init");
92 }
87} 93}