diff options
author | Nicola Mettifogo | 2008-07-28 11:50:36 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2008-07-28 11:50:36 +0000 |
commit | a1557bd776c9335b36313860d437bc8b1ef2a936 (patch) | |
tree | 7bcb7e7104780cb1e27d468af69ed8d382c101b6 /engines/parallaction/parallaction_ns.cpp | |
parent | fb388deb99be4c1457dd052382c32a05dfc4b528 (diff) | |
download | scummvm-rg350-a1557bd776c9335b36313860d437bc8b1ef2a936.tar.gz scummvm-rg350-a1557bd776c9335b36313860d437bc8b1ef2a936.tar.bz2 scummvm-rg350-a1557bd776c9335b36313860d437bc8b1ef2a936.zip |
Pick up/drop/open/close actions are now available in game.
svn-id: r33371
Diffstat (limited to 'engines/parallaction/parallaction_ns.cpp')
-rw-r--r-- | engines/parallaction/parallaction_ns.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp index 5b5c9f6871..851fe38138 100644 --- a/engines/parallaction/parallaction_ns.cpp +++ b/engines/parallaction/parallaction_ns.cpp @@ -34,6 +34,7 @@ namespace Parallaction { + #define MOUSEARROW_WIDTH 16 #define MOUSEARROW_HEIGHT 16 @@ -165,7 +166,6 @@ Parallaction_ns::~Parallaction_ns() { delete _locationParser; delete _programParser; - delete _mouseComposedArrow; _location._animations.remove(_char._ani); @@ -182,7 +182,7 @@ void Parallaction_ns::freeFonts() { } void Parallaction_ns::initCursors() { - _mouseComposedArrow = _disk->loadPointer("pointer"); + _comboArrow = _disk->loadPointer("pointer"); _mouseArrow = _resMouseArrow; } @@ -197,21 +197,13 @@ void Parallaction_ns::setArrowCursor() { _system->setMouseCursor(_mouseArrow, MOUSEARROW_WIDTH, MOUSEARROW_HEIGHT, 0, 0, 0); } -void Parallaction_ns::setInventoryCursor(int pos) { - - if (pos == -1) - return; - - const InventoryItem *item = getInventoryItem(pos); - if (item->_index == 0) - return; - - _input->_activeItem._id = item->_id; +void Parallaction_ns::setInventoryCursor(ItemName name) { + assert(name > 0); - byte *v8 = _mouseComposedArrow->getData(0); + byte *v8 = _comboArrow->getData(0); // FIXME: destination offseting is not clear - _inventoryRenderer->drawItem(item->_index, v8 + 7 * MOUSECOMBO_WIDTH + 7, MOUSECOMBO_WIDTH); + _inventoryRenderer->drawItem(name, v8 + 7 * MOUSECOMBO_WIDTH + 7, MOUSECOMBO_WIDTH); _system->setMouseCursor(v8, MOUSECOMBO_WIDTH, MOUSECOMBO_HEIGHT, 0, 0, 0); } |