diff options
author | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-10-08 03:03:16 -0400 |
---|---|---|
committer | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-10-08 03:03:16 -0400 |
commit | a422f32613441b5313e4a3bb0fab61f8cb87914c (patch) | |
tree | 0a6c8f17e6a8df0b6c377813fa700064f68ced93 /src/engine.cpp | |
parent | 5f53889d4357d8dba6e726ed38358eca96dbeb47 (diff) | |
parent | 5b1c22529a946a782a8376de2b34c28348d078d1 (diff) |
Using polymorphism for world layer storage now, and added demo backdrops
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 10 |
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(); |