diff options
author | Eugene Sandulenko | 2014-02-01 14:46:14 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-02-01 16:55:44 +0200 |
commit | b668304f064c7798e382373adc210e57e5ce6a8f (patch) | |
tree | ba12f26773ea83b78a8e6e566b9b1820d0329984 | |
parent | 86d5e8bd6820aee3c124bf0d4c6c25ba31bd42e0 (diff) | |
download | scummvm-rg350-b668304f064c7798e382373adc210e57e5ce6a8f.tar.gz scummvm-rg350-b668304f064c7798e382373adc210e57e5ce6a8f.tar.bz2 scummvm-rg350-b668304f064c7798e382373adc210e57e5ce6a8f.zip |
FULLPIPE: Implement Inventory2::removeItem2()
-rw-r--r-- | engines/fullpipe/inventory.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index f9255a553b..cf12a8279c 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -123,7 +123,25 @@ void Inventory2::removeItem(int itemId, int count) { } void Inventory2::removeItem2(Scene *sceneObj, int itemId, int x, int y, int priority) { - warning("STUB: void removeItem2(sc, %d, %d, %d, %d)", itemId, x, y, priority); + int idx = getInventoryItemIndexById(itemId); + + if (idx >= 0) { + if (_inventoryItems[idx]->itemId >> 16) { + removeItem(itemId, 1); + + Scene *sc = g_fp->accessScene(_sceneId); + + if (sc) { + StaticANIObject *ani = new StaticANIObject(sc->getStaticANIObject1ById(itemId, -1)); + + sceneObj->addStaticANIObject(ani, 1); + + ani->_statics = (Statics *)ani->_staticsList[0]; + ani->setOXY(x, y); + ani->_priority = priority; + } + } + } } int Inventory2::getCountItemsWithId(int itemId) { |