Mercurial > mm7
annotate Chest.h @ 2410:2d3c3d1dff0c
added RenderStruct.h
author | Ritor1 |
---|---|
date | Tue, 15 Jul 2014 15:44:45 +0600 |
parents | 5d263539bbec |
children |
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); | |
2343 | 63 static void ChestUI_WritePointedObjectStatusString(); |
64 static void OnChestLeftClick(); | |
0 | 65 |
526 | 66 unsigned __int16 uChestBitmapID; //0 |
67 unsigned __int16 uFlags; //2 | |
68 struct ItemGen igChestItems[140]; //4 | |
528 | 69 signed __int16 pInventoryIndices[140]; //0x13b4 |
0 | 70 }; |
71 #pragma pack(pop) | |
72 | |
526 | 73 void __fastcall sub_420B13(int a1, int a2); |
0 | 74 |
75 | |
76 extern size_t uNumChests; // idb | |
77 extern struct ChestList *pChestList; | |
1202 | 78 extern std::array<Chest, 20> pChests; |