annotate Events.cpp @ 308:6d584c95dcf8

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