aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-07-12 05:01:10 +0530
committerEugene Sandulenko2019-09-03 17:17:17 +0200
commitb032068417a11599bbcca52ccef5cce04b789633 (patch)
treec298af59e2a06a46e72817e31eee041a620e39f1
parentee9de9157c078885e0886c117e3c12f631176624 (diff)
downloadscummvm-rg350-b032068417a11599bbcca52ccef5cce04b789633.tar.gz
scummvm-rg350-b032068417a11599bbcca52ccef5cce04b789633.tar.bz2
scummvm-rg350-b032068417a11599bbcca52ccef5cce04b789633.zip
HDB: Add HDBGame::start() and remove AI::clearP...
...ersistent() placeholder
-rw-r--r--engines/hdb/ai-init.cpp5
-rw-r--r--engines/hdb/hdb.cpp6
-rw-r--r--engines/hdb/hdb.h1
-rw-r--r--engines/hdb/menu.cpp5
4 files changed, 8 insertions, 9 deletions
diff --git a/engines/hdb/ai-init.cpp b/engines/hdb/ai-init.cpp
index 5eeff2bd8c..95498dc17b 100644
--- a/engines/hdb/ai-init.cpp
+++ b/engines/hdb/ai-init.cpp
@@ -905,9 +905,6 @@ AI::AI() {
_triggerList = new Common::Array<Trigger *>;
_hereList = new Common::Array<HereT *>;
- warning("REMOVE: Remove for final. Used here due to lack of a MENU");
- _numGems = _numGooCups = _numMonkeystones = _numInventory = _numDeliveries = 0;
-
_stunAnim = 0;
_stunTimer = g_system->getMillis();
}
@@ -1031,7 +1028,7 @@ bool AI::init() {
}
void AI::clearPersistent() {
- _numGems = _numGooCups = _numMonkeystones = 0;
+ _numGems = _numGooCups = _numMonkeystones = _numInventory = _numDeliveries = 0;
}
const char *AI::funcLookUp(void(*function)(AIEntity *e)) {
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp
index 534c6225d6..357aa984c0 100644
--- a/engines/hdb/hdb.cpp
+++ b/engines/hdb/hdb.cpp
@@ -167,6 +167,10 @@ void HDBGame::changeGameState() {
}
}
+void HDBGame::start() {
+ _gameState = GAME_TITLE;
+}
+
bool HDBGame::restartMap() {
if (!_currentMapname[0])
return false;
@@ -729,6 +733,8 @@ Common::Error HDBGame::run() {
initGraphics(kScreenWidth, kScreenHeight, &_format);
_console = new Console();
+ start();
+
#if 0
Common::SeekableReadStream *titleStream = _fileMan->findFirstData("monkeylogoscreen", TYPE_PIC);
if (titleStream == NULL) {
diff --git a/engines/hdb/hdb.h b/engines/hdb/hdb.h
index 4e0ea0d725..9ba967a917 100644
--- a/engines/hdb/hdb.h
+++ b/engines/hdb/hdb.h
@@ -164,6 +164,7 @@ public:
void save(Common::OutSaveFile *out);
void loadSaveFile(Common::InSaveFile *in);
+ void start();
bool restartMap();
bool startMap(const char *name);
diff --git a/engines/hdb/menu.cpp b/engines/hdb/menu.cpp
index e03724fe67..11c8817c84 100644
--- a/engines/hdb/menu.cpp
+++ b/engines/hdb/menu.cpp
@@ -704,11 +704,6 @@ void Menu::freeMenu() {
}
bool Menu::startTitle() {
- // Defaults the game into Action Mode
- warning("REMOVE: Putting this here since Menu hasn't been implemented yet");
- g_hdb->setActionMode(1);
- g_hdb->setGameState(GAME_PLAY);
-
int i;
readConfig();