annotate Monsters.h @ 1575:43d3536a20f7

OnInventoryItemRightClick
author Nomad
date Mon, 09 Sep 2013 20:09:01 +0200
parents 7ef4b64f6329
children 861ede68187a
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
Ritor1
parents:
diff changeset
2
Ritor1
parents:
diff changeset
3
Ritor1
parents:
diff changeset
4
Ritor1
parents:
diff changeset
5 /* 334 */
Ritor1
parents:
diff changeset
6 enum MONSTER_TYPE
Ritor1
parents:
diff changeset
7 {
Ritor1
parents:
diff changeset
8 MONSTER_DEVIL_1 = 0x16,
319
5a66be213cff Actor::Die
Nomad
parents: 237
diff changeset
9 MONSTER_DEVIL_2 = 0x17,
0
Ritor1
parents:
diff changeset
10 MONSTER_DEVIL_3 = 0x18,
Ritor1
parents:
diff changeset
11 MONSTER_DRAGON_1 = 0x19,
319
5a66be213cff Actor::Die
Nomad
parents: 237
diff changeset
12 MONSTER_DRAGON_2 = 0x1A,
0
Ritor1
parents:
diff changeset
13 MONSTER_DRAGON_3 = 0x1B,
Ritor1
parents:
diff changeset
14 MONSTER_ELEMENTAL_WATER_1 = 0x2E,
Ritor1
parents:
diff changeset
15 MONSTER_ELEMENTAL_WATER_3 = 0x30,
Ritor1
parents:
diff changeset
16 MONSTER_ELF_ARCHER_1 = 0x31,
Ritor1
parents:
diff changeset
17 MONSTER_ELF_ARCHER_3 = 0x33,
Ritor1
parents:
diff changeset
18 MONSTER_ELF_SPEARMAN_1 = 0x34,
Ritor1
parents:
diff changeset
19 MONSTER_ELF_SPEARMAN_3 = 0x36,
Ritor1
parents:
diff changeset
20 MONSTER_GHOST_1 = 0x46,
Ritor1
parents:
diff changeset
21 MONSTER_GHOST_3 = 0x48,
Ritor1
parents:
diff changeset
22 MONSTER_HARPY_1 = 0x55,
319
5a66be213cff Actor::Die
Nomad
parents: 237
diff changeset
23 MONSTER_HARPY_2 = 0x56,
0
Ritor1
parents:
diff changeset
24 MONSTER_HARPY_3 = 0x57,
Ritor1
parents:
diff changeset
25 MONSTER_LICH_1 = 0x5B,
Ritor1
parents:
diff changeset
26 MONSTER_LICH_3 = 0x5D,
Ritor1
parents:
diff changeset
27 MONSTER_OOZE_1 = 0x70,
319
5a66be213cff Actor::Die
Nomad
parents: 237
diff changeset
28 MONSTER_OOZE_2 = 0x71,
0
Ritor1
parents:
diff changeset
29 MONSTER_OOZE_3 = 0x72,
Ritor1
parents:
diff changeset
30 MONSTER_PEASANT_ELF_FEMALE_1_1 = 0x85,
Ritor1
parents:
diff changeset
31 MONSTER_PEASANT_ELF_MALE_3_3 = 0x96,
Ritor1
parents:
diff changeset
32 MONSTER_SKELETON_1 = 0xC7,
Ritor1
parents:
diff changeset
33 MONSTER_SKELETON_3 = 0xC9,
Ritor1
parents:
diff changeset
34 MONSTER_TITAN_1 = 0xD3,
Ritor1
parents:
diff changeset
35 MONSTER_TITAN_3 = 0xD5,
Ritor1
parents:
diff changeset
36 MONSTER_VAMPIRE_1 = 0xD9,
Ritor1
parents:
diff changeset
37 MONSTER_VAMPIRE_3 = 0xDB,
Ritor1
parents:
diff changeset
38 MONSTER_WIGHT_1 = 0xDF,
Ritor1
parents:
diff changeset
39 MONSTER_WIGHT_3 = 0xE1,
Ritor1
parents:
diff changeset
40 MONSTER_ZOMBIE_1 = 0xE5,
Ritor1
parents:
diff changeset
41 MONSTER_ZOMBIE_3 = 0xE7,
Ritor1
parents:
diff changeset
42 MONSTER_PEASANT_GOBLIN_MALE_3_3 = 0xF9,
319
5a66be213cff Actor::Die
Nomad
parents: 237
diff changeset
43 MONSTER_TROLL_1 = 0xFA,
5a66be213cff Actor::Die
Nomad
parents: 237
diff changeset
44 MONSTER_TROLL_2 = 0xFB,
0
Ritor1
parents:
diff changeset
45 MONSTER_TROLL_3 = 0xFC,
Ritor1
parents:
diff changeset
46 MONSTER_TREANT_1 = 0xFD,
Ritor1
parents:
diff changeset
47 MONSTER_TREANT_3 = 0xFF,
Ritor1
parents:
diff changeset
48 MONSTER_GHOUL_1 = 0x100,
Ritor1
parents:
diff changeset
49 MONSTER_GHOUL_3 = 0x102,
Ritor1
parents:
diff changeset
50 };
Ritor1
parents:
diff changeset
51
Ritor1
parents:
diff changeset
52 /* 335 */
Ritor1
parents:
diff changeset
53 enum MONSTER_SPECIAL_ABILITY_TYPE
Ritor1
parents:
diff changeset
54 {
Ritor1
parents:
diff changeset
55 MONSTER_SPECIAL_ABILITY_NONE = 0x0,
Ritor1
parents:
diff changeset
56 MONSTER_SPECIAL_ABILITY_SHOT = 0x1,
Ritor1
parents:
diff changeset
57 MONSTER_SPECIAL_ABILITY_SUMMON = 0x2,
Ritor1
parents:
diff changeset
58 MONSTER_SPECIAL_ABILITY_EXPLODE = 0x3,
Ritor1
parents:
diff changeset
59 };
Ritor1
parents:
diff changeset
60
1456
5c95f2246c2a TE mostly working
Gloval
parents: 794
diff changeset
61 enum MONSTER_MOVEMENT_TYPE
5c95f2246c2a TE mostly working
Gloval
parents: 794
diff changeset
62 {
5c95f2246c2a TE mostly working
Gloval
parents: 794
diff changeset
63 MONSTER_MOVEMENT_TYPE_SHORT = 0x0,
5c95f2246c2a TE mostly working
Gloval
parents: 794
diff changeset
64 MONSTER_MOVEMENT_TYPE_MEDIUM = 0x1,
5c95f2246c2a TE mostly working
Gloval
parents: 794
diff changeset
65 MONSTER_MOVEMENT_TYPE_LONG = 0x2,
5c95f2246c2a TE mostly working
Gloval
parents: 794
diff changeset
66 MONSTER_MOVEMENT_TYPE_GLOBAL = 0x3,
5c95f2246c2a TE mostly working
Gloval
parents: 794
diff changeset
67 MONSTER_MOVEMENT_TYPE_FREE = 0x4,
5c95f2246c2a TE mostly working
Gloval
parents: 794
diff changeset
68 MONSTER_MOVEMENT_TYPE_STAIONARY = 0x5,
5c95f2246c2a TE mostly working
Gloval
parents: 794
diff changeset
69 };
5c95f2246c2a TE mostly working
Gloval
parents: 794
diff changeset
70
5c95f2246c2a TE mostly working
Gloval
parents: 794
diff changeset
71
0
Ritor1
parents:
diff changeset
72 /* 336 */
Ritor1
parents:
diff changeset
73 enum MONSTER_SUPERTYPE
Ritor1
parents:
diff changeset
74 {
Ritor1
parents:
diff changeset
75 MONSTER_SUPERTYPE_UNDEAD = 0x1,
Ritor1
parents:
diff changeset
76 MONSTER_SUPERTYPE_KREEGAN = 0x2,
Ritor1
parents:
diff changeset
77 MONSTER_SUPERTYPE_DRAGON = 0x3,
Ritor1
parents:
diff changeset
78 MONSTER_SUPERTYPE_ELF = 0x4,
Ritor1
parents:
diff changeset
79 MONSTER_SUPERTYPE_WATER_ELEMENTAL = 0x5,
Ritor1
parents:
diff changeset
80 MONSTER_SUPERTYPE_TREANT = 0x6,
Ritor1
parents:
diff changeset
81 MONSTER_SUPERTYPE_TITAN = 0x7,
Ritor1
parents:
diff changeset
82 MONSTER_SUPERTYPE_8 = 0x8,
Ritor1
parents:
diff changeset
83 };
Ritor1
parents:
diff changeset
84
Ritor1
parents:
diff changeset
85
Ritor1
parents:
diff changeset
86
Ritor1
parents:
diff changeset
87 /* 187 */
Ritor1
parents:
diff changeset
88 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
89 struct MonsterInfo
Ritor1
parents:
diff changeset
90 {
Ritor1
parents:
diff changeset
91 enum HostilityRadius: unsigned __int8
Ritor1
parents:
diff changeset
92 {
Ritor1
parents:
diff changeset
93 Hostility_Friendly = 0,
Ritor1
parents:
diff changeset
94 Hostility_Close = 1,
Ritor1
parents:
diff changeset
95 Hostility_Short = 2,
Ritor1
parents:
diff changeset
96 Hostility_Medium = 3,
Ritor1
parents:
diff changeset
97 Hostility_Long = 4
Ritor1
parents:
diff changeset
98 };
Ritor1
parents:
diff changeset
99
794
Nomad
parents: 751
diff changeset
100 inline MonsterInfo():
Nomad
parents: 751
diff changeset
101 pName(nullptr), pPictureName(nullptr)
Nomad
parents: 751
diff changeset
102 {}
Nomad
parents: 751
diff changeset
103
0
Ritor1
parents:
diff changeset
104 char *pName;
694
52329962fcdb monster table init rework started
Gloval
parents: 319
diff changeset
105 char *pPictureName;
0
Ritor1
parents:
diff changeset
106 unsigned __int8 uLevel;
Ritor1
parents:
diff changeset
107 unsigned __int8 uTreasureDropChance;
Ritor1
parents:
diff changeset
108 unsigned __int8 uTreasureDiceRolls;
Ritor1
parents:
diff changeset
109 unsigned __int8 uTreasureDiceSides;
Ritor1
parents:
diff changeset
110 unsigned __int8 uTreasureLevel;
Ritor1
parents:
diff changeset
111 unsigned __int8 uTreasureType;
Ritor1
parents:
diff changeset
112 unsigned __int8 uFlying;
Ritor1
parents:
diff changeset
113 unsigned __int8 uMovementType;
Ritor1
parents:
diff changeset
114 unsigned __int8 uAIType;
Ritor1
parents:
diff changeset
115 HostilityRadius uHostilityType;
Ritor1
parents:
diff changeset
116 char field_12;
Ritor1
parents:
diff changeset
117 unsigned __int8 uSpecialAttack;
Ritor1
parents:
diff changeset
118 unsigned __int8 uSpecialAttackType;
Ritor1
parents:
diff changeset
119 unsigned __int8 uAttack1Type;
Ritor1
parents:
diff changeset
120 unsigned __int8 uAttack1DamageDiceRolls;
Ritor1
parents:
diff changeset
121 unsigned __int8 uAttack1DamageDiceSides;
Ritor1
parents:
diff changeset
122 unsigned __int8 uAttack1DamageBonus;
Ritor1
parents:
diff changeset
123 unsigned __int8 uMissleAttack1Type;
Ritor1
parents:
diff changeset
124 unsigned __int8 uAttack2Chance;
Ritor1
parents:
diff changeset
125 unsigned __int8 uAttack2Type;
Ritor1
parents:
diff changeset
126 unsigned __int8 uAttack2DamageDiceRolls;
Ritor1
parents:
diff changeset
127 unsigned __int8 uAttack2DamageDiceSides;
Ritor1
parents:
diff changeset
128 unsigned __int8 uAttack2DamageBonus;
Ritor1
parents:
diff changeset
129 unsigned __int8 uMissleAttack2Type;
Ritor1
parents:
diff changeset
130 unsigned __int8 uSpell1UseChance;
Ritor1
parents:
diff changeset
131 unsigned __int8 uSpell1ID;
Ritor1
parents:
diff changeset
132 unsigned __int8 uSpell2UseChance;
Ritor1
parents:
diff changeset
133 unsigned __int8 uSpell2ID;
Ritor1
parents:
diff changeset
134 unsigned __int8 uResFire;
Ritor1
parents:
diff changeset
135 unsigned __int8 uResAir;
Ritor1
parents:
diff changeset
136 unsigned __int8 uResWater;
Ritor1
parents:
diff changeset
137 unsigned __int8 uResEarth;
Ritor1
parents:
diff changeset
138 unsigned __int8 uResMind;
Ritor1
parents:
diff changeset
139 unsigned __int8 uResSpirit;
Ritor1
parents:
diff changeset
140 unsigned __int8 uResBody;
Ritor1
parents:
diff changeset
141 unsigned __int8 uResLight;
Ritor1
parents:
diff changeset
142 unsigned __int8 uResDark;
Ritor1
parents:
diff changeset
143 unsigned __int8 uResPhysical;
735
6daaa2f18d0d Fixed some house sounds & shop-related stuff
Nomad
parents: 711
diff changeset
144 unsigned __int8 uSpecialAbilityType; // 0 SPECIAL_ABILITY_TYPE_NONE
6daaa2f18d0d Fixed some house sounds & shop-related stuff
Nomad
parents: 711
diff changeset
145 // 1 SPECIAL_ABILITY_TYPE_SHOT
6daaa2f18d0d Fixed some house sounds & shop-related stuff
Nomad
parents: 711
diff changeset
146 // 2 SPECIAL_ABILITY_TYPE_SUMMON
6daaa2f18d0d Fixed some house sounds & shop-related stuff
Nomad
parents: 711
diff changeset
147 // 3 SPECIAL_ABILITY_TYPE_EXPLODE
0
Ritor1
parents:
diff changeset
148 unsigned __int8 uSpecialAbilityDamageDiceRolls;
Ritor1
parents:
diff changeset
149 unsigned __int8 uSpecialAbilityDamageDiceSides;
Ritor1
parents:
diff changeset
150 unsigned __int8 uSpecialAbilityDamageDiceBonus;
Ritor1
parents:
diff changeset
151 unsigned __int8 uNumCharactersAttackedPerSpecialAbility;
Ritor1
parents:
diff changeset
152 char field_33;
Ritor1
parents:
diff changeset
153 unsigned __int16 uID;
Ritor1
parents:
diff changeset
154 unsigned __int16 bQuestMonster;
Ritor1
parents:
diff changeset
155 unsigned __int16 uSpellSkillAndMastery1;
Ritor1
parents:
diff changeset
156 unsigned __int16 uSpellSkillAndMastery2;
Ritor1
parents:
diff changeset
157 __int16 field_3C_some_special_attack;
Ritor1
parents:
diff changeset
158 __int16 field_3E;
Ritor1
parents:
diff changeset
159 unsigned int uHP;
Ritor1
parents:
diff changeset
160 unsigned int uAC;
Ritor1
parents:
diff changeset
161 unsigned int uExp;
Ritor1
parents:
diff changeset
162 unsigned int uBaseSpeed;
711
a5e587c8e30e some cleaning
Gloval
parents: 694
diff changeset
163 signed int uRecoveryTime;
0
Ritor1
parents:
diff changeset
164 unsigned int uAttackPreference;
Ritor1
parents:
diff changeset
165 };
Ritor1
parents:
diff changeset
166 #pragma pack(pop)
Ritor1
parents:
diff changeset
167
Ritor1
parents:
diff changeset
168
237
2799737f8a74 more text parsers refactor
Gloval
parents: 0
diff changeset
169
0
Ritor1
parents:
diff changeset
170 /* 189 */
Ritor1
parents:
diff changeset
171 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
172 struct MonsterStats
Ritor1
parents:
diff changeset
173 {
Ritor1
parents:
diff changeset
174 void Initialize();
Ritor1
parents:
diff changeset
175 void InitializePlacements();
751
6005142abce0 monster init refactored
Gloval
parents: 735
diff changeset
176 signed int FindMonsterByTextureName(const char *Str2);
0
Ritor1
parents:
diff changeset
177
Ritor1
parents:
diff changeset
178 static bool BelongsToSupertype(unsigned int uMonsterInfoID, enum MONSTER_SUPERTYPE eSupertype);
Ritor1
parents:
diff changeset
179
237
2799737f8a74 more text parsers refactor
Gloval
parents: 0
diff changeset
180 MonsterInfo pInfos[265]; //0 - 5b18h
694
52329962fcdb monster table init rework started
Gloval
parents: 319
diff changeset
181 char *pPlaceStrings[31]; //5B18h placement counts from 1
237
2799737f8a74 more text parsers refactor
Gloval
parents: 0
diff changeset
182 unsigned int uNumMonsters; //5B94h
2799737f8a74 more text parsers refactor
Gloval
parents: 0
diff changeset
183 unsigned int uNumPlacements; //5B98h
0
Ritor1
parents:
diff changeset
184 int field_5B9C;
Ritor1
parents:
diff changeset
185 };
Ritor1
parents:
diff changeset
186 #pragma pack(pop)
Ritor1
parents:
diff changeset
187
Ritor1
parents:
diff changeset
188
Ritor1
parents:
diff changeset
189
Ritor1
parents:
diff changeset
190 #pragma pack(push, 1)
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1456
diff changeset
191 struct MonsterDesc_mm6
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1456
diff changeset
192 {
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1456
diff changeset
193 unsigned __int16 uMonsterHeight;
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1456
diff changeset
194 unsigned __int16 uMonsterRadius;
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1456
diff changeset
195 unsigned __int16 uMovementSpeed;
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1456
diff changeset
196 __int16 uToHitRadius;
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1456
diff changeset
197 unsigned __int16 pSoundSampleIDs[4];
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1456
diff changeset
198 char pMonsterName[32];
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1456
diff changeset
199 char pSpriteNames[10][10];
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1456
diff changeset
200 };
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1456
diff changeset
201
0
Ritor1
parents:
diff changeset
202 struct MonsterDesc
Ritor1
parents:
diff changeset
203 {
Ritor1
parents:
diff changeset
204 unsigned __int16 uMonsterHeight;
Ritor1
parents:
diff changeset
205 unsigned __int16 uMonsterRadius;
Ritor1
parents:
diff changeset
206 unsigned __int16 uMovementSpeed;
Ritor1
parents:
diff changeset
207 __int16 uToHitRadius;
Ritor1
parents:
diff changeset
208 unsigned int uTintColor;
Ritor1
parents:
diff changeset
209 unsigned __int16 pSoundSampleIDs[4];
Ritor1
parents:
diff changeset
210 char pMonsterName[32];
Ritor1
parents:
diff changeset
211 char pSpriteNames[10][10];
Ritor1
parents:
diff changeset
212 };
Ritor1
parents:
diff changeset
213 #pragma pack(pop)
Ritor1
parents:
diff changeset
214
Ritor1
parents:
diff changeset
215
Ritor1
parents:
diff changeset
216 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
217 struct MonsterList
Ritor1
parents:
diff changeset
218 {
Ritor1
parents:
diff changeset
219 inline MonsterList(): //----- (00458429)
Ritor1
parents:
diff changeset
220 uNumMonsters(0), pMonsters(nullptr)
Ritor1
parents:
diff changeset
221 {}
751
6005142abce0 monster init refactored
Gloval
parents: 735
diff changeset
222 signed __int16 GetMonsterIDByName(const char *pMonsterName);
0
Ritor1
parents:
diff changeset
223 void ToFile();
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1456
diff changeset
224 void FromFile(void *data_mm6, void *data_mm7, void *data_mm8);
0
Ritor1
parents:
diff changeset
225 bool FromFileTxt(const char *Args);
Ritor1
parents:
diff changeset
226
751
6005142abce0 monster init refactored
Gloval
parents: 735
diff changeset
227 signed int uNumMonsters;
0
Ritor1
parents:
diff changeset
228 struct MonsterDesc *pMonsters;
Ritor1
parents:
diff changeset
229 };
Ritor1
parents:
diff changeset
230 #pragma pack(pop)
Ritor1
parents:
diff changeset
231
Ritor1
parents:
diff changeset
232
Ritor1
parents:
diff changeset
233 extern struct MonsterStats *pMonsterStats;
Ritor1
parents:
diff changeset
234 extern struct MonsterList *pMonsterList;