From 3eab2731cdf60574b9ecddb09b5a8ad4a02a566b Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 3 Jul 2019 18:12:05 +0200 Subject: HDB: Implement loadMap() --- engines/hdb/hdb.cpp | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'engines/hdb/hdb.cpp') diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp index 9eaf120813..1f2f58bda2 100644 --- a/engines/hdb/hdb.cpp +++ b/engines/hdb/hdb.cpp @@ -106,7 +106,7 @@ bool HDBGame::init() { error("Input::init: Couldn't initialize Input"); } if (!_lua->init()) { - error("LuaScript::init: Couldn't load the GLOBAL_LUA code."); + error("LuaScript::init: Couldn't load the GLOBAL.LUA code."); } _menu->init(); @@ -192,7 +192,7 @@ bool HDBGame::restartMap() { return true; } -bool HDBGame::startMap(char *name) { +bool HDBGame::startMap(const char *name) { // save last mapname strcpy(_lastMapname, _currentMapname); @@ -503,18 +503,7 @@ Common::Error HDBGame::run() { tile->load(tileStream); #endif - _lua->loadLua("MAP00_LUA"); - - _lua->callFunction("level_loaded", 0); - - Common::SeekableReadStream *mapStream = _fileMan->findFirstData("MAP00_MSM", TYPE_BINARY); - if (mapStream == NULL) { - debug("The MAP00_MSM MPC entry can't be found."); - return Common::kReadingFailed; - } - - _map->load(mapStream); - _ai->initAnimInfo(); + startMap("MAP00"); //_window->openDialog("Sgt. Filibuster", 0, "You address me as 'sarge' or 'sergeant' or get your snappin' teeth kicked in! Got me?", 0, NULL); -- cgit v1.2.3