22 #ifndef LASTEXPRESS_INVENTORY_H 23 #define LASTEXPRESS_INVENTORY_H 39 #include "lastexpress/shared.h" 41 #include "lastexpress/eventhandler.h" 43 #include "common/events.h" 44 #include "common/serializer.h" 48 class LastExpressEngine;
62 ObjectLocation location;
65 cursor = kCursorNormal;
71 location = kObjectLocationNone;
75 return Common::String::format(
"{ %d - %d - %d - %d - %d - %d - %d }", cursor, scene, usable, isSelectable, inPocket, floating, location);
82 s.syncAsByte(isSelectable);
83 s.syncAsByte(inPocket);
84 s.syncAsByte(floating);
85 s.syncAsByte(location);
93 void addItem(InventoryItem item);
94 void removeItem(InventoryItem item, ObjectLocation newLocation = kObjectLocationNone);
95 bool hasItem(InventoryItem item);
96 void selectItem(InventoryItem item);
98 InventoryItem getSelectedItem() {
return _selectedItem; }
103 InventoryItem getFirstExaminableItem()
const;
104 void setLocationAndProcess(InventoryItem item, ObjectLocation location);
108 void showHourGlass()
const;
109 void setPortrait(InventoryItem item)
const;
110 void drawEgg()
const;
111 void drawBlinkingEgg(uint ticks = 1);
117 bool isMagnifierInUse() {
return _useMagnifier; }
118 bool isPortraitHighlighted() {
return _portraitHighlighted; }
119 bool isOpened() {
return _isOpened; }
120 bool isEggHighlighted() {
return _eggHightlighted; }
137 InventoryItem _selectedItem;
138 uint32 _highlightedItemIndex;
142 bool _showingHourGlass;
143 int16 _blinkingDirection;
144 uint16 _blinkingBrightness;
148 bool _portraitHighlighted;
150 bool _eggHightlighted;
161 void examine(InventoryItem item);
162 void drawHighlight(uint32 currentIndex,
bool reset);
163 uint32 getItemIndex(uint32 currentIndex)
const;
165 bool isItemSceneParameter(InventoryItem item)
const;
167 void drawItem(CursorStyle
id, uint16 x, uint16 y, int16 brighnessIndex = -1)
const;
170 void drawSelectedItem();
171 void clearSelectedItem()
const;
176 #endif // LASTEXPRESS_INVENTORY_H
static String format(MSVC_PRINTF const char *fmt,...) GCC_PRINTF(1
Definition: lastexpress.h:69
Definition: eventhandler.h:36
Definition: animation.h:45
Definition: inventory.h:51
Definition: serializer.h:79
Definition: inventory.h:55
Definition: serializer.h:308