From 5931470800c43260f600303d1231dbaf586f26fc Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 9 Feb 2021 22:28:27 -0500 Subject: 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). --- src/script_system.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/script_system.cpp') 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) { return game_.getSpriteByAlias(alias); }); + engine_.set_function( + "loadMap", + [&] (std::string filename, std::string warpPoint) { + game_.loadMap(filename, warpPoint); + }); + engine_.script_file("../res/scripts/common.lua"); } -- cgit 1.4.1