From 769b2fed4625828e7572f96d95727f79ad34f79e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 18 Apr 2005 10:26:43 +0000 Subject: o Unstubbed sfPreDialog -- we have enough code for that o Started to restore inventory functionality svn-id: r17666 --- saga/interface.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'saga/interface.cpp') diff --git a/saga/interface.cpp b/saga/interface.cpp index 59913ad018..825fa98258 100644 --- a/saga/interface.cpp +++ b/saga/interface.cpp @@ -533,7 +533,6 @@ void Interface::removeFromInventory(int sprite) { void Interface::drawInventory() { if (_panelMode != kPanelMain) return; -/* SURFACE *back_buf = _vm->_gfx->getBackBuffer(); // TODO: Inventory scrolling @@ -548,14 +547,14 @@ void Interface::drawInventory() { Point drawPoint; for (int i = 0; i < _inventoryCount; i++) { - if (_inventory[i] >= ARRAYSIZE(ObjectTable)) { + if (!_vm->_actor->validObjId(_vm->_actor->objIndexToId(_inventory[i]))) { continue; } drawPoint.x = x + col * width; drawPoint.y = y + row * height; _vm->_sprite->draw(back_buf, _vm->_sprite->_mainSprites, - ObjectTable[_inventory[i]].spritelistRn, + _vm->_actor->getObj(_vm->_actor->objIndexToId(_inventory[i]))->spritelistRn, drawPoint, 256); if (++col >= _vm->getDisplayInfo().inventoryColumns) { @@ -564,7 +563,7 @@ void Interface::drawInventory() { } col = 0; } - }*/ + } } int Interface::inventoryTest(const Point& imousePt, int *ibutton) { -- cgit v1.2.3