diff options
Diffstat (limited to 'engines/fullpipe/inventory.cpp')
-rw-r--r-- | engines/fullpipe/inventory.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 13ac78a358..8424e7e976 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -106,6 +106,17 @@ bool Inventory2::loadPartial(MfcArchive &file) { // Inventory2_SerializePartiall return true; } +bool Inventory2::savePartial(MfcArchive &file) { + file.writeUint32LE(_inventoryItems.size()); + + for (uint i = 0; i < _inventoryItems.size(); i++) { + file.writeUint16LE(_inventoryItems[i]->itemId); + file.writeUint16LE(_inventoryItems[i]->count); + } + + return true; +} + void Inventory2::addItem(int itemId, int count) { if (getInventoryPoolItemIndexById(itemId) >= 0) _inventoryItems.push_back(new InventoryItem(itemId, count)); |