0
|
1 #pragma once
|
|
2 #include "Items.h"
|
|
3
|
|
4
|
|
5
|
|
6
|
|
7 /* 348 */
|
|
8 enum CHEST_FLAGS
|
|
9 {
|
|
10 CHEST_TRAPPED = 0x1,
|
|
11 CHEST_ITEMS_PLACED = 0x2,
|
|
12 CHEST_OPENED = 0x4,
|
|
13 };
|
|
14
|
|
15
|
|
16
|
|
17 #pragma pack(push, 1)
|
|
18 struct ChestDesc
|
|
19 {
|
|
20 char pName[32];
|
|
21 char uWidth;
|
|
22 char uHeight;
|
|
23 __int16 uTextureID;
|
|
24 };
|
|
25 #pragma pack(pop)
|
|
26
|
|
27
|
|
28
|
|
29 #pragma pack(push, 1)
|
|
30 struct ChestList
|
|
31 {
|
|
32 inline ChestList(): //----- (00458438)
|
|
33 uNumChests(0), pChests(nullptr)
|
|
34 {}
|
|
35
|
|
36 void ToFile();
|
|
37 void FromFile(void *pSerialized);
|
|
38 int FromFileTxt(const char *Args);
|
|
39
|
|
40
|
|
41 unsigned int uNumChests;
|
|
42 struct ChestDesc *pChests;
|
|
43 };
|
|
44 #pragma pack(pop)
|
|
45
|
|
46
|
|
47
|
|
48 /* 65 */
|
|
49 #pragma pack(push, 1)
|
|
50 struct Chest
|
|
51 {
|
|
52 static int CanPlaceItemAt(signed int a1, int a2, unsigned int uChestID);
|
|
53 static int _41FF64(unsigned int uChestID);
|
|
54 static int _41FFA2(int a1, ItemGen *a2, unsigned int uChestID);
|
|
55 static unsigned int PlaceItemAt(unsigned int a1, unsigned int uItemIdx, unsigned int uChestID);
|
|
56 static char *_420284(unsigned int uChestID);
|
|
57 static bool Open(unsigned int uChestID);
|
|
58 static void DrawChestUI(unsigned int uChestID);
|
|
59 static void ToggleFlag(unsigned int uChestID, unsigned __int16 uFlag, unsigned int bToggle);
|
|
60
|
|
61 unsigned __int16 uChestBitmapID;
|
|
62 unsigned __int16 uFlags;
|
|
63 struct ItemGen mm7__vector_pItems[140];
|
|
64 __int16 pInventoryIndices[140];
|
|
65 };
|
|
66 #pragma pack(pop)
|
|
67
|
|
68
|
|
69
|
|
70
|
|
71 extern size_t uNumChests; // idb
|
|
72 extern struct ChestList *pChestList;
|
|
73 extern Chest pChests[20]; |