diff options
author | Nipun Garg | 2019-06-18 06:14:29 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:47 +0200 |
commit | 0d3e719b8dd1d1159564f118db74f405a86c500f (patch) | |
tree | 01719e76c5a7f9bf7170273d3e2b3cad285fb521 | |
parent | ca4fb8dd044cac2e4e112f3ee2a3ce80ce341682 (diff) | |
download | scummvm-rg350-0d3e719b8dd1d1159564f118db74f405a86c500f.tar.gz scummvm-rg350-0d3e719b8dd1d1159564f118db74f405a86c500f.tar.bz2 scummvm-rg350-0d3e719b8dd1d1159564f118db74f405a86c500f.zip |
HDB: Add the AI class to hdb.cpp
-rw-r--r-- | engines/hdb/hdb.cpp | 6 | ||||
-rw-r--r-- | engines/hdb/hdb.h | 1 |
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; |