summary refs log tree commit diff stats
path: root/src/script_system.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-02-09 22:28:27 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-02-09 22:28:27 -0500
commit5931470800c43260f600303d1231dbaf586f26fc (patch)
treeaaaa30ee6bae81c1badc8b70d2fbdce33a058d5a /src/script_system.cpp
parent315ca2fb388f790791c9ce372cf44e00d51e0e7f (diff)
downloadtanetane-5931470800c43260f600303d1231dbaf586f26fc.tar.gz
tanetane-5931470800c43260f600303d1231dbaf586f26fc.tar.bz2
tanetane-5931470800c43260f600303d1231dbaf586f26fc.zip
Map changing!
Also removed some dependencies on the Renderer. More changes need to be made. Fading to black before the change would be good. And making sure the characters are facing the right direction. Maybe that code shouldn't live in Game, either. Later we also want to combine the tilesets for these two maps (and any others that are on Tanetane).
Diffstat (limited to 'src/script_system.cpp')
-rw-r--r--src/script_system.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/script_system.cpp b/src/script_system.cpp index e2b117a..6e38905 100644 --- a/src/script_system.cpp +++ b/src/script_system.cpp
@@ -50,6 +50,12 @@ ScriptSystem::ScriptSystem(Game& game) : game_(game) {
50 return game_.getSpriteByAlias(alias); 50 return game_.getSpriteByAlias(alias);
51 }); 51 });
52 52
53 engine_.set_function(
54 "loadMap",
55 [&] (std::string filename, std::string warpPoint) {
56 game_.loadMap(filename, warpPoint);
57 });
58
53 engine_.script_file("../res/scripts/common.lua"); 59 engine_.script_file("../res/scripts/common.lua");
54} 60}
55 61