aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/hdb/hdb.cpp10
-rw-r--r--engines/hdb/hdb.h1
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;