annotate Events.cpp @ 501:6fa3ff8ef729

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