comparison Chest.h @ 526:214d9d47cf1f

Chest working, but items are not laid correctly
author Gloval
date Sun, 03 Mar 2013 01:55:57 +0400
parents 94546824edad
children b1598f110b07 8e34868c8069
comparison
equal deleted inserted replaced
525:e7b3fa10d58d 526:214d9d47cf1f
45 45
46 46
47 47
48 /* 65 */ 48 /* 65 */
49 #pragma pack(push, 1) 49 #pragma pack(push, 1)
50 struct Chest 50 struct Chest //0x14cc
51 { 51 {
52 inline bool Initialized() const {return uFlags & CHEST_ITEMS_PLACED;} 52 inline bool Initialized() const {return uFlags & CHEST_ITEMS_PLACED;}
53 inline void SetInitialized(bool b) {if (b) uFlags |= CHEST_ITEMS_PLACED; else uFlags &= ~CHEST_ITEMS_PLACED;} 53 inline void SetInitialized(bool b) {if (b) uFlags |= CHEST_ITEMS_PLACED; else uFlags &= ~CHEST_ITEMS_PLACED;}
54 inline bool Trapped() const {return uFlags & CHEST_TRAPPED;} 54 inline bool Trapped() const {return uFlags & CHEST_TRAPPED;}
55 55
56 static int CanPlaceItemAt(signed int a1, int a2, unsigned int uChestID); 56 static bool CanPlaceItemAt(signed int a1, int a2, unsigned int uChestID);
57 static int _41FF64(unsigned int uChestID); 57 static int CountChestItems(unsigned int uChestID);
58 static int _41FFA2(int a1, ItemGen *a2, unsigned int uChestID); 58 static int PutItemInChest(int a1, ItemGen *a2, unsigned int uChestID);
59 static unsigned int PlaceItemAt(unsigned int a1, unsigned int uItemIdx, unsigned int uChestID); 59 static void PlaceItemAt(unsigned int put_cell_pos, unsigned int uItemIdx, unsigned int uChestID);
60 static char *_420284(unsigned int uChestID); 60 static void PlaceItems(unsigned int uChestID);
61 static bool Open(unsigned int uChestID); 61 static bool Open(signed int uChestID);
62 static void DrawChestUI(unsigned int uChestID); 62 static void DrawChestUI(unsigned int uChestID);
63 static void ToggleFlag(unsigned int uChestID, unsigned __int16 uFlag, unsigned int bToggle); 63 static void ToggleFlag(unsigned int uChestID, unsigned __int16 uFlag, unsigned int bToggle);
64 64
65 unsigned __int16 uChestBitmapID; 65 unsigned __int16 uChestBitmapID; //0
66 unsigned __int16 uFlags; 66 unsigned __int16 uFlags; //2
67 struct ItemGen mm7__vector_pItems[140]; 67 struct ItemGen igChestItems[140]; //4
68 __int16 pInventoryIndices[140]; 68 __int16 pInventoryIndices[140]; //0x13b4
69 }; 69 };
70 #pragma pack(pop) 70 #pragma pack(pop)
71 71
72 72 void __fastcall sub_420B13(int a1, int a2);
73 73
74 74
75 extern size_t uNumChests; // idb 75 extern size_t uNumChests; // idb
76 extern struct ChestList *pChestList; 76 extern struct ChestList *pChestList;
77 extern Chest pChests[20]; 77 extern Chest pChests[20];