annotate Chest.h @ 0:9c0607679772

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