aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 70b0b45..703b45e 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -58,6 +58,10 @@ int Engine::init(void)
[this](std::string name, std::string file, int size) {
systems.system<TextSystem>().get()->loadFont(name, file, size);
});
+ script->addToGameNamespace("puts",
+ [this](std::string name, float x, float y, std::string text) {
+ systems.system<TextSystem>().get()->put(name, x, y, text);
+ });
script->init();
@@ -138,6 +142,7 @@ void Engine::renderLoop(void)
{
entityx::TimeDelta dt = 0; /**< Elapsed milliseconds since each loop */
while (shouldRun()) {
+ systems.update<TextSystem>(dt);
systems.update<RenderSystem>(dt);
}
}