annotate Chest.h @ 506:9b4bdf6089af

Слияние
author Ritor1
date Tue, 26 Feb 2013 18:48:05 +0600
parents 94546824edad
children 214d9d47cf1f db4631a484ae
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 {
426
94546824edad Chests party fixed
Nomad
parents: 0
diff changeset
52 inline bool Initialized() const {return uFlags & CHEST_ITEMS_PLACED;}
94546824edad Chests party fixed
Nomad
parents: 0
diff changeset
53 inline void SetInitialized(bool b) {if (b) uFlags |= CHEST_ITEMS_PLACED; else uFlags &= ~CHEST_ITEMS_PLACED;}
94546824edad Chests party fixed
Nomad
parents: 0
diff changeset
54 inline bool Trapped() const {return uFlags & CHEST_TRAPPED;}
94546824edad Chests party fixed
Nomad
parents: 0
diff changeset
55
0
Ritor1
parents:
diff changeset
56 static int CanPlaceItemAt(signed int a1, int a2, unsigned int uChestID);
Ritor1
parents:
diff changeset
57 static int _41FF64(unsigned int uChestID);
Ritor1
parents:
diff changeset
58 static int _41FFA2(int a1, ItemGen *a2, unsigned int uChestID);
Ritor1
parents:
diff changeset
59 static unsigned int PlaceItemAt(unsigned int a1, unsigned int uItemIdx, unsigned int uChestID);
Ritor1
parents:
diff changeset
60 static char *_420284(unsigned int uChestID);
Ritor1
parents:
diff changeset
61 static bool Open(unsigned int uChestID);
Ritor1
parents:
diff changeset
62 static void DrawChestUI(unsigned int uChestID);
Ritor1
parents:
diff changeset
63 static void ToggleFlag(unsigned int uChestID, unsigned __int16 uFlag, unsigned int bToggle);
Ritor1
parents:
diff changeset
64
Ritor1
parents:
diff changeset
65 unsigned __int16 uChestBitmapID;
Ritor1
parents:
diff changeset
66 unsigned __int16 uFlags;
Ritor1
parents:
diff changeset
67 struct ItemGen mm7__vector_pItems[140];
Ritor1
parents:
diff changeset
68 __int16 pInventoryIndices[140];
Ritor1
parents:
diff changeset
69 };
Ritor1
parents:
diff changeset
70 #pragma pack(pop)
Ritor1
parents:
diff changeset
71
Ritor1
parents:
diff changeset
72
Ritor1
parents:
diff changeset
73
Ritor1
parents:
diff changeset
74
Ritor1
parents:
diff changeset
75 extern size_t uNumChests; // idb
Ritor1
parents:
diff changeset
76 extern struct ChestList *pChestList;
Ritor1
parents:
diff changeset
77 extern Chest pChests[20];