diff options
author | Nicola Mettifogo | 2009-05-21 08:06:15 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2009-05-21 08:06:15 +0000 |
commit | 465da49782171d69e2fa9804c60e260f1e3a8efa (patch) | |
tree | 5aa6f0217cb46eb6a77d7a6267c0efbe888a70e5 | |
parent | f3f0be30fd520550ab286d660210dc099a8a3ced (diff) | |
download | scummvm-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
-rw-r--r-- | engines/parallaction/inventory.cpp | 16 | ||||
-rw-r--r-- | engines/parallaction/parallaction.h | 2 | ||||
-rw-r--r-- | engines/parallaction/parallaction_br.cpp | 3 |
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; |