From 465da49782171d69e2fa9804c60e260f1e3a8efa Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Thu, 21 May 2009 08:06:15 +0000 Subject: Made BRA demos start again by partially reverting commit 39773. Multiple inventory support must be done somehow differently. svn-id: r40750 --- engines/parallaction/inventory.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'engines/parallaction/inventory.cpp') 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; } -- cgit v1.2.3