annotate Chest.h @ 106:1e18102bd4d0

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