aboutsummaryrefslogtreecommitdiff
path: root/engines/illusions/bbdou/bbdou_inventory.h
diff options
context:
space:
mode:
authorjohndoe1232014-03-28 21:53:21 +0100
committerEugene Sandulenko2018-07-20 06:43:33 +0000
commit3b3f84c764f8cab8f54b06bbafc607cfb6899fdd (patch)
tree8ef0d8e3af51b7e0a4f232e36c250aa89aeae655 /engines/illusions/bbdou/bbdou_inventory.h
parent33d28deb690c79a6aca190c5b1bc998c39d95662 (diff)
downloadscummvm-rg350-3b3f84c764f8cab8f54b06bbafc607cfb6899fdd.tar.gz
scummvm-rg350-3b3f84c764f8cab8f54b06bbafc607cfb6899fdd.tar.bz2
scummvm-rg350-3b3f84c764f8cab8f54b06bbafc607cfb6899fdd.zip
ILLUSIONS: Implement inventory
- Implement cursor camera tracking - Various bugfixes
Diffstat (limited to 'engines/illusions/bbdou/bbdou_inventory.h')
-rw-r--r--engines/illusions/bbdou/bbdou_inventory.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/engines/illusions/bbdou/bbdou_inventory.h b/engines/illusions/bbdou/bbdou_inventory.h
index 31023c063a..a983212114 100644
--- a/engines/illusions/bbdou/bbdou_inventory.h
+++ b/engines/illusions/bbdou/bbdou_inventory.h
@@ -24,6 +24,7 @@
#define ILLUSIONS_BBDOU_BBDOU_INVENTORY_H
#include "illusions/specialcode.h"
+#include "common/array.h"
#include "common/rect.h"
namespace Illusions {
@@ -32,6 +33,68 @@ class IllusionsEngine;
class BbdouSpecialCode;
class Control;
+struct InventoryItem {
+ uint32 _objectId;
+ uint32 _sequenceId;
+ bool _assigned;
+ bool _flag;
+ int _timesPresent;
+ int _fieldE;
+ InventoryItem(uint32 objectId, uint32 sequenceId);
+};
+
+struct InventorySlot {
+ uint32 _namedPointId;
+ uint32 _objectId;
+ InventoryItem *_inventoryItem;
+ InventorySlot(uint32 namedPointId);
+};
+
+class InventoryBag {
+public:
+ InventoryBag(IllusionsEngine *vm, uint32 sceneId);
+ void registerInventorySlot(uint32 namedPointId);
+ bool addInventoryItem(InventoryItem *inventoryItem, InventorySlot *inventorySlot);
+ void removeInventoryItem(InventoryItem *inventoryItem);
+ void buildItems();
+protected:
+public:
+ typedef Common::Array<InventorySlot*> InventorySlots;
+ typedef InventorySlots::iterator InventorySlotsIterator;
+ IllusionsEngine *_vm;
+ uint32 _sceneId;
+ InventorySlots _inventorySlots;
+ bool _isActive;
+ int _fieldA;
+};
+
+class BbdouInventory {
+public:
+ BbdouInventory(IllusionsEngine *vm, BbdouSpecialCode *bbdou);
+ void registerInventoryBag(uint32 sceneId);
+ void registerInventoryItem(uint32 objectId, uint32 sequenceId);
+ void registerInventorySlot(uint32 namedPointId);
+ void addInventoryItem(uint32 objectId);
+ void removeInventoryItem(uint32 objectId);
+ void open();
+ void close();
+ InventoryBag *getInventoryBag(uint32 sceneId);
+ InventoryItem *getInventoryItem(uint32 objectId);
+ void refresh();
+ void buildItems(InventoryBag *inventoryBag);
+protected:
+ typedef Common::Array<InventoryItem*> InventoryItems;
+ typedef InventoryItems::iterator InventoryItemsIterator;
+ IllusionsEngine *_vm;
+ BbdouSpecialCode *_bbdou;
+ Common::Array<InventoryBag*> _inventoryBags;
+ InventoryItems _inventoryItems;
+ uint32 _activeBagSceneId;
+ uint32 _activeInventorySceneId;
+ int _index;
+ //field_12 dw
+};
+
} // End of namespace Illusions
#endif // ILLUSIONS_BBDOU_BBDOU_INVENTORY_H