Mercurial > mm7
annotate Chest.h @ 2062:c2a004e7458b
_494035_timed_effects__water_walking_damage__etc()
author | Ritor1 |
---|---|
date | Mon, 02 Dec 2013 19:51:19 +0600 |
parents | 7ef4b64f6329 |
children | 5d263539bbec |
rev | line source |
---|---|
0 | 1 #pragma once |
2 | |
3 | |
4 | |
5 | |
6 /* 348 */ | |
7 enum CHEST_FLAGS | |
8 { | |
9 CHEST_TRAPPED = 0x1, | |
10 CHEST_ITEMS_PLACED = 0x2, | |
11 CHEST_OPENED = 0x4, | |
12 }; | |
13 | |
14 | |
15 | |
16 #pragma pack(push, 1) | |
17 struct ChestDesc | |
18 { | |
19 char pName[32]; | |
20 char uWidth; | |
21 char uHeight; | |
22 __int16 uTextureID; | |
23 }; | |
24 #pragma pack(pop) | |
25 | |
26 | |
27 | |
28 #pragma pack(push, 1) | |
29 struct ChestList | |
30 { | |
31 inline ChestList(): //----- (00458438) | |
32 uNumChests(0), pChests(nullptr) | |
33 {} | |
34 | |
35 void ToFile(); | |
1477
7ef4b64f6329
* LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents:
1202
diff
changeset
|
36 void FromFile(void *data_mm6, void *data_mm7, void *data_mm8); |
0 | 37 int FromFileTxt(const char *Args); |
38 | |
39 | |
40 unsigned int uNumChests; | |
41 struct ChestDesc *pChests; | |
42 }; | |
43 #pragma pack(pop) | |
44 | |
45 | |
46 | |
47 /* 65 */ | |
48 #pragma pack(push, 1) | |
526 | 49 struct Chest //0x14cc |
0 | 50 { |
1113
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
1016
diff
changeset
|
51 inline bool Initialized() const {return (uFlags & CHEST_ITEMS_PLACED) != 0;} |
426 | 52 inline void SetInitialized(bool b) {if (b) uFlags |= CHEST_ITEMS_PLACED; else uFlags &= ~CHEST_ITEMS_PLACED;} |
1113
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
1016
diff
changeset
|
53 inline bool Trapped() const {return (uFlags & CHEST_TRAPPED) != 0;} |
426 | 54 |
706 | 55 static bool CanPlaceItemAt(signed int a1, int a2, signed int uChestID); |
56 static int CountChestItems(signed int uChestID); | |
57 static int PutItemInChest(int a1, ItemGen *a2, signed int uChestID); | |
58 static void PlaceItemAt(unsigned int put_cell_pos, unsigned int uItemIdx, signed int uChestID); | |
59 static void PlaceItems(signed int uChestID); | |
526 | 60 static bool Open(signed int uChestID); |
706 | 61 static void DrawChestUI(signed int uChestID); |
62 static void ToggleFlag(signed int uChestID, unsigned __int16 uFlag, unsigned int bToggle); | |
0 | 63 |
526 | 64 unsigned __int16 uChestBitmapID; //0 |
65 unsigned __int16 uFlags; //2 | |
66 struct ItemGen igChestItems[140]; //4 | |
528 | 67 signed __int16 pInventoryIndices[140]; //0x13b4 |
0 | 68 }; |
69 #pragma pack(pop) | |
70 | |
526 | 71 void __fastcall sub_420B13(int a1, int a2); |
0 | 72 |
73 | |
74 extern size_t uNumChests; // idb | |
75 extern struct ChestList *pChestList; | |
1202 | 76 extern std::array<Chest, 20> pChests; |