aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-06-21 09:46:07 +0530
committerEugene Sandulenko2019-09-03 17:16:54 +0200
commita56dca47f85cc12b60ed3a3702fd5ac44a337b4e (patch)
tree42125a7c76a50532288dad3c2e6c75314300a346
parentb913a3632d80dfed276c325de8cae622f35873ff (diff)
downloadscummvm-rg350-a56dca47f85cc12b60ed3a3702fd5ac44a337b4e.tar.gz
scummvm-rg350-a56dca47f85cc12b60ed3a3702fd5ac44a337b4e.tar.bz2
scummvm-rg350-a56dca47f85cc12b60ed3a3702fd5ac44a337b4e.zip
HDB: Unstub 'Draw Floating Entities'
-rw-r--r--engines/hdb/ai-funcs.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp
index 5105aa76b9..32bd8a65b4 100644
--- a/engines/hdb/ai-funcs.cpp
+++ b/engines/hdb/ai-funcs.cpp
@@ -926,7 +926,18 @@ void AI::drawEnts(int x, int y, int w, int h) {
static int stunAnim = 0;
// Draw Floating Entities
- warning("STUB: AI::drawEnts: Draw Floating Entities");
+ for (Common::Array<AIEntity *>::iterator it = _floats->begin(); it != _floats->end(); it++) {
+ AIEntity *e = (*it);
+ if (e->aiDraw) {
+ e->aiDraw(e, x, y);
+ }
+
+ if ((e->x > x - kTileWidth) && (e->x < x + w) && (e->y > y - kTileHeight) && (e->y < y + h)) {
+ e->draw->drawMasked(e->x - x + e->drawXOff, e->y - y + e->drawYOff);
+ e->onScreen = 1;
+ } else
+ e->onScreen = 0;
+ }
// Draw all other Ents
_numLevel2Ents = 0;