Mercurial > mm7
annotate Events.h @ 1892:9995cbcc62e0
Actor::GetActorsRelation finishing cleanup
author | Grumpy7 |
---|---|
date | Sun, 20 Oct 2013 00:21:16 -0700 |
parents | cecb080929c4 |
children | 5d263539bbec |
rev | line source |
---|---|
0 | 1 #pragma once |
2 | |
3 | |
4 | |
5 | |
6 /* 167 */ | |
7 #pragma pack(push, 1) | |
307 | 8 struct EventIndex |
0 | 9 { |
10 int uEventID; | |
307 | 11 int event_sequence_num; |
0 | 12 unsigned int uEventOffsetInEVT; |
13 }; | |
14 #pragma pack(pop) | |
15 | |
307 | 16 // raw event struct |
17 // header | |
18 // size_event 1 header+data | |
19 // event id 2 3 | |
20 // event_sequence_num | |
21 // event data | |
0 | 22 #pragma pack(push, 1) |
23 struct _evt_raw | |
24 { | |
310 | 25 unsigned char _e_size; |
0 | 26 unsigned char v1; |
27 unsigned char v2; | |
28 unsigned char v3; | |
307 | 29 |
310 | 30 unsigned char _e_type; |
0 | 31 unsigned char v5; |
32 unsigned char v6; | |
33 unsigned char v7; | |
34 unsigned char v8; | |
35 unsigned char v9; | |
36 unsigned char v10; | |
37 unsigned char v11; | |
38 unsigned char v12; | |
39 unsigned char v13; | |
40 unsigned char v14; | |
41 unsigned char v15; | |
42 unsigned char v16; | |
43 unsigned char v17; | |
44 unsigned char v18; | |
45 unsigned char v19; | |
46 unsigned char v20; | |
47 unsigned char v21; | |
48 unsigned char v22; | |
49 unsigned char v23; | |
50 unsigned char v24; | |
51 unsigned char v25; | |
52 unsigned char v26; | |
53 unsigned char v27; | |
54 unsigned char v28; | |
55 unsigned char v29; | |
56 unsigned char v30; | |
57 unsigned char v31; | |
58 unsigned char v32; | |
59 unsigned char tail[128]; | |
60 }; | |
1105 | 61 #pragma pack(pop) |
0 | 62 |
63 | |
64 | |
65 /* 310 */ | |
66 enum EventType | |
67 { | |
68 EVENT_Exit = 0x1, | |
69 EVENT_SpeakInHouse = 0x2, | |
70 EVENT_PlaySound = 0x3, | |
71 EVENT_MouseOver = 0x4, | |
72 EVENT_LocationName = 0x5, | |
73 EVENT_MoveToMap = 0x6, | |
74 EVENT_OpenChest = 0x7, | |
75 EVENT_ShowFace = 0x8, | |
76 EVENT_ReceiveDamage = 0x9, | |
77 EVENT_SetSnow = 0xA, | |
78 EVENT_SetTexture = 0xB, | |
79 EVENT_ShowMovie = 0xC, | |
80 EVENT_SetSprite = 0xD, | |
81 EVENT_Compare = 0xE, | |
82 EVENT_ChangeDoorState = 0xF, | |
83 EVENT_Add = 0x10, | |
84 EVENT_Substract = 0x11, | |
85 EVENT_Set = 0x12, | |
86 EVENT_SummonMonsters = 0x13, | |
87 EVENT_CastSpell = 0x15, | |
88 EVENT_SpeakNPC = 0x16, | |
89 EVENT_SetFacesBit = 0x17, | |
90 EVENT_ToggleActorFlag = 0x18, | |
91 EVENT_RandomGoTo = 0x19, | |
92 EVENT_InputString = 0x1A, | |
93 EVENT_StatusText = 0x1D, | |
94 EVENT_ShowMessage = 0x1E, | |
95 EVENT_OnTimer = 0x1F, | |
96 EVENT_ToggleIndoorLight = 0x20, | |
97 EVENT_PressAnyKey = 0x21, | |
98 EVENT_SummonItem = 0x22, | |
99 EVENT_ForPartyMember = 0x23, | |
100 EVENT_Jmp = 0x24, | |
101 EVENT_OnMapReload = 0x25, | |
1052 | 102 EVENT_Initialize = 0x26, |
0 | 103 EVENT_SetNPCTopic = 0x27, |
104 EVENT_MoveNPC = 0x28, | |
105 EVENT_GiveItem = 0x29, | |
106 EVENT_ChangeEvent = 0x2A, | |
107 EVENT_CheckSkill = 0x2B, | |
423 | 108 EVENT_OnCanShowDialogItemCmp = 44, |
109 EVENT_EndCanShowDialogItem = 45, | |
110 EVENT_SetCanShowDialogItem = 46, | |
0 | 111 EVENT_SetNPCGroupNews = 0x2F, |
112 EVENT_SetActorGroup = 0x30, | |
113 EVENT_NPCSetItem = 0x31, | |
114 EVENT_SetNPCGreeting = 0x32, | |
115 EVENT_IsActorAlive = 0x33, | |
423 | 116 EVENT_IsActorAssasinated =52, |
0 | 117 EVENT_OnMapLeave = 0x35, |
118 EVENT_ChangeGroup = 0x36, | |
119 EVENT_ChangeGroupAlly = 0x37, | |
120 EVENT_CheckSeason = 0x38, | |
121 EVENT_ToggleActorGroupFlag = 0x39, | |
122 EVENT_ToggleChestFlag = 0x3A, | |
123 EVENT_CharacterAnimation = 0x3B, | |
124 EVENT_SetActorItem = 0x3C, | |
125 EVENT_OnDateTimer = 0x3D, | |
126 EVENT_EnableDateTimer = 0x3E, | |
127 EVENT_StopAnimation = 0x3F, | |
128 EVENT_CheckItemsCount = 0x40, | |
129 EVENT_RemoveItems = 0x41, | |
130 EVENT_SpecialJump = 0x42, | |
131 EVENT_IsTotalBountyHuntingAwardInRange = 0x43, | |
132 EVENT_IsNPCInParty = 0x44, | |
133 }; | |
134 | |
135 /* 311 */ | |
136 enum VariableType | |
137 { | |
138 VAR_Sex = 0x1, | |
139 VAR_Class = 0x2, | |
140 VAR_CurrentHP = 0x3, | |
141 VAR_MaxHP = 0x4, | |
142 VAR_CurrentSP = 0x5, | |
143 VAR_MaxSP = 0x6, | |
144 VAR_ActualAC = 0x7, | |
145 VAR_ACModifier = 0x8, | |
146 VAR_BaseLevel = 0x9, | |
147 VAR_LevelModifier = 0xA, | |
148 VAR_Age = 0xB, | |
149 VAR_Award = 0xC, | |
150 VAR_Experience = 0xD, | |
151 VAR_Race = 0xE, | |
152 VAR_QBits_QuestsDone = 0x10, | |
153 VAR_PlayerItemInHands = 0x11, | |
154 VAR_Hour = 0x12, | |
155 VAR_DayOfYear = 0x13, | |
156 VAR_DayOfWeek = 0x14, | |
157 VAR_FixedGold = 0x15, | |
158 VAR_RandomGold = 0x16, | |
159 VAR_FixedFood = 0x17, | |
160 VAR_RandomFood = 0x18, | |
161 VAR_MightBonus = 0x19, | |
162 VAR_IntellectBonus = 0x1A, | |
163 VAR_PersonalityBonus = 0x1B, | |
164 VAR_EnduranceBonus = 0x1C, | |
165 VAR_SpeedBonus = 0x1D, | |
166 VAR_AccuracyBonus = 0x1E, | |
167 VAR_LuckBonus = 0x1F, | |
168 VAR_BaseMight = 0x20, | |
169 VAR_BaseIntellect = 0x21, | |
170 VAR_BasePersonality = 0x22, | |
171 VAR_BaseEndurance = 0x23, | |
172 VAR_BaseSpeed = 0x24, | |
173 VAR_BaseAccuracy = 0x25, | |
174 VAR_BaseLuck = 0x26, | |
175 VAR_ActualMight = 0x27, | |
176 VAR_ActualIntellect = 0x28, | |
177 VAR_ActualPersonality = 0x29, | |
178 VAR_ActualEndurance = 0x2A, | |
179 VAR_ActualSpeed = 0x2B, | |
180 VAR_ActualAccuracy = 0x2C, | |
181 VAR_ActualLuck = 0x2D, | |
182 VAR_FireResistance = 0x2E, | |
183 VAR_AirResistance = 0x2F, | |
184 VAR_WaterResistance = 0x30, | |
185 VAR_EarthResistance = 0x31, | |
186 VAR_SpiritResistance = 0x32, | |
187 VAR_MindResistance = 0x33, | |
188 VAR_BodyResistance = 0x34, | |
189 VAR_LightResistance = 0x35, | |
190 VAR_DarkResistance = 0x36, | |
191 VAR_PhysicalResistance = 0x37, | |
192 VAR_MagicResistance = 0x38, | |
193 VAR_FireResistanceBonus = 0x39, | |
194 VAR_AirResistanceBonus = 0x3A, | |
195 VAR_WaterResistanceBonus = 0x3B, | |
196 VAR_EarthResistanceBonus = 0x3C, | |
197 VAR_SpiritResistanceBonus = 0x3D, | |
198 VAR_MindResistanceBonus = 0x3E, | |
199 VAR_BodyResistanceBonus = 0x3F, | |
200 VAR_LightResistanceBonus = 0x40, | |
201 VAR_DarkResistanceBonus = 0x41, | |
202 VAR_PhysicalResistanceBonus = 0x42, | |
203 VAR_MagicResistanceBonus = 0x43, | |
204 VAR_StaffSkill = 0x44, | |
205 VAR_SwordSkill = 0x45, | |
206 VAR_DaggerSkill = 0x46, | |
207 VAR_AxeSkill = 0x47, | |
208 VAR_SpearSkill = 0x48, | |
209 VAR_BowSkill = 0x49, | |
210 VAR_MaceSkill = 0x4A, | |
211 VAR_BlasterSkill = 0x4B, | |
212 VAR_ShieldSkill = 0x4C, | |
213 VAR_LeatherSkill = 0x4D, | |
214 VAR_SkillChain = 0x4E, | |
215 VAR_PlateSkill = 0x4F, | |
216 VAR_FireSkill = 0x50, | |
217 VAR_AirSkill = 0x51, | |
218 VAR_WaterSkill = 0x52, | |
219 VAR_EarthSkill = 0x53, | |
220 VAR_SpiritSkill = 0x54, | |
221 VAR_MindSkill = 0x55, | |
222 VAR_BodySkill = 0x56, | |
223 VAR_LightSkill = 0x57, | |
224 VAR_DarkSkill = 0x58, | |
225 VAR_IdentifyItemSkill = 0x59, | |
226 VAR_MerchantSkill = 0x5A, | |
227 VAR_RepairSkill = 0x5B, | |
228 VAR_BodybuildingSkill = 0x5C, | |
229 VAR_MeditationSkill = 0x5D, | |
230 VAR_PerceptionSkill = 0x5E, | |
231 VAR_DiplomacySkill = 0x5F, | |
232 VAR_ThieverySkill = 0x60, | |
233 VAR_DisarmTrapSkill = 0x61, | |
234 VAR_DodgeSkill = 0x62, | |
235 VAR_UnarmedSkill = 0x63, | |
236 VAR_IdentifyMonsterSkill = 0x64, | |
237 VAR_ArmsmasterSkill = 0x65, | |
238 VAR_StealingSkill = 0x66, | |
239 VAR_AlchemySkill = 0x67, | |
240 VAR_LearningSkill = 0x68, | |
241 VAR_Cursed = 0x69, | |
242 VAR_Weak = 0x6A, | |
243 VAR_Asleep = 0x6B, | |
244 VAR_Afraid = 0x6C, | |
245 VAR_Drunk = 0x6D, | |
246 VAR_Insane = 0x6E, | |
247 VAR_PoisonedGreen = 0x6F, | |
248 VAR_DiseasedGreen = 0x70, | |
249 VAR_PoisonedYellow = 0x71, | |
250 VAR_DiseasedYellow = 0x72, | |
251 VAR_PoisonedRed = 0x73, | |
252 VAR_DiseasedRed = 0x74, | |
253 VAR_Paralyzed = 0x75, | |
254 VAR_Unconsious = 0x76, | |
255 VAR_Dead = 0x77, | |
256 VAR_Stoned = 0x78, | |
257 VAR_Eradicated = 0x79, | |
258 VAR_MajorCondition = 0x7A, | |
1052 | 259 VAR_MapPersistentVariable_0 = 123, |
1736
c6fe09a06712
Player::CompareVariable finished, renamed stru_5E4C90 to stru_5E4C90_MapPersistVars, party::field_4A0 to party::CounterEventValues
Grumpy7
parents:
1731
diff
changeset
|
260 VAR_MapPersistentVariable_74 = 0xC5, |
c6fe09a06712
Player::CompareVariable finished, renamed stru_5E4C90 to stru_5E4C90_MapPersistVars, party::field_4A0 to party::CounterEventValues
Grumpy7
parents:
1731
diff
changeset
|
261 VAR_MapPersistentVariable_75 = 0xC6, |
c6fe09a06712
Player::CompareVariable finished, renamed stru_5E4C90 to stru_5E4C90_MapPersistVars, party::field_4A0 to party::CounterEventValues
Grumpy7
parents:
1731
diff
changeset
|
262 VAR_MapPersistentVariable_99 = 0xDE, |
0 | 263 VAR_AutoNotes = 0xDF, |
1731 | 264 VAR_IsMightMoreThanBase = 0xE0, |
265 VAR_IsIntellectMoreThanBase = 0xE1, | |
266 VAR_IsPersonalityMoreThanBase = 0xE2, | |
267 VAR_IsEnduranceMoreThanBase = 0xE3, | |
268 VAR_IsSpeedMoreThanBase = 0xE4, | |
269 VAR_IsAccuracyMoreThanBase = 0xE5, | |
270 VAR_IsLuckMoreThanBase = 0xE6, | |
271 VAR_PlayerBits = 0xE7, | |
0 | 272 VAR_NPCs2 = 0xE8, |
273 VAR_IsFlying = 0xF0, | |
274 VAR_HiredNPCHasSpeciality = 0xF1, | |
275 VAR_CircusPrises = 0xF2, | |
276 VAR_NumSkillPoints = 0xF3, | |
1731 | 277 VAR_MonthIs = 0xF4, |
278 VAR_Counter1 = 0xF5, | |
279 VAR_Counter2 = 0xF6, | |
280 VAR_Counter3 = 0xF7, | |
281 VAR_Counter4 = 0xF8, | |
282 VAR_Counter5 = 0xF9, | |
283 VAR_Counter6 = 0xFa, | |
284 VAR_Counter7 = 0xFB, | |
285 VAR_Counter8 = 0xFC, | |
286 VAR_Counter9 = 0xFD, | |
287 VAR_Counter10 = 0xFE, | |
1747
cecb080929c4
Party_stru0 renamed to PartyTimeStruct, fixed its members, renamed Party::field_3C to Party::PartyTimes, started Player::SetVariable refactoring start
Grumpy7
parents:
1736
diff
changeset
|
288 VAR_UnknownTimeEvent0 = 0xFF, |
cecb080929c4
Party_stru0 renamed to PartyTimeStruct, fixed its members, renamed Party::field_3C to Party::PartyTimes, started Player::SetVariable refactoring start
Grumpy7
parents:
1736
diff
changeset
|
289 VAR_UnknownTimeEvent19 = 0x112, |
0 | 290 VAR_ReputationInCurrentLocation = 0x113, |
291 VAR_History_0 = 0x114, | |
292 VAR_History_28 = 0x130, | |
1731 | 293 VAR_Unknown1 = 0x131, |
0 | 294 VAR_GoldInBank = 0x132, |
295 VAR_NumDeaths = 0x133, | |
296 VAR_NumBounties = 0x134, | |
297 VAR_PrisonTerms = 0x135, | |
298 VAR_ArenaWinsPage = 0x136, | |
299 VAR_ArenaWinsSquire = 0x137, | |
300 VAR_ArenaWinsKnight = 0x138, | |
301 VAR_ArenaWinsLord = 0x139, | |
302 VAR_Invisible = 0x13A, | |
303 VAR_ItemEquipped = 0x13B, | |
304 }; | |
305 | |
336 | 306 #define EVT_WORD(x) *(unsigned __int16*)&x |
307 #define EVT_DWORD(x) *(unsigned int*)&x | |
308 #define EVT_STRING(x) (unsigned char*)&x | |
309 #define EVT_BYTE(x) (unsigned char)x | |
0 | 310 |
1202 | 311 extern std::array<EventIndex, 4400> pSomeOtherEVT_Events; |
423 | 312 extern signed int uSomeOtherEVT_NumEvents; |
0 | 313 extern char *pSomeOtherEVT; |
1202 | 314 extern std::array<EventIndex, 4400> pSomeEVT_Events; |
428 | 315 extern signed int uSomeEVT_NumEvents; |
0 | 316 extern char *pSomeEVT; |
317 | |
318 extern unsigned int uGlobalEVT_NumEvents; | |
319 extern unsigned int uGlobalEVT_Size; | |
1202 | 320 extern std::array<char, 46080> pGlobalEVT; |
321 extern std::array<EventIndex, 4400> pGlobalEVT_Index; | |
0 | 322 |
1202 | 323 extern std::array<unsigned int, 500> pLevelStrOffsets; |
0 | 324 extern unsigned int uLevelStrNumStrings; |
325 extern unsigned int uLevelStrFileSize; | |
428 | 326 extern signed int uLevelEVT_NumEvents; |
0 | 327 extern unsigned int uLevelEVT_Size; |
1202 | 328 extern std::array<char, 9216> pLevelStr; |
329 extern std::array<char, 9216> pLevelEVT; | |
330 extern std::array<EventIndex, 4400> pLevelEVT_Index; | |
0 | 331 |
332 | |
307 | 333 unsigned int LoadEventsToBuffer(const char *pContainerName, char *pBuffer, unsigned int uBufferSize); |
1052 | 334 void Initialize_GlobalEVT(); |
335 void LoadLevel_InitializeLevelEvt(); | |
336 void EventProcessor(int uEventID, int a2, int a3, int entry_line = 0); | |
0 | 337 |
338 | |
339 | |
340 /* 312 */ | |
341 #pragma pack(push, 1) | |
342 struct ByteArray | |
343 { | |
344 char f[65535]; | |
345 }; | |
346 #pragma pack(pop) |