diff options
author | Nipun Garg | 2019-06-07 03:34:56 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:44 +0200 |
commit | c846026ef23b93d71fb9f4528ed0f2c10a1b91a1 (patch) | |
tree | d0be8468c3de93c661ddd4c2555723cbd93662a0 | |
parent | 067275cfeb919763f3172d1ceebd2eda79cc2bcd (diff) | |
download | scummvm-rg350-c846026ef23b93d71fb9f4528ed0f2c10a1b91a1.tar.gz scummvm-rg350-c846026ef23b93d71fb9f4528ed0f2c10a1b91a1.tar.bz2 scummvm-rg350-c846026ef23b93d71fb9f4528ed0f2c10a1b91a1.zip |
HDB: Setup loadMap call in hdb.cpp
-rw-r--r-- | engines/hdb/hdb.cpp | 10 | ||||
-rw-r--r-- | engines/hdb/hdb.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp index f252723fd0..871fe3c5c9 100644 --- a/engines/hdb/hdb.cpp +++ b/engines/hdb/hdb.cpp @@ -44,6 +44,7 @@ HDBGame::HDBGame(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst g_hdb = this; fileMan = new FileMan; lua = new LuaScript; + mapLoader = new MapLoader; DebugMan.addDebugChannel(kDebugExample1, "Example1", "This is just an example to test"); DebugMan.addDebugChannel(kDebugExample2, "Example2", "This is also an example"); @@ -53,6 +54,7 @@ HDBGame::~HDBGame() { delete _console; delete fileMan; delete lua; + delete mapLoader; DebugMan.clearAllDebugChannels(); } @@ -148,6 +150,14 @@ Common::Error HDBGame::run() { lua->initScript(luaStream, "MAP00_DEMO_LUA", luaLength); + Common::SeekableReadStream *mapStream = fileMan->findFirstData("MAP00_DEMO_MSM", TYPE_BINARY); + if (mapStream == NULL) { + debug("The MAP00_DEMO_MSM MPC entry can't be found."); + return Common::kReadingFailed; + } + + mapLoader->loadMap(mapStream); + #if 0 lua->executeFile("test.lua"); #endif diff --git a/engines/hdb/hdb.h b/engines/hdb/hdb.h index a07e77ec0c..a8b863764e 100644 --- a/engines/hdb/hdb.h +++ b/engines/hdb/hdb.h @@ -84,6 +84,7 @@ public: FileMan *fileMan; LuaScript *lua; + MapLoader *mapLoader; // Game related members; |