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,
|
|
260 VAR_MapPersistentVariable_1 = 124,
|
|
261 VAR_MapPersistentVariable_2 = 125,
|
|
262 VAR_MapPersistentVariable_3 = 126,
|
|
263 VAR_MapPersistentVariable_4 = 127,
|
|
264 VAR_MapPersistentVariable_5 = 0x80,
|
0
|
265 VAR_NPCs = 0xD6,
|
|
266 VAR_Reputation = 0xD7,
|
|
267 VAR_ActiveSpells = 0xDE,
|
|
268 VAR_AutoNotes = 0xDF,
|
|
269 VAR_MonthEquals = 0xE2,
|
|
270 VAR_NPCs2 = 0xE8,
|
|
271 VAR_IsFlying = 0xF0,
|
|
272 VAR_HiredNPCHasSpeciality = 0xF1,
|
|
273 VAR_CircusPrises = 0xF2,
|
|
274 VAR_NumSkillPoints = 0xF3,
|
|
275 VAR_MonthEquals2 = 0xF4,
|
|
276 VAR_Counter1 = 0xF7,
|
|
277 VAR_Counter2 = 0xF8,
|
|
278 VAR_Counter3 = 0xF9,
|
|
279 VAR_Counter4 = 0xFA,
|
|
280 VAR_Counter5 = 0xFB,
|
|
281 VAR_Counter6 = 0xFC,
|
|
282 VAR_Counter7 = 0xFD,
|
|
283 VAR_Counter8 = 0xFE,
|
|
284 VAR_Counter9 = 0xFF,
|
|
285 VAR_CounterA = 0x100,
|
|
286 VAR_ReputationInCurrentLocation = 0x113,
|
|
287 VAR_History_0 = 0x114,
|
|
288 VAR_History_28 = 0x130,
|
|
289 VAR_GoldInBank = 0x132,
|
|
290 VAR_NumDeaths = 0x133,
|
|
291 VAR_NumBounties = 0x134,
|
|
292 VAR_PrisonTerms = 0x135,
|
|
293 VAR_ArenaWinsPage = 0x136,
|
|
294 VAR_ArenaWinsSquire = 0x137,
|
|
295 VAR_ArenaWinsKnight = 0x138,
|
|
296 VAR_ArenaWinsLord = 0x139,
|
|
297 VAR_Invisible = 0x13A,
|
|
298 VAR_ItemEquipped = 0x13B,
|
|
299 };
|
|
300
|
336
|
301 #define EVT_WORD(x) *(unsigned __int16*)&x
|
|
302 #define EVT_DWORD(x) *(unsigned int*)&x
|
|
303 #define EVT_STRING(x) (unsigned char*)&x
|
|
304 #define EVT_BYTE(x) (unsigned char)x
|
0
|
305
|
1202
|
306 extern std::array<EventIndex, 4400> pSomeOtherEVT_Events;
|
423
|
307 extern signed int uSomeOtherEVT_NumEvents;
|
0
|
308 extern char *pSomeOtherEVT;
|
1202
|
309 extern std::array<EventIndex, 4400> pSomeEVT_Events;
|
428
|
310 extern signed int uSomeEVT_NumEvents;
|
0
|
311 extern char *pSomeEVT;
|
|
312
|
|
313 extern unsigned int uGlobalEVT_NumEvents;
|
|
314 extern unsigned int uGlobalEVT_Size;
|
1202
|
315 extern std::array<char, 46080> pGlobalEVT;
|
|
316 extern std::array<EventIndex, 4400> pGlobalEVT_Index;
|
0
|
317
|
1202
|
318 extern std::array<unsigned int, 500> pLevelStrOffsets;
|
0
|
319 extern unsigned int uLevelStrNumStrings;
|
|
320 extern unsigned int uLevelStrFileSize;
|
428
|
321 extern signed int uLevelEVT_NumEvents;
|
0
|
322 extern unsigned int uLevelEVT_Size;
|
1202
|
323 extern std::array<char, 9216> pLevelStr;
|
|
324 extern std::array<char, 9216> pLevelEVT;
|
|
325 extern std::array<EventIndex, 4400> pLevelEVT_Index;
|
0
|
326
|
|
327
|
307
|
328 unsigned int LoadEventsToBuffer(const char *pContainerName, char *pBuffer, unsigned int uBufferSize);
|
1052
|
329 void Initialize_GlobalEVT();
|
|
330 void LoadLevel_InitializeLevelEvt();
|
|
331 void EventProcessor(int uEventID, int a2, int a3, int entry_line = 0);
|
0
|
332
|
|
333
|
|
334
|
|
335 /* 312 */
|
|
336 #pragma pack(push, 1)
|
|
337 struct ByteArray
|
|
338 {
|
|
339 char f[65535];
|
|
340 };
|
|
341 #pragma pack(pop)
|