aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/fullpipe/inventory.cpp')
-rw-r--r--engines/fullpipe/inventory.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp
index 588b465415..877f260e57 100644
--- a/engines/fullpipe/inventory.cpp
+++ b/engines/fullpipe/inventory.cpp
@@ -47,7 +47,10 @@ bool CInventory::load(MfcArchive &file) {
}
int CInventory::getInventoryPoolItemIndexById(int itemId) {
- for (int i = 0; i < _itemsPool.size(); i++) {
+ if (_itemsPool.size() <= 0)
+ return -1;
+
+ for (uint i = 0; i < _itemsPool.size(); i++) {
if (_itemsPool[i].id == itemId)
return i;
}
@@ -55,6 +58,17 @@ int CInventory::getInventoryPoolItemIndexById(int itemId) {
return 0;
}
+bool CInventory::setItemFlags(int itemId, int flags) {
+ int idx = getInventoryPoolItemIndexById(itemId);
+
+ if (idx < 0)
+ return false;
+ else
+ _itemsPool[idx].flags = flags;
+
+ return true;
+}
+
CInventory2::CInventory2() {
_selectedId = -1;
_field_48 = -1;
@@ -78,4 +92,12 @@ bool CInventory2::loadPartial(MfcArchive &file) { // CInventory2_SerializePartia
return true;
}
+void CInventory2::addItem(int itemId, int value) {
+ warning("STUB: CInventory2::addItem");
+}
+
+void CInventory2::rebuildItemRects() {
+ g_fullpipe->accessScene(_sceneId);
+}
+
} // End of namespace Fullpipe