aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/parallaction/inventory.cpp16
-rw-r--r--engines/parallaction/parallaction.h2
-rw-r--r--engines/parallaction/parallaction_br.cpp3
3 files changed, 6 insertions, 15 deletions
diff --git a/engines/parallaction/inventory.cpp b/engines/parallaction/inventory.cpp
index c7fc6b9cf2..b9d702ea5c 100644
--- a/engines/parallaction/inventory.cpp
+++ b/engines/parallaction/inventory.cpp
@@ -351,13 +351,11 @@ void Parallaction_ns::initInventory() {
}
void Parallaction_br::initInventory() {
- for (int i = 0; i < 3; ++i) {
- _inventory[i] = new Inventory(&_invProps_BR, _verbs_BR);
- assert(_inventory[i]);
- }
+ _inventory = new Inventory(&_invProps_BR, _verbs_BR);
+ assert(_inventory);
_inventoryRenderer = new InventoryRenderer(this, &_invProps_BR);
assert(_inventoryRenderer);
- // don't bind here, wait for changeCharacter()
+ _inventoryRenderer->bindInventory(_inventory);
}
void Parallaction_ns::destroyInventory() {
@@ -369,12 +367,8 @@ void Parallaction_ns::destroyInventory() {
void Parallaction_br::destroyInventory() {
delete _inventoryRenderer;
- delete _inventory[0];
- delete _inventory[1];
- delete _inventory[2];
- _inventory[0] = 0;
- _inventory[1] = 0;
- _inventory[2] = 0;
+ delete _inventory;
+ _inventory = 0;
_inventoryRenderer = 0;
}
diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h
index b5ba60a089..43d22c2f36 100644
--- a/engines/parallaction/parallaction.h
+++ b/engines/parallaction/parallaction.h
@@ -547,7 +547,7 @@ private:
LocationParser_br *_locationParser;
ProgramParser_br *_programParser;
SoundMan_br *_soundManI;
- Inventory *_inventory[3];
+ Inventory *_inventory;
int32 _counters[32];
Table *_countersNames;
diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp
index 562eb06266..18f0abb909 100644
--- a/engines/parallaction/parallaction_br.cpp
+++ b/engines/parallaction/parallaction_br.cpp
@@ -455,9 +455,6 @@ void Parallaction_br::changeCharacter(const char *name) {
_char.setName(name);
_char._ani->gfxobj = _gfx->loadCharacterAnim(name);
_char._talk = _disk->loadTalk(name);
-
- // TODO: select the inventory according to character
- _inventoryRenderer->bindInventory(_inventory[0]);
}
_char._ani->_flags |= kFlagsActive;