aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorAndy Belle-Isle <drumsetmonkey@gmail.com>2019-10-08 03:03:16 -0400
committerAndy Belle-Isle <drumsetmonkey@gmail.com>2019-10-08 03:03:16 -0400
commita422f32613441b5313e4a3bb0fab61f8cb87914c (patch)
tree0a6c8f17e6a8df0b6c377813fa700064f68ced93 /src/engine.cpp
parent5f53889d4357d8dba6e726ed38358eca96dbeb47 (diff)
parent5b1c22529a946a782a8376de2b34c28348d078d1 (diff)
Using polymorphism for world layer storage now, and added demo backdrops
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index b1d9a56..81e0272 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -59,13 +59,11 @@ int Engine::init(void)
// Load game script and entity data
auto* script = systems.system<ScriptSystem>().get();
script->addToGameNamespace("loadFont",
- [this](std::string name, std::string file, int size) {
- systems.system<TextSystem>().get()->loadFont(name, file, size);
- });
+ bindInstance(&TextSystem::loadFont,
+ systems.system<TextSystem>().get()));
script->addToGameNamespace("puts",
- [this](std::string name, float x, float y, std::string text) {
- systems.system<TextSystem>().get()->put(name, x, y, text);
- });
+ bindInstance(&TextSystem::put,
+ systems.system<TextSystem>().get()));
script->init();