aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-06-20 19:03:40 +0530
committerEugene Sandulenko2019-09-03 17:16:52 +0200
commit3fc0cb74b123bb6b854534fdc48a0ae4d9440710 (patch)
tree5c7e7d353afd1ef4390e56c212d50a739a346ec9
parent28e8f3d789cb0cf14650ec014cbdc9ea2b8e0172 (diff)
downloadscummvm-rg350-3fc0cb74b123bb6b854534fdc48a0ae4d9440710.tar.gz
scummvm-rg350-3fc0cb74b123bb6b854534fdc48a0ae4d9440710.tar.bz2
scummvm-rg350-3fc0cb74b123bb6b854534fdc48a0ae4d9440710.zip
HDB: Remove 'Cache Graphics for Inventory' stub
-rw-r--r--engines/hdb/ai-funcs.cpp36
-rw-r--r--engines/hdb/ai-init.cpp2
2 files changed, 36 insertions, 2 deletions
diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp
index 6ccc982761..b07399ffa1 100644
--- a/engines/hdb/ai-funcs.cpp
+++ b/engines/hdb/ai-funcs.cpp
@@ -551,7 +551,41 @@ void AI::initAllEnts() {
}
}
- warning("STUB: initAllEnts: Cache graphics for Inventory and Deliveries");
+ for (int i = 0; i < _numInventory; i++) {
+ AIEntity *temp = &_inventory[i].ent;
+
+ // Clear out all ptrs in entity before writing
+ for (int j = 0; i < kMaxAnimFrames; i++) {
+ temp->blinkGfx[j] = NULL;
+ temp->movedownGfx[j] = NULL;
+ temp->moveupGfx[j] = NULL;
+ temp->moveleftGfx[j] = NULL;
+ temp->moverightGfx[j] = NULL;
+ temp->standdownGfx[j] = NULL;
+ temp->standupGfx[j] = NULL;
+ temp->standleftGfx[j] = NULL;
+ temp->standrightGfx[j] = NULL;
+ temp->special1Gfx[j] = NULL;
+ }
+
+ temp->blinkFrames = 0;
+ temp->movedownFrames = 0;
+ temp->moveupFrames = 0;
+ temp->moveleftFrames = 0;
+ temp->moverightFrames = 0;
+ temp->standdownFrames = 0;
+ temp->standupFrames = 0;
+ temp->standleftFrames = 0;
+ temp->standrightFrames = 0;
+
+ temp->draw = NULL;
+ temp->aiDraw = NULL;
+ temp->aiAction = temp->aiInit = temp->aiUse = NULL;
+
+ cacheEntGfx(temp, false);
+ }
+
+ warning("STUB: initAllEnts: Cache graphics for Deliveries");
warning("STUB: initAllEnts: LaserScan required");
}
diff --git a/engines/hdb/ai-init.cpp b/engines/hdb/ai-init.cpp
index 812b51043f..fcb371a03b 100644
--- a/engines/hdb/ai-init.cpp
+++ b/engines/hdb/ai-init.cpp
@@ -669,7 +669,7 @@ AIEntTypeInfo aiEntList[] = {
AI::AI() {
_ents = new Common::Array<AIEntity *>;
// REMOVE: Remove for final. Used here due to lack of a MENU
- _numGems = _numGooCups = _numMonkeystones = 0;
+ _numGems = _numGooCups = _numMonkeystones = _numInventory = 0;
}
AI::~AI() {