diff options
author | Eugene Sandulenko | 2019-06-26 08:52:37 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:00 +0200 |
commit | aa793bdcfdb95400cc159cac3afe30f0c332cae8 (patch) | |
tree | 211712bb52a926d3be2923ef7b641c3ba472998e /engines/hdb | |
parent | 37a393e9e1f7e4b477caca016be707b82073d932 (diff) | |
download | scummvm-rg350-aa793bdcfdb95400cc159cac3afe30f0c332cae8.tar.gz scummvm-rg350-aa793bdcfdb95400cc159cac3afe30f0c332cae8.tar.bz2 scummvm-rg350-aa793bdcfdb95400cc159cac3afe30f0c332cae8.zip |
HDB: Added more debug output and hid some verbose stubs
Diffstat (limited to 'engines/hdb')
-rw-r--r-- | engines/hdb/ai-cinematic.cpp | 3 | ||||
-rw-r--r-- | engines/hdb/ai-funcs.cpp | 23 | ||||
-rw-r--r-- | engines/hdb/ai-player.cpp | 4 | ||||
-rw-r--r-- | engines/hdb/draw-manager.h | 3 | ||||
-rw-r--r-- | engines/hdb/map-loader.cpp | 4 |
5 files changed, 23 insertions, 14 deletions
diff --git a/engines/hdb/ai-cinematic.cpp b/engines/hdb/ai-cinematic.cpp index 4b906bdf3a..85944a157b 100644 --- a/engines/hdb/ai-cinematic.cpp +++ b/engines/hdb/ai-cinematic.cpp @@ -193,8 +193,7 @@ void AI::processCines() { warning("Can't locate '%s' in moveEntity", _cine[i]->title); } } else { - debug(3, "C_MOVEENTITY: _cine[%d]->e->tileX: %d, _cine[%d]->e->goalX: %d", i, _cine[i]->e->tileX, i, _cine[i]->e->goalX); - debug(3, "C_MOVEENTITY: _cine[%d]->e->tileY: %d, _cine[%d]->e->goalY: %d", i, _cine[i]->e->tileY, i, _cine[i]->e->goalY); + debug(3, "C_MOVEENTITY: %d, %s tileX: %d, goalX: %d tileY %d, goalY: %d", i, AIType2Str(_cine[i]->e->type), _cine[i]->e->tileX, _cine[i]->e->goalX, _cine[i]->e->tileY, _cine[i]->e->goalY); if (!_cine[i]->e->goalX) { complete = true; } diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp index f13e9d575a..c1f7da0ead 100644 --- a/engines/hdb/ai-funcs.cpp +++ b/engines/hdb/ai-funcs.cpp @@ -1209,7 +1209,7 @@ void AI::drawEnts(int x, int y, int w, int h) { case AI_VORTEXIAN: if (e->draw) e->draw->drawMasked(e->x - x + e->drawXOff, e->y - y + e->drawYOff); - debug(1, "STUB: AI::drawEnts: Replace Masked Blitting with Alpha Masked Blitting"); + debug(9, "STUB: AI::drawEnts: Replace Masked Blitting with Alpha Masked Blitting"); break; case AI_GUY: // Draw Player Last break; @@ -1259,16 +1259,21 @@ void AI::drawEnts(int x, int y, int w, int h) { } void AI::drawLevel2Ents() { - int debug = 0; //game.GetDebug(); // FIXME + int debugging = 0; //game.GetDebug(); // FIXME for (int i = 0; i < _numLevel2Ents; i++) { // call custom drawing code? - if (_entsLevel2[i].aiDraw) + if (_entsLevel2[i].aiDraw) { + debug(5, "AI::drawLevel2Ents: entity %s(%d) at %d,%d", AIType2Str(_entsLevel2[i].e->type), _entsLevel2[i].e->type, _entsLevel2[i].x, _entsLevel2[i].y); + _entsLevel2[i].aiDraw(_entsLevel2[i].e, _entsLevel2[i].x, _entsLevel2[i].y); - else if (_entsLevel2[i].draw) + } else if (_entsLevel2[i].draw) { + debug(5, "AI::drawLevel2Ents: tile '%s' at %d,%d", _entsLevel2[i].draw->getName(), _entsLevel2[i].x, _entsLevel2[i].y); + _entsLevel2[i].draw->drawMasked(_entsLevel2[i].x, _entsLevel2[i].y); - else if (debug) + } else if (debugging) { _debugQMark->drawMasked(_entsLevel2[i].x, _entsLevel2[i].y ); + } if (_entsLevel2[i].stunnedWait) g_hdb->_ai->_stunnedGfx[_stunAnim]->drawMasked(_entsLevel2[i].x , _entsLevel2[i].y); @@ -1436,11 +1441,13 @@ AIEntity *AI::legalMove(int tileX, int tileY, int level, int *result) { if (hit && hit->state != STATE_FLOATING) // If player and entity are not at the same level, are they on stairs? - if (hit->level != level) - if (level == 1 && !(bgFlags & kFlagStairTop)) + if (hit->level != level) { + if (level == 1 && !(bgFlags & kFlagStairTop)) { hit = NULL; - else if (level == 1 && !(bgFlags & kFlagStairBot)) + } else if (level == 1 && !(bgFlags & kFlagStairBot)) { hit = NULL; + } + } if (level == 1) { if (bgFlags & kFlagSolid) { diff --git a/engines/hdb/ai-player.cpp b/engines/hdb/ai-player.cpp index 898a20b878..3eda52a411 100644 --- a/engines/hdb/ai-player.cpp +++ b/engines/hdb/ai-player.cpp @@ -128,7 +128,7 @@ void aiPlayerInit2(AIEntity *e) { } void aiPlayerAction(AIEntity *e) { - warning("STUB: AI: aiPlayerAction required"); + debug(9, "STUB: AI: aiPlayerAction required"); } void aiPlayerDraw(AIEntity *e, int mx, int my) { @@ -226,7 +226,7 @@ void aiSergeantInit2(AIEntity *e) { void aiSergeantAction(AIEntity *e) { if (e->goalX) { - warning("AI-PLAYER: aiSergeantAction: Play SND_FOOTSTEPS sounds"); + debug(9, "STUB: AI-PLAYER: aiSergeantAction: Play SND_FOOTSTEPS sounds"); g_hdb->_ai->animateEntity(e); } else g_hdb->_ai->animEntFrames(e); diff --git a/engines/hdb/draw-manager.h b/engines/hdb/draw-manager.h index d63b58256f..05d62453da 100644 --- a/engines/hdb/draw-manager.h +++ b/engines/hdb/draw-manager.h @@ -190,6 +190,8 @@ public: uint _width, _height; + char *getName() { return _name; } + private: char _name[64]; @@ -210,6 +212,7 @@ public: uint32 _flags; + char *getName() { return _name; } private: char _name[64]; diff --git a/engines/hdb/map-loader.cpp b/engines/hdb/map-loader.cpp index 04a5ee6c2f..678c203f51 100644 --- a/engines/hdb/map-loader.cpp +++ b/engines/hdb/map-loader.cpp @@ -702,7 +702,7 @@ void Map::drawGratings() { g_hdb->_drawMan->getTile(_gratings[i]->tile)->drawMasked(_gratings[i]->x, _gratings[i]->y); } - debug(1, "Gratings Count: %d", _numGratings); + debug(8, "Gratings Count: %d", _numGratings); } void Map::drawForegrounds() { @@ -710,7 +710,7 @@ void Map::drawForegrounds() { g_hdb->_drawMan->getTile(_foregrounds[i]->tile)->drawMasked(_foregrounds[i]->x, _foregrounds[i]->y); } - debug(1, "Foregrounds Count: %d", _numForegrounds); + debug(8, "Foregrounds Count: %d", _numForegrounds); } uint32 Map::getMapBGTileFlags(int x, int y) { |