From a3ba287c1e45b39b9401601eaa04177cdf0b921c Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Sun, 14 Jul 2019 02:56:11 +0530 Subject: HDB: Add code for drawing Debug Mark --- engines/hdb/ai-funcs.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'engines/hdb/ai-funcs.cpp') diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp index dea37fe45a..e5923ed9f0 100644 --- a/engines/hdb/ai-funcs.cpp +++ b/engines/hdb/ai-funcs.cpp @@ -1647,6 +1647,7 @@ void AI::animEntFrames(AIEntity *e) { void AI::drawEnts(int x, int y, int w, int h) { + int debugFlag = g_hdb->getDebug(); static int stunAnim = 0; static uint32 stunTimer = g_hdb->getTimeSlice(); @@ -1730,6 +1731,8 @@ void AI::drawEnts(int x, int y, int w, int h) { debugN(5, "at %d %d", e->x, e->y); e->draw->drawMasked(e->x - x + e->drawXOff, e->y - y + e->drawYOff); + } else if (debugFlag) { + _debugQMark->drawMasked(e->x - x, e->y - y); } else { debugN(5, "no draw function"); } @@ -1759,7 +1762,7 @@ void AI::drawEnts(int x, int y, int w, int h) { } void AI::drawLevel2Ents() { - int debugging = g_hdb->getDebug(); + int debugFlag = g_hdb->getDebug(); for (int i = 0; i < _numLevel2Ents; i++) { // call custom drawing code? @@ -1771,7 +1774,7 @@ void AI::drawLevel2Ents() { 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 (debugging) { + } else if (debugFlag) { _debugQMark->drawMasked(_entsLevel2[i].x, _entsLevel2[i].y ); } -- cgit v1.2.3