28 #ifndef GAME_INVENTORY_H 29 #define GAME_INVENTORY_H 31 #include "hpl1/engine/engine.h" 35 #include "hpl1/penumbra-overture/GameTypes.h" 51 mpDrawer->DestroyGfxObject(mpGfxObject);
56 virtual void OnDraw() {}
57 virtual void OnMouseOver() {}
58 virtual void OnMouseDown(eMButton aButton) {}
59 virtual void OnMouseUp(eMButton aButton) {}
60 virtual void OnDoubleClick(eMButton aButton) {}
61 virtual void OnUpdate(
float afTimeStep) {}
62 virtual void OnShortcutDown(
int alNum) {}
64 cRect2f &GetRect() {
return mRect; }
65 cGfxObject *GetGfxObject() {
return mpGfxObject; }
90 void OnMouseDown(eMButton aButton);
91 void OnMouseUp(eMButton aButton);
92 void OnDoubleClick(eMButton aButton);
93 void OnUpdate(
float afTimeStep);
94 void OnShortcutDown(
int alNum);
99 void SetIndex(
int alX) { mlIndex = alX; }
100 void SetEquip(
bool abX) { mbEquip = abX; }
102 void SetEquipIndex(
int alX) { mlEquipIndex = alX; }
103 int GetEquipIndex() {
return mlEquipIndex; }
131 bool InitFromFile(
const tString &asFile);
135 void SetName(
const tString &asName) { msName = asName; }
136 const tString &GetName() {
return msName; }
138 void SetSubType(
const tString &asSubType) { msSubType = asSubType; }
139 const tString &GetSubType() {
return msSubType; }
141 const tWString &GetGameName() {
return msGameName; }
142 const tWString &GetDescription() {
return msDescription; }
144 const tString &GetHudModelFile() {
return msHudModelFile; }
145 const tString &GetHudModelName() {
return msHudModelName; }
147 const tString &GetEntityFile() {
return msEntityFile; }
149 cGfxObject *GetGfxObject() {
return mpGfxObject; }
150 cGfxObject *GetGfxObjectAdditive() {
return mpGfxObjectAdditive; }
152 eGameItemType GetItemType() {
return mItemType; }
154 bool CanBeDropped() {
return mbCanBeDropped; }
156 bool HasCount() {
return mbHasCount; }
157 int GetCount() {
return mlCount; }
158 void AddCount(
int alX) { mlCount += alX; }
159 void SetCount(
int alX) { mlCount = alX; }
169 eGameItemType mItemType;
188 typedef tInventoryItemMap::iterator tInventoryItemMapIt;
199 void OnUpdate(
float afTimeStep);
215 void OnUpdate(
float afTimeStep);
230 void SetActive(
bool abX);
231 bool IsActive() {
return mbActive; }
235 void Update(
float afTimeStep);
237 void OnMouseDown(eMButton aButton);
238 void OnMouseUp(eMButton aButton);
285 virtual int GetSaveCreatePrio();
298 void Update(
float afTimeStep);
302 void SetActive(
bool abX);
305 float GetAlpha() {
return mfAlpha; }
310 void AddItemFromFile(
const tString &asName,
const tString &asFile,
int alSlotIndex);
315 void SetMousePos(
const cVector2f &avPos);
316 void AddMousePos(
const cVector2f &avRel);
318 void SetNoteBookActive(
bool abX) { mbNoteBookIsActive = abX; }
319 bool GetNoteBookActive() {
return mbNoteBookIsActive; }
321 void OnMouseDown(eMButton aButton);
322 void OnMouseUp(eMButton aButton);
323 void OnDoubleClick(eMButton aButton);
325 void OnInventoryDown();
327 void OnShortcutDown(
int alNum);
329 cVector2f GetMousePos() {
return mvMousePos; }
332 void SetItemName(
const tWString &asName) {
336 void SetItemDesc(
const tWString &asDesc) {
342 void SetCurrentItem(
cInventoryItem *apItem) { mpCurrentItem = apItem; }
345 void SetCurrentSlot(
cInventorySlot *apSlot) { mpCurrentSlot = apSlot; }
347 void SetCurrentItemOffset(
const cVector2f &avOffset) { mvCurrentItemOffset = avOffset; }
349 cInventorySlot *GetEquipSlot(
int alIdx) {
return mvEquipSlots[alIdx]; }
353 cGameItemType *GetItemType(
int alIndex) {
return mvItemTypes[alIndex]; }
355 void SetDroppedInSlot(
bool abX) { mbDroppedInSlot = abX; }
357 void SetMessage(
const tWString &asMessage);
359 void AddPickupCallback(
const tString &asItem,
const tString &asFunction);
363 void RemovePickupCallback(
const tString &asFunction);
364 void RemoveUseCallback(
const tString &asFunction);
365 void RemoveCombineCallback(
const tString &asFunction);
367 void ClearCallbacks();
369 void CheckPickupCallback(
const tString &asItem);
370 bool CheckUseCallback(
const tString &asItem,
const tString &asObject);
371 bool CheckCombineCallback(
const tString &asItem1,
const tString &asItem2,
int alSlotIndex);
402 eCrossHairState mLastCrossHairState;
408 bool mbDroppedInSlot;
410 bool mbCheckingCombineItems;
412 bool mbNoteBookIsActive;
418 bool mbMessageActive;
420 float mfMessageAlpha;
437 #endif // GAME_INVENTORY_H
Definition: SaveHandler.h:323
Definition: GameItem.h:62
Definition: font_data.h:67
T * iterator
Definition: array.h:54
Definition: SaveHandler.h:113
Definition: Inventory.h:208
Definition: SaveGame.h:130
Definition: GameItemType.h:45
Definition: Inventory.h:225
Definition: GraphicsDrawer.h:77
Definition: Inventory.h:192
Definition: GfxObject.h:38
Definition: Inventory.h:123
Definition: SaveGame.h:111
Definition: Container.h:219
Definition: Updateable.h:35
Definition: Inventory.h:82
Definition: list_intern.h:51
Definition: SaveGame.h:183
Definition: Inventory.h:290