Mercurial > mm7
annotate DecorationList.h @ 1477:7ef4b64f6329
* LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Added support for most of mm6 resources, placeholders for mm8 resources.
Fixed few C4258
author | Nomad |
---|---|
date | Wed, 28 Aug 2013 18:43:07 +0200 |
parents | 39eaa6b00141 |
children | 59d1da1863df |
rev | line source |
---|---|
0 | 1 #pragma once |
2 | |
3 | |
4 | |
5 | |
6 /* 321 */ | |
7 enum DECORATION_FLAGS | |
8 { | |
9 DECORATION_MOVE_THROUGH = 0x1, | |
10 DECORATION_DONT_DRAW = 0x2, | |
11 DECORATION_FLICKER_SLOW = 0x4, | |
12 DECORATION_FICKER_AVERAGE = 0x8, | |
13 DECORATION_FICKER_FAST = 0x10, | |
14 DECORATION_MARKER = 0x20, | |
15 DECORATION_SLOW_LOOP = 0x40, | |
16 DECORATION_EMITS_FIRE = 0x80, | |
17 DECORATION_SOUND_ON_DAWN = 0x100, | |
18 DECORATION_SOUND_ON_DUSK = 0x200, | |
19 DECORATION_EMITS_SMOKE = 0x400, | |
20 }; | |
21 | |
22 | |
23 | |
24 /* 54 */ | |
25 #pragma pack(push, 1) | |
1477
7ef4b64f6329
* LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents:
1113
diff
changeset
|
26 struct DecorationDesc_mm6 |
0 | 27 { |
1113
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
380
diff
changeset
|
28 inline bool CanMoveThrough() {return (uFlags & DECORATION_MOVE_THROUGH) != 0;} |
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
380
diff
changeset
|
29 inline bool DontDraw() {return (uFlags & DECORATION_DONT_DRAW) != 0;} |
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
380
diff
changeset
|
30 inline bool SoundOnDawn() {return (uFlags & DECORATION_SOUND_ON_DAWN) != 0;} |
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
380
diff
changeset
|
31 inline bool SoundOnDusk() {return (uFlags & DECORATION_SOUND_ON_DUSK) != 0;} |
379 | 32 |
0 | 33 char pName[32]; |
34 char field_20[32]; | |
35 __int16 uType; | |
36 unsigned __int16 uDecorationHeight; | |
37 __int16 uRadius; | |
38 __int16 uLightRadius; | |
39 unsigned __int16 uSpriteID; | |
40 __int16 uFlags; | |
41 __int16 uSoundID; | |
42 __int16 _pad; | |
1477
7ef4b64f6329
* LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents:
1113
diff
changeset
|
43 //unsigned __int8 uColoredLightRed; |
7ef4b64f6329
* LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents:
1113
diff
changeset
|
44 //unsigned __int8 uColoredLightGreen; |
7ef4b64f6329
* LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents:
1113
diff
changeset
|
45 //unsigned __int8 uColoredLightBlue; |
7ef4b64f6329
* LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents:
1113
diff
changeset
|
46 //char __padding; |
7ef4b64f6329
* LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents:
1113
diff
changeset
|
47 }; |
7ef4b64f6329
* LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents:
1113
diff
changeset
|
48 |
7ef4b64f6329
* LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents:
1113
diff
changeset
|
49 struct DecorationDesc: public DecorationDesc_mm6 |
7ef4b64f6329
* LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents:
1113
diff
changeset
|
50 { |
0 | 51 unsigned __int8 uColoredLightRed; |
52 unsigned __int8 uColoredLightGreen; | |
53 unsigned __int8 uColoredLightBlue; | |
54 char __padding; | |
55 }; | |
56 #pragma pack(pop) | |
57 | |
58 /* 55 */ | |
59 #pragma pack(push, 1) | |
60 struct DecorationList | |
61 { | |
62 inline DecorationList(): //----- (00458380) | |
63 pDecorations(nullptr), uNumDecorations(0) | |
64 {} | |
65 | |
66 void ToFile(); | |
1477
7ef4b64f6329
* LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents:
1113
diff
changeset
|
67 void FromFile(void *data_mm6, void *data_mm7, void *data_mm8); |
0 | 68 bool FromFileTxt(const char *Args); |
69 void InitializeDecorationSprite(unsigned int uDecID); | |
70 unsigned __int16 GetDecorIdByName(const char *pName); | |
71 | |
72 unsigned int uNumDecorations; | |
73 struct DecorationDesc *pDecorations; | |
74 }; | |
75 #pragma pack(pop) | |
76 | |
77 | |
78 extern struct DecorationList *pDecorationList; |