diff options
author | Nipun Garg | 2019-06-21 03:19:36 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:52 +0200 |
commit | 15c2a946d197e99fb9eb036e23ecb7253c69cab9 (patch) | |
tree | cd107fd668cbbeb0a72aced91c0d0a476f5e987f | |
parent | 949f27872a3efec74f19f8b8508d4b81ffdf1048 (diff) | |
download | scummvm-rg350-15c2a946d197e99fb9eb036e23ecb7253c69cab9.tar.gz scummvm-rg350-15c2a946d197e99fb9eb036e23ecb7253c69cab9.tar.bz2 scummvm-rg350-15c2a946d197e99fb9eb036e23ecb7253c69cab9.zip |
HDB: Modify _inventory to an array of InvEnt*
-rw-r--r-- | engines/hdb/ai-funcs.cpp | 2 | ||||
-rw-r--r-- | engines/hdb/ai-inventory.cpp | 2 | ||||
-rw-r--r-- | engines/hdb/ai.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp index cd13505041..8e2db69d93 100644 --- a/engines/hdb/ai-funcs.cpp +++ b/engines/hdb/ai-funcs.cpp @@ -558,7 +558,7 @@ void AI::initAllEnts() { } for (int i = 0; i < _numInventory; i++) { - AIEntity *temp = _inventory[i].ent; + AIEntity *temp = _inventory[i]->ent; // Clear out all ptrs in entity before writing for (int j = 0; i < kMaxAnimFrames; i++) { diff --git a/engines/hdb/ai-inventory.cpp b/engines/hdb/ai-inventory.cpp index d050b3cfaf..ea23dd2295 100644 --- a/engines/hdb/ai-inventory.cpp +++ b/engines/hdb/ai-inventory.cpp @@ -61,7 +61,7 @@ bool AI::addToInventory(AIEntity *e) { return false; } - memcpy(&_inventory[_numInventory].ent, e, sizeof(AIEntity)); + _inventory[_numInventory]->ent = e; _numInventory++; // If weapon, ready it diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h index 63eefc745f..89491b6e7b 100644 --- a/engines/hdb/ai.h +++ b/engines/hdb/ai.h @@ -720,7 +720,7 @@ private: int _numGooCups; int _numMonkeystones; - InvEnt _inventory[kMaxInventory]; + InvEnt *_inventory[kMaxInventory]; int _numInventory; Waypoint _waypoints[kMaxWaypoints]; |