diff options
author | Nipun Garg | 2019-06-28 19:59:19 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:03 +0200 |
commit | 4c5cb8bafea28df61afd54d568a5b2b60961723d (patch) | |
tree | 6851869b3467a72e082516d6df017652cafc6e6e /engines/hdb/hdb.cpp | |
parent | 2d7ab33be2f820ce0c7c8215cabbb8e1237a449b (diff) | |
download | scummvm-rg350-4c5cb8bafea28df61afd54d568a5b2b60961723d.tar.gz scummvm-rg350-4c5cb8bafea28df61afd54d568a5b2b60961723d.tar.bz2 scummvm-rg350-4c5cb8bafea28df61afd54d568a5b2b60961723d.zip |
HDB: Add _gameState check
Diffstat (limited to 'engines/hdb/hdb.cpp')
-rw-r--r-- | engines/hdb/hdb.cpp | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp index a00d89ed1a..9e41924c0c 100644 --- a/engines/hdb/hdb.cpp +++ b/engines/hdb/hdb.cpp @@ -99,6 +99,7 @@ bool HDBGame::init() { // Defaults the game into Action Mode setActionMode(1); + start(); _gameShutdown = false; _systemInit = true; @@ -106,7 +107,8 @@ bool HDBGame::init() { } void HDBGame::start() { - _gameState = GAME_TITLE; + warning("REMOVE: _gameState initialized to GAME_PLAY"); + _gameState = GAME_PLAY; } /* @@ -237,7 +239,7 @@ Common::Error HDBGame::run() { initGraphics(kScreenWidth, kScreenHeight, &_format); _console = new Console(); - +#if 0 Common::SeekableReadStream *titleStream = _fileMan->findFirstData("monkeylogoscreen", TYPE_PIC); if (titleStream == NULL) { debug("The TitleScreen MPC entry can't be found."); @@ -255,6 +257,7 @@ Common::Error HDBGame::run() { Tile *tile = new Tile; tile->load(tileStream); +#endif Common::SeekableReadStream *luaStream = _fileMan->findFirstData("MAP00_LUA", TYPE_BINARY); int32 luaLength = _fileMan->getLength("MAP00_LUA", TYPE_BINARY); @@ -298,36 +301,38 @@ Common::Error HDBGame::run() { } } - _drawMan->drawSky(); + if (_gameState == GAME_PLAY) { + _drawMan->drawSky(); - debug(9, "STUB: HDBGame::run: Add check for pause flag"); + debug(9, "STUB: HDBGame::run: Add check for pause flag"); - _ai->moveEnts(); - _ai->processCallbackList(); + _ai->moveEnts(); + _ai->processCallbackList(); - _map->draw(); - _ai->processCines(); - //_window->drawDialog(); + _map->draw(); + _ai->processCines(); + //_window->drawDialog(); - AIEntity *e = _ai->getPlayer(); + AIEntity *e = _ai->getPlayer(); - if (e && e->level < 2) - _ai->drawWayPoints(); + if (e && e->level < 2) + _ai->drawWayPoints(); - _map->drawEnts(); - _map->drawGratings(); + _map->drawEnts(); + _map->drawGratings(); - if (e && e->level == 2) - _ai->drawWayPoints(); + if (e && e->level == 2) + _ai->drawWayPoints(); - _ai->drawLevel2Ents(); + _ai->drawLevel2Ents(); - _map->drawForegrounds(); - _ai->animateTargets(); + _map->drawForegrounds(); + _ai->animateTargets(); - _window->drawDialog(); - _window->drawInventory(); - _window->drawTextOut(); + _window->drawDialog(); + _window->drawInventory(); + _window->drawTextOut(); + } // Update Timer that's NOT used for in-game Timing _prevTimeSlice = _timeSlice; |