aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/hdb.cpp6
-rw-r--r--engines/hdb/hdb.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp
index d7df7ef981..03e5d694b3 100644
--- a/engines/hdb/hdb.cpp
+++ b/engines/hdb/hdb.cpp
@@ -46,6 +46,7 @@ HDBGame::HDBGame(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst
_drawMan = new DrawMan;
_lua = new LuaScript;
_map = new Map;
+ _ai = new AI;
_rnd = new Common::RandomSource("hdb");
DebugMan.addDebugChannel(kDebugExample1, "Example1", "This is just an example to test");
@@ -58,6 +59,7 @@ HDBGame::~HDBGame() {
delete _drawMan;
delete _lua;
delete _map;
+ delete _ai;
delete _rnd;
DebugMan.clearAllDebugChannels();
@@ -74,6 +76,10 @@ bool HDBGame::init() {
error("FileMan::openMPC: Cannot find the hyperspace.mpc data file.");
return false;
}
+ if (!_ai->init()) {
+ error("AI::init: Couldn't initialize AI");
+ return false;
+ }
if (!_drawMan->init()) {
error("DrawMan::init: Couldn't initialize DrawMan");
return false;
diff --git a/engines/hdb/hdb.h b/engines/hdb/hdb.h
index 613a1cdf39..f548bed92e 100644
--- a/engines/hdb/hdb.h
+++ b/engines/hdb/hdb.h
@@ -101,6 +101,7 @@ public:
DrawMan *_drawMan;
LuaScript *_lua;
Map *_map;
+ AI *_ai;
// Random Source
Common::RandomSource *_rnd;