aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb/ai-funcs.cpp
diff options
context:
space:
mode:
authorNipun Garg2019-07-14 02:56:11 +0530
committerEugene Sandulenko2019-09-03 17:17:20 +0200
commita3ba287c1e45b39b9401601eaa04177cdf0b921c (patch)
tree67c4595a3bb90393ad1579c60ab0673ea92d60ca /engines/hdb/ai-funcs.cpp
parentc31217f1ee471278115006afd6f6c6a5a8b95705 (diff)
downloadscummvm-rg350-a3ba287c1e45b39b9401601eaa04177cdf0b921c.tar.gz
scummvm-rg350-a3ba287c1e45b39b9401601eaa04177cdf0b921c.tar.bz2
scummvm-rg350-a3ba287c1e45b39b9401601eaa04177cdf0b921c.zip
HDB: Add code for drawing Debug Mark
Diffstat (limited to 'engines/hdb/ai-funcs.cpp')
-rw-r--r--engines/hdb/ai-funcs.cpp7
1 files changed, 5 insertions, 2 deletions
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 );
}