22 #ifndef DRAGONS_INVENTORY_H 23 #define DRAGONS_INVENTORY_H 25 #include "common/system.h" 31 class BackgroundResourceLoader;
34 class DragonINIResource;
36 #define DRAGONS_MAX_INVENTORY_ITEMS 0x29 38 #define ACTOR_INVENTORY_OFFSET 0x17 48 InventoryState _previousState;
52 int16 _screenPositionIndex;
54 InventoryState _state;
57 void (*_inventionBookPrevSceneUpdateFunc)();
58 uint16 _inventionBookPrevSceneId;
59 uint16 _inventionBookPrevFlickerINISceneId;
62 uint16 _inventoryItemTbl[DRAGONS_MAX_INVENTORY_ITEMS];
68 void loadScene(uint32 sceneId);
69 bool isActorSet() {
return true; }
71 int32 getSequenceId() {
74 void setActorSequenceId(int32 sequenceId);
75 void updateActorSequenceId(int32 sequenceId);
76 void resetSequenceId();
78 InventoryState getState() {
return _state; }
79 void setState(InventoryState newState) { _state = newState; }
80 void setPreviousState();
82 int16 getPositionIndex() {
return _screenPositionIndex; }
86 return _state != Closed;
89 void close() { _state = Closed; }
91 void updateVisibility();
92 void setActorFlag400();
93 void clearActorFlag400();
94 void setPriority(uint16 priority);
97 void closeInventory();
100 uint16 getIniAtPosition(int16 x, int16 y);
101 void loadInventoryItemsFromSave();
103 void openInventionBook();
104 void closeInventionBook();
106 bool addItem(uint16 iniId);
107 bool addItemIfPositionIsEmpty(uint16 iniId, uint16 x, uint16 y);
108 void replaceItem(uint16 existingIniId, uint16 newIniId);
109 bool clearItem(uint16 iniId);
110 bool hasItem(uint16 iniId);
112 Actor *getInventoryItemActor(uint16 iniId);
113 void inventoryMissing();
116 void setPositionFromSceneId(uint32 sceneId);
118 void animateBagOut();
123 #endif //DRAGONS_INVENTORY_H Definition: background.h:36
Definition: dragonini.h:64
Definition: inventory.h:46
Definition: dragons.h:167