Mercurial > mm7
annotate Events.cpp @ 1081:6ea7c693a1cf
Merge
author | Gloval |
---|---|
date | Sat, 25 May 2013 23:51:56 +0400 |
parents | 1c10b24a4159 |
children | 5d5c78088274 |
rev | line source |
---|---|
762 | 1 #include <assert.h> |
307 | 2 #include <stdlib.h> |
3 | |
1016 | 4 #include "VideoPlayer.h" |
5 #include "Mouse.h" | |
6 | |
307 | 7 #include "MapInfo.h" |
8 #include "Game.h" | |
1052 | 9 #include "Outdoor.h" |
307 | 10 #include "GUIWindow.h" |
11 #include "GUIProgressBar.h" | |
12 #include "Chest.h" | |
13 #include "stru176.h" | |
14 #include "LOD.h" | |
15 #include "Actor.h" | |
16 #include "Party.h" | |
17 #include "Math.h" | |
18 #include "AudioPlayer.h" | |
19 #include "Indoor.h" | |
20 #include "Viewport.h" | |
21 #include "texts.h" | |
22 #include "Allocator.h" | |
23 #include "stru123.h" | |
24 #include "stru159.h" | |
0 | 25 #include "Events.h" |
26 #include "Events2D.h" | |
629 | 27 #include "UIHouses.h" |
1052 | 28 #include "Log.h" |
481 | 29 #include "MM7.h" |
0 | 30 |
31 | |
32 | |
307 | 33 EventIndex pSomeOtherEVT_Events[4400]; |
423 | 34 signed int uSomeOtherEVT_NumEvents; |
0 | 35 char *pSomeOtherEVT; |
307 | 36 EventIndex pSomeEVT_Events[4400]; |
428 | 37 signed int uSomeEVT_NumEvents; |
0 | 38 char *pSomeEVT; |
39 | |
40 unsigned int uGlobalEVT_NumEvents; | |
41 unsigned int uGlobalEVT_Size; | |
42 char pGlobalEVT[46080]; | |
307 | 43 EventIndex pGlobalEVT_Index[4400]; |
0 | 44 |
45 unsigned int pLevelStrOffsets[500]; | |
46 unsigned int uLevelStrNumStrings; | |
47 unsigned int uLevelStrFileSize; | |
428 | 48 signed int uLevelEVT_NumEvents; |
0 | 49 unsigned int uLevelEVT_Size; |
50 char pLevelStr[9216]; | |
51 char pLevelEVT[9216]; | |
307 | 52 EventIndex pLevelEVT_Index[4400]; |
0 | 53 |
54 | |
55 _2devent p2DEvents[525]; // weak | |
307 | 56 |
57 | |
58 | |
59 //----- (00443CE1) -------------------------------------------------------- | |
60 unsigned int LoadEventsToBuffer(const char *pContainerName, char *pBuffer, unsigned int uBufferSize) | |
1052 | 61 { |
307 | 62 FILE *pLodFile; // eax@1 |
63 unsigned int uTextureSize; // esi@3 | |
64 char Args[60]; // [sp+8h] [bp-B4h]@6 | |
65 void *ptr; // [sp+B8h] [bp-4h]@1 | |
66 Texture DstBuf; // [sp+6Ch] [bp-50h]@1 | |
67 | |
68 ptr = pEvents_LOD->LoadRaw(pContainerName, 0); | |
69 pLodFile = pEvents_LOD->FindContainer(pContainerName, 0); | |
70 if ( !pLodFile ) | |
71 Abortf("Unable to load %s", pContainerName); | |
72 fread(&DstBuf, 1, 48, pLodFile); | |
73 uTextureSize = DstBuf.uDecompressedSize; | |
74 if ( !DstBuf.uDecompressedSize ) | |
75 uTextureSize = DstBuf.uTextureSize; | |
76 memset(&DstBuf, 0, 72); | |
77 if ( uTextureSize >= (signed int)uBufferSize ) | |
78 { | |
79 sprintf(Args, "File %s Size %lu - Buffer size %lu", pContainerName, uTextureSize, uBufferSize); | |
80 Abortf(Args); | |
81 } | |
82 memcpy(pBuffer, ptr, uTextureSize); | |
83 pAllocator->FreeChunk(ptr); | |
84 return uTextureSize; | |
85 } | |
86 | |
87 //----- (00443DA1) -------------------------------------------------------- | |
88 void __cdecl Initialize_GlobalEVT() | |
762 | 89 { |
307 | 90 struct raw_event_header |
91 { | |
92 unsigned char evt_size; | |
93 unsigned char evt_id_l; | |
94 unsigned char evt_id_h; | |
95 unsigned char evt_sequence_num; | |
96 } ; | |
97 uint events_count; | |
98 unsigned int offset_in; | |
99 raw_event_header *current_hdr; | |
100 uGlobalEVT_NumEvents = 0; | |
101 uGlobalEVT_Size = LoadEventsToBuffer("global.evt", pGlobalEVT, 46080); | |
102 if ( !uGlobalEVT_Size ) | |
103 return; | |
104 memset(pGlobalEVT_Index, 0x80, sizeof(pGlobalEVT_Index));//52800 | |
105 events_count = uGlobalEVT_NumEvents; | |
106 current_hdr=(raw_event_header *)pGlobalEVT; | |
107 offset_in=0; | |
108 for (events_count = 0, offset_in = 0; offset_in < uGlobalEVT_Size; ++events_count) | |
109 { | |
110 pGlobalEVT_Index[events_count].uEventID=current_hdr->evt_id_l+(current_hdr->evt_id_h<<8); | |
111 pGlobalEVT_Index[events_count].event_sequence_num=current_hdr->evt_sequence_num; | |
112 pGlobalEVT_Index[events_count].uEventOffsetInEVT=offset_in; | |
113 offset_in+=current_hdr->evt_size+1; | |
1052 | 114 |
307 | 115 current_hdr=(raw_event_header *)&pGlobalEVT[offset_in]; |
116 } | |
117 uGlobalEVT_NumEvents = events_count; | |
118 | |
762 | 119 assert(uGlobalEVT_NumEvents < 4400); |
120 } | |
307 | 121 |
122 | |
1052 | 123 |
307 | 124 //----- (00443EF8) -------------------------------------------------------- |
125 void LoadLevel_InitializeLevelEvt() | |
126 { | |
601 | 127 struct raw_event_header |
128 { | |
129 unsigned char evt_size; | |
130 unsigned char evt_id_l; | |
131 unsigned char evt_id_h; | |
132 unsigned char evt_sequence_num; | |
133 } ; | |
134 uint events_count; | |
135 unsigned int offset_in; | |
136 raw_event_header *current_hdr; | |
137 | |
307 | 138 if (!uLevelEVT_Size) |
139 return; | |
140 | |
336 | 141 memset(array_5B5928_timers, 0, 3200); |
142 memset(pLevelEVT_Index, 80, sizeof(EventIndex)*4400); | |
307 | 143 |
144 uLevelEVT_NumEvents = 0; | |
336 | 145 dword_5B65C8_timers_count = 0; |
307 | 146 |
601 | 147 current_hdr=(raw_event_header *)pLevelEVT; |
148 offset_in=0; | |
149 for (events_count = 0, offset_in = 0; offset_in < uLevelEVT_Size; ++events_count) | |
150 { | |
151 pLevelEVT_Index[events_count].uEventID=current_hdr->evt_id_l+(current_hdr->evt_id_h<<8); | |
152 pLevelEVT_Index[events_count].event_sequence_num=current_hdr->evt_sequence_num; | |
153 pLevelEVT_Index[events_count].uEventOffsetInEVT=offset_in; | |
154 offset_in+=current_hdr->evt_size+1; | |
1052 | 155 |
601 | 156 current_hdr=(raw_event_header *)&pLevelEVT[offset_in]; |
157 } | |
158 uLevelEVT_NumEvents = events_count; | |
159 | |
160 /* | |
1052 | 161 EmeraldIsle::Variables: |
162 [0] ??? | |
163 [1] ??? | |
164 [2] Luck Fountain uses left | |
165 [3] Gold Fountain used this week | |
166 [4] Gold Fountain total uses | |
167 | |
1053 | 168 |
169 Emerald Isle #110 // Fire Resistance fountain | |
170 0 LocationName | |
171 0 if (Player.FireResistance < 50) | |
172 { | |
173 1 Set(Player.FireResistance, 50) | |
174 2 SetFooterString(22) // +50 Fire Resistance (temporarily) | |
175 3 Add(Party.Autonotes, 2) | |
176 4 goto return | |
177 } | |
178 5 SetFooterString(11) // Refreshing! | |
179 6 return | |
180 | |
181 | |
182 | |
1052 | 183 Emerald Isle #111 // ??? |
1053 | 184 Initialize |
1052 | 185 Set(Map.Variables[0], 30) |
186 Set(Map.Variables[1], 30) | |
187 | |
188 | |
189 Emerald Isle #114 // month timer - manage luck fountain | |
190 0 LocationName | |
191 0 if (Player.BaseLuck >= 15) | |
192 { | |
193 2 SetFooterString(11) // Refreshing! | |
194 3 return | |
195 } | |
196 else | |
197 { | |
198 1 if (Map.Variables[2] >= 1) | |
199 { | |
200 4 Sub(Map.Variables[2], 1) | |
201 5 Add(Player.BaseLuck, 2) | |
202 6 SetFooterString(25) // +2 Luck (Permament) | |
203 7 return | |
204 } | |
205 else | |
206 { | |
207 2 SetFooterString(11) // Refreshing! | |
208 3 return | |
209 } | |
210 } | |
211 | |
212 8 Initialize | |
213 9 Set Map.Variables[2], 8 | |
214 | |
215 | |
216 | |
217 Emerald Isle #115 // week timer - gold fountain in the center of town | |
218 0 LocationName | |
219 0 if (Map.Variables[4] < 3) | |
220 { | |
1053 | 221 1 if (Map.Variables[3] == 0) |
307 | 222 { |
1052 | 223 2 if (Party.Gold < 201) |
224 { | |
225 3 if (Player.BaseLuck >= 15) | |
226 { | |
227 5 Add(Map.Variables[3], 1) | |
228 6 Add(Party.Gold, 1000) | |
229 7 Add(Map.Variables[4], 1) | |
230 8 goto return | |
231 } | |
232 else | |
233 { | |
234 4 goto 9 | |
235 } | |
236 } | |
237 } | |
238 } | |
239 9 SetFooterString(11) // Refreshing! | |
240 10 return | |
241 | |
242 11 Initialize | |
243 12 Set(Map.Variables[3], 0) | |
244 | |
245 | |
246 | |
247 | |
248 | |
249 Emerald Isle #220 // day timer - monster spawner | |
250 0 LocationName | |
1053 | 251 0 Initialize |
1052 | 252 1 if (NumAliveActors(group=20) != 0) |
253 2 return | |
254 3 SpawnMonsters(1, level=1, count=10, x=-336, y=14512, z=0, group=20) | |
255 4 SpawnMonsters(1, level=2, count=5, x=16, y=16352, z=90, group=20) | |
256 5 SpawnMonsters(1, level=1, count=10, x=480, y=18288, z=6, group=20) | |
257 | |
258 | |
259 | |
260 Emerald Isle #200 // margareth dock tip | |
261 0 if (!QBits.QuestDone[17]) | |
262 { | |
263 1 InitiateNPCDialogue(npc=19) | |
264 } | |
265 2 return | |
266 | |
267 | |
268 Emerald Isle #201 // margareth armoury tip | |
269 0 if (!QBits.QuestDone[17]) | |
270 { | |
271 1 InitiateNPCDialogue(npc=20) | |
272 } | |
273 2 return | |
274 */ | |
307 | 275 } |
276 | |
277 | |
278 //----- (0044684A) -------------------------------------------------------- | |
1052 | 279 void EventProcessor(int uEventID, int targetObj, int canShowMessages, int entry_line) |
280 { | |
307 | 281 unsigned int v3; // eax@5 |
336 | 282 signed int v4; // esi@7 |
307 | 283 //char *v5; // eax@8 |
284 Player *v6; // ecx@8 | |
285 //char *v7; // ebp@8 | |
286 //signed int v8; // edx@10 | |
287 //int v9; // edi@12 | |
288 //ByteArray *v10; // esi@12 | |
289 int v11; // eax@14 | |
290 char *v12; // eax@15 | |
291 //char *v13; // edi@21 | |
292 int v14; // ebp@21 | |
293 int v15; // edi@21 | |
294 const char *v16; // esi@21 | |
295 bool v17; // edx@21 | |
296 int v18; // ecx@22 | |
297 int v19; // ebp@36 | |
298 signed int v20; // ecx@40 | |
299 int v21; // eax@40 | |
300 int v22; // edx@40 | |
301 int v23; // eax@40 | |
302 unsigned __int16 v24; // ax@45 | |
303 int v25; // eax@54 | |
304 LevelDecoration *v26; // eax@55 | |
305 int v27; // eax@57 | |
306 int v28; // ecx@57 | |
827 | 307 //int v29; // edx@58 |
308 int pEventID; // eax@58 | |
309 int pNPC_ID; // ecx@58 | |
310 int pIndex; // esi@58 | |
311 NPCData *pNPC; // ecx@58 | |
307 | 312 int v34; // esi@59 |
313 int v35; // esi@60 | |
314 int v36; // esi@61 | |
315 int v37; // esi@62 | |
316 int v38; // eax@78 | |
317 int v39; // ecx@78 | |
318 size_t v40; // edx@78 | |
319 Actor *v41; // esi@79 | |
320 int v42; // eax@84 | |
321 int v43; // ecx@84 | |
322 size_t v44; // edx@84 | |
323 Actor *v45; // esi@85 | |
324 void *v46; // eax@91 | |
325 GUIWindow *v47; // eax@93 | |
326 GUIButton *v48; // ecx@93 | |
327 GUIButton *v49; // esi@94 | |
328 char v50; // al@100 | |
329 Player *v51; // esi@103 | |
330 Player *v52; // ecx@106 | |
331 int v53; // ecx@107 | |
332 char v54; // al@111 | |
333 Player *v55; // esi@114 | |
334 Player *v56; // ecx@117 | |
335 int v57; // ecx@118 | |
469 | 336 signed int pValue; // ebp@124 |
337 Player *pPlayer; // esi@125 | |
307 | 338 int v60; // eax@126 |
339 int v61; // edx@133 | |
340 int v62; // eax@139 | |
501 | 341 int v63; // ebp@145 |
307 | 342 signed int v64; // edi@146 |
343 unsigned int v65; // edx@148 | |
344 Player *v66; // ecx@148 | |
345 int v67; // esi@148 | |
346 signed int v68; // eax@151 | |
347 int v69; // esi@151 | |
348 Player *v70; // ecx@158 | |
349 unsigned int v71; // eax@159 | |
350 int v72; // esi@159 | |
351 signed int v73; // eax@162 | |
352 int v74; // esi@162 | |
353 int v75; // edx@172 | |
354 Player *v76; // esi@173 | |
355 signed int v77; // ebp@186 | |
356 int v78; // edx@186 | |
357 Player *v79; // esi@187 | |
501 | 358 //signed int v80; // ebp@200 |
359 //int v81; // edx@200 | |
307 | 360 Player *v82; // esi@201 |
361 int v83; // eax@212 | |
362 int v84; // ebp@220 | |
363 signed int v85; // ebp@224 | |
364 char v86; // al@224 | |
365 Player *v87; // esi@227 | |
366 Player *v88; // ecx@231 | |
367 int v89; // ecx@232 | |
368 int v90; // eax@243 | |
369 const char *v91; // ecx@247 | |
370 int v92; // eax@251 | |
371 char *v93; // eax@252 | |
372 int v94; // ecx@262 | |
373 int v95; // ebp@262 | |
374 int v96; // edx@262 | |
375 int v97; // eax@262 | |
376 unsigned int v98; // edx@265 | |
377 const char *v99; // esi@267 | |
378 int v100; // edx@267 | |
379 //char *v101; // edi@281 | |
380 unsigned int v102; // esi@281 | |
381 int v103; // edi@284 | |
382 int v104; // eax@288 | |
383 int v105; // edx@294 | |
384 int v106; // [sp-20h] [bp-4C8h]@278 | |
385 signed int v107; // [sp-1Ch] [bp-4C4h]@278 | |
386 unsigned int v108; // [sp-18h] [bp-4C0h]@278 | |
387 signed int v109; // [sp-14h] [bp-4BCh]@278 | |
388 signed int v110; // [sp-10h] [bp-4B8h]@278 | |
389 int v111; // [sp-Ch] [bp-4B4h]@278 | |
390 // Event *v112; // [sp-8h] [bp-4B0h]@5 | |
391 int v113; // [sp-8h] [bp-4B0h]@106 | |
392 int v114; // [sp-8h] [bp-4B0h]@117 | |
393 signed int v115; // [sp-8h] [bp-4B0h]@231 | |
394 unsigned int v116; // [sp-8h] [bp-4B0h]@278 | |
395 int v117; // [sp-4h] [bp-4ACh]@106 | |
396 int v118; // [sp-4h] [bp-4ACh]@117 | |
397 int v119; // [sp-4h] [bp-4ACh]@231 | |
398 int v120; // [sp-4h] [bp-4ACh]@278 | |
399 int v121; // [sp-4h] [bp-4ACh]@294 | |
310 | 400 int curr_seq_num; // [sp+10h] [bp-498h]@4 |
307 | 401 //char *v123; // [sp+14h] [bp-494h]@0 |
336 | 402 signed int v124; // [sp+18h] [bp-490h]@7 |
501 | 403 //signed int v125; // [sp+1Ch] [bp-48Ch]@155 |
307 | 404 int v126; // [sp+1Ch] [bp-48Ch]@262 |
336 | 405 int player_choose; // [sp+20h] [bp-488h]@4 |
307 | 406 int v128; // [sp+24h] [bp-484h]@21 |
407 int v129; // [sp+24h] [bp-484h]@262 | |
408 signed int v130; // [sp+28h] [bp-480h]@0 | |
409 //int v131; // [sp+2Ch] [bp-47Ch]@1 | |
410 int v132; // [sp+30h] [bp-478h]@262 | |
411 signed int v133; // [sp+34h] [bp-474h]@1 | |
412 int v134; // [sp+38h] [bp-470h]@262 | |
413 int v135; // [sp+3Ch] [bp-46Ch]@262 | |
414 int v136; // [sp+40h] [bp-468h]@40 | |
415 int v137; // [sp+44h] [bp-464h]@40 | |
416 int v138; // [sp+48h] [bp-460h]@40 | |
417 int v139; // [sp+4Ch] [bp-45Ch]@40 | |
418 ItemGen item; // [sp+50h] [bp-458h]@15 | |
419 char Source[120]; // [sp+74h] [bp-434h]@15 | |
420 char Str[120]; // [sp+ECh] [bp-3BCh]@21 | |
421 Actor Dst; // [sp+164h] [bp-344h]@53 | |
422 | |
423 //v131 = uEventID; | |
424 v133 = 0; | |
469 | 425 EvtTargetObj = targetObj; |
307 | 426 dword_5B65C4 = 0; |
469 | 427 if ( !uEventID ) |
307 | 428 { |
783 | 429 if ( !GameUI_Footer_TimeLeft ) |
307 | 430 ShowStatusBarString(pGlobalTXT_LocalizationStrings[521], 2u);// Nothing here |
431 return; | |
432 } | |
336 | 433 player_choose = (uActiveCharacter == 0)?6:4; //4 - active or 6 - random player if active =0 |
1052 | 434 curr_seq_num = entry_line; |
435 | |
520
35f28d4c0ff9
GlobalEventInfo changed to LevelDecoration* activeLevelDecoration
Gloval
parents:
512
diff
changeset
|
436 if ( activeLevelDecoration ) |
307 | 437 { |
438 uSomeEVT_NumEvents = uGlobalEVT_NumEvents; | |
439 pSomeEVT = pGlobalEVT; | |
336 | 440 memcpy(pSomeEVT_Events, pGlobalEVT_Index, sizeof(EventIndex)*4400); //4400 evts |
307 | 441 } |
442 else | |
443 { | |
444 uSomeEVT_NumEvents = uLevelEVT_NumEvents; | |
445 pSomeEVT = pLevelEVT; | |
336 | 446 memcpy(pSomeEVT_Events, pLevelEVT_Index, sizeof(EventIndex)*4400); |
307 | 447 } |
448 | |
336 | 449 v4 = 0; |
450 v124 = 0; | |
451 //for (uint i = 0; i < uSomeEVT_NumEvents; ++i) | |
452 // { | |
307 | 453 //v6 = v123; |
454 //v7 = ""; | |
336 | 455 while ( 1 ) |
456 { | |
307 | 457 if ( dword_5B65C4 ) |
458 goto LABEL_301; | |
459 //v8 = v4; | |
336 | 460 if ( pSomeEVT_Events[v4].uEventID == uEventID && pSomeEVT_Events[v4].event_sequence_num == curr_seq_num ) |
307 | 461 { |
462 //v9 = pSomeEVT_Events[v8].uEventOffsetInEVT; | |
463 //v10 = (ByteArray *)&v5[v9]; | |
336 | 464 auto _evt = (_evt_raw *)(pSomeEVT + pSomeEVT_Events[v4].uEventOffsetInEVT); |
307 | 465 |
310 | 466 switch (_evt->_e_type) |
307 | 467 { |
468 case EVENT_CheckSeason: | |
336 | 469 // |
307 | 470 if ( !sub_4465DF_check_season(_evt->v5) ) |
1052 | 471 { |
310 | 472 ++curr_seq_num; |
336 | 473 v4 = v124; |
307 | 474 break; |
1052 | 475 } |
336 | 476 v124 = -1; |
477 curr_seq_num = _evt->v6 - 1; | |
478 ++curr_seq_num; | |
479 break; | |
307 | 480 case EVENT_ShowMovie: |
481 { | |
482 strcpy(Source, (char *)&_evt->v7); | |
483 v12 = (char *)&item.uExpireTime + strlen(Source) + 7; | |
484 if ( *v12 == 32 ) | |
485 *v12 = 0; | |
486 if ( pVideoPlayer->field_54 ) | |
487 pVideoPlayer->Unload(); | |
488 pVideoPlayer->bStopBeforeSchedule = 0; | |
489 pVideoPlayer->pResetflag = 0; | |
1038 | 490 |
307 | 491 v128 = pCurrentScreen; |
492 //v13 = &pSomeEVT[v9]; | |
493 //v14 = (unsigned __int8)v13[5]; | |
494 //v15 = (unsigned __int8)v13[6]; | |
495 v14 = _evt->v5; | |
496 v15 = _evt->v6; | |
497 strcpy(Str, Source); | |
498 v16 = RemoveQuotes(Str); | |
499 VideoPlayer::MovieLoop(v16, 0, v14, 1); | |
500 if ( !_strcmpi(v16, "arbiter good") ) | |
373 | 501 { |
502 pParty->alignment = PartyAlignment_Good; | |
307 | 503 v18 = 0; |
504 LOBYTE(v17) = 1; | |
373 | 505 SetUserInterface(PartyAlignment_Good, v17); |
307 | 506 if ( !v15 || v128 == 3 ) |
507 { | |
508 pCurrentScreen = v128; | |
509 if ( v128 == 3 ) | |
510 pGameLoadingUI_ProgressBar->uType = GUIProgressBar::TYPE_Fullscreen; | |
511 if ( v128 == 13 ) | |
898 | 512 pVideoPlayer->OpenHouseMovie(pAnimatedRooms[uCurrentHouse_Animation].video_name, 1u); |
307 | 513 } |
1038 | 514 |
310 | 515 ++curr_seq_num; |
336 | 516 v4 = v124; |
517 | |
307 | 518 //v6 = v123; |
519 //v7 = ""; | |
520 break; | |
521 } | |
522 if ( !_strcmpi(v16, "arbiter evil") ) | |
523 { | |
524 v18 = 2; | |
373 | 525 pParty->alignment = PartyAlignment_Evil; |
307 | 526 LOBYTE(v17) = 1; |
373 | 527 SetUserInterface(PartyAlignment_Evil, v17); |
307 | 528 if ( !v15 || v128 == 3 ) |
529 { | |
530 pCurrentScreen = v128; | |
531 if ( v128 == 3 ) | |
532 pGameLoadingUI_ProgressBar->uType = GUIProgressBar::TYPE_Fullscreen; | |
533 if ( v128 == 13 ) | |
898 | 534 pVideoPlayer->OpenHouseMovie(pAnimatedRooms[uCurrentHouse_Animation].video_name, 1u); |
307 | 535 } |
310 | 536 ++curr_seq_num; |
336 | 537 v4 = v124; |
538 | |
307 | 539 //v6 = v123; |
540 //v7 = ""; | |
541 | |
542 break; | |
543 } | |
544 if ( !_strcmpi(v16, "pcout01") ) // moving to harmondale from emerald isle | |
766 | 545 { |
307 | 546 Rest(0x2760u); |
547 pParty->RestAndHeal(); | |
766 | 548 pParty->days_played_without_rest = 0; |
549 } | |
307 | 550 if ( !v15 || v128 == 3 ) |
551 { | |
552 pCurrentScreen = v128; | |
553 if ( v128 == 3 ) | |
554 pGameLoadingUI_ProgressBar->uType = GUIProgressBar::TYPE_Fullscreen; | |
555 if ( v128 == 13 ) | |
898 | 556 pVideoPlayer->OpenHouseMovie(pAnimatedRooms[uCurrentHouse_Animation].video_name, 1u); |
307 | 557 } |
310 | 558 ++curr_seq_num; |
336 | 559 v4 = v124; |
560 | |
307 | 561 //v6 = v123; |
562 //v7 = ""; | |
563 } | |
564 break; | |
565 case EVENT_CheckSkill: | |
566 { | |
567 v19 = _evt->v7 + ((_evt->v8 + ((_evt->v9 + ((unsigned int)_evt->v10 << 8)) << 8)) << 8); | |
336 | 568 if ( player_choose < 0 ) |
307 | 569 goto LABEL_47; |
336 | 570 if ( player_choose <= 3 ) |
307 | 571 { |
336 | 572 v24 = pParty->pPlayers[0].pActiveSkills[3486 * player_choose + _evt->v5]; |
307 | 573 } |
574 else | |
575 { | |
336 | 576 if ( player_choose == 4 ) |
307 | 577 { |
578 v24 = pPlayers[uActiveCharacter]->pActiveSkills[_evt->v5]; | |
579 } | |
580 else | |
581 { | |
336 | 582 if ( player_choose == 5 ) |
307 | 583 { |
584 v20 = 0; | |
585 v21 = 3486 * v130 + _evt->v5; | |
586 v136 = 1; | |
587 LOWORD(v21) = pParty->pPlayers[0].pActiveSkills[v21]; | |
588 v137 = v21 & 0x40; | |
589 v138 = v21 & 0x80; | |
590 v22 = v21 & 0x100; | |
591 v23 = v21 & 0x3F; | |
592 v139 = v22; | |
593 while ( v23 < v19 || !*(&v136 + _evt->v6) ) | |
594 { | |
595 ++v20; | |
596 if ( v20 >= 4 ) | |
597 { | |
310 | 598 ++curr_seq_num; |
336 | 599 v4 = v124; |
600 | |
307 | 601 //v6 = v123; |
602 //v7 = ""; | |
603 break; | |
604 } | |
605 } | |
606 v11 = _evt->v11; | |
607 goto LABEL_130; | |
608 } | |
609 LABEL_47: | |
610 //v10 = (ByteArray *)&v5[v9]; | |
611 v24 = pParty->pPlayers[0].pActiveSkills[_evt->v5 + 3486 * rand() % 4]; | |
612 } | |
613 } | |
614 v136 = 1; | |
615 v137 = v24 & 0x40; | |
616 v138 = v24 & 0x80; | |
617 v139 = v24 & 0x100; | |
618 if ( (v24 & 0x3F) >= v19 && *(&v136 + _evt->v6) ) | |
619 { | |
620 v11 = _evt->v11; | |
621 goto LABEL_130; | |
622 } | |
310 | 623 ++curr_seq_num; |
336 | 624 v4 = v124; |
625 | |
307 | 626 //v6 = v123; |
627 //v7 = ""; | |
628 } | |
629 break; | |
630 | |
631 case EVENT_SpeakNPC: | |
469 | 632 if ( canShowMessages ) |
307 | 633 { |
634 //Actor::Actor(&Dst); | |
635 memset(&Dst, 0, 0x344u); | |
469 | 636 dword_5B65D0_dialogue_actor_npc_id = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((unsigned int)_evt->v8 << 8)) << 8)) << 8); |
602 | 637 Dst.sNPC_ID = dword_5B65D0_dialogue_actor_npc_id; |
1033 | 638 GameUI_InitializeDialogue(&Dst, false); |
307 | 639 } |
640 else | |
641 { | |
469 | 642 bDialogueUI_InitializeActor_NPC_ID = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((unsigned int)_evt->v8 << 8)) << 8)) << 8); |
307 | 643 } |
310 | 644 ++curr_seq_num; |
336 | 645 v4 = v124; |
646 | |
307 | 647 //v6 = v123; |
648 //v7 = ""; | |
649 break; | |
650 case EVENT_ChangeEvent: | |
520
35f28d4c0ff9
GlobalEventInfo changed to LevelDecoration* activeLevelDecoration
Gloval
parents:
512
diff
changeset
|
651 v25 = EVT_DWORD(_evt->v5); |
307 | 652 if ( v25 ) |
653 { | |
520
35f28d4c0ff9
GlobalEventInfo changed to LevelDecoration* activeLevelDecoration
Gloval
parents:
512
diff
changeset
|
654 stru_5E4C90._decor_events[activeLevelDecoration->_idx_in_stru123] = _evt->v5 - 124; |
307 | 655 } |
656 else | |
657 { | |
520
35f28d4c0ff9
GlobalEventInfo changed to LevelDecoration* activeLevelDecoration
Gloval
parents:
512
diff
changeset
|
658 v26 = (LevelDecoration *)activeLevelDecoration; |
35f28d4c0ff9
GlobalEventInfo changed to LevelDecoration* activeLevelDecoration
Gloval
parents:
512
diff
changeset
|
659 stru_5E4C90._decor_events[activeLevelDecoration ->_idx_in_stru123] = 0; |
525 | 660 v26->field_2 |= 0x0020; |
307 | 661 } |
310 | 662 ++curr_seq_num; |
336 | 663 v4 = v124; |
525 | 664 |
307 | 665 break; |
666 case EVENT_SetNPCGreeting: | |
525 | 667 v27 = EVT_DWORD(_evt->v5); |
307 | 668 pNPCStats->pNewNPCData[v27].uFlags &= 0xFFFFFFFCu; |
525 | 669 pNPCStats->pNewNPCData[v27].greet = EVT_DWORD(_evt->v9); |
310 | 670 ++curr_seq_num; |
336 | 671 v4 = v124; |
672 | |
307 | 673 //v6 = v123; |
674 //v7 = ""; | |
675 break; | |
827 | 676 case EVENT_SetNPCTopic: |
677 { | |
678 //v29 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((uint)_evt->v8 << 8)) << 8)) << 8); | |
679 pEventID = _evt->v10 + ((_evt->v11 + ((_evt->v12 + ((uint)_evt->v13 << 8)) << 8)) << 8); | |
680 pNPC_ID = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((uint)_evt->v8 << 8)) << 8)) << 8); | |
681 pIndex = _evt->v9; | |
682 pNPC = &pNPCStats->pNewNPCData[pNPC_ID]; | |
683 if ( pIndex == 0 ) | |
684 pNPC->evt_A = pEventID; | |
685 if ( pIndex == 1 ) | |
686 pNPC->evt_B = pEventID; | |
687 if ( pIndex == 2 ) | |
688 pNPC->evt_C = pEventID; | |
689 if ( pIndex == 3 ) | |
690 pNPC->evt_D = pEventID; | |
691 if ( pIndex == 4 ) | |
692 pNPC->evt_E = pEventID; | |
693 if ( pIndex == 5 ) | |
694 pNPC->evt_F = pEventID; | |
695 if ( pNPC_ID == 8 ) | |
696 { | |
697 if ( pEventID == 78 ) | |
698 { | |
699 sub_4BD8B5(); | |
700 window_SpeakInHouse->Release(); | |
701 pParty->uFlags &= ~2; | |
702 if ( EnterHouse(HOUSE_DARK_GUILD_PIT) ) | |
703 { | |
704 pAudioPlayer->StopChannels(-1, -1); | |
705 window_SpeakInHouse = GUIWindow::Create(0, 0, 640, 480, WINDOW_HouseInterior, 170, 0); | |
948 | 706 window_SpeakInHouse->CreateButton( 61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); |
707 window_SpeakInHouse->CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); | |
708 window_SpeakInHouse->CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); | |
709 window_SpeakInHouse->CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); | |
710 window_SpeakInHouse->CreateButton( 0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, '\t', "", 0); | |
827 | 711 current_npc_text = pNPCTopics[90].pText; |
712 } | |
713 } | |
714 } | |
715 ++curr_seq_num; | |
716 } | |
717 v4 = v124; | |
718 break; | |
307 | 719 case EVENT_NPCSetItem: |
525 | 720 sub_448518_npc_set_item(EVT_DWORD(_evt->v5),EVT_DWORD(_evt->v9), _evt->v13); |
310 | 721 ++curr_seq_num; |
336 | 722 v4 = v124; |
525 | 723 |
307 | 724 break; |
725 case EVENT_SetActorItem: | |
525 | 726 Actor::GiveItem(EVT_DWORD(_evt->v5),EVT_DWORD(_evt->v9), _evt->v13); |
310 | 727 ++curr_seq_num; |
336 | 728 v4 = v124; |
307 | 729 break; |
730 case EVENT_SetNPCGroupNews: | |
731 pNPCStats->pGroups_copy[_evt->v5 + ((_evt->v6 + ((_evt->v7 + ((uint)_evt->v8 << 8)) << 8)) << 8)] = _evt->v9 + ((uint)_evt->v10 << 8); | |
310 | 732 ++curr_seq_num; |
336 | 733 v4 = v124; |
307 | 734 break; |
735 case EVENT_SetActorGroup: | |
736 __debugbreak(); | |
737 *(&pActors[0].uGroup + 0x11000000 * _evt->v8 + 209 * (_evt->v5 + ((_evt->v6 + ((uint)_evt->v7 << 8)) << 8))) = _evt->v9 + ((_evt->v10 + ((_evt->v11 + ((uint)_evt->v12 << 8)) << 8)) << 8); | |
310 | 738 ++curr_seq_num; |
336 | 739 v4 = v124; |
307 | 740 break; |
741 case EVENT_ChangeGroup: | |
742 v38 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((uint)_evt->v8 << 8)) << 8)) << 8); | |
743 v39 = _evt->v9 + ((_evt->v10 + ((_evt->v11 + ((uint)_evt->v12 << 8)) << 8)) << 8); | |
744 v40 = uNumActors; | |
745 __debugbreak(); | |
746 if ( (signed int)uNumActors > 0 ) | |
747 { | |
748 v41 = pActors;//[0].uGroup; | |
749 do | |
750 { | |
751 if ( v41->uGroup == v38 ) | |
752 v41->uGroup = v39; | |
753 ++v41; | |
754 --v40; | |
755 } | |
756 while ( v40 ); | |
757 } | |
310 | 758 ++curr_seq_num; |
336 | 759 v4 = v124; |
760 | |
307 | 761 //v6 = v123; |
762 //v7 = ""; | |
763 break; | |
764 case EVENT_ChangeGroupAlly: | |
765 v42 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((uint)_evt->v8 << 8)) << 8)) << 8); | |
766 v43 = _evt->v9 + ((_evt->v10 + ((_evt->v11 + ((uint)_evt->v12 << 8)) << 8)) << 8); | |
767 v44 = uNumActors; | |
768 __debugbreak(); | |
769 if ( (signed int)uNumActors > 0 ) | |
770 { | |
771 v45 = pActors;//[0].uAlly; | |
772 do | |
773 { | |
774 if ( v45->uGroup == v42 ) | |
775 v45->uAlly = v43; | |
776 ++v45; | |
777 --v44; | |
778 } | |
779 while ( v44 ); | |
780 } | |
310 | 781 ++curr_seq_num; |
336 | 782 v4 = v124; |
783 | |
307 | 784 //v6 = v123; |
785 //v7 = ""; | |
786 break; | |
787 case EVENT_MoveNPC: | |
310 | 788 { |
789 | |
525 | 790 pNPCStats->pNewNPCData[EVT_DWORD(_evt->v5)].Location2D =EVT_DWORD(_evt->v9); |
336 | 791 if ( window_SpeakInHouse ) |
307 | 792 { |
525 | 793 |
794 if ( window_SpeakInHouse->par1C == 165 ) | |
307 | 795 { |
796 sub_4BD8B5(); | |
797 pVideoPlayer->Unload(); | |
336 | 798 window_SpeakInHouse->Release(); |
569 | 799 pParty->uFlags &= ~2; |
520
35f28d4c0ff9
GlobalEventInfo changed to LevelDecoration* activeLevelDecoration
Gloval
parents:
512
diff
changeset
|
800 activeLevelDecoration = (LevelDecoration*)1; |
481 | 801 if ( EnterHouse(HOUSE_BODY_GUILD_ERATHIA) ) |
307 | 802 { |
803 pAudioPlayer->PlaySound((SoundID)0, 0, 0, -1, 0, 0, 0, 0); | |
525 | 804 window_SpeakInHouse = GUIWindow::Create(0, 0, 640, 480, WINDOW_HouseInterior, 165, 0); |
805 v48 = window_SpeakInHouse->pControlsHead; | |
307 | 806 if ( v48 ) |
807 { | |
808 do | |
809 { | |
810 v49 = v48->pNext; | |
811 pAllocator->FreeChunk(v48); | |
812 v48 = v49; | |
813 } | |
814 while ( v49 ); | |
815 } | |
525 | 816 window_SpeakInHouse->pControlsHead = 0; |
336 | 817 window_SpeakInHouse->pControlsTail = 0; |
818 window_SpeakInHouse->uNumControls = 0; | |
307 | 819 } |
820 } | |
821 else | |
822 { | |
525 | 823 if ( window_SpeakInHouse->par1C == 553 ) |
307 | 824 pVideoPlayer->bLoopPlaying = 0; |
825 } | |
826 } | |
525 | 827 |
310 | 828 } |
525 | 829 ++curr_seq_num; |
336 | 830 v4 = v124; |
525 | 831 |
307 | 832 break; |
833 case EVENT_Jmp: | |
310 | 834 curr_seq_num = _evt->v5 - 1; |
835 ++curr_seq_num; | |
525 | 836 v4 = -1; |
837 | |
307 | 838 break; |
839 case EVENT_ShowFace: | |
336 | 840 if ( _evt->v5 <= 3u ) //someone |
841 pParty->pPlayers[_evt->v5].PlayEmotion((CHARACTER_EXPRESSION_ID)_evt->v6, 0); | |
842 else if ( _evt->v5 == 4 ) //active | |
843 pParty->pPlayers[uActiveCharacter].PlayEmotion((CHARACTER_EXPRESSION_ID)_evt->v6, 0); | |
844 else if ( _evt->v5 == 5 ) //all players | |
307 | 845 { |
336 | 846 for(int i=0; i<4; ++i) |
847 pParty->pPlayers[i].PlayEmotion((CHARACTER_EXPRESSION_ID)_evt->v6, 0); | |
307 | 848 } |
336 | 849 else //random player |
850 pParty->pPlayers[rand() % 4].PlayEmotion((CHARACTER_EXPRESSION_ID)_evt->v6, 0); | |
310 | 851 ++curr_seq_num; |
336 | 852 v4 = v124; |
525 | 853 |
307 | 854 break; |
855 case EVENT_CharacterAnimation: | |
336 | 856 if ( _evt->v5 <= 3u ) //someone |
857 pParty->pPlayers[_evt->v5].PlaySound((PlayerSpeech) _evt->v6, 0); | |
858 else if ( _evt->v5 == 4 ) //active | |
859 pParty->pPlayers[uActiveCharacter].PlaySound((PlayerSpeech) _evt->v6, 0); | |
860 else if ( _evt->v5 == 5 ) //all | |
861 for(int i=0; i<4; ++i) | |
862 pParty->pPlayers[i].PlaySound((PlayerSpeech) _evt->v6, 0); | |
863 else //random | |
864 pParty->pPlayers[rand() % 4].PlaySound((PlayerSpeech) _evt->v6, 0); | |
865 ++curr_seq_num; | |
525 | 866 v4 = v124; |
867 | |
307 | 868 break; |
869 case EVENT_ForPartyMember: | |
336 | 870 player_choose = _evt->v5; |
310 | 871 ++curr_seq_num; |
336 | 872 v4 = v124; |
307 | 873 break; |
874 case EVENT_SummonItem: | |
875 sub_42F7EB_DropItemAt(_evt->v5 + ((_evt->v6 + ((_evt->v7 + ((uint)_evt->v8 << 8)) << 8)) << 8), | |
876 _evt->v9 + ((_evt->v10 + ((_evt->v11 + ((uint)_evt->v12 << 8)) << 8)) << 8), | |
877 _evt->v13 + ((_evt->v14 + ((_evt->v15 + ((uint)_evt->v16 << 8)) << 8)) << 8), | |
878 _evt->v17 + ((_evt->v18 + ((_evt->v19 + ((uint)_evt->v20 << 8)) << 8)) << 8), | |
879 _evt->v21 + ((_evt->v22 + ((_evt->v23 + ((uint)_evt->v24 << 8)) << 8)) << 8), | |
880 _evt->v25, _evt->v26, 0, 0); | |
310 | 881 ++curr_seq_num; |
336 | 882 v4 = v124; |
883 | |
307 | 884 //v6 = v123; |
885 //v7 = ""; | |
886 break; | |
501 | 887 case EVENT_Compare: |
484 | 888 pValue = EVT_DWORD(_evt->v7); |
889 if ( player_choose <= 3 ) | |
512 | 890 { |
484 | 891 if ( pPlayers[player_choose]->CompareVariable((enum VariableType)EVT_WORD(_evt->v5), pValue) ) |
512 | 892 { |
484 | 893 v124 = -1; |
894 curr_seq_num = _evt->v11 - 1; | |
307 | 895 } |
512 | 896 } |
484 | 897 else if ( player_choose == 4 ) //active |
512 | 898 { |
899 if ( uActiveCharacter ) | |
307 | 900 { |
512 | 901 if ( pPlayers[uActiveCharacter]->CompareVariable((enum VariableType)EVT_WORD(_evt->v5), pValue) ) |
307 | 902 { |
484 | 903 v124 = -1; |
904 curr_seq_num = _evt->v11 - 1; | |
307 | 905 } |
906 } | |
512 | 907 } |
484 | 908 else if ( player_choose == 5 )//all |
512 | 909 { |
484 | 910 v130=0; |
616 | 911 for(int i = 1; i < 5; ++i) |
512 | 912 { |
913 if ( pPlayers[i]->CompareVariable((enum VariableType)EVT_WORD(_evt->v5), pValue) ) | |
484 | 914 { |
915 v124 = -1; | |
916 curr_seq_num = _evt->v11 - 1; | |
917 break; | |
512 | 918 } |
484 | 919 ++v130; |
307 | 920 } |
512 | 921 } |
484 | 922 else if ( player_choose == 6 ) //random |
512 | 923 { |
484 | 924 if ( pPlayers[rand() % 4]->CompareVariable((enum VariableType)EVT_WORD(_evt->v5), pValue) ) |
512 | 925 { |
484 | 926 v124 = -1; |
927 curr_seq_num = _evt->v11 - 1; | |
928 } | |
512 | 929 } |
310 | 930 ++curr_seq_num; |
336 | 931 v4 = v124; |
307 | 932 break; |
933 case EVENT_IsActorAlive: | |
484 | 934 if (IsActorAlive(EVT_BYTE(_evt->v5), EVT_DWORD(_evt->v6), EVT_BYTE(_evt->v10))) |
935 { | |
936 v124 = -1; | |
937 curr_seq_num = _evt->v11 - 1; | |
938 } | |
939 ++curr_seq_num; | |
940 v4 = v124; | |
941 break; | |
307 | 942 case EVENT_Substract: |
501 | 943 pValue = EVT_DWORD(_evt->v7); |
944 if ( EVT_WORD(_evt->v5) == VAR_PlayerItemInHands ) | |
945 { | |
545 | 946 if ( pParty->pPickedItem.uItemID == pValue )//In hand |
307 | 947 { |
948 pMouse->RemoveHoldingItem(); | |
310 | 949 ++curr_seq_num; |
336 | 950 v4 = v124; |
307 | 951 break; |
501 | 952 } |
545 | 953 v67 = (int)pPlayers[uActiveCharacter]->pInventoryIndices; |
954 for ( v65 = 0; v65 < 126; ++v65 ) | |
501 | 955 { |
545 | 956 if ( (int)&pPlayers[uActiveCharacter]->pInventoryItems[v67] == pValue ) |
307 | 957 { |
545 | 958 pPlayers[uActiveCharacter]->RemoveItemAtInventoryIndex(v65); |
310 | 959 ++curr_seq_num; |
336 | 960 v4 = v124; |
307 | 961 break; |
501 | 962 } |
307 | 963 v67 += 4; |
501 | 964 } |
965 while ( (signed int)v65 < 126 ); | |
545 | 966 v69 = (int)&pPlayers[uActiveCharacter]->pEquipment; |
967 for ( v68 = 0; v68 < 16; ++v68 ) | |
968 { | |
969 if ( *(int *)v69 && (int)&pPlayers[uActiveCharacter]->pInventoryItems[v69] == pValue ) | |
501 | 970 { |
898 | 971 *(&pPlayers[uActiveCharacter]->pEquipment.uShield + v68) = 0; |
545 | 972 ++curr_seq_num; |
973 v4 = v124; | |
974 break; | |
975 } | |
976 v69 += 4; | |
977 } | |
978 for (int i = 1; i < 5; i++) | |
979 { | |
980 v72 = (int)pPlayers[i]->pInventoryIndices; | |
981 for ( int v71 = 0; v71 < 126; ++v71 ) | |
982 { | |
983 if ( (int)&pPlayers[i]->pInventoryItems[v72] == pValue ) | |
307 | 984 { |
545 | 985 pPlayers[i]->RemoveItemAtInventoryIndex(v71); |
307 | 986 break; |
501 | 987 } |
545 | 988 v72 += 4; |
501 | 989 } |
545 | 990 v73 = 0; |
991 v74 = (int)&pPlayers[i]->pEquipment; | |
992 while ( !*(int *)v74 || (int)&pPlayer->pInventoryItems[v74] != pValue ) | |
993 { | |
994 ++v73; | |
995 v74 += 4; | |
996 if ( v73 >= 16 ) | |
997 break; | |
998 } | |
898 | 999 *(&pPlayers[i]->pEquipment.uShield + v73) = 0; |
307 | 1000 } |
545 | 1001 } |
501 | 1002 if ( player_choose <= 3 ) |
1003 { | |
512 | 1004 pPlayer = &pParty->pPlayers[player_choose]; |
501 | 1005 pPlayer->SubtractVariable((enum VariableType)EVT_WORD(_evt->v5), pValue); |
1006 } | |
1007 else if ( player_choose == 4 ) //active | |
1008 { | |
1009 if ( uActiveCharacter ) | |
307 | 1010 { |
501 | 1011 pPlayer = pPlayers[uActiveCharacter]; |
1012 pPlayer->SubtractVariable((enum VariableType)EVT_WORD(_evt->v5), pValue); | |
1013 } | |
1014 } | |
1015 else if ( player_choose == 5 )//all | |
1016 { | |
512 | 1017 v130 = 0; |
614 | 1018 for(int i = 1; i < 5; ++i) |
501 | 1019 { |
1020 if ( pPlayers[i]->SubtractVariable((enum VariableType)EVT_WORD(_evt->v5), pValue) ) | |
1021 break; | |
1022 } | |
1023 ++v130; | |
1024 } | |
1025 else if ( player_choose == 6 ) //random | |
1026 { | |
512 | 1027 player_choose = rand() % 4; |
1028 pPlayer = &pParty->pPlayers[player_choose]; | |
501 | 1029 pPlayer->SubtractVariable((enum VariableType)EVT_WORD(_evt->v5), pValue); |
1030 } | |
545 | 1031 ++curr_seq_num; |
1032 v4 = v124; | |
1033 break; | |
512 | 1034 case EVENT_Set: |
1035 pValue = EVT_DWORD(_evt->v7); | |
1036 if ( player_choose <= 3 ) | |
501 | 1037 { |
512 | 1038 pPlayer = &pParty->pPlayers[player_choose]; |
1039 pPlayer->SetVariable((enum VariableType)EVT_WORD(_evt->v5), pValue); | |
501 | 1040 } |
512 | 1041 else if ( player_choose == 4 ) //active |
501 | 1042 { |
512 | 1043 if ( uActiveCharacter ) |
307 | 1044 { |
512 | 1045 pPlayer = pPlayers[uActiveCharacter]; |
1046 pPlayer->SetVariable((enum VariableType)EVT_WORD(_evt->v5), pValue); | |
307 | 1047 } |
501 | 1048 } |
512 | 1049 else if ( player_choose == 5 )//all |
1050 { | |
525 | 1051 //recheck v130 |
512 | 1052 for(int i = 1; i < 5; ++i) |
1053 pPlayers[i]->SetVariable((enum VariableType)EVT_WORD(_evt->v5), pValue); | |
525 | 1054 |
512 | 1055 } |
1056 else if ( player_choose == 6 ) //random | |
1057 { | |
1058 player_choose = rand() % 4; | |
1059 pPlayer = &pParty->pPlayers[player_choose]; | |
1060 pPlayer->SetVariable((enum VariableType)EVT_WORD(_evt->v5), pValue); | |
525 | 1061 |
512 | 1062 } |
525 | 1063 ++curr_seq_num; |
1064 v4 = v124; | |
1065 break; | |
307 | 1066 case EVENT_Add: |
501 | 1067 pValue = EVT_DWORD(_evt->v7); |
512 | 1068 if ( player_choose <= 3 ) |
1069 { | |
1070 pPlayer = &pParty->pPlayers[player_choose]; | |
1071 pPlayer->AddVariable((enum VariableType)EVT_WORD(_evt->v5), pValue); | |
1072 } | |
1073 else if ( player_choose == 4 ) //active | |
1074 { | |
1075 if ( uActiveCharacter ) | |
1076 { | |
1077 pPlayer = pPlayers[uActiveCharacter]; | |
1078 pPlayer->AddVariable((enum VariableType)EVT_WORD(_evt->v5), pValue); | |
1079 } | |
1080 } | |
1081 else if ( player_choose == 5 )//all | |
1082 { | |
1083 //v130 = 0; | |
1084 for(int i = 1; i < 5; ++i) | |
1085 pPlayers[i]->AddVariable((enum VariableType)EVT_WORD(_evt->v5), pValue); | |
525 | 1086 |
512 | 1087 } |
1088 else if ( player_choose == 6 ) //random | |
1089 { | |
1090 player_choose = rand() % 4; | |
1091 pPlayer = &pParty->pPlayers[player_choose]; | |
1092 pPlayer->AddVariable((enum VariableType)EVT_WORD(_evt->v5), pValue); | |
1093 } | |
525 | 1094 v83 = EVT_WORD(_evt->v5); |
1052 | 1095 if (v83 == 21 || // gold well on emerald isle |
1096 v83 == 22 || v83 == 23 || v83 == 24 ) | |
1097 { | |
1098 __debugbreak(); // find out what these decorations are | |
1099 viewparams->bRedrawGameUI = true; | |
1100 } | |
525 | 1101 ++curr_seq_num; |
1102 v4 = v124; | |
1103 break; | |
307 | 1104 case EVENT_InputString: |
1052 | 1105 if ( !entry_line ) |
307 | 1106 { |
783 | 1107 strcpy(GameUI_Footer_TimedString, &pLevelStr[pLevelStrOffsets[EVT_DWORD(_evt->v5 )]]); |
310 | 1108 v105 = curr_seq_num; |
307 | 1109 v121 = 26; |
1110 LABEL_295: | |
1111 sub_4451A8_press_any_key(uEventID, v105, v121); | |
1112 LABEL_301: | |
1113 if ( v133 == 1 ) | |
797 | 1114 OnMapLeave(); |
307 | 1115 return; |
1116 } | |
1117 v84 = _evt->v13 + ((_evt->v14 + ((_evt->v15 + ((uint)_evt->v16 << 8)) << 8)) << 8); | |
783 | 1118 if ( !_strcmpi(GameUI_Footer_TimedString, &pLevelStr[pLevelStrOffsets[_evt->v9 + ((_evt->v10 + ((_evt->v11 + ((uint)_evt->v12 << 8)) << 8)) << 8)]]) |
1119 || !_strcmpi(GameUI_Footer_TimedString, &pLevelStr[pLevelStrOffsets[v84]]) ) | |
307 | 1120 { |
1121 v11 = _evt->v17; | |
1122 LABEL_130: | |
1123 //v124 = -1; | |
1124 LABEL_131: | |
310 | 1125 curr_seq_num = v11 - 1; |
307 | 1126 } |
310 | 1127 ++curr_seq_num; |
336 | 1128 v4 = v124; |
1129 | |
307 | 1130 //v6 = v123; |
1131 //v7 = ""; | |
1132 break; | |
1133 case EVENT_RandomGoTo: | |
1134 //v124 = -1; | |
1135 v11 = (unsigned __int8)*(&_evt->v5 + rand() % ((_evt->v5 != 0) + (_evt->v6 != 0) + (_evt->v7 != 0) + (_evt->v8 != 0) + (_evt->v9 != 0) | |
1136 + (_evt->v10 != 0))); | |
525 | 1137 curr_seq_num = v11 - 1; |
787 | 1138 ++curr_seq_num; |
1139 v4 = v124; | |
1140 break; | |
307 | 1141 case EVENT_ReceiveDamage: |
525 | 1142 v85 = EVT_DWORD(_evt->v7 ); |
307 | 1143 v86 = _evt->v5; |
797 | 1144 if ( (unsigned __int8)v86 <= 3 ) |
307 | 1145 { |
1146 v119 = _evt->v6; | |
525 | 1147 v115 = EVT_DWORD(_evt->v7 ); |
307 | 1148 v89 = (unsigned __int8)v86; |
797 | 1149 v88 = &pParty->pPlayers[v89]; |
1036 | 1150 v88->ReceiveDamage(v115, (DAMAGE_TYPE)v119); |
797 | 1151 ++curr_seq_num; |
1152 v4 = v124; | |
1153 break; | |
307 | 1154 } |
1155 if ( v86 == 4 ) | |
1156 { | |
1157 if ( !uActiveCharacter ) | |
1158 { | |
310 | 1159 ++curr_seq_num; |
336 | 1160 v4 = v124; |
1161 | |
307 | 1162 //v6 = v123; |
1163 //v7 = ""; | |
1164 break; | |
1165 } | |
1166 v119 = _evt->v6; | |
1167 v88 = pPlayers[uActiveCharacter]; | |
525 | 1168 v115 = EVT_DWORD(_evt->v7 ); |
1036 | 1169 v88->ReceiveDamage(v115, (DAMAGE_TYPE)v119); |
797 | 1170 ++curr_seq_num; |
1171 v4 = v124; | |
1172 break; | |
307 | 1173 } |
1174 if ( v86 != 5 ) | |
1175 { | |
1176 v119 = _evt->v6; | |
525 | 1177 v115 = EVT_DWORD(_evt->v7 ); |
307 | 1178 v89 = rand() % 4; |
1179 v88 = &pParty->pPlayers[v89]; | |
1036 | 1180 v88->ReceiveDamage(v115, (DAMAGE_TYPE)v119); |
310 | 1181 ++curr_seq_num; |
336 | 1182 v4 = v124; |
1183 | |
307 | 1184 //v6 = v123; |
1185 //v7 = ""; | |
1186 break; | |
1187 } | |
1188 v87 = pParty->pPlayers; | |
1189 do | |
1190 { | |
1036 | 1191 v87->ReceiveDamage(v85, (DAMAGE_TYPE)_evt->v6); |
307 | 1192 ++v87; |
1193 } | |
1194 while ( (signed int)v87 < (signed int)pParty->pHirelings ); | |
310 | 1195 ++curr_seq_num; |
336 | 1196 v4 = v124; |
1197 | |
307 | 1198 //v6 = v123; |
1199 //v7 = ""; | |
1200 break; | |
1201 case EVENT_ToggleIndoorLight: | |
525 | 1202 pIndoor->ToggleLight(EVT_DWORD(_evt->v5 ), _evt->v9); |
310 | 1203 ++curr_seq_num; |
336 | 1204 v4 = v124; |
1205 | |
307 | 1206 //v6 = v123; |
1207 //v7 = ""; | |
1208 break; | |
1209 case EVENT_SetFacesBit: | |
525 | 1210 sub_44892E_set_faces_bit(EVT_DWORD(_evt->v5),EVT_DWORD(_evt->v9), _evt->v13); |
310 | 1211 ++curr_seq_num; |
336 | 1212 v4 = v124; |
1213 | |
307 | 1214 //v6 = v123; |
1215 //v7 = ""; | |
1216 break; | |
1217 case EVENT_ToggleChestFlag: | |
525 | 1218 Chest::ToggleFlag(EVT_DWORD(_evt->v5 ), EVT_DWORD(_evt->v9 ), _evt->v13); |
310 | 1219 ++curr_seq_num; |
336 | 1220 v4 = v124; |
1221 | |
307 | 1222 //v6 = v123; |
1223 //v7 = ""; | |
1224 break; | |
1225 case EVENT_ToggleActorFlag: | |
525 | 1226 Actor::ToggleFlag(EVT_DWORD(_evt->v5 ), EVT_DWORD(_evt->v9 ), _evt->v13); |
310 | 1227 ++curr_seq_num; |
336 | 1228 v4 = v124; |
1229 | |
307 | 1230 //v6 = v123; |
1231 //v7 = ""; | |
1232 break; | |
1233 case EVENT_ToggleActorGroupFlag: | |
525 | 1234 ToggleActorGroupFlag(EVT_DWORD(_evt->v5 ), EVT_DWORD(_evt->v9 ), _evt->v13); |
310 | 1235 ++curr_seq_num; |
336 | 1236 v4 = v124; |
1237 | |
307 | 1238 //v6 = v123; |
1239 //v7 = ""; | |
1240 break; | |
1241 case EVENT_SetSnow: | |
1242 if ( !_evt->v5 ) | |
1243 pWeather->bRenderSnow = _evt->v6 != 0; | |
310 | 1244 ++curr_seq_num; |
336 | 1245 v4 = v124; |
1246 | |
307 | 1247 //v6 = v123; |
1248 //v7 = ""; | |
1249 break; | |
1250 case EVENT_StatusText: | |
525 | 1251 v90 = EVT_DWORD(_evt->v5 ); |
520
35f28d4c0ff9
GlobalEventInfo changed to LevelDecoration* activeLevelDecoration
Gloval
parents:
512
diff
changeset
|
1252 if ( activeLevelDecoration ) |
307 | 1253 { |
525 | 1254 if ( activeLevelDecoration == (LevelDecoration*)1 ) |
307 | 1255 { |
827 | 1256 current_npc_text = pNPCTopics[v90-1].pText;//(&dword_721664)[8 * v90]; |
307 | 1257 } |
469 | 1258 if ( canShowMessages == 1 ) |
307 | 1259 { |
1260 v91 = pNPCTopics[v90-1].pText;//(&dword_721664)[8 * v90]; | |
1261 //LABEL_248: | |
1262 ShowStatusBarString(v91, 2u); | |
1263 } | |
1264 } | |
1265 else | |
1266 { | |
469 | 1267 if ( canShowMessages == 1 ) |
307 | 1268 { |
1269 v91 = &pLevelStr[pLevelStrOffsets[v90]]; | |
1270 ShowStatusBarString(v91, 2u); | |
1271 } | |
1272 } | |
310 | 1273 ++curr_seq_num; |
336 | 1274 v4 = v124; |
1275 | |
307 | 1276 //v6 = v123; |
1277 //v7 = ""; | |
1278 break; | |
1279 case EVENT_ShowMessage: | |
525 | 1280 v92 = EVT_DWORD(_evt->v5 ); |
520
35f28d4c0ff9
GlobalEventInfo changed to LevelDecoration* activeLevelDecoration
Gloval
parents:
512
diff
changeset
|
1281 if ( activeLevelDecoration ) |
307 | 1282 { |
1283 v93 = (char *)pNPCTopics[v92-1].pText;//(&dword_721664)[8 * v92]; | |
1284 byte_5B0938[0] = 0; | |
827 | 1285 current_npc_text = v93; |
307 | 1286 } |
1287 else | |
1288 { | |
1289 strcpy(byte_5B0938, &pLevelStr[pLevelStrOffsets[v92]]); | |
1290 } | |
310 | 1291 ++curr_seq_num; |
336 | 1292 v4 = v124; |
1293 | |
307 | 1294 //v6 = v123; |
1295 //v7 = ""; | |
1296 break; | |
1297 case EVENT_CastSpell: | |
835 | 1298 EventCastSpell(_evt->v5, _evt->v6, _evt->v7, EVT_DWORD(_evt->v8 ), |
525 | 1299 EVT_DWORD(_evt->v12 ), EVT_DWORD(_evt->v16 ), EVT_DWORD(_evt->v20 ), |
1300 EVT_DWORD(_evt->v24 ), EVT_DWORD(_evt->v28 )); | |
835 | 1301 ++curr_seq_num; |
1302 v4 = v124; | |
1303 break; | |
307 | 1304 case EVENT_SetTexture: |
525 | 1305 sub_44861E_set_texture(EVT_DWORD(_evt->v5 ), (char *)&_evt->v9); |
310 | 1306 ++curr_seq_num; |
336 | 1307 v4 = v124; |
1308 | |
307 | 1309 //v6 = v123; |
1310 //v7 = ""; | |
1311 break; | |
1312 case EVENT_SetSprite: | |
525 | 1313 SetDecorationSprite(EVT_DWORD(_evt->v5 ), _evt->v9, (char *)&_evt->v10); |
310 | 1314 ++curr_seq_num; |
336 | 1315 v4 = v124; |
1316 | |
307 | 1317 //v6 = v123; |
1318 //v7 = ""; | |
1319 break; | |
1320 case EVENT_SummonMonsters: | |
525 | 1321 sub_448CF4_spawn_monsters(_evt->v5, _evt->v6, _evt->v7,EVT_DWORD(_evt->v8 ), |
1322 EVT_DWORD(_evt->v12 ), EVT_DWORD(_evt->v16 ), EVT_DWORD(_evt->v20 ), | |
1323 EVT_DWORD(_evt->v24 )); | |
310 | 1324 ++curr_seq_num; |
336 | 1325 v4 = v124; |
1326 | |
307 | 1327 //v6 = v123; |
1328 //v7 = ""; | |
1329 break; | |
1330 case EVENT_MouseOver: | |
1331 case EVENT_LocationName: | |
310 | 1332 --curr_seq_num; |
1333 ++curr_seq_num; | |
336 | 1334 v4 = v124; |
1335 | |
307 | 1336 //v6 = v123; |
1337 //v7 = ""; | |
1338 break; | |
1339 case EVENT_ChangeDoorState: | |
1340 sub_449A49_door_switch_animation(_evt->v5, _evt->v6); | |
310 | 1341 ++curr_seq_num; |
336 | 1342 v4 = v124; |
1343 | |
307 | 1344 //v6 = v123; |
1345 //v7 = ""; | |
1346 break; | |
1347 case EVENT_OpenChest: | |
1348 if ( !Chest::Open(_evt->v5) ) | |
1349 goto LABEL_301; | |
310 | 1350 ++curr_seq_num; |
336 | 1351 v4 = v124; |
1352 | |
307 | 1353 //v6 = v123; |
1354 //v7 = ""; | |
1355 break; | |
1356 case EVENT_MoveToMap: | |
1357 v94 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((uint)_evt->v8 << 8)) << 8)) << 8); | |
1358 v135 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((uint)_evt->v8 << 8)) << 8)) << 8); | |
1359 v132 = _evt->v9 + ((_evt->v10 + ((_evt->v11 + ((uint)_evt->v12 << 8)) << 8)) << 8); | |
1360 v126 = _evt->v13 + ((_evt->v14 + ((_evt->v15 + ((uint)_evt->v16 << 8)) << 8)) << 8); | |
1361 v129 = _evt->v17 + ((_evt->v18 + ((_evt->v19 + ((uint)_evt->v20 << 8)) << 8)) << 8); | |
1362 v95 = _evt->v21 + ((_evt->v22 + ((_evt->v23 + ((uint)_evt->v24 << 8)) << 8)) << 8); | |
1363 v96 = _evt->v25; | |
1364 v97 = v96 + ((_evt->v26 + ((_evt->v27 + ((uint)_evt->v28 << 8)) << 8)) << 8); | |
1365 v134 = v96 + ((_evt->v26 + ((_evt->v27 + ((uint)_evt->v28 << 8)) << 8)) << 8); | |
1366 if ( _evt->v29 || _evt->v30 ) | |
1367 { | |
1368 if ( pRenderer->pRenderD3D && !pRenderer->bWindowMode ) | |
1369 pRenderer->_49FD3A(); | |
1033 | 1370 TransitionUI_Load(_evt->v29, _evt->v30, v135, v132, v126, v129, v95, v134, (char *)&_evt->v31); |
307 | 1371 dword_5C3418 = uEventID; |
310 | 1372 dword_5C341C = curr_seq_num + 1; |
307 | 1373 goto LABEL_301; |
1374 } | |
1375 _5B65AC_npcdata_fame_or_other = _evt->v9 + ((_evt->v10 + ((_evt->v11 + ((uint)_evt->v12 << 8)) << 8)) << 8); | |
1376 _5B65A8_npcdata_uflags_or_other = v94; | |
1377 _5B65B0_npcdata_rep_or_other = v126; | |
1378 if ( v129 == -1 ) | |
1379 { | |
1380 v98 = _5B65B4_npcdata_loword_house_or_other; | |
1381 } | |
1382 else | |
1383 { | |
1384 v98 = v129 & stru_5C6E00->uDoublePiMask; | |
1385 _5B65B4_npcdata_loword_house_or_other = v129 & stru_5C6E00->uDoublePiMask; | |
1386 } | |
1387 v99 = (char *)&_evt->v31; | |
1388 _5B65B8_npcdata_hiword_house_or_other = v95; | |
1389 dword_5B65BC = v97; | |
1390 v100 = v94 | v132 | v126 | v95 | v97 | v98; | |
1391 dword_5B65C0 = v100; | |
1392 if ( *v99 == 48 ) | |
1393 { | |
1394 if ( v100 ) | |
1395 { | |
1396 pParty->vPosition.x = v135; | |
1397 pParty->vPosition.y = v132; | |
1398 pParty->vPosition.z = v126; | |
1399 pParty->uFallStartY = v126; | |
1400 if ( _5B65B4_npcdata_loword_house_or_other != -1 ) | |
1401 pParty->sRotationY = _5B65B4_npcdata_loword_house_or_other; | |
1402 _5B65B4_npcdata_loword_house_or_other = -1; | |
1403 v120 = 0; | |
1404 v116 = 0; | |
1405 v111 = 0; | |
1406 v110 = 0; | |
1407 v109 = -1; | |
1408 v108 = 0; | |
1409 v107 = 0; | |
1410 pParty->sRotationX = v95; | |
1411 pParty->uFallSpeed = v134; | |
1412 dword_5B65C0 = 0; | |
1413 dword_5B65BC = 0; | |
1414 _5B65B8_npcdata_hiword_house_or_other = 0; | |
1415 _5B65B0_npcdata_rep_or_other = 0; | |
1416 _5B65AC_npcdata_fame_or_other = 0; | |
1417 _5B65A8_npcdata_uflags_or_other = 0; | |
1418 v106 = 232; | |
1419 LABEL_280: | |
1420 pAudioPlayer->PlaySound((SoundID)v106, v107, v108, v109, v110, v111, v116, v120); | |
1421 } | |
1422 } | |
1423 else | |
1424 { | |
520
35f28d4c0ff9
GlobalEventInfo changed to LevelDecoration* activeLevelDecoration
Gloval
parents:
512
diff
changeset
|
1425 pGameLoadingUI_ProgressBar->uType = (GUIProgressBar::Type)((activeLevelDecoration == NULL) + 1); |
783 | 1426 sub_44987B(v99, MapStartPoint_Party); |
307 | 1427 v133 = 1; |
1428 if ( pCurrentScreen == SCREEN_HOUSE ) | |
1429 { | |
978 | 1430 if ( uGameState == GAME_STATE_2 ) |
307 | 1431 { |
1432 pAudioPlayer->StopChannels(-1, -1); | |
747 | 1433 dialog_menu_id = HOUSE_DIALOGUE_NULL; |
307 | 1434 while ( sub_4BD8B5() ) |
1435 ; | |
1436 pVideoPlayer->Unload(); | |
336 | 1437 window_SpeakInHouse->Release(); |
1438 window_SpeakInHouse = 0; | |
307 | 1439 if ( pMessageQueue_50CBD0->uNumMessages ) |
1440 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | |
1441 pCurrentScreen = SCREEN_GAME; | |
1442 viewparams->bRedrawGameUI = 1; | |
457 | 1443 pDialogueNPCCount = 0; |
307 | 1444 pDialogueWindow->Release(); |
747 | 1445 dialog_menu_id = HOUSE_DIALOGUE_NULL; |
307 | 1446 pDialogueWindow = 0; |
1006 | 1447 pIcons_LOD->SyncLoadedFilesCount(); |
307 | 1448 } |
797 | 1449 OnMapLeave(); |
1450 return; | |
307 | 1451 } |
1452 } | |
310 | 1453 ++curr_seq_num; |
336 | 1454 v4 = v124; |
1455 | |
307 | 1456 //v6 = v123; |
1457 //v7 = ""; | |
1458 break; | |
1459 case EVENT_PlaySound: | |
1460 v120 = 0; | |
1461 v116 = 0; | |
1462 v111 = 0; | |
1463 v110 = _evt->v13 + ((_evt->v14 + ((_evt->v15 + ((uint)_evt->v16 << 8)) << 8)) << 8); | |
1464 v109 = _evt->v9 + ((_evt->v10 + ((_evt->v11 + ((uint)_evt->v12 << 8)) << 8)) << 8); | |
1465 v108 = 0; | |
1466 v107 = 0; | |
1467 v106 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((uint)_evt->v8 << 8)) << 8)) << 8); | |
1468 goto LABEL_280; | |
1469 case EVENT_GiveItem: | |
1470 item.Reset(); | |
1471 //v101 = &pSomeEVT[v9]; | |
1472 v102 = _evt->v7 | |
1473 + ((_evt->v8 + ((_evt->v9 + ((uint)_evt->v10 << 8)) << 8)) << 8); | |
1474 pItemsTable->GenerateItem(_evt->v5, _evt->v6, &item); | |
1475 if ( v102 ) | |
1476 item.uItemID = v102; | |
1477 pParty->SetHoldingItem(&item); | |
310 | 1478 ++curr_seq_num; |
336 | 1479 v4 = v124; |
307 | 1480 //v6 = v123; |
1481 //v7 = ""; | |
1482 break; | |
336 | 1483 case EVENT_SpeakInHouse: |
496 | 1484 if ( EnterHouse((enum HOUSE_ID)EVT_DWORD(_evt->v5))) |
307 | 1485 { |
1486 if ( pRenderer->pRenderD3D && !pRenderer->bWindowMode ) | |
1487 pRenderer->_49FD3A(); | |
1488 pAudioPlayer->PlaySound((SoundID)0, 0, 0, -1, 0, 0, 0, 0); | |
1489 pAudioPlayer->PlaySound(SOUND_EnteringAHouse, 814, 0, -1, 0, 0, 0, 0); | |
1490 v104 = 187; | |
1491 if ( uCurrentHouse_Animation != 167 ) | |
525 | 1492 v104 = EVT_DWORD(_evt->v5); |
336 | 1493 window_SpeakInHouse = GUIWindow::Create(0, 0, 640, 480, WINDOW_HouseInterior, v104, 0); |
948 | 1494 window_SpeakInHouse->CreateButton( 61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); |
1495 window_SpeakInHouse->CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); | |
1496 window_SpeakInHouse->CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); | |
1497 window_SpeakInHouse->CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); | |
1498 window_SpeakInHouse->CreateButton( 0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, '\t', "", 0); | |
307 | 1499 } |
310 | 1500 ++curr_seq_num; |
336 | 1501 v4 = v124; |
1502 | |
307 | 1503 //v6 = v123; |
1504 //v7 = ""; | |
1505 break; | |
1506 case EVENT_PressAnyKey: | |
1507 v121 = 33; | |
310 | 1508 v105 = curr_seq_num + 1; |
307 | 1509 goto LABEL_295; |
1510 case EVENT_Exit: | |
484 | 1511 if ( v133 == 1 ) |
1512 OnMapLeave(); | |
1513 return; | |
307 | 1514 default: |
310 | 1515 ++curr_seq_num; |
336 | 1516 v4 = v124; |
1517 | |
307 | 1518 //v6 = v123; |
1519 //v7 = ""; | |
1520 break; | |
1521 } | |
1522 } | |
336 | 1523 ++v4; |
1524 v124 = v4; | |
1525 if ( v4 >= uSomeEVT_NumEvents ) | |
1526 goto LABEL_301; | |
307 | 1527 //} |
1528 } | |
1529 } | |
1530 |