diff options
author | Eugene Sandulenko | 2013-09-15 22:29:00 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-09-15 22:29:22 +0300 |
commit | 2196916b62777e9c2b3ad87d1e542ec11a8c3d4b (patch) | |
tree | 1ea7faa96f6a86ecf6e98445cdf3009a6e015e62 /engines/fullpipe/inventory.cpp | |
parent | e2a8dc1b2f1d634a844848ff7bc5793d616dfc78 (diff) | |
download | scummvm-rg350-2196916b62777e9c2b3ad87d1e542ec11a8c3d4b.tar.gz scummvm-rg350-2196916b62777e9c2b3ad87d1e542ec11a8c3d4b.tar.bz2 scummvm-rg350-2196916b62777e9c2b3ad87d1e542ec11a8c3d4b.zip |
FULLPIPE: Implement FullpipeEngine::defHandleKeyDown()
Diffstat (limited to 'engines/fullpipe/inventory.cpp')
-rw-r--r-- | engines/fullpipe/inventory.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 1e229f3408..ccedb57ce2 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -138,6 +138,10 @@ int CInventory2::getInventoryItemIndexById(int itemId) { return -1; } +int CInventory2::getInventoryPoolItemIdAtIndex(int itemId) { + return _itemsPool[itemId]->id; +} + int CInventory2::getInventoryPoolItemFieldCById(int itemId) { for (uint i = 0; i < _itemsPool.size(); i++) { if (_itemsPool[i]->id == itemId) @@ -417,4 +421,17 @@ int CInventory2::getHoveredItem(Common::Point *point) { return 0; } +void FullpipeEngine::getAllInventory() { + CInventory2 *inv = getGameLoaderInventory(); + + for (uint i = 0; i < inv->getItemsPoolCount(); ++i ) { + int id = inv->getInventoryPoolItemIdAtIndex(i); + + if (inv->getCountItemsWithId(id) < 1) + inv->addItem(id, 1); + } + + inv->rebuildItemRects(); +} + } // End of namespace Fullpipe |