From 2a45bcdaaba672167556f81316c1f69b33f9a226 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sun, 13 May 2007 16:25:18 +0000 Subject: Reverted some changes to inventory handling. svn-id: r26838 --- engines/parallaction/inventory.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/engines/parallaction/inventory.cpp b/engines/parallaction/inventory.cpp index 09c49bb20d..39a89db580 100644 --- a/engines/parallaction/inventory.cpp +++ b/engines/parallaction/inventory.cpp @@ -258,13 +258,12 @@ void extractInventoryGraphics(int16 pos, byte *dst) { void jobShowInventory(void *parm, Job *j) { // printf("job_showInventory()..."); - uint16 slots = 0; - while (_inventory[slots]._id != 0) - slots++; + _numInvLines = 0; + while (_inventory[_numInvLines]._id != 0) _numInvLines++; + _numInvLines = (_numInvLines + 4) / INVENTORY_ITEMS_PER_LINE; - uint16 lines = (slots + 4) / INVENTORY_ITEMS_PER_LINE; + Common::Rect r(INVENTORY_WIDTH, _numInvLines * INVENTORYITEM_HEIGHT); - Common::Rect r(INVENTORY_WIDTH, lines * INVENTORYITEM_HEIGHT); r.moveTo(_invPosition); _vm->_gfx->copyRect( -- cgit v1.2.3