692
|
1 #include "Viewport.h"
|
|
2
|
|
3 #include "Party.h"
|
|
4 #include "Indoor.h"
|
1051
|
5 #include "Math.h"
|
692
|
6 #include "mm7_data.h"
|
1297
|
7 #include "Actor.h"
|
|
8 #include "Outdoor.h"
|
|
9 #include "Events.h"
|
|
10 #include "BSPModel.h"
|
|
11 #include "Mouse.h"
|
|
12 #include "SpriteObject.h"
|
|
13 #include "ObjectList.h"
|
|
14 #include "DecorationList.h"
|
|
15 #include "texts.h"
|
|
16 #include "Game.h"
|
|
17 #include "Vis.h"
|
|
18 #include "LOD.h"
|
|
19 #include "GUIWindow.h"
|
|
20 #include "TurnEngine.h"
|
|
21 #include "stru123.h"
|
|
22 #include "MM7.h"
|
692
|
23
|
|
24
|
|
25 //----- (004C0262) --------------------------------------------------------
|
|
26 void Viewport::SetScreen( signed int sTL_X, signed int sTL_Y, signed int sBR_X, signed int sBR_Y )
|
|
27 {
|
|
28 unsigned int tl_x; // edx@1
|
|
29 unsigned int br_x; // esi@1
|
|
30 unsigned int tl_y; // edi@3
|
|
31 unsigned int br_y; // eax@3
|
|
32
|
|
33 tl_x = sTL_X;
|
|
34 br_x = sBR_X;
|
|
35 if ( sTL_X > sBR_X )
|
|
36 {
|
1027
|
37 __debugbreak(); // check this code
|
692
|
38 br_x = sBR_X ^ sTL_X ^ sBR_X; // swap x's
|
|
39 tl_x = br_x ^ sBR_X ^ sTL_X;
|
|
40 }
|
|
41 tl_y = sTL_Y;
|
|
42 br_y = sBR_Y;
|
711
|
43 if ( sTL_Y > sBR_Y )
|
692
|
44 {
|
1027
|
45 __debugbreak(); // check this code
|
692
|
46 br_y = sBR_Y ^ sTL_Y ^ sBR_Y; // swap y's
|
|
47 tl_y = br_y ^ sBR_Y ^ sTL_Y;
|
|
48 }
|
|
49 this->uScreen_TL_X = tl_x;
|
|
50 this->uScreen_TL_Y = tl_y;
|
|
51 this->uScreen_BR_X = br_x;
|
|
52 this->uScreen_BR_Y = br_y;
|
|
53 this->uScreenWidth = br_x - tl_x + 1;
|
693
|
54 this->uScreenHeight = br_y - tl_y + 1;
|
|
55 this->uScreenCenterX = (signed int)(br_x + tl_x) /2;
|
692
|
56 if ( pRenderer->pRenderD3D == 0 )
|
871
|
57 this->uScreenCenterY = this->uScreen_BR_Y - fixpoint_sub0(field_30, uScreenHeight);
|
692
|
58 else
|
693
|
59 this->uScreenCenterY = uScreenHeight/2;
|
692
|
60 SetViewport(this->uScreen_TL_X, this->uScreen_TL_Y, this->uScreen_BR_X, this->uScreen_BR_Y);
|
|
61 }
|
|
62
|
|
63 //----- (004C02F8) --------------------------------------------------------
|
|
64 void Viewport::_4C02F8(int a2)
|
|
65 {
|
|
66 this->field_30 = a2;
|
|
67 SetScreen(this->uScreen_TL_X, this->uScreen_TL_Y, this->uScreen_BR_X, this->uScreen_BR_Y);
|
|
68 }
|
|
69
|
|
70 //----- (004C0312) --------------------------------------------------------
|
693
|
71 void Viewport::SetViewport( signed int sTL_X, signed int sTL_Y, signed int sBR_X, signed int sBR_Y )
|
692
|
72 {
|
693
|
73 signed int tl_x; // ebx@1
|
|
74 signed int tl_y; // edi@3
|
|
75 signed int br_x; // edx@5
|
|
76 signed int br_y; // eax@7
|
692
|
77
|
693
|
78 tl_x = sTL_X;
|
|
79 if ( sTL_X < this->uScreen_TL_X )
|
|
80 tl_x = this->uScreen_TL_X;
|
|
81 tl_y = sTL_Y;
|
|
82 if ( sTL_Y < this->uScreen_TL_Y )
|
|
83 tl_y = this->uScreen_TL_Y;
|
|
84 br_x = sBR_X;
|
|
85 if ( sBR_X > this->uScreen_BR_X )
|
|
86 br_x = this->uScreen_BR_X;
|
|
87 br_y = sBR_Y;
|
|
88 if ( sBR_Y > this->uScreen_BR_Y )
|
|
89 br_y = this->uScreen_BR_Y;
|
|
90 this->uViewportTL_Y = tl_y;
|
|
91 this->uViewportTL_X = tl_x;
|
|
92 this->uViewportBR_X = br_x;
|
|
93 this->uViewportBR_Y = br_y;
|
692
|
94 }
|
|
95
|
|
96 //----- (00443219) --------------------------------------------------------
|
|
97 void ViewingParams::_443219()
|
|
98 {
|
693
|
99 this->sViewCenterY += 512;
|
|
100 AdjustPosition();
|
692
|
101 }
|
|
102
|
|
103 //----- (00443225) --------------------------------------------------------
|
|
104 void ViewingParams::_443225()
|
|
105 {
|
693
|
106 this->sViewCenterX -= 512;
|
|
107 AdjustPosition();
|
692
|
108 }
|
|
109
|
|
110 //----- (00443231) --------------------------------------------------------
|
|
111 void ViewingParams::_443231()
|
|
112 {
|
693
|
113 this->sViewCenterY -= 512;
|
|
114 AdjustPosition();
|
692
|
115 }
|
|
116
|
|
117 //----- (0044323D) --------------------------------------------------------
|
|
118 void ViewingParams::_44323D()
|
|
119 {
|
693
|
120 this->sViewCenterX += 512;
|
|
121 AdjustPosition();
|
692
|
122 }
|
|
123
|
|
124 //----- (00443249) --------------------------------------------------------
|
693
|
125 void ViewingParams::CenterOnParty()
|
692
|
126 {
|
|
127 int v1; // edx@1
|
|
128
|
|
129 v1 = (unsigned __int64)((signed __int64)this->field_2C << 15) >> 16;
|
|
130 this->field_2C = v1;
|
|
131 if ( v1 < 384 )
|
|
132 this->field_2C = 384;
|
693
|
133 this->sViewCenterX = pParty->vPosition.x;
|
|
134 this->sViewCenterY = pParty->vPosition.y;
|
|
135 AdjustPosition();
|
692
|
136 }
|
|
137
|
|
138 //----- (00443291) --------------------------------------------------------
|
693
|
139 void ViewingParams::CenterOnParty2()
|
692
|
140 {
|
|
141 int v1; // edx@1
|
|
142 int v2; // eax@1
|
|
143
|
|
144 v1 = 2 * this->field_2C;
|
|
145 v2 = 1536;
|
|
146 this->field_2C = v1;
|
|
147 if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor )
|
|
148 v2 = 3072;
|
|
149 if ( v1 > v2 )
|
|
150 this->field_2C = v2;
|
693
|
151 this->sViewCenterX = pParty->vPosition.x;
|
|
152 this->sViewCenterY = pParty->vPosition.y;
|
|
153 AdjustPosition();
|
692
|
154 }
|
|
155
|
|
156 //----- (004432E7) --------------------------------------------------------
|
693
|
157 void ViewingParams::AdjustPosition()
|
692
|
158 {
|
|
159 ViewingParams *v1; // esi@1
|
|
160 int v2; // ebx@1
|
|
161 signed int v3; // edx@1
|
|
162 int v4; // ecx@1
|
|
163 int v5; // edi@3
|
|
164 int v6; // eax@3
|
|
165 int v7; // eax@5
|
693
|
166
|
692
|
167
|
|
168 v1 = this;
|
711
|
169 v2 = this->indoor_center_y;
|
692
|
170 v3 = 88 >> this->field_2C / 384;
|
|
171 v4 = (44 - v3) << 9;
|
693
|
172 if ( v1->sViewCenterY > v2 + v4 )
|
|
173 v1->sViewCenterY = v2 + v4;
|
692
|
174
|
711
|
175 v5 = v1->indoor_center_x;
|
692
|
176 v6 = (v3 - 44) << 9;
|
693
|
177 if ( v1->sViewCenterX < v5 + v6 )
|
|
178 v1->sViewCenterX = v5 + v6;
|
692
|
179
|
|
180 v7 = v2 + v6;
|
693
|
181 if ( v1->sViewCenterY < v7 )
|
|
182 v1->sViewCenterY = v7;
|
692
|
183
|
693
|
184 if ( v1->sViewCenterX > v5 + v4 )
|
|
185 v1->sViewCenterX = v5 + v4;
|
692
|
186 }
|
|
187
|
|
188 //----- (00443343) --------------------------------------------------------
|
|
189 void ViewingParams::InitGrayPalette()
|
|
190 {
|
|
191 for (unsigned short i=0; i<256; ++i)
|
949
|
192 pPalette[i]=TargetColor(i, i, i);
|
692
|
193 }
|
|
194
|
|
195 //----- (00443365) --------------------------------------------------------
|
|
196 void ViewingParams::_443365()
|
1222
|
197 {
|
|
198 Vec3_short_ *v3; // eax@4
|
|
199 Vec3_short_ *v6; // eax@12
|
|
200 int minimum_y; // [sp+10h] [bp-10h]@2
|
|
201 int maximum_y; // [sp+14h] [bp-Ch]@2
|
|
202 int minimum_x; // [sp+18h] [bp-8h]@2
|
|
203 int maximum_x; // [sp+1Ch] [bp-4h]@2
|
692
|
204
|
1222
|
205 InitGrayPalette();
|
|
206 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor )
|
|
207 {
|
|
208 minimum_x = 0x40000000;
|
|
209 minimum_y = 0x40000000;
|
711
|
210
|
1222
|
211 maximum_x = -0x40000000;
|
|
212 maximum_y = -0x40000000;
|
|
213 for (int i=0; i<pIndoor->pMapOutlines->uNumOutlines; ++i)
|
|
214 {
|
|
215 v3 = &pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uFace1ID];
|
711
|
216
|
1222
|
217 if ( v3->x < minimum_x )
|
|
218 minimum_x = v3->x;
|
|
219 if ( v3->x > maximum_x )
|
|
220 maximum_x = v3->x;
|
|
221 if ( v3->y < minimum_y )
|
|
222 minimum_y = v3->x;
|
|
223 if ( v3->y > maximum_y )
|
|
224 maximum_y = v3->x;
|
711
|
225
|
1222
|
226 v6 = &pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uFace2ID];
|
|
227
|
|
228 if ( v6->x < minimum_x )
|
|
229 minimum_x = v3->x;
|
|
230 if ( v6->x > maximum_x )
|
|
231 maximum_x = v3->x;
|
711
|
232
|
1222
|
233 if ( v6->y < minimum_y )
|
|
234 minimum_y = v3->y;
|
|
235 if ( v6->y > maximum_y )
|
|
236 maximum_y = v3->y;
|
|
237 }
|
711
|
238
|
1222
|
239 uMinimapZoom = 1024;
|
|
240 indoor_center_x = (signed int)(minimum_x + maximum_x) / 2;
|
|
241 field_28 = 10;
|
|
242 indoor_center_y = (signed int)(minimum_y + maximum_y) / 2;
|
|
243 }
|
|
244 else
|
|
245 {
|
|
246 indoor_center_x = 0;
|
|
247 indoor_center_y = 0;
|
|
248 uMinimapZoom = _576E2C_current_minimap_zoom;
|
|
249 field_28 = dword_576E28;
|
|
250 }
|
|
251 field_2C = 384;
|
1297
|
252 }
|
|
253 //----- (0042213C) --------------------------------------------------------
|
|
254 void OnGameViewportClick()
|
|
255 {
|
|
256 signed int v0; // ebx@2
|
|
257 POINT *v1; // esi@3
|
|
258 signed int v2; // eax@9
|
|
259 BLVFace *v3; // eax@10
|
|
260 unsigned int v4; // eax@11
|
|
261 unsigned __int16 v5; // dx@14
|
|
262 signed int v6; // eax@14
|
|
263 char *v7; // esi@15
|
|
264 //int *v8; // eax@19
|
|
265 int v9; // eax@19
|
|
266 unsigned int v10; // eax@19
|
|
267 int v11; // ecx@21
|
|
268 ODMFace *v12; // eax@22
|
|
269 LevelDecoration *v13; // esi@24
|
|
270 __int16 v14; // ax@25
|
|
271 int v15; // ecx@29
|
|
272 signed int v16; // edx@30
|
|
273 Actor *v17; // esi@30
|
|
274 int v18; // ebx@47
|
|
275 unsigned __int16 v19; // ax@50
|
|
276 const char *v20; // eax@51
|
|
277 signed int v21; // eax@58
|
|
278 ItemGen *v22; // esi@62
|
|
279 unsigned int v23; // eax@62
|
|
280 SpriteObject a1; // [sp+Ch] [bp-80h]@1
|
|
281 //POINT v25; // [sp+7Ch] [bp-10h]@3
|
|
282 POINT a2; // [sp+84h] [bp-8h]@3
|
|
283
|
|
284 v1 = pMouse->GetCursorPos(&a2);
|
|
285 if ( pRenderer->pRenderD3D )
|
|
286 v0 = pGame->pVisInstance->get_picked_object_zbuf_val();
|
|
287 else
|
|
288 {
|
|
289 v0 = pRenderer->pActiveZBuffer[v1->x + pSRZBufferLineOffsets[v1->y]];
|
|
290 }
|
|
291
|
|
292 if ( PID_TYPE(v0) == OBJECT_Item)
|
|
293 {
|
|
294 a2.y = (signed int)(unsigned __int16)v0 >> 3;
|
|
295 v21 = (signed int)(unsigned __int16)v0 >> 3;
|
|
296 if ( !(pObjectList->pObjects[pSpriteObjects[v21].uObjectDescID].uFlags & 0x10) && a2.y < 1000 && pSpriteObjects[v21].uObjectDescID
|
|
297 && (unsigned int)v0 < 0x2000000 )
|
|
298 {
|
|
299 v22 = &pSpriteObjects[v21].stru_24;
|
|
300 v23 = pSpriteObjects[v21].stru_24.uItemID;
|
|
301 if ( pItemsTable->pItems[v23].uEquipType == 18 )
|
|
302 {
|
|
303 party_finds_gold(v22->uSpecEnchantmentType, 0);
|
|
304 viewparams->bRedrawGameUI = 1;
|
|
305 }
|
|
306 else
|
|
307 {
|
|
308 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[471], pItemsTable->pItems[v23].pUnidentifiedName);
|
|
309 ShowStatusBarString(pTmpBuf2.data(), 2u);
|
|
310 if ( v22->uItemID == 506 )
|
|
311 _449B7E_toggle_bit(pParty->_quest_bits, 184, 1u);
|
|
312 if ( v22->uItemID == 455 )
|
|
313 _449B7E_toggle_bit(pParty->_quest_bits, 185, 1u);
|
|
314 if ( !pParty->AddItem(v22) )
|
|
315 pParty->SetHoldingItem(v22);
|
|
316 }
|
|
317 SpriteObject::OnInteraction(a2.y);
|
|
318 return;
|
|
319 }
|
|
320 v4 = pParty->pPickedItem.uItemID;
|
|
321 if ( !pParty->pPickedItem.uItemID )
|
|
322 return;
|
|
323 goto LABEL_14;
|
|
324 }
|
|
325 if ( PID_TYPE(v0) != OBJECT_Actor)
|
|
326 {
|
|
327 if ( PID_TYPE(v0) == OBJECT_Decoration)
|
|
328 {
|
|
329 v13 = &pLevelDecorations[(signed int)(unsigned __int16)v0 >> 3];
|
|
330 if ( (signed int)(((unsigned int)v0 >> 16) - pDecorationList->pDecorations[v13->uDecorationDescID].uRadius) >= 512 )
|
|
331 {
|
|
332 v4 = pParty->pPickedItem.uItemID;
|
|
333 if ( !pParty->pPickedItem.uItemID )
|
|
334 return;
|
|
335 goto LABEL_14;
|
|
336 }
|
|
337 v14 = v13->field_16_event_id;
|
|
338 if ( !v14 )
|
|
339 {
|
|
340 if ( pLevelDecorations[(signed int)(unsigned __int16)v0 >> 3].IsInteractive() )
|
|
341 {
|
|
342 v15 = stru_5E4C90._decor_events[v13->_idx_in_stru123 - 75] + 380;
|
|
343 activeLevelDecoration = &pLevelDecorations[(signed int)(unsigned __int16)v0 >> 3];
|
|
344 EventProcessor(v15, 0, 1);
|
|
345 activeLevelDecoration = NULL;
|
|
346 }
|
|
347 return;
|
|
348 }
|
|
349 v11 = v14;
|
|
350 }
|
|
351 else
|
|
352 {
|
|
353 if ( PID_TYPE(v0) != OBJECT_BModel || HIWORD(v0) >= 512 )
|
|
354 {
|
|
355 v4 = pParty->pPickedItem.uItemID;
|
|
356 if ( !pParty->pPickedItem.uItemID )
|
|
357 return;
|
|
358 goto LABEL_14;
|
|
359 }
|
|
360 v2 = PID_ID(v0);
|
|
361 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
|
|
362 {
|
|
363 v3 = &pIndoor->pFaces[v2];
|
|
364 if ( !(v3->uAttributes & 0x2000000) )
|
|
365 {
|
|
366 LABEL_11:
|
|
367 v4 = pParty->pPickedItem.uItemID;
|
|
368 if ( !pParty->pPickedItem.uItemID )
|
|
369 {
|
|
370 ShowNothingHereStatus();
|
|
371 v4 = pParty->pPickedItem.uItemID;
|
|
372 if ( !pParty->pPickedItem.uItemID )
|
|
373 return;
|
|
374 }
|
|
375 LABEL_14:
|
|
376 v5 = pItemsTable->pItems[v4].uSpriteID;
|
|
377 v6 = 0;
|
|
378 a1.uType = v5;
|
|
379 if ( (signed int)pObjectList->uNumObjects <= 0 )
|
|
380 LOWORD(v6) = 0;
|
|
381 else
|
|
382 {
|
|
383 v7 = (char *)&pObjectList->pObjects->uObjectID;
|
|
384 while ( v5 != *(short *)v7 )
|
|
385 {
|
|
386 ++v6;
|
|
387 v7 += 56;
|
|
388 if ( v6 >= (signed int)pObjectList->uNumObjects )
|
|
389 {
|
|
390 LOWORD(v6) = 0;
|
|
391 break;
|
|
392 }
|
|
393 }
|
|
394 }
|
|
395 a1.uObjectDescID = v6;
|
|
396 a1.vPosition.y = pParty->vPosition.y;
|
|
397 a1.spell_caster_pid = OBJECT_Player;
|
|
398 a1.vPosition.x = pParty->vPosition.x;
|
|
399 a1.vPosition.z = pParty->sEyelevel + pParty->vPosition.z;
|
|
400 a1.uSoundID = 0;
|
|
401 a1.uFacing = 0;
|
|
402 a1.uAttributes = 8;
|
|
403 a1.uSectorID = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->sEyelevel + pParty->vPosition.z);
|
|
404 a1.uSpriteFrameID = 0;
|
|
405 memcpy(&a1.stru_24, &pParty->pPickedItem, 0x24u);
|
|
406
|
|
407 extern int UnprojectX(int);
|
|
408 v9 = UnprojectX(v1->x);
|
|
409 a1.Create(pParty->sRotationY + v9, 184, 200, 0);
|
|
410 v10 = pIcons_LOD->LoadTexture(pItemsTable->pItems[pParty->pPickedItem.uItemID].pIconName, TEXTURE_16BIT_PALETTE);
|
|
411 if (v10 != -1)
|
|
412 pIcons_LOD->pTextures[v10].Release();
|
|
413 pMouse->RemoveHoldingItem();
|
|
414 pIcons_LOD->SyncLoadedFilesCount();
|
|
415 return;
|
|
416 }
|
|
417 v11 = pIndoor->pFaceExtras[v3->uFaceExtraID].uEventID;
|
|
418 }
|
|
419 else
|
|
420 {
|
|
421 v12 = &pOutdoor->pBModels[(signed int)(v0 & 0xFFFF) >> 9].pFaces[v2 & 0x3F];
|
|
422 if ( !v12->Clickable())
|
|
423 goto LABEL_11;
|
|
424 v11 = v12->sCogTriggeredID;
|
|
425 }
|
|
426 }
|
|
427 EventProcessor(v11, (unsigned __int16)v0, 1);
|
|
428 return;
|
|
429 }
|
|
430 v16 = (signed int)(unsigned __int16)v0 >> 3;
|
|
431 a2.y = v16;
|
|
432 v17 = &pActors[v16];
|
|
433 if ( v17->uAIState == 5 )
|
|
434 {
|
|
435 if ( (unsigned int)v0 < 0x2000000 )
|
|
436 {
|
|
437 stru_50C198.LootActor(&pActors[v16]);
|
|
438 return;
|
|
439 }
|
|
440 v4 = pParty->pPickedItem.uItemID;
|
|
441 if ( !pParty->pPickedItem.uItemID )
|
|
442 return;
|
|
443 goto LABEL_14;
|
|
444 }
|
|
445 if ( GetAsyncKeyState(VK_SHIFT) >= 0 )
|
|
446 {
|
|
447 if ( !v17->GetActorsRelation(0) && !(BYTE2(v17->uAttributes) & 8) )
|
|
448 {
|
|
449 if ( HIWORD(v0) >= 512)
|
|
450 {
|
|
451 v4 = pParty->pPickedItem.uItemID;
|
|
452 if ( !pParty->pPickedItem.uItemID )
|
|
453 return;
|
|
454 goto LABEL_14;
|
|
455 }
|
|
456 if ( !v17->CanAct() )
|
|
457 return;
|
|
458 v18 = a2.y;
|
|
459 Actor::AI_FaceObject(a2.y, 4u, 0, 0);
|
|
460 if ( !v17->sNPC_ID )
|
|
461 {
|
|
462 v19 = pNPCStats->pGroups_copy[v17->uGroup];
|
|
463 if ( v19 )
|
|
464 {
|
|
465 v20 = pNPCStats->pCatchPhrases[v19];
|
|
466 if ( v20 )
|
|
467 {
|
|
468 pParty->uFlags |= 2u;
|
|
469 strcpy(byte_5B0938.data(), v20);
|
|
470 sub_4451A8_press_any_key(0, 0, 0);
|
|
471 }
|
|
472 }
|
|
473 return;
|
|
474 }
|
|
475 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
|
|
476 return;
|
|
477 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_StartNPCDialogue;
|
|
478 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v18;
|
|
479 LABEL_42:
|
|
480 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
|
|
481 ++pMessageQueue_50CBD0->uNumMessages;
|
|
482 return;*/
|
|
483 pMessageQueue_50CBD0->AddMessage(UIMSG_StartNPCDialogue, v18, 0);
|
|
484 return;
|
|
485 }
|
|
486 if ( pParty->bTurnBasedModeOn == 1 && pTurnEngine->field_4 == 3 )
|
|
487 {
|
|
488 pTurnEngine->field_18 |= 8u;
|
|
489 return;
|
|
490 }
|
|
491 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
|
|
492 {
|
|
493 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Attack;
|
|
494 goto LABEL_41;
|
|
495 }*/
|
|
496 pMessageQueue_50CBD0->AddMessage(UIMSG_Attack, 0, 0);
|
|
497 }
|
|
498 else
|
|
499 {
|
|
500 if ( pParty->bTurnBasedModeOn == 1 && pTurnEngine->field_4 == 3 )
|
|
501 {
|
|
502 pParty->uFlags |= PARTY_FLAGS_1_FALLING;
|
|
503 return;
|
|
504 }
|
|
505 if ( uActiveCharacter
|
|
506 && sub_427769_spell(pPlayers[uActiveCharacter]->uQuickSpell))
|
|
507 {
|
|
508 pMessageQueue_50CBD0->AddMessage(UIMSG_CastQuickSpell, 0, 0);
|
|
509 /*&& (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
|
|
510 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_CastQuickSpell;
|
|
511 LABEL_41:
|
|
512 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
|
|
513 goto LABEL_42;*/
|
|
514 }
|
|
515 }
|
|
516 }
|