aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/inventory.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2009-05-21 08:06:15 +0000
committerNicola Mettifogo2009-05-21 08:06:15 +0000
commit465da49782171d69e2fa9804c60e260f1e3a8efa (patch)
tree5aa6f0217cb46eb6a77d7a6267c0efbe888a70e5 /engines/parallaction/inventory.cpp
parentf3f0be30fd520550ab286d660210dc099a8a3ced (diff)
downloadscummvm-rg350-465da49782171d69e2fa9804c60e260f1e3a8efa.tar.gz
scummvm-rg350-465da49782171d69e2fa9804c60e260f1e3a8efa.tar.bz2
scummvm-rg350-465da49782171d69e2fa9804c60e260f1e3a8efa.zip
Made BRA demos start again by partially reverting commit 39773. Multiple inventory support must be done somehow differently.
svn-id: r40750
Diffstat (limited to 'engines/parallaction/inventory.cpp')
-rw-r--r--engines/parallaction/inventory.cpp16
1 files changed, 5 insertions, 11 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;
}