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 };
|
|
61 #pragma pop()
|
|
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,
|
|
102 EVENT_OnLongTimer = 0x26,
|
|
103 EVENT_SetNPCTopic = 0x27,
|
|
104 EVENT_MoveNPC = 0x28,
|
|
105 EVENT_GiveItem = 0x29,
|
|
106 EVENT_ChangeEvent = 0x2A,
|
|
107 EVENT_CheckSkill = 0x2B,
|
|
108 EVENT_OnCanShowDialogItemCmp = 0x2C,
|
|
109 EVENT_EndCanShowDialogItem = 0x2D,
|
|
110 EVENT_SetCanShowDialogItem = 0x2E,
|
|
111 EVENT_SetNPCGroupNews = 0x2F,
|
|
112 EVENT_SetActorGroup = 0x30,
|
|
113 EVENT_NPCSetItem = 0x31,
|
|
114 EVENT_SetNPCGreeting = 0x32,
|
|
115 EVENT_IsActorAlive = 0x33,
|
|
116 EVENT_OnMapLeave = 0x35,
|
|
117 EVENT_ChangeGroup = 0x36,
|
|
118 EVENT_ChangeGroupAlly = 0x37,
|
|
119 EVENT_CheckSeason = 0x38,
|
|
120 EVENT_ToggleActorGroupFlag = 0x39,
|
|
121 EVENT_ToggleChestFlag = 0x3A,
|
|
122 EVENT_CharacterAnimation = 0x3B,
|
|
123 EVENT_SetActorItem = 0x3C,
|
|
124 EVENT_OnDateTimer = 0x3D,
|
|
125 EVENT_EnableDateTimer = 0x3E,
|
|
126 EVENT_StopAnimation = 0x3F,
|
|
127 EVENT_CheckItemsCount = 0x40,
|
|
128 EVENT_RemoveItems = 0x41,
|
|
129 EVENT_SpecialJump = 0x42,
|
|
130 EVENT_IsTotalBountyHuntingAwardInRange = 0x43,
|
|
131 EVENT_IsNPCInParty = 0x44,
|
|
132 };
|
|
133
|
|
134 /* 311 */
|
|
135 enum VariableType
|
|
136 {
|
|
137 VAR_Sex = 0x1,
|
|
138 VAR_Class = 0x2,
|
|
139 VAR_CurrentHP = 0x3,
|
|
140 VAR_MaxHP = 0x4,
|
|
141 VAR_CurrentSP = 0x5,
|
|
142 VAR_MaxSP = 0x6,
|
|
143 VAR_ActualAC = 0x7,
|
|
144 VAR_ACModifier = 0x8,
|
|
145 VAR_BaseLevel = 0x9,
|
|
146 VAR_LevelModifier = 0xA,
|
|
147 VAR_Age = 0xB,
|
|
148 VAR_Award = 0xC,
|
|
149 VAR_Experience = 0xD,
|
|
150 VAR_Race = 0xE,
|
|
151 VAR_QBits_QuestsDone = 0x10,
|
|
152 VAR_PlayerItemInHands = 0x11,
|
|
153 VAR_Hour = 0x12,
|
|
154 VAR_DayOfYear = 0x13,
|
|
155 VAR_DayOfWeek = 0x14,
|
|
156 VAR_FixedGold = 0x15,
|
|
157 VAR_RandomGold = 0x16,
|
|
158 VAR_FixedFood = 0x17,
|
|
159 VAR_RandomFood = 0x18,
|
|
160 VAR_MightBonus = 0x19,
|
|
161 VAR_IntellectBonus = 0x1A,
|
|
162 VAR_PersonalityBonus = 0x1B,
|
|
163 VAR_EnduranceBonus = 0x1C,
|
|
164 VAR_SpeedBonus = 0x1D,
|
|
165 VAR_AccuracyBonus = 0x1E,
|
|
166 VAR_LuckBonus = 0x1F,
|
|
167 VAR_BaseMight = 0x20,
|
|
168 VAR_BaseIntellect = 0x21,
|
|
169 VAR_BasePersonality = 0x22,
|
|
170 VAR_BaseEndurance = 0x23,
|
|
171 VAR_BaseSpeed = 0x24,
|
|
172 VAR_BaseAccuracy = 0x25,
|
|
173 VAR_BaseLuck = 0x26,
|
|
174 VAR_ActualMight = 0x27,
|
|
175 VAR_ActualIntellect = 0x28,
|
|
176 VAR_ActualPersonality = 0x29,
|
|
177 VAR_ActualEndurance = 0x2A,
|
|
178 VAR_ActualSpeed = 0x2B,
|
|
179 VAR_ActualAccuracy = 0x2C,
|
|
180 VAR_ActualLuck = 0x2D,
|
|
181 VAR_FireResistance = 0x2E,
|
|
182 VAR_AirResistance = 0x2F,
|
|
183 VAR_WaterResistance = 0x30,
|
|
184 VAR_EarthResistance = 0x31,
|
|
185 VAR_SpiritResistance = 0x32,
|
|
186 VAR_MindResistance = 0x33,
|
|
187 VAR_BodyResistance = 0x34,
|
|
188 VAR_LightResistance = 0x35,
|
|
189 VAR_DarkResistance = 0x36,
|
|
190 VAR_PhysicalResistance = 0x37,
|
|
191 VAR_MagicResistance = 0x38,
|
|
192 VAR_FireResistanceBonus = 0x39,
|
|
193 VAR_AirResistanceBonus = 0x3A,
|
|
194 VAR_WaterResistanceBonus = 0x3B,
|
|
195 VAR_EarthResistanceBonus = 0x3C,
|
|
196 VAR_SpiritResistanceBonus = 0x3D,
|
|
197 VAR_MindResistanceBonus = 0x3E,
|
|
198 VAR_BodyResistanceBonus = 0x3F,
|
|
199 VAR_LightResistanceBonus = 0x40,
|
|
200 VAR_DarkResistanceBonus = 0x41,
|
|
201 VAR_PhysicalResistanceBonus = 0x42,
|
|
202 VAR_MagicResistanceBonus = 0x43,
|
|
203 VAR_StaffSkill = 0x44,
|
|
204 VAR_SwordSkill = 0x45,
|
|
205 VAR_DaggerSkill = 0x46,
|
|
206 VAR_AxeSkill = 0x47,
|
|
207 VAR_SpearSkill = 0x48,
|
|
208 VAR_BowSkill = 0x49,
|
|
209 VAR_MaceSkill = 0x4A,
|
|
210 VAR_BlasterSkill = 0x4B,
|
|
211 VAR_ShieldSkill = 0x4C,
|
|
212 VAR_LeatherSkill = 0x4D,
|
|
213 VAR_SkillChain = 0x4E,
|
|
214 VAR_PlateSkill = 0x4F,
|
|
215 VAR_FireSkill = 0x50,
|
|
216 VAR_AirSkill = 0x51,
|
|
217 VAR_WaterSkill = 0x52,
|
|
218 VAR_EarthSkill = 0x53,
|
|
219 VAR_SpiritSkill = 0x54,
|
|
220 VAR_MindSkill = 0x55,
|
|
221 VAR_BodySkill = 0x56,
|
|
222 VAR_LightSkill = 0x57,
|
|
223 VAR_DarkSkill = 0x58,
|
|
224 VAR_IdentifyItemSkill = 0x59,
|
|
225 VAR_MerchantSkill = 0x5A,
|
|
226 VAR_RepairSkill = 0x5B,
|
|
227 VAR_BodybuildingSkill = 0x5C,
|
|
228 VAR_MeditationSkill = 0x5D,
|
|
229 VAR_PerceptionSkill = 0x5E,
|
|
230 VAR_DiplomacySkill = 0x5F,
|
|
231 VAR_ThieverySkill = 0x60,
|
|
232 VAR_DisarmTrapSkill = 0x61,
|
|
233 VAR_DodgeSkill = 0x62,
|
|
234 VAR_UnarmedSkill = 0x63,
|
|
235 VAR_IdentifyMonsterSkill = 0x64,
|
|
236 VAR_ArmsmasterSkill = 0x65,
|
|
237 VAR_StealingSkill = 0x66,
|
|
238 VAR_AlchemySkill = 0x67,
|
|
239 VAR_LearningSkill = 0x68,
|
|
240 VAR_Cursed = 0x69,
|
|
241 VAR_Weak = 0x6A,
|
|
242 VAR_Asleep = 0x6B,
|
|
243 VAR_Afraid = 0x6C,
|
|
244 VAR_Drunk = 0x6D,
|
|
245 VAR_Insane = 0x6E,
|
|
246 VAR_PoisonedGreen = 0x6F,
|
|
247 VAR_DiseasedGreen = 0x70,
|
|
248 VAR_PoisonedYellow = 0x71,
|
|
249 VAR_DiseasedYellow = 0x72,
|
|
250 VAR_PoisonedRed = 0x73,
|
|
251 VAR_DiseasedRed = 0x74,
|
|
252 VAR_Paralyzed = 0x75,
|
|
253 VAR_Unconsious = 0x76,
|
|
254 VAR_Dead = 0x77,
|
|
255 VAR_Stoned = 0x78,
|
|
256 VAR_Eradicated = 0x79,
|
|
257 VAR_MajorCondition = 0x7A,
|
|
258 VAR_MapPersistentVariable_0 = 0x7B,
|
|
259 VAR_NPCs = 0xD6,
|
|
260 VAR_Reputation = 0xD7,
|
|
261 VAR_ActiveSpells = 0xDE,
|
|
262 VAR_AutoNotes = 0xDF,
|
|
263 VAR_MonthEquals = 0xE2,
|
|
264 VAR_NPCs2 = 0xE8,
|
|
265 VAR_IsFlying = 0xF0,
|
|
266 VAR_HiredNPCHasSpeciality = 0xF1,
|
|
267 VAR_CircusPrises = 0xF2,
|
|
268 VAR_NumSkillPoints = 0xF3,
|
|
269 VAR_MonthEquals2 = 0xF4,
|
|
270 VAR_Counter1 = 0xF7,
|
|
271 VAR_Counter2 = 0xF8,
|
|
272 VAR_Counter3 = 0xF9,
|
|
273 VAR_Counter4 = 0xFA,
|
|
274 VAR_Counter5 = 0xFB,
|
|
275 VAR_Counter6 = 0xFC,
|
|
276 VAR_Counter7 = 0xFD,
|
|
277 VAR_Counter8 = 0xFE,
|
|
278 VAR_Counter9 = 0xFF,
|
|
279 VAR_CounterA = 0x100,
|
|
280 VAR_ReputationInCurrentLocation = 0x113,
|
|
281 VAR_History_0 = 0x114,
|
|
282 VAR_History_28 = 0x130,
|
|
283 VAR_GoldInBank = 0x132,
|
|
284 VAR_NumDeaths = 0x133,
|
|
285 VAR_NumBounties = 0x134,
|
|
286 VAR_PrisonTerms = 0x135,
|
|
287 VAR_ArenaWinsPage = 0x136,
|
|
288 VAR_ArenaWinsSquire = 0x137,
|
|
289 VAR_ArenaWinsKnight = 0x138,
|
|
290 VAR_ArenaWinsLord = 0x139,
|
|
291 VAR_Invisible = 0x13A,
|
|
292 VAR_ItemEquipped = 0x13B,
|
|
293 };
|
|
294
|
336
|
295 #define EVT_WORD(x) *(unsigned __int16*)&x
|
|
296 #define EVT_DWORD(x) *(unsigned int*)&x
|
|
297 #define EVT_STRING(x) (unsigned char*)&x
|
|
298 #define EVT_BYTE(x) (unsigned char)x
|
0
|
299
|
307
|
300 extern EventIndex pSomeOtherEVT_Events[4400];
|
0
|
301 extern unsigned int uSomeOtherEVT_NumEvents;
|
|
302 extern char *pSomeOtherEVT;
|
307
|
303 extern EventIndex pSomeEVT_Events[4400];
|
0
|
304 extern unsigned int uSomeEVT_NumEvents;
|
|
305 extern char *pSomeEVT;
|
|
306
|
|
307 extern unsigned int uGlobalEVT_NumEvents;
|
|
308 extern unsigned int uGlobalEVT_Size;
|
|
309 extern char pGlobalEVT[46080];
|
307
|
310 extern EventIndex pGlobalEVT_Index[4400];
|
0
|
311
|
|
312 extern unsigned int pLevelStrOffsets[500];
|
|
313 extern unsigned int uLevelStrNumStrings;
|
|
314 extern unsigned int uLevelStrFileSize;
|
|
315 extern unsigned int uLevelEVT_NumEvents;
|
|
316 extern unsigned int uLevelEVT_Size;
|
|
317 extern char pLevelStr[9216];
|
|
318 extern char pLevelEVT[9216];
|
307
|
319 extern EventIndex pLevelEVT_Index[4400];
|
0
|
320
|
|
321
|
307
|
322 unsigned int LoadEventsToBuffer(const char *pContainerName, char *pBuffer, unsigned int uBufferSize);
|
|
323 void Initialize_GlobalEVT();
|
|
324 void LoadLevel_InitializeLevelEvt();
|
|
325 void EventProcessor(int uEventID, int a2, int a3);
|
0
|
326
|
|
327
|
|
328
|
|
329 /* 312 */
|
|
330 #pragma pack(push, 1)
|
|
331 struct ByteArray
|
|
332 {
|
|
333 char f[65535];
|
|
334 };
|
|
335 #pragma pack(pop)
|