Mercurial > mm7
annotate Arcomage.cpp @ 1130:d98415be04ca
banker's rounding template
author | Grumpy7 |
---|---|
date | Fri, 31 May 2013 23:38:43 +0200 |
parents | 39eaa6b00141 |
children | f947bedb2859 |
rev | line source |
---|---|
0 | 1 #include <string> |
1033 | 2 #include <assert.h> |
0 | 3 |
1016 | 4 #include "LightmapBuilder.h" |
0 | 5 #include "Arcomage.h" |
6 #include "VideoPlayer.h" | |
7 #include "AudioPlayer.h" | |
8 #include "Mouse.h" | |
9 #include "Game.h" | |
10 #include "Viewport.h" | |
11 #include "Time.h" | |
12 #include "GUIFont.h" | |
13 #include "Party.h" | |
14 #include "GUIWindow.h" | |
15 #include "Events2D.h" | |
16 #include "VectorTypes.h" | |
189 | 17 #include "texts.h" |
0 | 18 |
19 | |
20 | |
938 | 21 void sub_409BE8(); |
22 | |
23 | |
24 | |
25 | |
26 /* 388 */ | |
27 #pragma pack(push, 1) | |
28 struct stru348 | |
29 { | |
30 __int16 field_0; | |
31 __int16 field_2; | |
32 __int16 field_4; | |
33 __int16 field_6; | |
34 __int16 field_8; | |
35 __int16 field_A; | |
36 __int16 field_C; | |
37 __int16 field_E; | |
38 __int16 field_10; | |
39 __int16 field_12; | |
40 int field_14; | |
41 }; | |
42 #pragma pack(pop) | |
43 stru348 stru_4E1890[13] = | |
44 { | |
45 { 30, 100, 15, 5, 2, 2, 2, 10, 10, 10, 0}, | |
46 { 50, 150, 20, 5, 2, 2, 2, 5, 5, 5, 1}, | |
47 { 50, 150, 20, 5, 2, 2, 2, 5, 5, 5, 2}, | |
48 { 75, 200, 25, 10, 3, 3, 3, 5, 5, 5, 2}, | |
49 { 75, 200, 20, 10, 3, 3, 3, 5, 5, 5, 1}, | |
50 {100, 300, 30, 15, 4, 4, 4, 10, 10, 10, 1}, | |
51 {100, 300, 30, 15, 4, 4, 4, 10, 10, 10, 2}, | |
52 {150, 400, 20, 10, 5, 5, 5, 25, 25, 25, 0}, | |
53 {200, 500, 20, 10, 1, 1, 1, 15, 15, 15, 2}, | |
54 {100, 300, 20, 50, 1, 1, 5, 5, 5, 25, 0}, | |
55 {125, 350, 10, 20, 3, 1, 2, 15, 5, 10, 2}, | |
56 {125, 350, 10, 20, 3, 1, 2, 15, 5, 10, 1}, | |
57 {100, 300, 50, 50, 5, 3, 5, 20, 10, 20, 0} | |
58 }; | |
59 | |
60 | |
0 | 61 |
62 | |
63 ArcomageGame *pArcomageGame = new ArcomageGame; | |
64 ArcomageCard pCards[87]; | |
65 ArcomageGame_stru0 stru_505708[2]; | |
66 | |
67 | |
68 | |
935 | 69 stru272 array_4FAC10[10]; |
70 | |
0 | 71 |
72 | |
73 /* 267 */ | |
74 #pragma pack(push, 1) | |
75 struct stru273 | |
76 { | |
77 bool _40DD2F(); | |
78 bool Inside(Vec4_int_ *pXYZW); | |
79 | |
80 int x; | |
81 int y; | |
82 char field_8; | |
83 char field_9; | |
84 char field_A; | |
85 char field_B; | |
86 }; | |
87 #pragma pack(pop) | |
88 | |
89 | |
90 | |
91 | |
92 | |
93 | |
94 | |
95 | |
96 //----- (0040DD2F) -------------------------------------------------------- | |
97 bool stru273::_40DD2F() | |
98 { | |
99 bool result; // eax@1 | |
100 | |
101 this->x = pArcomageGame->mouse_x; | |
102 result = pArcomageGame->mouse_y; | |
103 this->y = pArcomageGame->mouse_y; | |
104 this->field_8 = pArcomageGame->mouse_left; | |
105 this->field_9 = pArcomageGame->mouse_left == pArcomageGame->field_F7; | |
106 this->field_8 = pArcomageGame->mouse_left; | |
107 this->field_B = pArcomageGame->mouse_right == pArcomageGame->field_F8; | |
108 pArcomageGame->field_F7 = pArcomageGame->mouse_left; | |
109 pArcomageGame->field_F8 = pArcomageGame->mouse_right; | |
110 LOBYTE(result) = 1; | |
111 return result; | |
112 } | |
113 | |
114 //----- (0040DD93) -------------------------------------------------------- | |
115 bool stru273::Inside(Vec4_int_ *pXYZW) | |
116 { | |
117 int v2; // eax@3 | |
118 | |
119 auto a1 = this; | |
120 return a1->x >= pXYZW->x && a1->x <= pXYZW->z && (v2 = a1->y, v2 >= pXYZW->y) && v2 <= pXYZW->w; | |
121 } | |
122 | |
123 | |
124 | |
125 | |
126 //----- (0040DFAF) -------------------------------------------------------- | |
127 void ArcomageGame::OnMouseClick(char right_left, bool bDown) | |
128 { | |
129 if ( right_left ) | |
130 pArcomageGame->mouse_right = bDown; | |
131 else | |
132 pArcomageGame->mouse_left = bDown; | |
133 } | |
134 | |
135 //----- (0040DFC1) -------------------------------------------------------- | |
136 void ArcomageGame::OnMouseMove(POINT *pXY) | |
137 { | |
138 pArcomageGame->mouse_x = pXY->x; | |
139 pArcomageGame->mouse_y = pXY->y; | |
140 } | |
141 | |
142 | |
143 //----- (0040DF47) -------------------------------------------------------- | |
144 void DoBlt_Copy(unsigned __int16 *pPixels) | |
145 { | |
146 unsigned __int16 *v1; // ebx@1 | |
147 ArcomageRect rect; // [sp+Ch] [bp-18h]@1 | |
148 int pTargetXY[2]; // [sp+1Ch] [bp-8h]@1 | |
149 | |
150 v1 = pPixels; | |
151 pRenderer->Present(); | |
152 pTargetXY[0] = 0; | |
153 pTargetXY[1] = 0; | |
154 rect.x = 0; | |
155 rect.z = 640; | |
156 rect.y = 0; | |
157 rect.w = 480; | |
158 pRenderer->BeginScene(); | |
159 pArcomageGame->pBlit_Copy_pixels = v1; | |
160 Blt_Copy(&rect, pTargetXY, 2); | |
161 pRenderer->EndScene(); | |
162 pArcomageGame->pBlit_Copy_pixels = 0; | |
163 } | |
164 | |
165 //----- (0040DDC9) -------------------------------------------------------- | |
166 void __thiscall ArcomageGame::PlaySound(unsigned int a1) | |
167 { | |
168 SoundID v1; // eax@10 | |
169 signed int v2; // [sp-4h] [bp-4h]@2 | |
170 | |
171 switch ( a1 ) | |
172 { | |
173 case 0x28u: | |
174 case 0x2Bu: | |
175 case 0x2Eu: | |
176 v2 = SOUND_Arcomage_LoseResources; | |
177 goto LABEL_10; | |
178 case 0x27u: | |
179 case 0x29u: | |
180 case 0x2Au: | |
181 case 0x2Cu: | |
182 case 0x2Du: | |
183 case 0x2Fu: | |
184 v2 = SOUND_Arcomage_AddResources; | |
185 goto LABEL_10; | |
186 case 0u: | |
187 case 0xCu: | |
188 case 0xEu: | |
189 case 0xFu: | |
190 case 0x10u: | |
191 case 0x30u: | |
192 case 0x32u: | |
193 case 0x35u: | |
194 v2 = SOUND_Arcomage_TowerWallDamage; | |
195 goto LABEL_10; | |
196 case 0x15u: | |
197 case 0x16u: | |
198 case 0x17u: | |
199 v2 = SOUND_Arcomage_DrawCard; | |
200 goto LABEL_10; | |
201 case 0x38u: | |
202 v2 = 124; | |
203 goto LABEL_10; | |
204 case 0x1Fu: | |
205 case 0x22u: | |
206 case 0x25u: | |
207 v2 = SOUND_Arcomage_ProductionDamage; | |
208 goto LABEL_10; | |
209 case 1u: | |
210 case 0x1Eu: | |
211 case 0x20u: | |
212 case 0x21u: | |
213 case 0x23u: | |
214 case 0x24u: | |
215 case 0x26u: | |
216 v2 = SOUND_Arcomage_ProductionUpgrade; | |
217 goto LABEL_10; | |
218 case 0x14u: | |
219 v2 = SOUND_Arcomage_127; | |
220 LABEL_10: | |
221 v1 = (SoundID)v2; | |
222 goto LABEL_16; | |
223 case 3u: | |
224 v1 = SOUND_Arcomage_128; | |
225 goto LABEL_16; | |
226 case 0x34u: | |
227 case 0x36u: | |
228 v1 = SOUND_Arcomage_TowerUpgrade; | |
229 goto LABEL_16; | |
230 case 0xAu: | |
231 case 0xBu: | |
232 case 0xDu: | |
233 v1 = (SoundID)130; | |
234 goto LABEL_16; | |
235 case 0x37u: | |
236 v1 = (SoundID)131; | |
237 goto LABEL_16; | |
238 case 0x31u: | |
239 case 0x33u: | |
240 v1 = SOUND_Arcomage_WallUpgrade; | |
241 LABEL_16: | |
242 pAudioPlayer->PlaySound(v1, 0, 0, -1, 0, 0, 0, 0); | |
243 break; | |
244 default: | |
245 return; | |
246 } | |
247 } | |
248 | |
249 //----- (0040DC2D) -------------------------------------------------------- | |
250 bool ArcomageGame::MsgLoop(int a1, ArcomageGame_stru1 *a2) | |
251 { | |
252 void *v2; // ebp@1 | |
253 BOOL v3; // eax@1 | |
254 int v4; // edx@6 | |
255 int v5; // edx@6 | |
256 int v6; // eax@6 | |
257 int v7; // edx@7 | |
258 | |
259 v2 = a2; | |
260 pArcomageGame->field_0 = 0; | |
261 pArcomageGame->stru1.field_0 = 0; | |
262 v3 = PeekMessageA(&pArcomageGame->msg, 0, 0, 0, PM_REMOVE); | |
263 if ( pArcomageGame->msg.message == WM_QUIT ) | |
264 Game_DeinitializeAndTerminate(0); | |
265 if ( v3 > 0 ) | |
266 { | |
267 TranslateMessage(&pArcomageGame->msg); | |
268 DispatchMessageA(&pArcomageGame->msg); | |
269 } | |
1038 | 270 /*if (pAsyncMouse) |
0 | 271 { |
272 EnterCriticalSection(&pGame->pThreadWardInstance->csAsyncMouse); | |
273 v4 = *((unsigned int *)pAsyncMouse + 7); | |
274 pArcomageGame->mouse_x = *((unsigned int *)pAsyncMouse + 6); | |
275 pArcomageGame->mouse_y = v4; | |
276 v5 = *((unsigned int *)pAsyncMouse + 27); | |
277 v6 = *(unsigned int *)v5; | |
278 if ( *(unsigned int *)v5 != v5 ) | |
279 { | |
280 do | |
281 { | |
282 v7 = *(unsigned int *)(v6 + 20); | |
283 if ( v7 & 1 ) | |
284 { | |
285 pArcomageGame->stru1.field_0 = 7; | |
286 } | |
287 else | |
288 { | |
289 if ( v7 & 2 ) | |
290 pArcomageGame->stru1.field_0 = 8; | |
291 } | |
292 v6 = *(unsigned int *)v6; | |
293 } | |
294 while ( v6 != *((unsigned int *)pAsyncMouse + 27) ); | |
295 } | |
296 pAsyncMouse->_46B944(); | |
297 if ( !*((unsigned char *)pAsyncMouse + 90) ) | |
298 pArcomageGame->field_F6 = 1; | |
299 LeaveCriticalSection(&pGame->pThreadWardInstance->csAsyncMouse); | |
1038 | 300 }*/ |
0 | 301 memcpy(v2, &pArcomageGame->stru1, 0xCu); |
302 return pArcomageGame->stru1.field_0 != 0; | |
303 } | |
304 | |
305 | |
306 //----- (0040D7D5) -------------------------------------------------------- | |
307 void am_BeginScene(unsigned __int16 *pPcxPixels, int a2, int a3) | |
308 { | |
309 unsigned __int16 *v3; // esi@1 | |
310 | |
311 v3 = pPcxPixels; | |
312 pRenderer->BeginScene(); | |
313 pArcomageGame->pBlit_Copy_pixels = v3; | |
314 } | |
315 | |
316 //----- (0040D7EC) -------------------------------------------------------- | |
317 void __fastcall Blt_Chroma(ArcomageRect *pSrcXYZW, int *pTargetXY, int a3, int a4) | |
318 { | |
319 ArcomageRect *pSrcXYZW_; // esi@1 | |
320 int x; // ecx@1 | |
321 int y; // edx@1 | |
322 unsigned __int16 *pSrc; // eax@2 | |
323 unsigned __int16 *v8; // edi@3 | |
324 int uSrcTotalWidth; // ecx@4 | |
325 unsigned int v10; // esi@9 | |
326 int v11; // ebx@11 | |
327 unsigned __int16 *v12; // edx@11 | |
328 char v13; // zf@17 | |
329 unsigned __int16 *v14; // ebx@20 | |
330 int v15; // eax@20 | |
331 unsigned __int16 *v16; // ecx@20 | |
332 unsigned int v17; // eax@23 | |
333 std::string v18; // [sp-18h] [bp-3Ch]@8 | |
334 const char *v19; // [sp-8h] [bp-2Ch]@8 | |
335 int v20; // [sp-4h] [bp-28h]@8 | |
336 std::string *v21; // [sp+Ch] [bp-18h]@8 | |
337 unsigned __int16 *v22; // [sp+10h] [bp-14h]@9 | |
338 int v23; // [sp+14h] [bp-10h]@3 | |
339 int v24; // [sp+18h] [bp-Ch]@3 | |
340 int uSrcPitch; // [sp+1Ch] [bp-8h]@5 | |
341 int a3a; // [sp+23h] [bp-1h]@8 | |
342 int v27; // [sp+30h] [bp+Ch]@13 | |
343 | |
344 pSrcXYZW_ = pSrcXYZW; | |
345 x = *pTargetXY; | |
346 y = pTargetXY[1]; | |
347 if ( !pRenderer->uNumSceneBegins || (pSrc = pArcomageGame->pBlit_Copy_pixels) == 0 ) | |
348 return; | |
349 v8 = &pRenderer->pTargetSurface[x + y * pRenderer->uTargetSurfacePitch]; | |
350 v23 = pSrcXYZW_->z - pSrcXYZW_->x; | |
351 v24 = pSrcXYZW_->w - pSrcXYZW_->y; | |
352 if ( pArcomageGame->pBlit_Copy_pixels == pArcomageGame->pBackgroundPixels ) | |
353 { | |
354 uSrcTotalWidth = (signed __int16)pArcomageGame->pGameBackground.uWidth; | |
355 LABEL_5: | |
356 uSrcPitch = uSrcTotalWidth; | |
357 goto LABEL_9; | |
358 } | |
359 if ( pArcomageGame->pBlit_Copy_pixels == pArcomageGame->pSpritesPixels ) | |
360 { | |
361 uSrcTotalWidth = (signed __int16)pArcomageGame->pSprites.uWidth; | |
362 goto LABEL_5; | |
363 } | |
364 MessageBoxW(nullptr, L"Problem in Blit_Chroma", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\am_nw.cpp:157", 0); | |
365 pSrc = pArcomageGame->pBlit_Copy_pixels; | |
366 LABEL_9: | |
367 v22 = &pSrc[pSrcXYZW_->x + uSrcPitch * pSrcXYZW_->y]; | |
368 v10 = 0xFFu >> (8 - LOBYTE(pRenderer->uTargetBBits)); | |
369 v21 = (std::string *)((((pRenderer->uTargetGBits != 6) - 1) & 0x4A00) + 12783); | |
370 if ( a4 == 2 ) | |
371 { | |
372 if ( v24 > 0 ) | |
373 { | |
374 v11 = v23; | |
375 v12 = v22; | |
376 uSrcPitch = 2 * (uSrcPitch - v23); | |
377 do | |
378 { | |
379 if ( v11 > 0 ) | |
380 { | |
381 v27 = v11; | |
382 do | |
383 { | |
384 if ( *v12 != v10 ) | |
385 *v8 = *v12; | |
386 ++v8; | |
387 ++v12; | |
388 --v27; | |
389 } | |
390 while ( v27 ); | |
391 } | |
392 v12 = (unsigned __int16 *)((char *)v12 + uSrcPitch); | |
393 v13 = v24-- == 1; | |
394 v8 += pRenderer->uTargetSurfacePitch - v11; | |
395 } | |
396 while ( !v13 ); | |
397 } | |
398 } | |
399 else | |
400 { | |
401 if ( v24 > 0 ) | |
402 { | |
403 v14 = (unsigned __int16 *)v23; | |
404 v15 = uSrcPitch - v23; | |
405 v23 = v24; | |
406 v16 = v22; | |
407 uSrcPitch = 2 * v15; | |
408 do | |
409 { | |
410 if ( (signed int)v14 > 0 ) | |
411 { | |
412 v22 = v14; | |
413 do | |
414 { | |
415 v17 = *v16; | |
416 if ( v17 != v10 ) | |
417 { | |
418 v24 = *v8; | |
419 *v8 = ((unsigned __int16)v21 & ((unsigned int)v24 >> 1)) + ((unsigned __int16)v21 & (v17 >> 1)); | |
420 } | |
421 ++v8; | |
422 ++v16; | |
423 v22 = (unsigned __int16 *)((char *)v22 - 1); | |
424 } | |
425 while ( v22 ); | |
426 } | |
427 v16 = (unsigned __int16 *)((char *)v16 + uSrcPitch); | |
428 v13 = v23-- == 1; | |
429 v8 += pRenderer->uTargetSurfacePitch - (uint)v14; | |
430 } | |
431 while ( !v13 ); | |
432 } | |
433 } | |
434 } | |
435 | |
436 //----- (0040D9B1) -------------------------------------------------------- | |
437 void __fastcall Blt_Copy(ArcomageRect *pSrcXYZW, int *pTargetXY, int a3) | |
438 { | |
439 ArcomageRect *pSrcXYZW_; // esi@1 | |
440 int x; // ecx@1 | |
441 int y; // edx@1 | |
442 unsigned __int16 *v6; // eax@2 | |
443 unsigned __int16 *v7; // edi@3 | |
444 int uSrcRegionWidth; // ebx@3 | |
445 int uSrcTotalWidth; // ecx@4 | |
446 unsigned __int16 *pSrc; // esi@8 | |
447 int v11; // edx@9 | |
448 int v12; // eax@12 | |
449 int v13; // ecx@19 | |
450 char v14; // zf@21 | |
451 std::string v15; // [sp-18h] [bp-38h]@7 | |
452 const char *v16; // [sp-8h] [bp-28h]@7 | |
453 int v17; // [sp-4h] [bp-24h]@7 | |
454 unsigned int v18; // [sp+Ch] [bp-14h]@7 | |
455 int v19; // [sp+10h] [bp-10h]@8 | |
456 int v20; // [sp+14h] [bp-Ch]@17 | |
457 int uSrcRegionHeight; // [sp+18h] [bp-8h]@3 | |
458 int a3a; // [sp+1Fh] [bp-1h]@7 | |
459 | |
460 pSrcXYZW_ = pSrcXYZW; | |
461 x = *pTargetXY; | |
462 y = pTargetXY[1]; | |
463 if ( pRenderer->uNumSceneBegins ) | |
464 { | |
465 v6 = pArcomageGame->pBlit_Copy_pixels; | |
466 if ( pArcomageGame->pBlit_Copy_pixels ) | |
467 { | |
468 v7 = &pRenderer->pTargetSurface[x + y * pRenderer->uTargetSurfacePitch]; | |
469 uSrcRegionWidth = pSrcXYZW_->z - pSrcXYZW_->x; | |
470 uSrcRegionHeight = pSrcXYZW_->w - pSrcXYZW_->y; | |
471 if ( pArcomageGame->pBlit_Copy_pixels == pArcomageGame->pBackgroundPixels ) | |
472 { | |
473 uSrcTotalWidth = (signed __int16)pArcomageGame->pGameBackground.uWidth; | |
474 } | |
475 else | |
476 { | |
477 if ( pArcomageGame->pBlit_Copy_pixels == pArcomageGame->pSpritesPixels ) | |
478 { | |
479 uSrcTotalWidth = (signed __int16)pArcomageGame->pSprites.uWidth; | |
480 } | |
481 else | |
482 { | |
483 MessageBoxW(nullptr, L"Problem in Blit_Copy", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\am_nw.cpp:246", 0); | |
484 uSrcTotalWidth = a3; | |
485 v6 = pArcomageGame->pBlit_Copy_pixels; | |
486 } | |
487 } | |
488 pSrc = &v6[pSrcXYZW_->x + uSrcTotalWidth * pSrcXYZW_->y]; | |
489 v19 = (((pRenderer->uTargetGBits != 6) - 1) & 0x4A00) + 0x31EF; | |
490 if ( a3 == 2 ) | |
491 { | |
492 v11 = uSrcRegionHeight; | |
493 if ( uSrcRegionHeight > 0 ) | |
494 { | |
495 uSrcRegionHeight = 2 * (uSrcTotalWidth - uSrcRegionWidth); | |
496 do | |
497 { | |
498 if ( uSrcRegionWidth > 0 ) | |
499 { | |
500 v12 = uSrcRegionWidth; | |
501 do | |
502 { | |
503 *v7 = *pSrc; | |
504 ++v7; | |
505 ++pSrc; | |
506 --v12; | |
507 } | |
508 while ( v12 ); | |
509 } | |
510 pSrc = (unsigned __int16 *)((char *)pSrc + uSrcRegionHeight); | |
511 --v11; | |
512 v7 += pRenderer->uTargetSurfacePitch - uSrcRegionWidth; | |
513 } | |
514 while ( v11 ); | |
515 } | |
516 } | |
517 else | |
518 { | |
519 if ( uSrcRegionHeight > 0 ) | |
520 { | |
521 v20 = uSrcRegionHeight; | |
522 uSrcRegionHeight = 2 * (uSrcTotalWidth - uSrcRegionWidth); | |
523 do | |
524 { | |
525 if ( uSrcRegionWidth > 0 ) | |
526 { | |
527 v13 = uSrcRegionWidth; | |
528 do | |
529 { | |
530 v18 = *v7; | |
531 *v7 = (v19 & (v18 >> 1)) + (v19 & ((unsigned int)*pSrc >> 1)); | |
532 ++v7; | |
533 ++pSrc; | |
534 --v13; | |
535 } | |
536 while ( v13 ); | |
537 } | |
538 pSrc = (unsigned __int16 *)((char *)pSrc + uSrcRegionHeight); | |
539 v14 = v20-- == 1; | |
540 v7 += pRenderer->uTargetSurfacePitch - uSrcRegionWidth; | |
541 } | |
542 while ( !v14 ); | |
543 } | |
544 } | |
545 } | |
546 } | |
547 } | |
548 | |
549 //----- (0040DB10) -------------------------------------------------------- | |
550 void __cdecl am_EndScene() | |
551 { | |
552 pRenderer->EndScene(); | |
553 pArcomageGame->pBlit_Copy_pixels = 0; | |
554 } | |
555 | |
556 //----- (0040D7B7) -------------------------------------------------------- | |
557 bool ArcomageGame::LoadSprites() | |
558 { | |
559 bool result; // eax@1 | |
560 | |
561 pArcomageGame->pSprites.Load("sprites.pcx", 2); | |
562 result = (bool)pArcomageGame->pSprites.pPixels; | |
563 pArcomageGame->pSpritesPixels = pArcomageGame->pSprites.pPixels; | |
564 LOBYTE(result) = 1; | |
565 return result; | |
566 } | |
567 | |
568 //----- (0040D799) -------------------------------------------------------- | |
569 bool ArcomageGame::LoadBackground() | |
570 { | |
571 bool result; // eax@1 | |
572 | |
573 pArcomageGame->pGameBackground.Load("layout.pcx", 2); | |
574 result = (bool)pArcomageGame->pGameBackground.pPixels; | |
575 pArcomageGame->pBackgroundPixels = pArcomageGame->pGameBackground.pPixels; | |
576 LOBYTE(result) = 1; | |
577 return result; | |
578 } | |
579 | |
580 //----- (00408BB4) -------------------------------------------------------- | |
581 bool __fastcall am_408BB4(int a1) | |
582 { | |
583 char result; // al@3 | |
584 signed int v3; // ebx@8 | |
585 int v4; // esi@8 | |
586 int v5; // eax@9 | |
587 int v6; // edi@9 | |
588 int v7; // eax@11 | |
589 signed int v8; // eax@11 | |
590 int v9; // ebx@5 | |
591 int v10; // eax@5 | |
592 int v11; // ecx@18 | |
593 char v12; // bl@20 | |
594 int v13; // eax@20 | |
595 ArcomageCard *v14; // ecx@20 | |
596 char v15; // dl@20 | |
597 char v16; // dl@24 | |
598 int v17; // edx@25 | |
599 int v18; // edx@27 | |
600 char v19; // dl@31 | |
601 int v20; // edx@32 | |
602 char v21; // dl@35 | |
603 char v22; // dl@39 | |
604 int v23; // edx@40 | |
605 char v24; // dl@45 | |
606 int v25; // edx@46 | |
607 char v26; // dl@52 | |
608 int v27; // edx@53 | |
609 char v28; // dl@58 | |
610 int v29; // edx@59 | |
611 char v30; // dl@64 | |
612 int v31; // edx@65 | |
613 char v32; // dl@70 | |
614 int v33; // edx@71 | |
615 char v34; // dl@76 | |
616 int v35; // edx@77 | |
617 char v36; // dl@82 | |
618 int v37; // edx@83 | |
619 char v38; // dl@86 | |
620 char v39; // dl@90 | |
621 int v40; // edi@93 | |
622 char v41; // dl@93 | |
623 int v42; // esi@93 | |
624 char v43; // bl@94 | |
625 int v44; // esi@95 | |
626 char v45; // dl@99 | |
627 char v46; // dl@103 | |
628 char v47; // dl@107 | |
629 char v48; // dl@111 | |
630 char v49; // dl@115 | |
631 ArcomageGame_stru0 *v50; // ebx@116 | |
632 ArcomageGame_stru0 *v51; // edx@116 | |
633 int v52; // esi@124 | |
634 int v53; // edx@124 | |
635 int v54; // edx@127 | |
636 int v55; // esi@130 | |
637 int v56; // edi@138 | |
638 int l; // esi@138 | |
639 int v58; // eax@140 | |
640 int v59; // ecx@142 | |
641 int v60; // edx@142 | |
642 int v61; // ebx@142 | |
643 int v62; // eax@145 | |
644 int v63; // esi@146 | |
645 int v64; // ebx@4 | |
646 int v65; // eax@4 | |
647 int v66; // ecx@168 | |
648 char v67; // bl@170 | |
649 int v68; // eax@170 | |
650 ArcomageCard *v69; // ecx@170 | |
651 char v70; // dl@170 | |
652 char v71; // dl@174 | |
653 int v72; // edx@175 | |
654 int v73; // edx@177 | |
655 char v74; // dl@181 | |
656 char v75; // dl@184 | |
657 char v76; // dl@188 | |
658 int v77; // edx@189 | |
659 char v78; // dl@194 | |
660 char v79; // dl@200 | |
661 int v80; // edx@201 | |
662 char v81; // dl@206 | |
663 int v82; // edx@207 | |
664 char v83; // dl@212 | |
665 int v84; // edx@213 | |
666 char v85; // dl@218 | |
667 int v86; // edx@219 | |
668 char v87; // dl@224 | |
669 int v88; // edx@225 | |
670 char v89; // dl@230 | |
671 int v90; // edx@231 | |
672 char v91; // dl@234 | |
673 int v92; // edx@235 | |
674 char v93; // dl@238 | |
675 int v94; // edx@239 | |
676 int v95; // esi@241 | |
677 char v96; // dl@241 | |
678 int v97; // esi@241 | |
679 char v98; // bl@242 | |
680 int v99; // edi@243 | |
681 int v100; // edx@245 | |
682 int v101; // edi@246 | |
683 char v102; // dl@247 | |
684 int v103; // edx@248 | |
685 char v104; // dl@251 | |
686 int v105; // edx@252 | |
687 char v106; // dl@255 | |
688 int v107; // edx@256 | |
689 char v108; // dl@259 | |
690 int v109; // edx@260 | |
691 char v110; // dl@263 | |
692 ArcomageGame_stru0 *v111; // ebx@264 | |
693 ArcomageGame_stru0 *v112; // edx@264 | |
694 int v113; // esi@272 | |
695 int v114; // edx@272 | |
696 int v115; // edx@275 | |
697 int v116; // esi@278 | |
698 int v117; // edi@286 | |
699 int j; // esi@286 | |
700 int v119; // eax@288 | |
701 int v120; // ecx@290 | |
702 int v121; // edx@290 | |
703 int v122; // ebx@290 | |
704 int v123; // eax@293 | |
705 int v124; // esi@294 | |
706 int v125; // [sp-28h] [bp-28h]@130 | |
707 int v126; // [sp-28h] [bp-28h]@278 | |
708 int k; // [sp-24h] [bp-24h]@18 | |
709 int i; // [sp-24h] [bp-24h]@168 | |
710 int v129; // [sp-20h] [bp-20h]@5 | |
711 int v130; // [sp-20h] [bp-20h]@4 | |
712 int v131; // [sp-1Ch] [bp-1Ch]@17 | |
713 int v132; // [sp-1Ch] [bp-1Ch]@140 | |
714 int v133; // [sp-1Ch] [bp-1Ch]@167 | |
715 int v134; // [sp-1Ch] [bp-1Ch]@288 | |
716 int v135; // [sp-18h] [bp-18h]@5 | |
717 int v136; // [sp-18h] [bp-18h]@4 | |
718 signed int v137; // [sp-14h] [bp-14h]@0 | |
719 int v138; // [sp-14h] [bp-14h]@93 | |
720 int v139; // [sp-14h] [bp-14h]@130 | |
721 int v140; // [sp-14h] [bp-14h]@241 | |
722 int v141; // [sp-14h] [bp-14h]@278 | |
723 ArcomageGame_stru0 *v142; // [sp-10h] [bp-10h]@5 | |
724 ArcomageGame_stru0 *v143; // [sp-10h] [bp-10h]@4 | |
725 ArcomageGame_stru0 *v144; // [sp-Ch] [bp-Ch]@5 | |
726 ArcomageGame_stru0 *v145; // [sp-Ch] [bp-Ch]@4 | |
727 char v146; // [sp-8h] [bp-8h]@35 | |
728 char v147; // [sp-8h] [bp-8h]@184 | |
729 char v148; // [sp-5h] [bp-5h]@20 | |
730 char v149; // [sp-5h] [bp-5h]@170 | |
731 | |
732 byte_4FAA00 = 1; | |
733 if ( dword_4DF3A4 ) | |
734 { | |
735 if ( dword_4DF3A4 != 1 ) | |
736 { | |
737 result = dword_4DF3A4 - 2; | |
738 if ( dword_4DF3A4 != 2 ) | |
1113
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
1038
diff
changeset
|
739 return result != 0; |
0 | 740 v64 = a1; |
741 v145 = &stru_505708[a1]; | |
742 v130 = a1; | |
743 v143 = &stru_505708[(a1 + 1) % 2]; | |
744 v136 = am_40BB49(a1); | |
745 v65 = 0; | |
746 do | |
747 { | |
748 if ( v65 >= v136 ) | |
749 { | |
750 dword_4FA9B0[2 * v65] = -1; | |
751 dword_4FA9B4[2 * v65] = -9999; | |
752 } | |
753 else | |
754 { | |
755 dword_4FA9B0[2 * v65] = v65; | |
756 dword_4FA9B4[2 * v65] = 0; | |
757 } | |
758 ++v65; | |
759 } | |
760 while ( v65 < 10 ); | |
761 v133 = 0; | |
762 if ( v136 > 0 ) | |
763 { | |
764 v66 = 47 * v64; | |
765 for ( i = 47 * v64; ; v66 = i ) | |
766 { | |
767 v67 = 99; | |
768 v68 = 2 * v133; | |
769 v69 = &pCards[stru_505708[0].arr_44[v66 + dword_4FA9B0[2 * v133]]]; | |
770 v70 = v69->field_38[2]; | |
771 v149 = v69->field_38[2]; | |
772 if ( v145->field_24 >= 10 ) | |
773 { | |
774 if ( v70 == 99 | |
775 || v69->field_48[4] == 99 | |
776 || v69->field_48[15] == 99 | |
777 || (v74 = BYTE1(v69->field_68), v74 == 99) ) | |
778 v73 = 5 * (v143->field_24 - v145->field_24); | |
779 else | |
780 v73 = 5 * (v149 + v69->field_48[4] + v69->field_48[15] + v74); | |
781 } | |
782 else | |
783 { | |
784 if ( v70 == 99 | |
785 || v69->field_48[4] == 99 | |
786 || v69->field_48[15] == 99 | |
787 || (v71 = BYTE1(v69->field_68), v71 == 99) ) | |
788 v72 = 5 * (v143->field_24 - v145->field_24); | |
789 else | |
790 v72 = 5 * (v149 + v69->field_48[4] + v69->field_48[15] + v71); | |
791 v73 = 4 * v72; | |
792 } | |
793 dword_4FA9B4[v68] += v73; | |
794 v75 = v69->field_38[1]; | |
795 v147 = v69->field_38[1]; | |
796 if ( v145->field_28 >= 10 ) | |
797 { | |
798 if ( v75 == 99 | |
799 || v69->field_48[3] == 99 | |
800 || v69->field_48[14] == 99 | |
801 || (v78 = LOBYTE(v69->field_68), v78 == 99) ) | |
802 v77 = v143->field_28 - v145->field_28; | |
803 else | |
804 v77 = v147 + v69->field_48[3] + v69->field_48[14] + v78; | |
805 } | |
806 else | |
807 { | |
808 if ( v75 == 99 | |
809 || v69->field_48[3] == 99 | |
810 || v69->field_48[14] == 99 | |
811 || (v76 = LOBYTE(v69->field_68), v76 == 99) ) | |
812 v77 = 5 * (v143->field_28 - v145->field_28); | |
813 else | |
814 v77 = 5 * (v147 + v69->field_48[3] + v69->field_48[14] + v76); | |
815 } | |
816 dword_4FA9B4[v68] += v77; | |
817 dword_4FA9B4[v68] += 7 * (v69->field_38[0] + v69->field_48[2] + v69->field_48[13] + v69->field_58[15]); | |
818 if ( BYTE2(v69->field_30) == 99 | |
819 || v69->field_38[12] == 99 | |
820 || v69->field_48[7] == 99 | |
821 || (v79 = v69->field_58[9], v79 == 99) ) | |
822 v80 = 5 * (v143->field_2C - v145->field_2C); | |
823 else | |
824 v80 = 5 * (BYTE2(v69->field_30) + v69->field_38[12] + v69->field_48[7] + v79); | |
825 dword_4FA9B4[v68] += 8 * v80; | |
826 if ( BYTE3(v69->field_30) == 99 | |
827 || v69->field_38[13] == 99 | |
828 || v69->field_48[8] == 99 | |
829 || (v81 = v69->field_58[10], v81 == 99) ) | |
830 v82 = 5 * (v143->field_30 - v145->field_30); | |
831 else | |
832 v82 = 5 * (BYTE3(v69->field_30) + v69->field_38[13] + v69->field_48[8] + v81); | |
833 dword_4FA9B4[v68] += 8 * v82; | |
834 if ( LOBYTE(v69->field_34) == 99 | |
835 || v69->field_38[14] == 99 | |
836 || v69->field_48[9] == 99 | |
837 || (v83 = v69->field_58[11], v83 == 99) ) | |
838 v84 = 5 * (v143->field_34 - v145->field_34); | |
839 else | |
840 v84 = 5 * (LOBYTE(v69->field_34) + v69->field_38[14] + v69->field_48[9] + v83); | |
841 dword_4FA9B4[v68] += 8 * v84; | |
842 if ( BYTE1(v69->field_34) == 99 | |
843 || v69->field_38[15] == 99 | |
844 || v69->field_48[10] == 99 | |
845 || (v85 = v69->field_58[12], v85 == 99) ) | |
846 v86 = v143->field_38 - v145->field_38; | |
847 else | |
848 v86 = BYTE1(v69->field_34) + v69->field_38[15] + v69->field_48[10] + v85; | |
849 dword_4FA9B4[v68] += 2 * v86; | |
850 if ( BYTE2(v69->field_34) == 99 | |
851 || v69->field_48[0] == 99 | |
852 || v69->field_48[11] == 99 | |
853 || (v87 = v69->field_58[13], v87 == 99) ) | |
854 v88 = v143->field_3C - v145->field_3C; | |
855 else | |
856 v88 = BYTE2(v69->field_34) + v69->field_48[0] + v69->field_48[11] + v87; | |
857 dword_4FA9B4[v68] += 2 * v88; | |
858 if ( BYTE3(v69->field_34) == 99 | |
859 || v69->field_48[1] == 99 | |
860 || v69->field_48[12] == 99 | |
861 || (v89 = v69->field_58[14], v89 == 99) ) | |
862 v90 = v143->field_40 - v145->field_40; | |
863 else | |
864 v90 = BYTE3(v69->field_34) + v69->field_48[1] + v69->field_48[12] + v89; | |
865 dword_4FA9B4[v68] += 2 * v90; | |
866 if ( v69->field_38[11] == 99 || (v91 = v69->field_58[8], v91 == 99) ) | |
867 v92 = 10 * (v145->field_24 - v143->field_24); | |
868 else | |
869 v92 = -10 * (v69->field_38[11] + v91); | |
870 dword_4FA9B4[v68] += v92; | |
871 if ( v69->field_38[10] == 99 || (v93 = v69->field_58[7], v93 == 99) ) | |
872 v94 = 3 * (v145->field_28 - v143->field_28); | |
873 else | |
874 v94 = -3 * (v69->field_38[10] + v93); | |
875 dword_4FA9B4[v68] += v94; | |
876 v95 = v69->field_38[9]; | |
877 v140 = v95; | |
878 v96 = v69->field_38[3]; | |
879 dword_4FA9B4[v68] += -7 * (v69->field_58[6] + v95); | |
880 v97 = dword_4FA9B4[v68]; | |
881 if ( v96 == 99 ) | |
882 goto LABEL_245; | |
883 v98 = v69->field_58[0]; | |
884 if ( v98 == 99 ) | |
885 break; | |
886 v99 = v96 + v98; | |
887 v67 = 99; | |
888 dword_4FA9B4[v68] = v97 - 5 * v99; | |
889 LABEL_246: | |
890 v101 = v140; | |
891 if ( v69->field_38[4] == v67 || (v102 = v69->field_58[1], v102 == v67) ) | |
892 v103 = 5 * (v145->field_30 - v143->field_30); | |
893 else | |
894 v103 = -5 * (v69->field_38[4] + v102); | |
895 dword_4FA9B4[v68] += v103; | |
896 if ( v69->field_38[5] == v67 || (v104 = v69->field_58[2], v104 == v67) ) | |
897 v105 = 5 * (v145->field_34 - v143->field_34); | |
898 else | |
899 v105 = -5 * (v69->field_38[5] + v104); | |
900 dword_4FA9B4[v68] += v105; | |
901 if ( v69->field_38[6] == v67 || (v106 = v69->field_58[3], v106 == v67) ) | |
902 v107 = v145->field_38 - v143->field_38; | |
903 else | |
904 v107 = -(v69->field_38[6] + v106); | |
905 dword_4FA9B4[v68] += 2 * v107; | |
906 if ( v69->field_38[7] == v67 || (v108 = v69->field_58[4], v108 == v67) ) | |
907 v109 = v145->field_3C - v143->field_3C; | |
908 else | |
909 v109 = -(v69->field_38[7] + v108); | |
910 dword_4FA9B4[v68] += 2 * v109; | |
911 if ( v69->field_38[8] == v67 || (v110 = v69->field_58[5], v110 == v67) ) | |
912 { | |
913 v112 = v145; | |
914 v111 = v143; | |
915 dword_4FA9B4[v68] += 2 * (v145->field_40 - v143->field_40); | |
916 } | |
917 else | |
918 { | |
919 v111 = v143; | |
920 dword_4FA9B4[v68] += -2 * (v69->field_38[8] + v110); | |
921 v112 = v145; | |
922 } | |
923 if ( LOBYTE(v69->field_30) || v69->field_48[5] ) | |
924 dword_4FA9B4[v68] *= 10; | |
925 if ( LOBYTE(v69->field_24) == 1 ) | |
926 { | |
927 v113 = LOBYTE(v69->field_28); | |
928 v114 = v112->field_38; | |
929 } | |
930 else | |
931 { | |
932 if ( LOBYTE(v69->field_24) == 2 ) | |
933 { | |
934 v113 = BYTE1(v69->field_28); | |
935 v114 = v112->field_3C; | |
936 } | |
937 else | |
938 { | |
939 if ( LOBYTE(v69->field_24) != 3 ) | |
940 goto LABEL_278; | |
941 v113 = BYTE2(v69->field_28); | |
942 v114 = v112->field_40; | |
943 } | |
944 } | |
945 v115 = v114 - v113; | |
946 if ( v115 > 3 ) | |
947 v115 = 3; | |
948 dword_4FA9B4[v68] += 5 * v115; | |
949 LABEL_278: | |
950 v116 = v69->field_58[8]; | |
951 v141 = v111->field_24; | |
952 v126 = v69->field_38[11]; | |
953 if ( v141 <= v116 + v126 ) | |
954 dword_4FA9B4[v68] += 9999; | |
955 v137 = v111->field_28 + v141; | |
956 if ( v137 <= v116 + v126 + v69->field_58[6] + v69->field_58[7] + v101 + v69->field_38[10] ) | |
957 dword_4FA9B4[v68] += 9999; | |
958 if ( v69->field_48[15] + (signed int)BYTE1(v69->field_68) + v145->field_24 + v69->field_48[4] + v149 >= dword_4E1884 ) | |
959 dword_4FA9B4[v68] += 9999; | |
960 ++v133; | |
961 if ( v133 >= v136 ) | |
962 { | |
963 v64 = v130; | |
964 goto LABEL_286; | |
965 } | |
966 } | |
967 v67 = 99; | |
968 LABEL_245: | |
969 v100 = v145->field_2C - v143->field_2C; | |
970 dword_4FA9B4[v68] = v97 + 4 * v100 + v100; | |
971 goto LABEL_246; | |
972 } | |
973 LABEL_286: | |
974 v117 = v136 - 1; | |
975 for ( j = v136 - 1; j >= 0; --j ) | |
976 { | |
977 v137 = 0; | |
978 if ( j > 0 ) | |
979 { | |
980 v119 = (int)dword_4FA9B0; | |
981 v134 = j; | |
982 v137 = j; | |
983 do | |
984 { | |
985 if ( *(unsigned int *)(v119 + 4) < *(unsigned int *)(v119 + 12) ) | |
986 { | |
987 v120 = *(unsigned int *)v119; | |
988 v121 = *(unsigned int *)(v119 + 4); | |
989 *(unsigned int *)v119 = *(unsigned int *)(v119 + 8); | |
990 v122 = *(unsigned int *)(v119 + 12); | |
991 *(unsigned int *)(v119 + 8) = v120; | |
992 *(unsigned int *)(v119 + 4) = v122; | |
993 v64 = v130; | |
994 *(unsigned int *)(v119 + 12) = v121; | |
995 } | |
996 v119 += 8; | |
997 --v134; | |
998 } | |
999 while ( v134 ); | |
1000 } | |
1001 } | |
1002 v123 = v136 - 1; | |
1003 if ( am_byte_4FAA77 ) | |
1004 { | |
1005 if ( v117 >= 0 ) | |
1006 { | |
1007 while ( !BYTE3(pCards[stru_505708[0].arr_44[47 * v64 + dword_4FA9B0[2 * v123]]].field_28) ) | |
1008 { | |
1009 --v123; | |
1010 if ( v123 < 0 ) | |
1113
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
1038
diff
changeset
|
1011 return am_40BCFB(v64, v137) != 0; |
0 | 1012 } |
1013 v137 = dword_4FA9B0[2 * v123]; | |
1014 } | |
1015 } | |
1016 else | |
1017 { | |
1018 v124 = 0; | |
1019 if ( v117 >= 0 ) | |
1020 { | |
1021 while ( !BYTE3(pCards[stru_505708[0].arr_44[47 * v64 + dword_4FA9B0[2 * v123]]].field_28) ) | |
1022 { | |
1023 --v123; | |
1024 if ( v123 < 0 ) | |
1025 goto LABEL_299; | |
1026 } | |
1027 v137 = dword_4FA9B0[2 * v123]; | |
1028 } | |
1029 LABEL_299: | |
1030 if ( v136 > 0 ) | |
1031 { | |
1032 while ( !am_40BF15(v64, dword_4FA9B0[2 * v124]) || dword_4FA9B4[2 * v124] < 0 ) | |
1033 { | |
1034 ++v124; | |
1035 if ( v124 >= v136 ) | |
1113
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
1038
diff
changeset
|
1036 return am_40BCFB(v64, v137) != 0; |
0 | 1037 } |
1113
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
1038
diff
changeset
|
1038 return am_40BE0E(v64, dword_4FA9B0[2 * v124]) != 0; |
0 | 1039 } |
1040 } | |
1113
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
1038
diff
changeset
|
1041 return am_40BCFB(v64, v137) != 0; |
0 | 1042 } |
1043 v9 = a1; | |
1044 v144 = &stru_505708[a1]; | |
1045 v129 = a1; | |
1046 v142 = &stru_505708[(a1 + 1) % 2]; | |
1047 v135 = am_40BB49(a1); | |
1048 v10 = 0; | |
1049 do | |
1050 { | |
1051 if ( v10 >= v135 ) | |
1052 { | |
1053 dword_4FA9B0[2 * v10] = -1; | |
1054 dword_4FA9B4[2 * v10] = -9999; | |
1055 } | |
1056 else | |
1057 { | |
1058 dword_4FA9B0[2 * v10] = v10; | |
1059 dword_4FA9B4[2 * v10] = 0; | |
1060 } | |
1061 ++v10; | |
1062 } | |
1063 while ( v10 < 10 ); | |
1064 v131 = 0; | |
1065 if ( v135 > 0 ) | |
1066 { | |
1067 v11 = 47 * v9; | |
1068 for ( k = 47 * v9; ; v11 = k ) | |
1069 { | |
1070 v12 = 99; | |
1071 v13 = 2 * v131; | |
1072 v14 = &pCards[stru_505708[0].arr_44[v11 + dword_4FA9B0[2 * v131]]]; | |
1073 v15 = v14->field_38[2]; | |
1074 v148 = v14->field_38[2]; | |
1075 if ( v144->field_24 >= 10 ) | |
1076 { | |
1077 if ( v15 == 99 || v14->field_48[4] == 99 || v14->field_48[15] == 99 || (v19 = BYTE1(v14->field_68), v19 == 99) ) | |
1078 v20 = 5 * (v142->field_24 - v144->field_24); | |
1079 else | |
1080 v20 = 5 * (v148 + v14->field_48[4] + v14->field_48[15] + v19); | |
1081 v18 = 2 * v20; | |
1082 } | |
1083 else | |
1084 { | |
1085 if ( v15 == 99 || v14->field_48[4] == 99 || v14->field_48[15] == 99 || (v16 = BYTE1(v14->field_68), v16 == 99) ) | |
1086 v17 = 5 * (v142->field_24 - v144->field_24); | |
1087 else | |
1088 v17 = 5 * (v148 + v14->field_48[4] + v14->field_48[15] + v16); | |
1089 v18 = 4 * v17; | |
1090 } | |
1091 dword_4FA9B4[v13] += v18; | |
1092 v21 = v14->field_38[1]; | |
1093 v146 = v14->field_38[1]; | |
1094 if ( v144->field_28 >= 10 ) | |
1095 { | |
1096 if ( v21 == 99 | |
1097 || v14->field_48[3] == 99 | |
1098 || v14->field_48[14] == 99 | |
1099 || (v24 = LOBYTE(v14->field_68), v24 == 99) ) | |
1100 v25 = v142->field_28 - v144->field_28; | |
1101 else | |
1102 v25 = v146 + v14->field_48[3] + v14->field_48[14] + v24; | |
1103 v23 = 2 * v25; | |
1104 } | |
1105 else | |
1106 { | |
1107 if ( v21 == 99 | |
1108 || v14->field_48[3] == 99 | |
1109 || v14->field_48[14] == 99 | |
1110 || (v22 = LOBYTE(v14->field_68), v22 == 99) ) | |
1111 v23 = 5 * (v142->field_28 - v144->field_28); | |
1112 else | |
1113 v23 = 5 * (v146 + v14->field_48[3] + v14->field_48[14] + v22); | |
1114 } | |
1115 dword_4FA9B4[v13] += v23; | |
1116 dword_4FA9B4[v13] += 7 * (v14->field_38[0] + v14->field_48[2] + v14->field_48[13] + v14->field_58[15]); | |
1117 if ( BYTE2(v14->field_30) == 99 | |
1118 || v14->field_38[12] == 99 | |
1119 || v14->field_48[7] == 99 | |
1120 || (v26 = v14->field_58[9], v26 == 99) ) | |
1121 v27 = 5 * (v142->field_2C - v144->field_2C); | |
1122 else | |
1123 v27 = 5 * (BYTE2(v14->field_30) + v14->field_38[12] + v14->field_48[7] + v26); | |
1124 dword_4FA9B4[v13] += 8 * v27; | |
1125 if ( BYTE3(v14->field_30) == 99 | |
1126 || v14->field_38[13] == 99 | |
1127 || v14->field_48[8] == 99 | |
1128 || (v28 = v14->field_58[10], v28 == 99) ) | |
1129 v29 = 5 * (v142->field_30 - v144->field_30); | |
1130 else | |
1131 v29 = 5 * (BYTE3(v14->field_30) + v14->field_38[13] + v14->field_48[8] + v28); | |
1132 dword_4FA9B4[v13] += 8 * v29; | |
1133 if ( LOBYTE(v14->field_34) == 99 | |
1134 || v14->field_38[14] == 99 | |
1135 || v14->field_48[9] == 99 | |
1136 || (v30 = v14->field_58[11], v30 == 99) ) | |
1137 v31 = 5 * (v142->field_34 - v144->field_34); | |
1138 else | |
1139 v31 = 5 * (LOBYTE(v14->field_34) + v14->field_38[14] + v14->field_48[9] + v30); | |
1140 dword_4FA9B4[v13] += 8 * v31; | |
1141 if ( BYTE1(v14->field_34) == 99 | |
1142 || v14->field_38[15] == 99 | |
1143 || v14->field_48[10] == 99 | |
1144 || (v32 = v14->field_58[12], v32 == 99) ) | |
1145 v33 = v142->field_38 - v144->field_38; | |
1146 else | |
1147 v33 = BYTE1(v14->field_34) + v14->field_38[15] + v14->field_48[10] + v32; | |
1148 dword_4FA9B4[v13] += 2 * v33; | |
1149 if ( BYTE2(v14->field_34) == 99 | |
1150 || v14->field_48[0] == 99 | |
1151 || v14->field_48[11] == 99 | |
1152 || (v34 = v14->field_58[13], v34 == 99) ) | |
1153 v35 = v142->field_3C - v144->field_3C; | |
1154 else | |
1155 v35 = BYTE2(v14->field_34) + v14->field_48[0] + v14->field_48[11] + v34; | |
1156 dword_4FA9B4[v13] += 2 * v35; | |
1157 if ( BYTE3(v14->field_34) == 99 | |
1158 || v14->field_48[1] == 99 | |
1159 || v14->field_48[12] == 99 | |
1160 || (v36 = v14->field_58[14], v36 == 99) ) | |
1161 v37 = v142->field_40 - v144->field_40; | |
1162 else | |
1163 v37 = BYTE3(v14->field_34) + v14->field_48[1] + v14->field_48[12] + v36; | |
1164 dword_4FA9B4[v13] += 2 * v37; | |
1165 if ( v14->field_38[11] == 99 || (v38 = v14->field_58[8], v38 == 99) ) | |
1166 dword_4FA9B4[v13] += v144->field_24 - v142->field_24; | |
1167 else | |
1168 dword_4FA9B4[v13] -= v14->field_38[11] + v38; | |
1169 if ( v14->field_38[10] == 99 || (v39 = v14->field_58[7], v39 == 99) ) | |
1170 dword_4FA9B4[v13] += v144->field_28 - v142->field_28; | |
1171 else | |
1172 dword_4FA9B4[v13] -= v14->field_38[10] + v39; | |
1173 v40 = v14->field_38[9]; | |
1174 v138 = v14->field_38[9]; | |
1175 dword_4FA9B4[v13] -= v40 + v14->field_58[6]; | |
1176 v41 = v14->field_38[3]; | |
1177 v42 = dword_4FA9B4[v13]; | |
1178 if ( v41 == 99 ) | |
1179 goto LABEL_97; | |
1180 v43 = v14->field_58[0]; | |
1181 if ( v43 == 99 ) | |
1182 break; | |
1183 v44 = v42 - v43; | |
1184 v12 = 99; | |
1185 dword_4FA9B4[v13] = v44 - v41; | |
1186 LABEL_98: | |
1187 if ( v14->field_38[4] == v12 || (v45 = v14->field_58[1], v45 == v12) ) | |
1188 dword_4FA9B4[v13] += v144->field_30 - v142->field_30; | |
1189 else | |
1190 dword_4FA9B4[v13] -= v14->field_38[4] + v45; | |
1191 if ( v14->field_38[5] == v12 || (v46 = v14->field_58[2], v46 == v12) ) | |
1192 dword_4FA9B4[v13] += v144->field_34 - v142->field_34; | |
1193 else | |
1194 dword_4FA9B4[v13] -= v14->field_38[5] + v46; | |
1195 if ( v14->field_38[6] == v12 || (v47 = v14->field_58[3], v47 == v12) ) | |
1196 dword_4FA9B4[v13] += v144->field_38 - v142->field_38; | |
1197 else | |
1198 dword_4FA9B4[v13] -= v14->field_38[6] + v47; | |
1199 if ( v14->field_38[7] == v12 || (v48 = v14->field_58[4], v48 == v12) ) | |
1200 dword_4FA9B4[v13] += v144->field_3C - v142->field_3C; | |
1201 else | |
1202 dword_4FA9B4[v13] -= v14->field_38[7] + v48; | |
1203 if ( v14->field_38[8] == v12 || (v49 = v14->field_58[5], v49 == v12) ) | |
1204 { | |
1205 v51 = v144; | |
1206 v50 = v142; | |
1207 dword_4FA9B4[v13] += v144->field_40 - v142->field_40; | |
1208 } | |
1209 else | |
1210 { | |
1211 v50 = v142; | |
1212 dword_4FA9B4[v13] -= v14->field_38[8] + v49; | |
1213 v51 = v144; | |
1214 } | |
1215 if ( LOBYTE(v14->field_30) || v14->field_48[5] ) | |
1216 dword_4FA9B4[v13] *= 10; | |
1217 if ( LOBYTE(v14->field_24) == 1 ) | |
1218 { | |
1219 v52 = LOBYTE(v14->field_28); | |
1220 v53 = v51->field_38; | |
1221 } | |
1222 else | |
1223 { | |
1224 if ( LOBYTE(v14->field_24) == 2 ) | |
1225 { | |
1226 v52 = BYTE1(v14->field_28); | |
1227 v53 = v51->field_3C; | |
1228 } | |
1229 else | |
1230 { | |
1231 if ( LOBYTE(v14->field_24) != 3 ) | |
1232 goto LABEL_130; | |
1233 v52 = BYTE2(v14->field_28); | |
1234 v53 = v51->field_40; | |
1235 } | |
1236 } | |
1237 v54 = v53 - v52; | |
1238 if ( v54 > 3 ) | |
1239 v54 = 3; | |
1240 dword_4FA9B4[v13] += 5 * v54; | |
1241 LABEL_130: | |
1242 v55 = v14->field_58[8]; | |
1243 v139 = v50->field_24; | |
1244 v125 = v14->field_38[11]; | |
1245 if ( v139 <= v55 + v125 ) | |
1246 dword_4FA9B4[v13] += 9999; | |
1247 v137 = v50->field_28 + v139; | |
1248 if ( v137 <= v55 + v125 + v14->field_58[6] + v14->field_58[7] + v40 + v14->field_38[10] ) | |
1249 dword_4FA9B4[v13] += 9999; | |
1250 if ( v14->field_48[15] + (signed int)BYTE1(v14->field_68) + v144->field_24 + v14->field_48[4] + v148 >= dword_4E1884 ) | |
1251 dword_4FA9B4[v13] += 9999; | |
1252 ++v131; | |
1253 if ( v131 >= v135 ) | |
1254 { | |
1255 v9 = v129; | |
1256 goto LABEL_138; | |
1257 } | |
1258 } | |
1259 v12 = 99; | |
1260 LABEL_97: | |
1261 v40 = v138; | |
1262 dword_4FA9B4[v13] = v42 + v144->field_2C - v142->field_2C; | |
1263 goto LABEL_98; | |
1264 } | |
1265 LABEL_138: | |
1266 v56 = v135 - 1; | |
1267 for ( l = v135 - 1; l >= 0; --l ) | |
1268 { | |
1269 v137 = 0; | |
1270 if ( l > 0 ) | |
1271 { | |
1272 v58 = (int)dword_4FA9B0; | |
1273 v132 = l; | |
1274 v137 = l; | |
1275 do | |
1276 { | |
1277 if ( *(unsigned int *)(v58 + 4) < *(unsigned int *)(v58 + 12) ) | |
1278 { | |
1279 v59 = *(unsigned int *)v58; | |
1280 v60 = *(unsigned int *)(v58 + 4); | |
1281 *(unsigned int *)v58 = *(unsigned int *)(v58 + 8); | |
1282 v61 = *(unsigned int *)(v58 + 12); | |
1283 *(unsigned int *)(v58 + 8) = v59; | |
1284 *(unsigned int *)(v58 + 4) = v61; | |
1285 v9 = v129; | |
1286 *(unsigned int *)(v58 + 12) = v60; | |
1287 } | |
1288 v58 += 8; | |
1289 --v132; | |
1290 } | |
1291 while ( v132 ); | |
1292 } | |
1293 } | |
1294 v62 = v135 - 1; | |
1295 if ( am_byte_4FAA77 ) | |
1296 { | |
1297 if ( v56 >= 0 ) | |
1298 { | |
1299 while ( !BYTE3(pCards[stru_505708[0].arr_44[47 * v9 + dword_4FA9B0[2 * v62]]].field_28) ) | |
1300 { | |
1301 --v62; | |
1302 if ( v62 < 0 ) | |
1113
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
1038
diff
changeset
|
1303 return am_40BCFB(v9, v137) != 0; |
0 | 1304 } |
1305 v137 = dword_4FA9B0[2 * v62]; | |
1306 } | |
1307 } | |
1308 else | |
1309 { | |
1310 v63 = 0; | |
1311 if ( v56 >= 0 ) | |
1312 { | |
1313 while ( !BYTE3(pCards[stru_505708[0].arr_44[47 * v9 + dword_4FA9B0[2 * v62]]].field_28) ) | |
1314 { | |
1315 --v62; | |
1316 if ( v62 < 0 ) | |
1317 goto LABEL_151; | |
1318 } | |
1319 v137 = dword_4FA9B0[2 * v62]; | |
1320 } | |
1321 LABEL_151: | |
1322 if ( v135 > 0 ) | |
1323 { | |
1324 while ( !am_40BF15(v9, dword_4FA9B0[2 * v63]) || dword_4FA9B4[2 * v63] < 0 ) | |
1325 { | |
1326 ++v63; | |
1327 if ( v63 >= v135 ) | |
1113
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
1038
diff
changeset
|
1328 return am_40BCFB(v9, v137) != 0; |
0 | 1329 } |
1113
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
1038
diff
changeset
|
1330 return am_40BE0E(v9, dword_4FA9B0[2 * v63]) != 0; |
0 | 1331 } |
1332 } | |
1113
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
1038
diff
changeset
|
1333 return am_40BCFB(v9, v137) != 0; |
0 | 1334 } |
1335 v3 = 0; | |
1336 v4 = a1; | |
1337 if ( am_byte_4FAA77 ) | |
1338 { | |
1339 LABEL_11: | |
1340 v7 = am_40BB49(v4); | |
1341 v8 = rand_interval(0, v7 - 1); | |
1342 result = am_40BCFB(v4, v8); | |
1343 } | |
1344 else | |
1345 { | |
1346 while ( 1 ) | |
1347 { | |
1348 v5 = am_40BB49(v4); | |
1349 v6 = rand_interval(0, v5 - 1); | |
1350 if ( am_40BF15(v4, v6) ) | |
1351 break; | |
1352 ++v3; | |
1353 if ( v3 >= 10 ) | |
1354 goto LABEL_11; | |
1355 } | |
1356 result = am_40BE0E(v4, v6); | |
1357 } | |
1113
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
1038
diff
changeset
|
1358 return result != 0; |
0 | 1359 } |
1360 // 408BB4: could not find valid save-restore pair for ebp | |
1361 // 4DF3A4: using guessed type int dword_4DF3A4; | |
1362 // 4E1884: using guessed type int dword_4E1884; | |
1363 // 4FA9B0: using guessed type int dword_4FA9B0[]; | |
1364 // 4FA9B4: using guessed type int dword_4FA9B4[]; | |
1365 // 4FAA00: using guessed type char byte_4FAA00; | |
1366 // 4FAA77: using guessed type char am_byte_4FAA77; | |
1367 | |
1368 | |
1369 | |
1370 //----- (00409E6A) -------------------------------------------------------- | |
1371 void ArcomageGame::Loop() | |
1372 { | |
1373 int v0; // edx@2 | |
1374 int v1; // ecx@14 | |
1375 signed int v2; // eax@15 | |
1376 stru272 *v3; // esi@17 | |
1377 __int16 *v4; // esi@23 | |
1378 | |
1379 while ( !pArcomageGame->field_F5 ) | |
1380 { | |
1381 pArcomageGame->field_F6 = 1; | |
1382 byte_4FAA24 = 1; | |
1383 am_40A346(amuint_4FAA6C); | |
1384 LABEL_8: | |
1385 while ( byte_4FAA24 ) | |
1386 { | |
1387 amuint_4FABC0 = -1; | |
1388 am_40A283(amuint_4FAA6C, v0); | |
1389 while ( 1 ) | |
1390 { | |
1391 byte_4FAA24 = am_40A560(amuint_4FAA6C); | |
1392 if ( am_40BB49(amuint_4FAA6C) <= dword_4E1874 ) | |
1393 break; | |
1394 am_byte_4FAA77 = 1; | |
1395 if ( pArcomageGame->field_F4 ) | |
1396 goto LABEL_8; | |
1397 } | |
1398 am_byte_4FAA77 = 0; | |
1399 } | |
1400 pArcomageGame->field_F5 = am_40A514(); | |
1401 if ( !pArcomageGame->field_F5 ) | |
1402 am_40A383(); | |
1403 if ( pArcomageGame->field_F4 ) | |
1404 pArcomageGame->field_F5 = 1; | |
1405 } | |
1406 am_40D444(); | |
1407 if ( byte_4FAA2C ) | |
1408 { | |
1409 v2 = retzero_sub_40DFA7((int)dword_4FAA28); | |
1410 v1 = 1000; | |
1411 dword_4FAA70 = v2 / 1000; | |
1412 } | |
1413 else | |
1414 { | |
1415 dword_4FAA70 = -1; | |
1416 } | |
1417 pVideoPlayer->BinkUpdatePalette(dword_4FAA28); | |
1418 v3 = array_4FAC10; | |
1419 do | |
1420 { | |
1421 v3->ptr_0->_40E0F5(1, 1); | |
1422 v3->ptr_0->_40DFFE(); | |
1423 ++v3; | |
1424 } | |
1425 while ( (signed int)v3 < (signed int)&unk_5052C8 ); | |
1038 | 1426 |
0 | 1427 pArcomageGame->pGameBackground.Release(); |
1428 pArcomageGame->pSprites.Release(); | |
1429 pArcomageGame->bGameInProgress = 0; | |
1430 viewparams->bRedrawGameUI = 1; | |
1431 if ( pVideoPlayer->AnyMovieLoaded() ) | |
1432 pVideoPlayer->_4BF5B2(); | |
1433 v4 = am_sounds; | |
1434 do | |
1435 { | |
764 | 1436 pSoundList->UnloadSound((unsigned __int16)*v4, 1); |
0 | 1437 ++v4; |
1438 } | |
1439 while ( (signed int)v4 <= (signed int)&unk_4FAA20 ); | |
1440 } | |
938 | 1441 |
1442 | |
1443 | |
0 | 1444 |
1445 //----- (00409FE9) -------------------------------------------------------- | |
1446 char __cdecl am_409FE9() | |
1447 { | |
1448 signed int v0; // edi@1 | |
1449 signed int v1; // esi@4 | |
1450 int *v2; // ecx@7 | |
1451 int *v3; // eax@7 | |
1452 signed int v4; // edx@7 | |
1453 int v5; // edx@13 | |
1454 signed int v6; // ecx@13 | |
1455 signed int v7; // eax@13 | |
1456 | |
1457 amuint_4FAA6C = dword_505890; | |
1458 sub_409BE8(); | |
1459 v0 = 0; | |
1460 do | |
1461 { | |
1462 if ( v0 ) | |
1463 { | |
1464 v1 = v0; | |
1465 inv_strcpy(pArcomageGame->pPlayer2Name, stru_505708[v0].pPlayerName); | |
1466 if ( byte_4E185C ) | |
1467 LOBYTE(stru_505708[v1].field_20) = 0; | |
1468 else | |
1469 LOBYTE(stru_505708[v1].field_20) = 1; | |
1470 } | |
1471 else | |
1472 { | |
1473 inv_strcpy(pArcomageGame->pPlayer1Name, (char *)stru_505708); | |
1474 LOBYTE(stru_505708[0].field_20) = 1; | |
1475 } | |
1476 stru_505708[v0].field_24 = amuint_4E1860; | |
1477 stru_505708[v0].field_28 = amuint_4E1864; | |
1478 stru_505708[v0].field_2C = amuint_4E1868; | |
1479 stru_505708[v0].field_30 = amuint_4E186C; | |
1480 stru_505708[v0].field_34 = amuint_4E1870; | |
1481 stru_505708[v0].field_38 = amuint_505884; | |
1482 stru_505708[v0].field_3C = amuint_505888; | |
1483 stru_505708[v0].field_40 = amuint_50588C; | |
1484 v2 = &stru_505708[v0].arr_6C[0][1]; | |
1485 v3 = stru_505708[v0].arr_44; | |
1486 v4 = 10; | |
1487 do | |
1488 { | |
1489 *v3 = -1; | |
1490 if ( am_byte_4E185D ) | |
1491 { | |
1492 *(v2 - 1) = -1; | |
1493 *v2 = -1; | |
1494 } | |
1495 else | |
1496 { | |
1497 *(v2 - 1) = 0; | |
1498 *v2 = 0; | |
1499 } | |
1500 ++v3; | |
1501 v2 += 2; | |
1502 --v4; | |
1503 } | |
1504 while ( v4 ); | |
1505 ++v0; | |
1506 } | |
1507 while ( v0 < 2 ); | |
1508 inv_strcpy(pDeckMaster, byte_5054C8); | |
1509 v5 = 0; | |
1510 v6 = (signed int)dword_505554; | |
1511 v7 = -2; | |
1512 do | |
1513 { | |
1514 byte_5054E8[v7 + 2] = 0; | |
1515 *(unsigned int *)v6 = v5; | |
1516 switch ( v7 ) | |
1517 { | |
1518 default: | |
1519 ++v5; | |
1520 break; | |
1521 case 0: | |
1522 case 2: | |
1523 case 6: | |
1524 case 9: | |
1525 case 13: | |
1526 case 18: | |
1527 case 23: | |
1528 case 33: | |
1529 case 36: | |
1530 case 38: | |
1531 case 44: | |
1532 case 46: | |
1533 case 52: | |
1534 case 57: | |
1535 case 69: | |
1536 case 71: | |
1537 case 75: | |
1538 case 79: | |
1539 case 81: | |
1540 case 84: | |
1541 case 89: | |
1542 break; | |
1543 } | |
1544 v6 += 4; | |
1545 ++v7; | |
1546 } | |
1547 while ( v6 < (signed int)&unk_505704 ); | |
1548 return am_40A198(); | |
1549 } | |
1550 // 4E185C: using guessed type char byte_4E185C; | |
1551 // 4E185D: using guessed type char am_byte_4E185D; | |
1552 // 4E1860: using guessed type int amuint_4E1860; | |
1553 // 4E1864: using guessed type int amuint_4E1864; | |
1554 // 4E1868: using guessed type int amuint_4E1868; | |
1555 // 4E186C: using guessed type int amuint_4E186C; | |
1556 // 4E1870: using guessed type int amuint_4E1870; | |
1557 // 505554: using guessed type int dword_505554[]; | |
1558 // 505884: using guessed type int amuint_505884; | |
1559 // 505888: using guessed type int amuint_505888; | |
1560 // 50588C: using guessed type int amuint_50588C; | |
1561 // 505890: using guessed type int dword_505890; | |
1562 | |
1563 //----- (0040A198) -------------------------------------------------------- | |
1564 char __cdecl am_40A198() | |
1565 { | |
1566 int *v0; // edi@1 | |
1567 int *v1; // edx@2 | |
1568 signed int v2; // esi@2 | |
1569 signed int v3; // eax@4 | |
1570 signed int v4; // esi@12 | |
1571 int v5; // eax@13 | |
1572 int v6; // edx@13 | |
1573 char *v7; // eax@13 | |
1574 char result; // al@14 | |
1575 char v9[108]; // [sp+8h] [bp-6Ch]@1 | |
1576 | |
1577 ArcomageGame::PlaySound(0x14u); | |
1578 memset(byte_5054E8, 0, sizeof(byte_5054E8)); | |
1579 memset(v9, 0, sizeof(v9)); | |
856 | 1580 v0 = stru_505708[0].arr_44;//variable incorrect |
0 | 1581 do |
1582 { | |
1583 v1 = v0; | |
1584 v2 = 10; | |
1585 do | |
1586 { | |
1587 if ( *v1 > -1 ) | |
1588 { | |
1589 v3 = 0; | |
1590 while ( dword_505554[v3] != *v1 || byte_5054E8[v3] ) | |
1591 { | |
1592 ++v3; | |
1593 if ( v3 >= 108 ) | |
1594 goto LABEL_10; | |
1595 } | |
1596 byte_5054E8[v3] = 1; | |
1597 } | |
1598 LABEL_10: | |
1599 ++v1; | |
1600 --v2; | |
1601 } | |
1602 while ( v2 ); | |
1603 v0 += 47; | |
1604 } | |
1605 while ( (signed int)v0 < (signed int)&pArcomageGame->msg.pt.y ); | |
1606 v4 = 0; | |
1607 do | |
1608 { | |
1609 do | |
1610 { | |
1611 v5 = rand(); | |
1612 v6 = v5 % 108; | |
1613 v7 = &v9[v5 % 108]; | |
1614 } | |
1615 while ( *v7 == 1 ); | |
1616 *v7 = 1; | |
1617 dword_505314[v4] = dword_505554[v6]; | |
1618 result = byte_5054E8[v6]; | |
1619 array_4FAC10[9].field_4[v4++ + 4232] = result; | |
1620 } | |
1621 while ( v4 < 108 ); | |
1622 dword_4FABC8 = 0; | |
1623 amuint_4FABC4 = -1; | |
1624 pArcomageGame->field_F6 = 1; | |
1625 return result; | |
1626 } | |
1627 // 4FABC4: using guessed type int amuint_4FABC4; | |
1628 // 4FABC8: using guessed type int dword_4FABC8; | |
1629 // 505314: using guessed type int dword_505314[]; | |
1630 // 505554: using guessed type int dword_505554[]; | |
1631 // 40A198: using guessed type char var_6C[108]; | |
1632 | |
1633 //----- (0040A255) -------------------------------------------------------- | |
1634 int __fastcall am_40A255(int a1, int a2) | |
1635 { | |
1636 int i; // edi@1 | |
1637 signed int v3; // esi@2 | |
1638 int result; // eax@3 | |
1639 | |
1640 for ( i = 0; i < dword_4E1874; ++i ) | |
1641 { | |
1642 v3 = 0; | |
1643 do | |
1644 result = am_40A283(v3++, a2); | |
1645 while ( v3 < 2 ); | |
1646 } | |
1647 pArcomageGame->field_F6 = 1; | |
1648 return result; | |
1649 } | |
1650 // 4E1874: using guessed type int dword_4E1874; | |
1651 | |
1652 //----- (0040A283) -------------------------------------------------------- | |
1653 signed int __fastcall am_40A283(int a1, int a2) | |
1654 { | |
1655 signed int v2; // eax@1 | |
1656 int v3; // edi@1 | |
1657 int v4; // esi@1 | |
1658 char v5; // bl@1 | |
1659 signed int result; // eax@7 | |
1660 int v7; // esi@8 | |
1661 | |
1662 v2 = dword_4FABC8; | |
1663 v3 = a1; | |
1664 v4 = a1; | |
1665 v5 = 0; | |
1666 do | |
1667 { | |
1668 if ( v2 >= 108 ) | |
1669 { | |
1670 am_40A198(); | |
1671 v2 = dword_4FABC8; | |
1672 } | |
1673 if ( !array_4FAC10[9].field_4[v2 + 4232] ) | |
1674 { | |
1675 v3 = dword_505314[v2]; | |
1676 v5 = 1; | |
1677 } | |
1678 ++v2; | |
1679 dword_4FABC8 = v2; | |
1680 } | |
1681 while ( !v5 ); | |
1682 ArcomageGame::PlaySound(0x15u); | |
1683 result = am_40A324(v4); | |
1684 if ( result != -1 ) | |
1685 { | |
1686 amuint_4FAA4C = result; | |
1687 stru_505708[0].arr_44[result + 47 * v4] = v3; | |
1688 v7 = 188 * v4 + 8 * result; | |
1689 *(int *)((char *)stru_505708[0].arr_6C[0] + v7) = rand_interval(-4, 4); | |
1690 result = rand_interval(-4, 4); | |
1691 *(int *)((char *)&stru_505708[0].arr_6C[0][1] + v7) = result; | |
1692 pArcomageGame->field_F6 = 1; | |
1693 byte_4FAA2D = 1; | |
1694 } | |
1695 return result; | |
1696 } | |
1697 // 4FAA2D: using guessed type char byte_4FAA2D; | |
1698 // 4FAA4C: using guessed type int amuint_4FAA4C; | |
1699 // 4FABC8: using guessed type int dword_4FABC8; | |
1700 // 505314: using guessed type int dword_505314[]; | |
1701 | |
1702 //----- (0040A324) -------------------------------------------------------- | |
1703 signed int __fastcall am_40A324(int a1) | |
1704 { | |
1705 signed int result; // eax@1 | |
1706 signed int v2; // edx@1 | |
1707 char *v3; // ecx@1 | |
1708 | |
1709 result = -1; | |
1710 v2 = 0; | |
1711 v3 = (char *)stru_505708[a1].arr_44; | |
1712 while ( *(unsigned int *)v3 != -1 ) | |
1713 { | |
1714 ++v2; | |
1715 v3 += 4; | |
1716 if ( v2 >= 10 ) | |
1717 return result; | |
1718 } | |
1719 return v2; | |
1720 } | |
1721 | |
1722 //----- (0040A346) -------------------------------------------------------- | |
1723 int __fastcall am_40A346(int a1) | |
1724 { | |
1725 int v1; // ecx@1 | |
1726 int result; // eax@1 | |
1727 | |
1728 v1 = a1; | |
1729 stru_505708[v1].field_38 += dword_4E1878 + stru_505708[v1].field_2C; | |
1730 stru_505708[v1].field_3C += dword_4E187C + stru_505708[v1].field_30; | |
1731 result = dword_4E1880 + stru_505708[v1].field_34; | |
1732 stru_505708[v1].field_40 += result; | |
1733 return result; | |
1734 } | |
1735 // 4E1878: using guessed type int dword_4E1878; | |
1736 // 4E187C: using guessed type int dword_4E187C; | |
1737 // 4E1880: using guessed type int dword_4E1880; | |
1738 | |
1739 //----- (0040A383) -------------------------------------------------------- | |
1740 void __cdecl am_40A383() | |
1741 { | |
1742 int v0; // eax@4 | |
1743 int v1; // ecx@4 | |
1744 unsigned __int8 v2; // sf@4 | |
1745 unsigned __int8 v3; // of@4 | |
1746 int v4; // eax@6 | |
1747 char Dest[64]; // [sp+4h] [bp-64h]@4 | |
1748 int v6; // [sp+44h] [bp-24h]@6 | |
1749 int v7; // [sp+48h] [bp-20h]@6 | |
1750 int v8; // [sp+4Ch] [bp-1Ch]@6 | |
1751 int v9; // [sp+50h] [bp-18h]@6 | |
1752 ArcomageGame_stru1 v10; // [sp+54h] [bp-14h]@7 | |
1753 int v11[2]; // [sp+60h] [bp-8h]@4 | |
1754 | |
1755 if ( !pArcomageGame->field_F4 ) | |
1756 { | |
1757 if ( LOBYTE(stru_505708[0].field_20) != 1 || LOBYTE(stru_505708[1].field_20) != 1 ) | |
1758 { | |
1759 ++amuint_4FAA6C; | |
1760 am_byte_4FAA75 = 1; | |
1761 if ( amuint_4FAA6C >= 2 ) | |
1762 amuint_4FAA6C = 0; | |
1763 } | |
1764 else | |
1765 { | |
1766 //nullsub_1(); | |
1767 v11[0] = 0; | |
1768 v11[1] = 0; | |
1769 inv_strcpy("Ñëåä", Dest); | |
1770 v0 = 0; | |
1771 v11[1] = 200; | |
1772 v11[0] = 320 - 12 * v0 / 2; | |
1773 pPrimaryWindow_draws_text(-1, Dest, v11); | |
1774 am_byte_4FAA75 = 1; | |
1775 v1 = amuint_4FAA6C + 1; | |
1776 v3 = __OFSUB__(amuint_4FAA6C + 1, 2); | |
1777 v2 = amuint_4FAA6C++ - 1 < 0; | |
1778 if ( !(v2 ^ v3) ) | |
1779 { | |
1780 v1 = 0; | |
1781 amuint_4FAA6C = 0; | |
1782 } | |
1783 inv_strcpy(stru_505708[v1].pPlayerName, Dest); | |
1784 v4 = 0; | |
1785 v11[1] = 260; | |
1786 v11[0] = 320 - 12 * v4 / 2; | |
1787 pPrimaryWindow_draws_text(-1, Dest, v11); | |
1788 v6 = 0; | |
1789 v8 = 640; | |
1790 v7 = 0; | |
1791 v9 = 480; | |
1792 //nullsub_1(); | |
1793 CallRenderPresent(); | |
1794 //nullsub_1(); | |
1795 while ( 1 ) | |
1796 { | |
1797 while ( 1 ) | |
1798 { | |
1799 while ( !ArcomageGame::MsgLoop(20, &v10) ) | |
1800 ; | |
1801 if ( v10.field_0 != 1 ) | |
1802 break; | |
1803 if ( v10.field_4 ) | |
1804 goto LABEL_13; | |
1805 //nullsub_1(); | |
1806 } | |
1807 if ( v10.field_0 > 4 ) | |
1808 { | |
1809 if ( v10.field_0 <= 8 ) | |
1810 goto LABEL_13; | |
1811 if ( v10.field_0 == 10 ) | |
1812 break; | |
1813 } | |
1814 } | |
1815 pArcomageGame->field_F4 = 1; | |
1816 byte_4FAA74 = 1; | |
1817 LABEL_13: | |
1818 v11[0] = 0; | |
1819 v11[1] = 0; | |
1820 v6 = 0; | |
1821 v8 = 640; | |
1822 v7 = 0; | |
1823 v9 = 480; | |
1824 //nullsub_1(); | |
1825 CallRenderPresent(); | |
1826 } | |
1827 } | |
1828 } | |
1829 | |
1830 | |
1831 //----- (0040A514) -------------------------------------------------------- | |
1832 bool __cdecl am_40A514() | |
1833 { | |
1834 bool result; // eax@1 | |
1835 char *v1; // ecx@1 | |
1836 | |
1837 LOBYTE(result) = 0; | |
1838 v1 = (char *)&stru_505708[0].field_24; | |
1839 do | |
1840 { | |
1841 if ( *(unsigned int *)v1 <= 0 ) | |
1842 LOBYTE(result) = 1; | |
1843 if ( *(unsigned int *)v1 >= dword_4E1884 ) | |
1844 LOBYTE(result) = 1; | |
1845 if ( *((unsigned int *)v1 + 5) >= dword_4E1888 | |
1846 || *((unsigned int *)v1 + 6) >= dword_4E1888 | |
1847 || *((unsigned int *)v1 + 7) >= dword_4E1888 ) | |
1848 LOBYTE(result) = 1; | |
1849 v1 += 188; | |
1850 } | |
1851 while ( (signed int)v1 < (signed int)&pArcomageGame->stru1.field_4 ); | |
1852 if ( result ) | |
1853 byte_4FAA2C = 1; | |
1854 return result; | |
1855 } | |
1856 // 4E1884: using guessed type int dword_4E1884; | |
1857 // 4E1888: using guessed type int dword_4E1888; | |
1858 // 4FAA2C: using guessed type char byte_4FAA2C; | |
1859 | |
1860 //----- (0040A560) -------------------------------------------------------- | |
1861 char am_40A560(unsigned int _this) | |
1862 { | |
1863 int v1; // ebp@0 | |
1864 unsigned __int64 v2; // qax@3 | |
1865 unsigned __int64 v3; // kr00_8@3 | |
1866 int v4; // ecx@17 | |
1867 int v5; // esi@67 | |
1868 char Dest[100]; // [sp+8h] [bp-A8h]@67 | |
1869 int v8; // [sp+6Ch] [bp-44h]@3 | |
1870 int pSrcXYZW[4]; // [sp+70h] [bp-40h]@75 | |
1871 int v10[4]; // [sp+80h] [bp-30h]@69 | |
1872 int pTargetXY[2]; // [sp+90h] [bp-20h]@75 | |
1873 ArcomageGame_stru1 a2; // [sp+98h] [bp-18h]@8 | |
1874 int v13; // [sp+A4h] [bp-Ch]@1 | |
1875 int a1; // [sp+A8h] [bp-8h]@1 | |
1876 char v15; // [sp+AEh] [bp-2h]@63 | |
1877 char v16; // [sp+AFh] [bp-1h]@1 | |
1878 | |
1879 uCardID = -1; | |
1880 a1 = _this; | |
1881 v16 = 0; | |
1882 v13 = 20; | |
1883 byte_4FAA00 = 0; | |
1884 dword_4FAA68 = 0; | |
1885 amuint_4FAA38 = 10; | |
1886 amuint_4FAA34 = 5; | |
1887 if ( amuint_4FAA4C != -1 ) | |
1888 byte_4FAA2D = 1; | |
1889 do | |
1890 { | |
1891 do | |
1892 { | |
1893 do | |
1894 { | |
1895 v2 = pEventTimer->Time(); | |
1896 v3 = v2 - pArcomageGame->event_timer_time; | |
1897 v8 = HIDWORD(v3); | |
1898 } | |
1899 while ( SHIDWORD(v3) < 0 ); | |
1900 } | |
1901 while ( SHIDWORD(v2) < (signed int)(((unsigned int)v2 < pArcomageGame->event_timer_time) | |
1902 + ((unsigned __int64)pArcomageGame->event_timer_time >> 32)) | HIDWORD(v3) == 0 | |
1903 && (unsigned int)v3 < 6 ); | |
1904 pArcomageGame->event_timer_time = pEventTimer->Time(); | |
1905 if ( pArcomageGame->field_F4 ) | |
1906 v16 = 1; | |
1907 ArcomageGame::MsgLoop(0, &a2); | |
1908 switch ( a2.field_0 ) | |
1909 { | |
1910 case 2: | |
1911 if ( a2.field_4 == 129 && a2.field_8 == 1 ) | |
1912 { | |
1913 pAudioPlayer->StopChannels(-1, -1); | |
1914 dword_4FAA68 = 0; | |
1915 goto LABEL_16; | |
1916 } | |
1917 break; | |
1918 case 9: | |
1919 pArcomageGame->field_F6 = 1; | |
1920 break; | |
1921 case 0xA: | |
1922 pAudioPlayer->StopChannels(-1, -1); | |
1923 byte_4FAA74 = 1; | |
1924 LABEL_16: | |
1925 v16 = 1; | |
1926 pArcomageGame->field_F4 = 1; | |
1927 break; | |
1928 } | |
1929 v4 = amuint_4FAA6C; | |
1930 if ( LOBYTE(stru_505708[amuint_4FAA6C].field_20) != 1 && !byte_4FAA00 && !byte_4FAA2E && !byte_4FAA2D ) | |
1931 { | |
1932 if ( am_byte_4FAA75 ) | |
1933 am_byte_4FAA76 = 1; | |
1934 am_408BB4(amuint_4FAA6C); | |
1935 v4 = amuint_4FAA6C; | |
1936 byte_4FAA2E = 1; | |
1937 } | |
1938 if ( amuint_4FAA4C != -1 && amuint_4FAA38 > 10 ) | |
1939 amuint_4FAA38 = 10; | |
1940 if ( byte_4FAA2E || byte_4FAA2D || LOBYTE(stru_505708[v4].field_20) != 1 ) | |
1941 { | |
1942 pArcomageGame->field_F6 = 1; | |
1943 if ( byte_4FAA2D ) | |
1944 { | |
1945 --amuint_4FAA38; | |
1946 if ( amuint_4FAA38 < 0 ) | |
1947 { | |
1948 byte_4FAA2D = 0; | |
1949 amuint_4FAA38 = 10; | |
1950 v16 = 0; | |
1951 } | |
1952 } | |
1953 if ( byte_4FAA2E ) | |
1954 { | |
1955 --v13; | |
1956 if ( v13 < 0 ) | |
1957 { | |
1958 if ( dword_4FAA68 > 1 ) | |
1959 { | |
1960 --dword_4FAA68; | |
1961 byte_4FAA00 = 0; | |
1962 } | |
1963 else | |
1964 { | |
1965 v16 = 1; | |
1966 } | |
1967 byte_4FAA2E = 0; | |
1968 v13 = 20; | |
1969 } | |
1970 } | |
1971 } | |
1972 else | |
1973 { | |
1974 if ( am_byte_4FAA77 ) | |
1975 { | |
1976 if ( a2.field_0 == 7 && am_40BCFB(a1, dword_4FABBC) ) | |
1977 { | |
1978 if ( am_byte_4FAA75 ) | |
1979 am_byte_4FAA76 = 1; | |
1980 if ( dword_4FAA64 > 0 ) | |
1981 { | |
1982 --dword_4FAA64; | |
1983 am_byte_4FAA77 = am_40BB49(a1) > dword_4E1874; | |
1984 } | |
1985 byte_4FAA2E = 1; | |
1986 } | |
1987 if ( a2.field_0 == 8 && am_40BCFB(a1, dword_4FABBC) ) | |
1988 { | |
1989 if ( am_byte_4FAA75 ) | |
1990 am_byte_4FAA76 = 1; | |
1991 if ( dword_4FAA64 > 0 ) | |
1992 { | |
1993 --dword_4FAA64; | |
1994 am_byte_4FAA77 = am_40BB49(a1) > dword_4E1874; | |
1995 } | |
1996 byte_4FAA2E = 1; | |
1997 } | |
1998 } | |
1999 else | |
2000 { | |
2001 if ( a2.field_0 == 7 ) | |
2002 { | |
2003 if ( am_40BE0E(a1, dword_4FABBC) ) | |
2004 { | |
2005 byte_4FAA2E = 1; | |
2006 if ( am_byte_4FAA75 ) | |
2007 am_byte_4FAA76 = 1; | |
2008 } | |
2009 } | |
2010 if ( a2.field_0 == 8 ) | |
2011 { | |
2012 if ( am_40BCFB(a1, dword_4FABBC) ) | |
2013 { | |
2014 byte_4FAA2E = 1; | |
2015 if ( am_byte_4FAA75 ) | |
2016 am_byte_4FAA76 = 1; | |
2017 } | |
2018 } | |
2019 } | |
2020 } | |
2021 //nullsub_1(); | |
2022 if ( false ) | |
2023 { | |
2024 if ( !v15 ) | |
2025 { | |
2026 //nullsub_1(); | |
2027 v15 = 1; | |
2028 } | |
2029 } | |
2030 else | |
2031 { | |
2032 v15 = 0; | |
2033 } | |
2034 if ( false ) | |
2035 { | |
2036 //nullsub_1(); | |
2037 //nullsub_1(); | |
1033 | 2038 assert(false && "Invalid strcpy params"); |
2039 inv_strcpy(nullptr, Dest); | |
0 | 2040 v5 = 0;//unk::const_0(&unk_4E19FC, 0); |
2041 //nullsub_1(); | |
2042 if ( v5 == 1 ) | |
2043 { | |
2044 pAudioPlayer->StopChannels(-1, -1); | |
2045 v16 = 1; | |
2046 pArcomageGame->field_F4 = 1; | |
2047 dword_4FAA68 = 0; | |
2048 } | |
2049 v10[0] = 0; | |
2050 v10[2] = 640; | |
2051 v10[1] = 0; | |
2052 v10[3] = 480; | |
2053 //nullsub_1(); | |
2054 } | |
2055 if ( dword_4FABB8 != am_40BB67(a1) ) | |
2056 { | |
2057 dword_4FABB8 = am_40BB67(a1); | |
2058 pArcomageGame->field_F6 = 1; | |
2059 } | |
2060 if ( pArcomageGame->field_F6 ) | |
2061 { | |
2062 am_blts(v13); | |
2063 DoBlt_Copy(pArcomageGame->pBackgroundPixels); | |
2064 pArcomageGame->field_F6 = 0; | |
2065 } | |
2066 if ( pArcomageGame->field_F9 ) | |
2067 { | |
2068 pTargetXY[0] = 0; | |
2069 pTargetXY[1] = 0; | |
2070 pSrcXYZW[0] = 0; | |
2071 pSrcXYZW[2] = 640; | |
2072 pSrcXYZW[1] = 0; | |
2073 pSrcXYZW[3] = 480; | |
2074 am_BeginScene(pArcomageGame->pBackgroundPixels, -1, 1); | |
2075 Blt_Copy((ArcomageRect *)pSrcXYZW, pTargetXY, 2); | |
2076 am_EndScene(); | |
2077 am_blts(v13); | |
2078 pRenderer->Present(); | |
2079 pArcomageGame->field_F9 = 0; | |
2080 } | |
2081 } | |
2082 while ( !v16 ); | |
2083 return dword_4FAA68 > 0; | |
2084 } | |
2085 // 40DB22: using guessed type uint __stdcall unk__const_0(uint, uint); | |
2086 // 4E1874: using guessed type int dword_4E1874; | |
2087 // 4FAA00: using guessed type char byte_4FAA00; | |
2088 // 4FAA2D: using guessed type char byte_4FAA2D; | |
2089 // 4FAA2E: using guessed type char byte_4FAA2E; | |
2090 // 4FAA34: using guessed type int amuint_4FAA34; | |
2091 // 4FAA38: using guessed type int amuint_4FAA38; | |
2092 // 4FAA4C: using guessed type int amuint_4FAA4C; | |
2093 // 4FAA64: using guessed type int dword_4FAA64; | |
2094 // 4FAA68: using guessed type int dword_4FAA68; | |
2095 // 4FAA74: using guessed type char byte_4FAA74; | |
2096 // 4FAA75: using guessed type char am_byte_4FAA75; | |
2097 // 4FAA76: using guessed type char am_byte_4FAA76; | |
2098 // 4FAA77: using guessed type char am_byte_4FAA77; | |
2099 // 4FABB8: using guessed type int dword_4FABB8; | |
2100 | |
2101 //----- (0040A9AF) -------------------------------------------------------- | |
2102 void __thiscall am_blts(int a1) | |
2103 { | |
2104 int v1; // esi@1 | |
2105 stru272_stru0 **v2; // esi@1 | |
2106 | |
2107 v1 = a1; | |
2108 am_BeginScene(pArcomageGame->pSpritesPixels, -1, 1); | |
2109 am_chroma_blts(); | |
2110 am_EndScene(); | |
2111 am_BeginScene(pArcomageGame->pSpritesPixels, -1, 1); | |
2112 am_40B4B9(); | |
2113 am_chroma_and_copy_blts(); | |
2114 am_chroma_blt(); | |
2115 am_DrawUI(); | |
2116 am_EndScene(); | |
2117 am_BeginScene(pArcomageGame->pSpritesPixels, -1, 1); | |
2118 am_40B76F(v1); | |
2119 v2 = (stru272_stru0 **)array_4FAC10; | |
2120 do | |
2121 { | |
2122 if ( *((unsigned char *)v2 - 64) ) | |
2123 (*v2)->_40E133(); | |
2124 v2 += 1067; | |
2125 } | |
2126 while ( (signed int)v2 < (signed int)&unk_5052C8 ); | |
2127 dword_4FABBC = am_40BB67(amuint_4FAA6C); | |
2128 am_40AA4E(); | |
2129 am_EndScene(); | |
2130 } | |
2131 | |
2132 //----- (0040AA4E) -------------------------------------------------------- | |
2133 void __cdecl am_40AA4E() | |
2134 { | |
2135 signed int v0; // ebx@1 | |
2136 char v1; // ch@2@3 | |
2137 char *v2; // esi@4 | |
2138 signed int v3; // edi@6 | |
2139 int *v4; // esi@6 | |
2140 int v5; // [sp-4h] [bp-2Ch]@4 | |
2141 int v6; // [sp+Ch] [bp-1Ch]@10 | |
2142 int v7; // [sp+10h] [bp-18h]@10 | |
2143 int v8; // [sp+14h] [bp-14h]@10 | |
2144 int v9; // [sp+18h] [bp-10h]@10 | |
2145 int v10; // [sp+1Ch] [bp-Ch]@6 | |
2146 char v11; // [sp+20h] [bp-8h]@1 | |
2147 char v12; // [sp+21h] [bp-7h]@1 | |
2148 char v13; // [sp+22h] [bp-6h]@1 | |
2149 char v14; // [sp+24h] [bp-4h]@1 | |
2150 char v15; // [sp+25h] [bp-3h]@1 | |
2151 char v16; // [sp+26h] [bp-2h]@1 | |
2152 | |
2153 v14 = 0; | |
2154 v15 = -1; | |
2155 v16 = 0; | |
2156 v11 = -1; | |
2157 v12 = 0; | |
2158 v13 = 0; | |
2159 v0 = (signed int)byte_4FABD1; | |
2160 do | |
2161 { | |
2162 if ( *(unsigned char *)(v0 - 1) && (*(stru272_stru0 **)(v0 + 63))->_40E2A7() == 2 ) | |
2163 { | |
2164 BYTE3(v5) = v1; | |
2165 v2 = &v14; | |
2166 if ( !*(unsigned char *)v0 ) | |
2167 v2 = &v11; | |
2168 LOWORD(v5) = *(_WORD *)v2; | |
2169 BYTE2(v5) = v2[2]; | |
2170 v10 = (unsigned __int16)R8G8B8_to_TargetFormat(v5); | |
2171 v3 = 0; | |
2172 v4 = (int *)(v0 + 71); | |
2173 do | |
2174 { | |
2175 if ( *(v4 - 1) > 0 ) | |
2176 { | |
2177 if ( v3 % 2 ) | |
2178 { | |
2179 Render::SetPixel((Vec2_int_ *)v4, v10); | |
2180 } | |
2181 else | |
2182 { | |
2183 v6 = *v4; | |
2184 v8 = v6 + 2; | |
2185 v7 = v4[1]; | |
2186 v9 = v7 + 2; | |
2187 DrawRect((Vec4_int_ *)&v6, v10, 1); | |
2188 } | |
2189 } | |
2190 ++v3; | |
2191 v4 += 7; | |
2192 } | |
2193 while ( v3 < 150 ); | |
2194 } | |
2195 v0 += 4268; | |
2196 } | |
2197 while ( v0 < (signed int)&array_4FAC10[9].field_4[4201] ); | |
2198 } | |
2199 | |
2200 //----- (0040AB0A) -------------------------------------------------------- | |
2201 void __cdecl am_chroma_blts() | |
2202 { | |
2203 int v0; // eax@1 | |
2204 int v1; // eax@1 | |
2205 int v2; // eax@1 | |
2206 int v3; // eax@1 | |
2207 int v4; // eax@1 | |
2208 int v5; // eax@1 | |
2209 int pSrcXYZW[4]; // [sp+Ch] [bp-18h]@1 | |
2210 int pTargetXY[2]; // [sp+1Ch] [bp-8h]@1 | |
2211 | |
2212 pSrcXYZW[1] = 0; | |
2213 pSrcXYZW[0] = 765; | |
2214 pSrcXYZW[2] = 843; | |
2215 pSrcXYZW[3] = 216; | |
2216 pTargetXY[0] = 8; | |
2217 pTargetXY[1] = 56; | |
2218 Blt_Copy((ArcomageRect *)pSrcXYZW, pTargetXY, 2); | |
2219 pTargetXY[0] = 555; | |
2220 pTargetXY[1] = 56; | |
2221 Blt_Copy((ArcomageRect *)pSrcXYZW, pTargetXY, 2); | |
2222 LOWORD(v0) = pArcomageGame->field_54; | |
2223 pTargetXY[0] = 8; | |
2224 pSrcXYZW[0] = 283; | |
2225 pSrcXYZW[2] = 361; | |
2226 pSrcXYZW[1] = 166; | |
2227 pSrcXYZW[3] = 190; | |
2228 pTargetXY[1] = 13; | |
2229 Blt_Chroma((ArcomageRect *)pSrcXYZW, pTargetXY, v0, 2); | |
2230 LOWORD(v1) = pArcomageGame->field_54; | |
2231 pTargetXY[0] = 555; | |
2232 pTargetXY[1] = 13; | |
2233 Blt_Chroma((ArcomageRect *)pSrcXYZW, pTargetXY, v1, 2); | |
2234 LOWORD(v2) = pArcomageGame->field_54; | |
2235 pSrcXYZW[0] = 234; | |
2236 pSrcXYZW[2] = 283; | |
2237 pSrcXYZW[1] = 166; | |
2238 pSrcXYZW[3] = 190; | |
2239 pTargetXY[0] = 100; | |
2240 pTargetXY[1] = 296; | |
2241 Blt_Chroma((ArcomageRect *)pSrcXYZW, pTargetXY, v2, 2); | |
2242 LOWORD(v3) = pArcomageGame->field_54; | |
2243 pTargetXY[0] = 492; | |
2244 pTargetXY[1] = 296; | |
2245 Blt_Chroma((ArcomageRect *)pSrcXYZW, pTargetXY, v3, 2); | |
2246 LOWORD(v4) = pArcomageGame->field_54; | |
2247 pSrcXYZW[0] = 192; | |
2248 pSrcXYZW[2] = 234; | |
2249 pSrcXYZW[1] = 166; | |
2250 pSrcXYZW[3] = 190; | |
2251 pTargetXY[0] = 168; | |
2252 pTargetXY[1] = 296; | |
2253 Blt_Chroma((ArcomageRect *)pSrcXYZW, pTargetXY, v4, 2); | |
2254 pTargetXY[0] = 430; | |
2255 LOWORD(v5) = pArcomageGame->field_54; | |
2256 pTargetXY[1] = 296; | |
2257 Blt_Chroma((ArcomageRect *)pSrcXYZW, pTargetXY, v5, 2); | |
2258 } | |
2259 | |
2260 //----- (0040AC5F) -------------------------------------------------------- | |
2261 void __cdecl am_DrawUI() | |
2262 { | |
2263 int v0; // ecx@7 | |
2264 int v1; // ecx@9 | |
2265 int v2; // eax@11 | |
2266 int v3; // ecx@12 | |
2267 int v4; // eax@14 | |
2268 int v5; // ecx@14 | |
2269 int v6; // eax@16 | |
2270 int v7; // ecx@16 | |
2271 int v8; // eax@18 | |
2272 int v9; // ecx@18 | |
2273 int v10; // eax@20 | |
2274 char Dest[32]; // [sp+Ch] [bp-28h]@2 | |
2275 int v12[2]; // [sp+2Ch] [bp-8h]@2 | |
2276 | |
2277 if ( am_byte_4FAA77 ) | |
2278 { | |
2279 inv_strcpy(pGlobalTXT_LocalizationStrings[266], Dest);// DISCARD A CARD | |
2280 v12[0] = 320 - pArcomageGame->pFont2->GetLineWidth(Dest) / 2; | |
2281 v12[1] = 306; | |
2282 pPrimaryWindow_draws_text(-1, Dest, v12); | |
2283 } | |
2284 inv_strcpy((const char *)stru_505708, Dest); | |
2285 if ( !amuint_4FAA6C ) | |
2286 inv_strcat("***", Dest); | |
2287 v12[0] = 47 - pArcomageGame->pFont1->GetLineWidth(Dest) / 2; | |
2288 v12[1] = 21; | |
2289 pPrimaryWindow_draws_text(-1, Dest, v12); | |
2290 inv_strcpy(stru_505708[1].pPlayerName, Dest); | |
2291 if ( amuint_4FAA6C == 1 ) | |
2292 inv_strcat("***", Dest); | |
2293 v12[0] = 595 - pArcomageGame->pFont1->GetLineWidth(Dest) / 2; | |
2294 v12[1] = 21; | |
2295 pPrimaryWindow_draws_text(-1, Dest, v12); | |
2296 intToString(stru_505708[0].field_24, Dest); | |
2297 v12[0] = 123 - pArcomageGame->pFont1->GetLineWidth(Dest) / 2; | |
2298 v12[1] = 305; | |
2299 pPrimaryWindow_draws_text(-1, Dest, v12); | |
2300 intToString(stru_505708[1].field_24, Dest); | |
2301 v12[0] = 515 - pArcomageGame->pFont1->GetLineWidth(Dest) / 2; | |
2302 v12[1] = 305; | |
2303 pPrimaryWindow_draws_text(-1, Dest, v12); | |
2304 intToString(stru_505708[0].field_28, Dest); | |
2305 v12[0] = 188 - pArcomageGame->pFont1->GetLineWidth(Dest) / 2; | |
2306 v12[1] = 305; | |
2307 pPrimaryWindow_draws_text(-1, Dest, v12); | |
2308 intToString(stru_505708[1].field_28, Dest); | |
2309 v12[0] = 451 - pArcomageGame->pFont1->GetLineWidth(Dest) / 2; | |
2310 v12[1] = 305; | |
2311 pPrimaryWindow_draws_text(-1, Dest, v12); | |
2312 v0 = stru_505708[0].field_2C; | |
2313 if ( byte_4E185E ) | |
2314 v0 = dword_4E1878 + stru_505708[0].field_2C; | |
2315 intToString(v0, Dest); | |
2316 v12[0] = 14 - 6 * 0 / 2; | |
2317 v12[1] = 92; | |
2318 am_40B102(-1, Dest, v12); | |
2319 v1 = stru_505708[1].field_2C; | |
2320 if ( byte_4E185E ) | |
2321 v1 = dword_4E1878 + stru_505708[1].field_2C; | |
2322 intToString(v1, Dest); | |
2323 v2 = 0; | |
2324 v12[1] = 92; | |
2325 v12[0] = 561 - 6 * v2 / 2; | |
2326 am_40B102(-1, Dest, v12); | |
2327 if ( byte_4E185E ) | |
2328 v3 = stru_505708[0].field_30 + dword_4E187C; | |
2329 else | |
2330 v3 = stru_505708[0].field_30; | |
2331 intToString(v3, Dest); | |
2332 v4 = 0; | |
2333 v12[1] = 164; | |
2334 v12[0] = 14 - 6 * v4 / 2; | |
2335 am_40B102(-1, Dest, v12); | |
2336 v5 = stru_505708[1].field_30; | |
2337 if ( byte_4E185E ) | |
2338 v5 = dword_4E187C + stru_505708[1].field_30; | |
2339 intToString(v5, Dest); | |
2340 v6 = 0; | |
2341 v12[1] = 164; | |
2342 v12[0] = 561 - 6 * v6 / 2; | |
2343 am_40B102(-1, Dest, v12); | |
2344 v7 = stru_505708[0].field_34; | |
2345 if ( byte_4E185E ) | |
2346 v7 = dword_4E1880 + stru_505708[0].field_34; | |
2347 intToString(v7, Dest); | |
2348 v8 = 0; | |
2349 v12[1] = 236; | |
2350 v12[0] = 14 - 6 * v8 / 2; | |
2351 am_40B102(-1, Dest, v12); | |
2352 v9 = stru_505708[1].field_34; | |
2353 if ( byte_4E185E ) | |
2354 v9 = dword_4E1880 + stru_505708[1].field_34; | |
2355 intToString(v9, Dest); | |
2356 v10 = 0; | |
2357 v12[1] = 236; | |
2358 v12[0] = 561 - 6 * v10 / 2; | |
2359 am_40B102(-1, Dest, v12); | |
2360 intToString(stru_505708[0].field_38, Dest); | |
2361 v12[1] = 114; | |
2362 v12[0] = 10; | |
2363 am_40B17E(-1, (int)Dest, v12); | |
2364 intToString(stru_505708[1].field_38, Dest); | |
2365 v12[0] = 557; | |
2366 v12[1] = 114; | |
2367 am_40B17E(-1, (int)Dest, v12); | |
2368 intToString(stru_505708[0].field_3C, Dest); | |
2369 v12[0] = 10; | |
2370 v12[1] = 186; | |
2371 am_40B1F3(-1, (int)Dest, (int)v12); | |
2372 intToString(stru_505708[1].field_3C, Dest); | |
2373 v12[0] = 557; | |
2374 v12[1] = 186; | |
2375 am_40B1F3(-1, (int)Dest, (int)v12); | |
2376 intToString(stru_505708[0].field_40, Dest); | |
2377 v12[0] = 10; | |
2378 v12[1] = 258; | |
2379 am_40B268(-1, Dest, v12); | |
2380 intToString(stru_505708[1].field_40, Dest); | |
2381 v12[0] = 557; | |
2382 v12[1] = 258; | |
2383 am_40B268(-1, Dest, v12); | |
2384 } | |
2385 // 4E185E: using guessed type char byte_4E185E; | |
2386 // 4E1878: using guessed type int dword_4E1878; | |
2387 // 4E187C: using guessed type int dword_4E187C; | |
2388 // 4E1880: using guessed type int dword_4E1880; | |
2389 // 4FAA77: using guessed type char am_byte_4FAA77; | |
2390 | |
2391 //----- (0040B102) -------------------------------------------------------- | |
2392 void __fastcall am_40B102(int a1, char *a2, int *pXY) | |
2393 { | |
2394 char *v3; // esi@1 | |
2395 int v4; // eax@1 | |
2396 unsigned __int8 v5; // bl@2 | |
2397 char v6; // zf@2 | |
2398 int v7; // eax@3 | |
2399 int v8; // ecx@3 | |
2400 int v9; // [sp+8h] [bp-18h]@3 | |
2401 int v10; // [sp+Ch] [bp-14h]@3 | |
2402 int v11; // [sp+10h] [bp-10h]@3 | |
2403 int v12; // [sp+14h] [bp-Ch]@3 | |
2404 int v13; // [sp+18h] [bp-8h]@1 | |
2405 int v14; // [sp+1Ch] [bp-4h]@1 | |
2406 | |
2407 v3 = a2; | |
2408 am_BeginScene(pArcomageGame->pSpritesPixels, -1, 1); | |
2409 v4 = pXY[1]; | |
2410 v13 = *pXY; | |
2411 v14 = v4; | |
2412 do | |
2413 { | |
2414 v5 = *v3++; | |
2415 v6 = v5 == 0; | |
2416 if ( v5 ) | |
2417 { | |
2418 v7 = 22 * v5; | |
2419 v8 = v7 - 864; | |
2420 v7 -= 842; | |
2421 v11 = v7; | |
2422 LOWORD(v7) = pArcomageGame->field_54; | |
2423 v9 = v8; | |
2424 v10 = 190; | |
2425 v12 = 207; | |
2426 Blt_Chroma((ArcomageRect *)&v9, &v13, v7, 1); | |
2427 v13 += 22; | |
2428 v6 = v5 == 0; | |
2429 } | |
2430 } | |
2431 while ( !v6 ); | |
2432 am_EndScene(); | |
2433 } | |
2434 | |
2435 //----- (0040B17E) -------------------------------------------------------- | |
2436 void __fastcall am_40B17E(int a1, int a2, int *pXY) | |
2437 { | |
2438 int v3; // esi@1 | |
2439 int v4; // eax@1 | |
2440 unsigned __int8 v5; // bl@2 | |
2441 char v6; // zf@2 | |
2442 int v7; // eax@3 | |
2443 int v8; // [sp+8h] [bp-18h]@3 | |
2444 int v9; // [sp+Ch] [bp-14h]@3 | |
2445 int v10; // [sp+10h] [bp-10h]@3 | |
2446 int v11; // [sp+14h] [bp-Ch]@3 | |
2447 int v12; // [sp+18h] [bp-8h]@1 | |
2448 int v13; // [sp+1Ch] [bp-4h]@1 | |
2449 | |
2450 v3 = a2; | |
2451 am_BeginScene(pArcomageGame->pSpritesPixels, -1, 1); | |
2452 v4 = pXY[1]; | |
2453 v12 = *pXY; | |
2454 v13 = v4; | |
2455 do | |
2456 { | |
2457 v5 = *(unsigned char *)v3++; | |
2458 v6 = v5 == 0; | |
2459 if ( v5 ) | |
2460 { | |
2461 v7 = 13 * v5; | |
2462 v8 = v7 - 370; | |
2463 v10 = v7 - 357; | |
2464 v9 = 128; | |
2465 v11 = 138; | |
2466 Blt_Copy((ArcomageRect *)&v8, &v12, 2); | |
2467 v12 += 13; | |
2468 v6 = v5 == 0; | |
2469 } | |
2470 } | |
2471 while ( !v6 ); | |
2472 am_EndScene(); | |
2473 } | |
2474 | |
2475 //----- (0040B1F3) -------------------------------------------------------- | |
2476 void __fastcall am_40B1F3(int a1, int a2, int a3) | |
2477 { | |
2478 int v3; // esi@1 | |
2479 int v4; // eax@1 | |
2480 unsigned __int8 v5; // bl@2 | |
2481 char v6; // zf@2 | |
2482 int v7; // eax@3 | |
2483 int v8; // [sp+8h] [bp-18h]@3 | |
2484 int v9; // [sp+Ch] [bp-14h]@3 | |
2485 int v10; // [sp+10h] [bp-10h]@3 | |
2486 int v11; // [sp+14h] [bp-Ch]@3 | |
2487 int v12; // [sp+18h] [bp-8h]@1 | |
2488 int v13; // [sp+1Ch] [bp-4h]@1 | |
2489 | |
2490 v3 = a2; | |
2491 am_BeginScene(pArcomageGame->pSpritesPixels, -1, 1); | |
2492 v4 = *(unsigned int *)(a3 + 4); | |
2493 v12 = *(unsigned int *)a3; | |
2494 v13 = v4; | |
2495 do | |
2496 { | |
2497 v5 = *(unsigned char *)v3++; | |
2498 v6 = v5 == 0; | |
2499 if ( v5 ) | |
2500 { | |
2501 v7 = 13 * v5; | |
2502 v8 = v7 - 370; | |
2503 v10 = v7 - 357; | |
2504 v9 = 138; | |
2505 v11 = 148; | |
2506 Blt_Copy((ArcomageRect *)&v8, &v12, 2); | |
2507 v12 += 13; | |
2508 v6 = v5 == 0; | |
2509 } | |
2510 } | |
2511 while ( !v6 ); | |
2512 am_EndScene(); | |
2513 } | |
2514 | |
2515 //----- (0040B268) -------------------------------------------------------- | |
2516 void __fastcall am_40B268(int a1, char *a2, int *pXY) | |
2517 { | |
2518 char *v3; // esi@1 | |
2519 int v4; // eax@1 | |
2520 unsigned __int8 v5; // bl@2 | |
2521 char v6; // zf@2 | |
2522 int v7; // eax@3 | |
2523 int v8; // [sp+8h] [bp-18h]@3 | |
2524 int v9; // [sp+Ch] [bp-14h]@3 | |
2525 int v10; // [sp+10h] [bp-10h]@3 | |
2526 int v11; // [sp+14h] [bp-Ch]@3 | |
2527 int v12; // [sp+18h] [bp-8h]@1 | |
2528 int v13; // [sp+1Ch] [bp-4h]@1 | |
2529 | |
2530 v3 = a2; | |
2531 am_BeginScene(pArcomageGame->pSpritesPixels, -1, 1); | |
2532 v4 = pXY[1]; | |
2533 v12 = *pXY; | |
2534 v13 = v4; | |
2535 do | |
2536 { | |
2537 v5 = *v3++; | |
2538 v6 = v5 == 0; | |
2539 if ( v5 ) | |
2540 { | |
2541 v7 = 13 * v5; | |
2542 v8 = v7 - 370; | |
2543 v10 = v7 - 357; | |
2544 v9 = 148; | |
2545 v11 = 158; | |
2546 Blt_Copy((ArcomageRect *)&v8, &v12, 2); | |
2547 v12 += 13; | |
2548 v6 = v5 == 0; | |
2549 } | |
2550 } | |
2551 while ( !v6 ); | |
2552 am_EndScene(); | |
2553 } | |
2554 | |
2555 //----- (0040B2DD) -------------------------------------------------------- | |
2556 void __cdecl am_chroma_and_copy_blts() | |
2557 { | |
2558 int v0; // eax@1 | |
2559 int v1; // esi@3 | |
2560 int v2; // eax@3 | |
2561 int v3; // eax@3 | |
2562 int v4; // esi@5 | |
2563 int v5; // eax@5 | |
2564 int pSrcXYZW[4]; // [sp+0h] [bp-18h]@3 | |
2565 int v7; // [sp+4h] [bp-14h]@3 | |
2566 int v8; // [sp+8h] [bp-10h]@3 | |
2567 int v9; // [sp+Ch] [bp-Ch]@3 | |
2568 int pTargetXY[2]; // [sp+10h] [bp-8h]@3 | |
2569 | |
2570 v0 = stru_505708[0].field_24; | |
2571 if ( stru_505708[0].field_24 > dword_4E1884 ) | |
2572 v0 = dword_4E1884; | |
2573 v7 = 0; | |
2574 pSrcXYZW[0] = 892; | |
2575 v8 = 937; | |
2576 pTargetXY[0] = 102; | |
2577 v1 = 200 * v0 / dword_4E1884; | |
2578 v9 = v1; | |
2579 pTargetXY[1] = 297 - v1; | |
2580 Blt_Copy((ArcomageRect *)pSrcXYZW, pTargetXY, 2); | |
2581 v7 = 0; | |
2582 v2 = 203 - v1; | |
2583 pTargetXY[1] = 203 - v1; | |
2584 LOWORD(v2) = pArcomageGame->field_54; | |
2585 pSrcXYZW[0] = 384; | |
2586 v8 = 452; | |
2587 v9 = 94; | |
2588 pTargetXY[0] = 91; | |
2589 Blt_Chroma((ArcomageRect *)pSrcXYZW, pTargetXY, v2, 2); | |
2590 v3 = stru_505708[1].field_24; | |
2591 if ( stru_505708[1].field_24 > dword_4E1884 ) | |
2592 v3 = dword_4E1884; | |
2593 v7 = 0; | |
2594 pSrcXYZW[0] = 892; | |
2595 v8 = 937; | |
2596 pTargetXY[0] = 494; | |
2597 v4 = 200 * v3 / dword_4E1884; | |
2598 v9 = v4; | |
2599 pTargetXY[1] = 297 - v4; | |
2600 Blt_Copy((ArcomageRect *)pSrcXYZW, pTargetXY, 2); | |
2601 LOWORD(v5) = pArcomageGame->field_54; | |
2602 pSrcXYZW[0] = 384; | |
2603 v8 = 452; | |
2604 v7 = 94; | |
2605 v9 = 188; | |
2606 pTargetXY[0] = 483; | |
2607 pTargetXY[1] = 203 - v4; | |
2608 Blt_Chroma((ArcomageRect *)pSrcXYZW, pTargetXY, v5, 2); | |
2609 } | |
2610 // 4E1884: using guessed type int dword_4E1884; | |
2611 | |
2612 //----- (0040B400) -------------------------------------------------------- | |
2613 void __cdecl am_chroma_blt() | |
2614 { | |
2615 int v0; // eax@1 | |
2616 int v1; // eax@4 | |
2617 int v2; // ecx@4 | |
2618 int v3; // eax@5 | |
2619 int v4; // eax@8 | |
2620 int v5; // esi@8 | |
2621 int pSrcXYZW[4]; // [sp+4h] [bp-18h]@4 | |
2622 int pTargetXY[2]; // [sp+14h] [bp-8h]@4 | |
2623 | |
2624 v0 = stru_505708[0].field_28; | |
2625 if ( stru_505708[0].field_28 <= 100 ) | |
2626 { | |
2627 if ( stru_505708[0].field_28 <= 0 ) | |
2628 goto LABEL_5; | |
2629 } | |
2630 else | |
2631 { | |
2632 v0 = 100; | |
2633 } | |
2634 pSrcXYZW[1] = 0; | |
2635 pSrcXYZW[0] = 843; | |
2636 v1 = 200 * v0 / 100; | |
2637 pSrcXYZW[2] = 867; | |
2638 pTargetXY[0] = 177; | |
2639 pSrcXYZW[3] = v1; | |
2640 v2 = 297 - v1; | |
2641 LOWORD(v1) = pArcomageGame->field_54; | |
2642 pTargetXY[1] = v2; | |
2643 Blt_Chroma((ArcomageRect *)pSrcXYZW, pTargetXY, v1, 2); | |
2644 LABEL_5: | |
2645 v3 = stru_505708[1].field_28; | |
2646 if ( stru_505708[1].field_28 <= 100 ) | |
2647 { | |
2648 if ( stru_505708[1].field_28 <= 0 ) | |
2649 return; | |
2650 } | |
2651 else | |
2652 { | |
2653 v3 = 100; | |
2654 } | |
2655 pSrcXYZW[1] = 0; | |
2656 pSrcXYZW[0] = 843; | |
2657 v4 = 200 * v3 / 100; | |
2658 pSrcXYZW[2] = 867; | |
2659 pTargetXY[0] = 439; | |
2660 pSrcXYZW[3] = v4; | |
2661 v5 = 297 - v4; | |
2662 LOWORD(v4) = pArcomageGame->field_54; | |
2663 pTargetXY[1] = v5; | |
2664 Blt_Chroma((ArcomageRect *)pSrcXYZW, pTargetXY, v4, 2); | |
2665 } | |
2666 | |
2667 //----- (0040B4B9) -------------------------------------------------------- | |
2668 void __cdecl am_40B4B9() | |
2669 { | |
2670 int v0; // esi@1 | |
2671 int v1; // ebx@1 | |
2672 int v2; // edi@1 | |
2673 int v3; // edx@2 | |
2674 int v4; // eax@3 | |
2675 int v5; // ecx@3 | |
2676 int v6; // eax@3 | |
2677 unsigned int v7; // ecx@4 | |
2678 int v8; // eax@16 | |
2679 int v9; // ecx@16 | |
2680 int v10; // eax@16 | |
2681 signed int v11; // edi@18 | |
2682 int v12; // esi@20 | |
2683 unsigned int v13; // ecx@20 | |
2684 int v14; // eax@23 | |
2685 unsigned int v15; // eax@25 | |
2686 unsigned int v16; // ecx@25 | |
2687 int *v17; // esi@26 | |
2688 unsigned int v18; // eax@29 | |
2689 int *v19; // ecx@29 | |
2690 int v20; // ecx@31 | |
2691 int v21; // [sp-4h] [bp-2Ch]@8 | |
2692 int pSrcXYZW[4]; // [sp+Ch] [bp-1Ch]@8 | |
2693 int pTargetXY[2]; // [sp+1Ch] [bp-Ch]@1 | |
2694 int v24; // [sp+24h] [bp-4h]@1 | |
2695 | |
2696 v0 = am_40BB49(amuint_4FAA6C); | |
2697 v1 = 0; | |
2698 v2 = 0; | |
2699 pTargetXY[1] = 327; | |
2700 v24 = (640 - 96 * v0) / (v0 + 1); | |
2701 pTargetXY[0] = (640 - 96 * v0) / (v0 + 1); | |
2702 while ( v2 < v0 ) | |
2703 { | |
2704 v3 = amuint_4FAA6C; | |
2705 if ( am_byte_4E185D != (_BYTE)v1 ) | |
2706 { | |
2707 v4 = 188 * amuint_4FAA6C + 8 * v2; | |
2708 v5 = *(int *)((char *)stru_505708[0].arr_6C[0] + v4); | |
2709 v6 = *(int *)((char *)&stru_505708[0].arr_6C[0][1] + v4); | |
2710 pTargetXY[0] += v5; | |
2711 pTargetXY[1] += v6; | |
2712 } | |
2713 v7 = stru_505708[0].arr_44[v2 + 47 * amuint_4FAA6C]; | |
2714 if ( v7 == -1 ) | |
2715 { | |
2716 ++v0; | |
2717 goto LABEL_15; | |
2718 } | |
2719 if ( v2 != amuint_4FAA4C ) | |
2720 { | |
2721 if ( LOBYTE(stru_505708[amuint_4FAA6C].field_20) == (_BYTE)v1 && byte_505881 == (_BYTE)v1 ) | |
2722 { | |
2723 pSrcXYZW[0] = 192; | |
2724 pSrcXYZW[2] = 288; | |
2725 pSrcXYZW[1] = v1; | |
2726 pSrcXYZW[3] = 128; | |
2727 v21 = 2; | |
2728 LABEL_12: | |
2729 Blt_Copy((ArcomageRect *)pSrcXYZW, pTargetXY, v21); | |
2730 goto LABEL_13; | |
2731 } | |
2732 ArcomageGame::GetCardRect(v7, (ArcomageRect *)pSrcXYZW); | |
2733 if ( !am_40BF15(amuint_4FAA6C, v2) ) | |
2734 { | |
2735 v1 = 0; | |
2736 v21 = 0; | |
2737 goto LABEL_12; | |
2738 } | |
2739 Blt_Copy((ArcomageRect *)pSrcXYZW, pTargetXY, 2); | |
2740 v1 = 0; | |
2741 } | |
2742 LABEL_13: | |
2743 v3 = amuint_4FAA6C; | |
2744 pTargetXY[0] += v24 + 96; | |
2745 LABEL_15: | |
2746 if ( am_byte_4E185D != (_BYTE)v1 ) | |
2747 { | |
2748 v8 = 188 * v3 + 8 * v2; | |
2749 v9 = *(int *)((char *)stru_505708[0].arr_6C[0] + v8); | |
2750 v10 = *(int *)((char *)&stru_505708[0].arr_6C[0][1] + v8); | |
2751 pTargetXY[0] -= v9; | |
2752 pTargetXY[1] -= v10; | |
2753 } | |
2754 ++v2; | |
2755 } | |
2756 v11 = 0; | |
2757 do | |
2758 { | |
2759 if ( am_byte_4FAA76 == (_BYTE)v1 ) | |
2760 { | |
2761 v12 = 4 * v11; | |
2762 v13 = amuint_4FAA78[8 * v11]; | |
2763 if ( v13 != -1 ) | |
2764 { | |
2765 ArcomageGame::GetCardRect(v13, (ArcomageRect *)pSrcXYZW); | |
2766 Blt_Copy((ArcomageRect *)pSrcXYZW, amuint_4FAA90[v12], v1); | |
2767 } | |
2768 if ( am_byte_4FAA7C[v12 * 8] != (_BYTE)v1 ) | |
2769 { | |
2770 pTargetXY[0] = amuint_4FAA90[v12][0] + 12; | |
2771 v14 = amuint_4FAA90[v12][1] + 40; | |
2772 pTargetXY[1] = amuint_4FAA90[v12][1] + 40; | |
2773 LOWORD(v14) = pArcomageGame->field_54; | |
2774 pSrcXYZW[0] = 843; | |
2775 pSrcXYZW[2] = 916; | |
2776 pSrcXYZW[1] = 200; | |
2777 pSrcXYZW[3] = 216; | |
2778 Blt_Chroma((ArcomageRect *)pSrcXYZW, pTargetXY, v14, 2); | |
2779 } | |
2780 } | |
2781 else | |
2782 { | |
2783 if ( amuint_4FAA34 <= v1 ) | |
2784 { | |
2785 if ( v11 == 9 ) | |
2786 { | |
2787 am_byte_4FAA76 = v1; | |
2788 am_byte_4FAA75 = v1; | |
2789 amuint_4FAA34 = 5; | |
2790 } | |
2791 v18 = 32 * v11; | |
2792 v19 = &amuint_4FAA78[8 * v11]; | |
2793 if ( *v19 != -1 ) | |
2794 amuint_4FABC4 = *v19; | |
2795 *v19 = -1; | |
2796 amuint_4FAA90[v18 / 8][0] = amuint_4FAA80[v18 / 4]; | |
2797 v20 = amuint_4FAA84[v18 / 4]; | |
2798 am_byte_4FAA7C[v18] = v1; | |
2799 amuint_4FAA90[v18 / 8][1] = v20; | |
2800 } | |
2801 else | |
2802 { | |
2803 v15 = 32 * v11; | |
2804 v16 = amuint_4FAA78[8 * v11]; | |
2805 if ( v16 != -1 ) | |
2806 { | |
2807 v17 = amuint_4FAA90[v15 / 8]; | |
2808 *v17 += amuint_4FAA88[v15 / 4]; | |
2809 amuint_4FAA90[v15 / 8][1] += amuint_4FAA8C[v15 / 4]; | |
2810 ArcomageGame::GetCardRect(v16, (ArcomageRect *)pSrcXYZW); | |
2811 Blt_Copy((ArcomageRect *)pSrcXYZW, v17, v1); | |
2812 } | |
2813 } | |
2814 } | |
2815 ++v11; | |
2816 } | |
2817 while ( v11 < 10 ); | |
2818 if ( am_byte_4FAA76 != (_BYTE)v1 ) | |
2819 --amuint_4FAA34; | |
2820 pSrcXYZW[0] = 192; | |
2821 pSrcXYZW[2] = 288; | |
2822 pSrcXYZW[1] = v1; | |
2823 pSrcXYZW[3] = 128; | |
2824 pTargetXY[0] = 120; | |
2825 pTargetXY[1] = 18; | |
2826 Blt_Copy((ArcomageRect *)pSrcXYZW, pTargetXY, v1); | |
2827 } | |
2828 // 4E185D: using guessed type char am_byte_4E185D; | |
2829 // 4FAA34: using guessed type int amuint_4FAA34; | |
2830 // 4FAA4C: using guessed type int amuint_4FAA4C; | |
2831 // 4FAA75: using guessed type char am_byte_4FAA75; | |
2832 // 4FAA76: using guessed type char am_byte_4FAA76; | |
2833 // 4FAA78: using guessed type int amuint_4FAA78[]; | |
2834 // 4FAA80: using guessed type int amuint_4FAA80[]; | |
2835 // 4FAA84: using guessed type int amuint_4FAA84[]; | |
2836 // 4FAA88: using guessed type int amuint_4FAA88[]; | |
2837 // 4FAA8C: using guessed type int amuint_4FAA8C[]; | |
2838 // 4FABC4: using guessed type int amuint_4FABC4; | |
2839 // 505881: using guessed type char byte_505881; | |
2840 | |
2841 | |
2842 | |
2843 //----- (0040B76F) -------------------------------------------------------- | |
2844 void __fastcall am_40B76F(int a1) | |
2845 { | |
2846 int v1; // eax@3 | |
2847 int v2; // eax@3 | |
2848 int v3; // esi@4 | |
2849 int v4; // eax@4 | |
2850 int *v5; // edx@6 | |
2851 int *v6; // ecx@6 | |
2852 signed int v7; // ebx@11 | |
2853 int v8; // eax@15 | |
2854 signed int v9; // ecx@15 | |
2855 int v10; // eax@20 | |
2856 int v11; // ecx@20 | |
2857 int v12; // eax@20 | |
2858 unsigned int v13; // ecx@21 | |
2859 double v14; // st7@22 | |
2860 int *v15; // edx@23 | |
2861 int v16; // eax@32 | |
2862 char v17; // zf@37 | |
2863 int v18; // eax@41 | |
2864 int v19; // eax@46 | |
2865 int v20; // ecx@46 | |
2866 int v21; // eax@46 | |
2867 int v22; // [sp-4h] [bp-2Ch]@6 | |
2868 int v23; // [sp-4h] [bp-2Ch]@28 | |
2869 int pSrcXYZW[4]; // [sp+Ch] [bp-1Ch]@6 | |
2870 int pTargetXY[2]; // [sp+1Ch] [bp-Ch]@20 | |
2871 int v26; // [sp+24h] [bp-4h]@1 | |
2872 | |
2873 v26 = a1; | |
2874 if ( amuint_4FAA4C != -1 ) | |
2875 { | |
2876 if ( amuint_4FAA38 >= 9 ) | |
2877 { | |
2878 am_uint_4FAA44_blt_xy[1] = 18; | |
2879 am_uint_4FAA44_blt_xy[0] = 120; | |
2880 v1 = am_40BB49(amuint_4FAA6C); | |
2881 v2 = (640 - 96 * v1) / v1 + 96; | |
2882 if ( am_byte_4E185D ) | |
2883 { | |
2884 v3 = 188 * amuint_4FAA6C + 8 * amuint_4FAA4C; | |
2885 amuint_4FAA3C_blt_xy[0] = (amuint_4FAA4C * v2 + *(int *)((char *)stru_505708[0].arr_6C[0] + v3) - 120) / 10; | |
2886 v4 = (*(int *)((char *)&stru_505708[0].arr_6C[0][1] + v3) + 309) / 10; | |
2887 } | |
2888 else | |
2889 { | |
2890 amuint_4FAA3C_blt_xy[0] = (amuint_4FAA4C * v2 - 120) / 10; | |
2891 v4 = 30; | |
2892 } | |
2893 am_uint_4FAA44_blt_xy[1] += v4; | |
2894 am_uint_4FAA44_blt_xy[0] += amuint_4FAA3C_blt_xy[0]; | |
2895 pSrcXYZW[1] = 0; | |
2896 amuint_4FAA3C_blt_xy[1] = v4; | |
2897 pSrcXYZW[0] = 192; | |
2898 pSrcXYZW[2] = 288; | |
2899 pSrcXYZW[3] = 128; | |
2900 v22 = 2; | |
2901 v5 = am_uint_4FAA44_blt_xy; | |
2902 v6 = pSrcXYZW; | |
2903 goto LABEL_7; | |
2904 } | |
2905 pSrcXYZW[1] = 0; | |
2906 v6 = pSrcXYZW; | |
2907 v5 = am_uint_4FAA44_blt_xy; | |
2908 v22 = 2; | |
2909 pSrcXYZW[3] = 128; | |
2910 pSrcXYZW[2] = 288; | |
2911 pSrcXYZW[0] = 192; | |
2912 if ( amuint_4FAA38 ) | |
2913 { | |
2914 am_uint_4FAA44_blt_xy[0] += amuint_4FAA3C_blt_xy[0]; | |
2915 am_uint_4FAA44_blt_xy[1] += amuint_4FAA3C_blt_xy[1]; | |
2916 LABEL_7: | |
2917 Blt_Copy((ArcomageRect *)v6, v5, v22); | |
2918 goto LABEL_11; | |
2919 } | |
2920 am_uint_4FAA44_blt_xy[0] += amuint_4FAA3C_blt_xy[0]; | |
2921 am_uint_4FAA44_blt_xy[1] += amuint_4FAA3C_blt_xy[1]; | |
2922 Blt_Copy((ArcomageRect *)pSrcXYZW, am_uint_4FAA44_blt_xy, 2); | |
2923 amuint_4FAA4C = -1; | |
2924 } | |
2925 LABEL_11: | |
2926 v7 = (signed int)amuint_4FAA78; | |
2927 if ( uCardID != -1 ) | |
2928 { | |
2929 if ( v26 <= 10 ) | |
2930 { | |
2931 if ( v26 == 10 ) | |
2932 { | |
2933 ArcomageGame::GetCardRect(uCardID, (ArcomageRect *)pSrcXYZW); | |
2934 v8 = 0; | |
2935 v9 = (signed int)amuint_4FAA78; | |
2936 while ( *(unsigned int *)v9 != -1 ) | |
2937 { | |
2938 v9 += 32; | |
2939 ++v8; | |
2940 if ( v9 >= (signed int)&dword_4FABB8 ) | |
2941 goto LABEL_20; | |
2942 } | |
2943 amuint_4FAA78[8 * v8] = uCardID; | |
2944 am_byte_4FAA7C[32 * v8] = 1; | |
2945 LABEL_20: | |
2946 v10 = 8 * v8; | |
2947 v11 = amuint_4FAA80[v10]; | |
2948 v12 = amuint_4FAA84[v10]; | |
2949 pTargetXY[0] = v11; | |
2950 pTargetXY[1] = v12; | |
2951 Blt_Copy((ArcomageRect *)pSrcXYZW, pTargetXY, 0); | |
2952 uCardID = -1; | |
2953 } | |
2954 } | |
2955 else | |
2956 { | |
2957 ArcomageGame::GetCardRect(uCardID, (ArcomageRect *)pSrcXYZW); | |
2958 amuint_4FAA5C_blt_xy[0] += amuint_4FAA54_blt_xy[0]; | |
2959 amuint_4FAA5C_blt_xy[1] += amuint_4FAA54_blt_xy[1]; | |
2960 Blt_Copy((ArcomageRect *)pSrcXYZW, amuint_4FAA5C_blt_xy, 0); | |
2961 } | |
2962 } | |
2963 v13 = amuint_4FABC0; | |
2964 if ( amuint_4FABC0 != -1 ) | |
2965 { | |
2966 v14 = (double)v26; | |
2967 if ( v14 > 15.0 ) | |
2968 { | |
2969 ArcomageGame::GetCardRect(amuint_4FABC0, (ArcomageRect *)pSrcXYZW); | |
2970 v15 = amuint_4FAA5C_blt_xy; | |
2971 amuint_4FAA5C_blt_xy[0] += amuint_4FAA54_blt_xy[0]; | |
2972 amuint_4FAA5C_blt_xy[1] += amuint_4FAA54_blt_xy[1]; | |
2973 LABEL_28: | |
2974 v23 = 2; | |
2975 LABEL_29: | |
2976 Blt_Copy((ArcomageRect *)pSrcXYZW, v15, v23); | |
2977 return; | |
2978 } | |
2979 if ( v14 == 15.0 ) | |
2980 { | |
2981 am_40BF77(amuint_4FAA6C, amuint_4FABC0); | |
2982 v13 = amuint_4FABC0; | |
2983 goto LABEL_26; | |
2984 } | |
2985 if ( v14 == 5.0 ) | |
2986 { | |
2987 amuint_4FAA5C_blt_xy[0] = 272; | |
2988 amuint_4FAA5C_blt_xy[1] = 173; | |
2989 v16 = 0; | |
2990 do | |
2991 { | |
2992 if ( *(unsigned int *)v7 == -1 ) | |
2993 break; | |
2994 v7 += 32; | |
2995 ++v16; | |
2996 } | |
2997 while ( v7 < (signed int)&dword_4FABB8 ); | |
2998 v26 = 32 * v16; | |
2999 amuint_4FAA54_blt_xy[0] = (amuint_4FAA80[8 * v16] - 272) / 5; | |
3000 amuint_4FAA54_blt_xy[1] = (amuint_4FAA84[8 * v16] - 173) / 5; | |
3001 ArcomageGame::GetCardRect(amuint_4FABC0, (ArcomageRect *)pSrcXYZW); | |
3002 pTargetXY[0] = 272; | |
3003 pTargetXY[1] = 173; | |
3004 goto LABEL_27; | |
3005 } | |
3006 if ( v14 >= 5.0 ) | |
3007 { | |
3008 v17 = v26 == 0; | |
3009 } | |
3010 else | |
3011 { | |
3012 v17 = v26 == 0; | |
3013 if ( v26 > 0 ) | |
3014 { | |
3015 ArcomageGame::GetCardRect(amuint_4FABC0, (ArcomageRect *)pSrcXYZW); | |
3016 v15 = amuint_4FAA5C_blt_xy; | |
3017 amuint_4FAA5C_blt_xy[0] += amuint_4FAA54_blt_xy[0]; | |
3018 amuint_4FAA5C_blt_xy[1] += amuint_4FAA54_blt_xy[1]; | |
3019 v23 = 0; | |
3020 goto LABEL_29; | |
3021 } | |
3022 } | |
3023 if ( !v17 ) | |
3024 { | |
3025 LABEL_26: | |
3026 ArcomageGame::GetCardRect(v13, (ArcomageRect *)pSrcXYZW); | |
3027 pTargetXY[0] = 272; | |
3028 pTargetXY[1] = 173; | |
3029 LABEL_27: | |
3030 v15 = pTargetXY; | |
3031 goto LABEL_28; | |
3032 } | |
3033 ArcomageGame::GetCardRect(amuint_4FABC0, (ArcomageRect *)pSrcXYZW); | |
3034 v18 = 0; | |
3035 while ( *(unsigned int *)v7 != -1 ) | |
3036 { | |
3037 v7 += 32; | |
3038 ++v18; | |
3039 if ( v7 >= (signed int)&dword_4FABB8 ) | |
3040 goto LABEL_46; | |
3041 } | |
3042 amuint_4FAA78[8 * v18] = amuint_4FABC0; | |
3043 LABEL_46: | |
3044 v19 = 8 * v18; | |
3045 v20 = amuint_4FAA80[v19]; | |
3046 v21 = amuint_4FAA84[v19]; | |
3047 pTargetXY[0] = v20; | |
3048 pTargetXY[1] = v21; | |
3049 Blt_Copy((ArcomageRect *)pSrcXYZW, pTargetXY, 0); | |
3050 amuint_4FABC0 = -1; | |
3051 } | |
3052 } | |
3053 // 4E185D: using guessed type char am_byte_4E185D; | |
3054 // 4FAA38: using guessed type int amuint_4FAA38; | |
3055 // 4FAA4C: using guessed type int amuint_4FAA4C; | |
3056 // 4FAA78: using guessed type int amuint_4FAA78[]; | |
3057 // 4FAA80: using guessed type int amuint_4FAA80[]; | |
3058 // 4FAA84: using guessed type int amuint_4FAA84[]; | |
3059 // 4FABB8: using guessed type int dword_4FABB8; | |
3060 | |
3061 //----- (0040BB12) -------------------------------------------------------- | |
3062 void ArcomageGame::GetCardRect(unsigned int uCardID, ArcomageRect *pCardRect) | |
3063 { | |
3064 ArcomageRect *pXYZW; // esi@1 | |
3065 int v3; // edx@1 | |
3066 int v4; // ecx@1 | |
3067 | |
3068 pXYZW = pCardRect; | |
3069 v3 = pCards[uCardID].slot % 10; | |
3070 v4 = (pCards[uCardID].slot / 10 << 7) + 220; | |
3071 pXYZW->y = v4; | |
3072 pXYZW->x = 96 * v3; | |
3073 pXYZW->w = v4 + 128; | |
3074 pXYZW->z = 96 * v3 + 96; | |
3075 } | |
3076 | |
3077 //----- (0040BB49) -------------------------------------------------------- | |
3078 int __fastcall am_40BB49(int a1) | |
3079 { | |
3080 int result; // eax@1 | |
3081 char *v2; // ecx@1 | |
3082 signed int v3; // edx@1 | |
3083 | |
3084 result = 0; | |
3085 v2 = (char *)stru_505708[a1].arr_44; | |
3086 v3 = 10; | |
3087 do | |
3088 { | |
3089 if ( *(unsigned int *)v2 != -1 ) | |
3090 ++result; | |
3091 v2 += 4; | |
3092 --v3; | |
3093 } | |
3094 while ( v3 ); | |
3095 return result; | |
3096 } | |
3097 | |
3098 //----- (0040BB67) -------------------------------------------------------- | |
3099 signed int __fastcall am_40BB67(int a1) | |
3100 { | |
3101 int v1; // esi@1 | |
3102 signed int result; // eax@1 | |
3103 int v3; // ebx@1 | |
3104 char v4; // zf@1 | |
3105 int v5; // eax@3 | |
3106 int v6; // eax@4 | |
3107 int v7; // ecx@6 | |
3108 char *v8; // eax@6 | |
3109 int v9; // eax@10 | |
3110 int v10; // ecx@10 | |
3111 int v11; // eax@10 | |
3112 char v12; // ch@2@11 | |
3113 int v13; // ST00_4@12 | |
3114 unsigned __int16 v14; // ax@12 | |
3115 int v15; // eax@13 | |
3116 int v16; // ecx@13 | |
3117 int v17; // eax@13 | |
3118 char v18; // al@16 | |
3119 char v19; // ch@2@16 | |
3120 int v20; // ST00_4@19 | |
3121 unsigned __int16 v21; // ax@19 | |
3122 int pXYZW[4]; // [sp+Ch] [bp-3Ch]@3 | |
3123 stru273 v26; // [sp+1Ch] [bp-2Ch]@2 | |
3124 int a1a; // [sp+28h] [bp-20h]@1 | |
3125 int v25; // [sp+2Ch] [bp-1Ch]@3 | |
3126 int var18; // [sp+30h] [bp-18h]@3 | |
3127 int i; // [sp+34h] [bp-14h]@4 | |
3128 int v28; // [sp+38h] [bp-10h]@1 | |
3129 int a2; // [sp+3Ch] [bp-Ch]@3 | |
3130 int v30; // [sp+40h] [bp-8h]@1 | |
3131 char v31; // [sp+44h] [bp-4h]@12 | |
3132 char v32; // [sp+45h] [bp-3h]@12 | |
3133 char v33; // [sp+46h] [bp-2h]@12 | |
3134 | |
3135 v1 = a1; | |
3136 v30 = 0; | |
3137 result = -1; | |
3138 v3 = 188 * a1; | |
3139 a1a = a1; | |
3140 v4 = LOBYTE(stru_505708[a1].field_20) == 0; | |
3141 v28 = -1; | |
3142 if ( !v4 ) | |
3143 { | |
3144 if ( v26._40DD2F() ) | |
3145 { | |
3146 v5 = am_40BB49(v1); | |
3147 a2 = 0; | |
3148 v25 = v5; | |
3149 pXYZW[1] = 327; | |
3150 pXYZW[3] = 455; | |
3151 pXYZW[0] = (640 - 96 * v5) / (v5 + 1); | |
3152 var18 = pXYZW[0] + 96; | |
3153 pXYZW[2] = pXYZW[0] + 96; | |
3154 if ( v5 > 0 ) | |
3155 { | |
3156 v6 = 47 * v1; | |
3157 for ( i = 47 * v1; ; v6 = i ) | |
3158 { | |
3159 v7 = v30; | |
3160 v8 = (char *)&stru_505708[0].arr_44[v30 + v6]; | |
3161 if ( *(unsigned int *)v8 == -1 ) | |
3162 { | |
3163 do | |
3164 { | |
3165 v8 += 4; | |
3166 ++v7; | |
3167 } | |
3168 while ( *(unsigned int *)v8 == -1 ); | |
3169 v30 = v7; | |
3170 } | |
3171 if ( am_byte_4E185D ) | |
3172 { | |
3173 v9 = v3 + 8 * v7; | |
3174 v10 = *(int *)((char *)stru_505708[0].arr_6C[0] + v9); | |
3175 v11 = *(int *)((char *)&stru_505708[0].arr_6C[0][1] + v9); | |
3176 pXYZW[0] += v10; | |
3177 pXYZW[2] += v10; | |
3178 pXYZW[1] += v11; | |
3179 pXYZW[3] += v11; | |
3180 } | |
3181 if ( v26.Inside((Vec4_int_ *)pXYZW) ) | |
3182 break; | |
3183 v31 = 0; | |
3184 v32 = 0; | |
3185 v33 = 0; | |
3186 BYTE3(v13) = v12; | |
3187 LOWORD(v13) = *(_WORD *)&v31; | |
3188 BYTE2(v13) = 0; | |
3189 v14 = R8G8B8_to_TargetFormat(v13); | |
3190 DrawRect((Vec4_int_ *)pXYZW, v14, 0); | |
3191 pXYZW[0] += var18; | |
3192 pXYZW[2] += var18; | |
3193 if ( am_byte_4E185D ) | |
3194 { | |
3195 v15 = v3 + 8 * v30; | |
3196 v16 = *(int *)((char *)stru_505708[0].arr_6C[0] + v15); | |
3197 v17 = *(int *)((char *)&stru_505708[0].arr_6C[0][1] + v15); | |
3198 pXYZW[0] -= v16; | |
3199 pXYZW[2] -= v16; | |
3200 pXYZW[1] -= v17; | |
3201 pXYZW[3] -= v17; | |
3202 } | |
3203 ++v30; | |
3204 ++a2; | |
3205 if ( a2 >= v25 ) | |
3206 goto LABEL_20; | |
3207 } | |
3208 v28 = a2; | |
3209 v18 = am_40BF15(a1a, a2); | |
3210 v31 = -1; | |
3211 if ( v18 ) | |
3212 { | |
3213 v32 = -1; | |
3214 v33 = -1; | |
3215 } | |
3216 else | |
3217 { | |
3218 v32 = 0; | |
3219 v33 = 0; | |
3220 } | |
3221 BYTE3(v20) = v19; | |
3222 LOWORD(v20) = *(_WORD *)&v31; | |
3223 BYTE2(v20) = v33; | |
3224 v21 = R8G8B8_to_TargetFormat(v20); | |
3225 DrawRect((Vec4_int_ *)pXYZW, v21, 0); | |
3226 } | |
3227 } | |
3228 LABEL_20: | |
3229 result = v28; | |
3230 } | |
3231 return result; | |
3232 } | |
3233 // 4E185D: using guessed type char am_byte_4E185D; | |
3234 | |
3235 //----- (0040BCFB) -------------------------------------------------------- | |
3236 char __fastcall am_40BCFB(int a1, signed int a2) | |
3237 { | |
3238 int v2; // esi@2 | |
3239 signed int v3; // edi@2 | |
3240 char *v4; // eax@2 | |
3241 int v5; // ecx@7 | |
3242 int v6; // ebx@7 | |
3243 int v7; // esi@8 | |
3244 int v8; // eax@8 | |
3245 int v9; // esi@8 | |
3246 int v10; // ecx@8 | |
3247 int v11; // eax@8 | |
3248 int v12; // eax@8 | |
3249 signed int v13; // edx@9 | |
3250 unsigned int v14; // eax@12 | |
3251 char result; // al@12 | |
3252 | |
3253 if ( a2 <= -1 ) | |
3254 goto LABEL_16; | |
3255 v2 = 0; | |
3256 v3 = 0; | |
3257 v4 = (char *)stru_505708[a1].arr_44; | |
3258 do | |
3259 { | |
3260 if ( *(unsigned int *)v4 != -1 ) | |
3261 { | |
3262 if ( a2 == v2 ) | |
3263 break; | |
3264 ++v2; | |
3265 } | |
3266 ++v3; | |
3267 v4 += 4; | |
3268 } | |
3269 while ( v3 < 10 ); | |
3270 v5 = v3 + 47 * a1; | |
3271 v6 = 4 * v5 + 5265228; | |
3272 if ( BYTE3(pCards[stru_505708[0].arr_44[v5]].field_28) ) | |
3273 { | |
3274 ArcomageGame::PlaySound(0x16u); | |
3275 v7 = amuint_4FAA6C; | |
3276 v8 = am_40BB49(amuint_4FAA6C); | |
3277 v9 = 188 * v7 + 8 * v3; | |
3278 v10 = 96 * v3 + *(int *)((char *)stru_505708[0].arr_6C[0] + v9) + (640 - 96 * v8) / (v8 + 1); | |
3279 v11 = *(int *)((char *)&stru_505708[0].arr_6C[0][1] + v9) + 327; | |
3280 amuint_4FAA5C_blt_xy[0] = v10; | |
3281 amuint_4FAA5C_blt_xy[1] = v11; | |
3282 v12 = 0; | |
3283 if ( !am_byte_4FAA75 ) | |
3284 { | |
3285 v13 = (signed int)amuint_4FAA78; | |
3286 do | |
3287 { | |
3288 if ( *(unsigned int *)v13 == -1 ) | |
3289 break; | |
3290 v13 += 32; | |
3291 ++v12; | |
3292 } | |
3293 while ( v13 < (signed int)&dword_4FABB8 ); | |
3294 } | |
3295 pArcomageGame->field_F6 = 1; | |
3296 amuint_4FAA54_blt_xy[0] = (amuint_4FAA80[8 * v12] - v10) / 10; | |
3297 amuint_4FAA54_blt_xy[1] = (amuint_4FAA84[8 * v12] - 327) / 10; | |
3298 v14 = *(unsigned int *)v6; | |
3299 *(unsigned int *)v6 = -1; | |
3300 am_byte_4FAA77 = 0; | |
3301 uCardID = v14; | |
3302 result = 1; | |
3303 } | |
3304 else | |
3305 { | |
3306 LABEL_16: | |
3307 result = 0; | |
3308 } | |
3309 return result; | |
3310 } | |
3311 // 4FAA75: using guessed type char am_byte_4FAA75; | |
3312 // 4FAA77: using guessed type char am_byte_4FAA77; | |
3313 // 4FAA78: using guessed type int amuint_4FAA78[]; | |
3314 // 4FAA80: using guessed type int amuint_4FAA80[]; | |
3315 // 4FAA84: using guessed type int amuint_4FAA84[]; | |
3316 // 4FABB8: using guessed type int dword_4FABB8; | |
3317 | |
3318 //----- (0040BE0E) -------------------------------------------------------- | |
3319 bool __fastcall am_40BE0E(int a1, signed int a2) | |
3320 { | |
3321 bool result; // eax@0 | |
3322 int v3; // ebp@1 | |
3323 int v4; // ecx@2 | |
3324 ArcomageGame_stru0 *v5; // esi@2 | |
3325 int v6; // edi@2 | |
3326 int v7; // eax@2 | |
3327 int v8; // ebx@8 | |
3328 int v9; // eax@8 | |
3329 int v10; // ebx@8 | |
3330 int v11; // ebp@8 | |
3331 int v12; // ecx@8 | |
3332 int v13; // eax@8 | |
3333 ArcomageCard *v14; // eax@8 | |
3334 int v15; // ecx@8 | |
3335 int v16; // ecx@8 | |
3336 | |
3337 v3 = a1; | |
3338 if ( a2 <= -1 ) | |
3339 goto LABEL_12; | |
3340 v4 = 0; | |
3341 v5 = &stru_505708[v3]; | |
3342 v6 = 0; | |
3343 v7 = (int)v5->arr_44; | |
3344 do | |
3345 { | |
3346 if ( *(unsigned int *)v7 != -1 ) | |
3347 { | |
3348 if ( a2 == v4 ) | |
3349 break; | |
3350 ++v4; | |
3351 } | |
3352 ++v6; | |
3353 v7 += 4; | |
3354 } | |
3355 while ( v6 < 10 ); | |
3356 result = am_40BF15(v3, v6); | |
3357 if ( result ) | |
3358 { | |
3359 ArcomageGame::PlaySound(0x17u); | |
3360 v8 = amuint_4FAA6C; | |
3361 v9 = am_40BB49(amuint_4FAA6C); | |
3362 v10 = 188 * v8 + 8 * v6; | |
3363 v11 = v6 + 47 * v3; | |
3364 amuint_4FAA54_blt_xy[1] = -30; | |
3365 pArcomageGame->field_F6 = 1; | |
3366 v12 = 96 * v6 + *(int *)((char *)stru_505708[0].arr_6C[0] + v10) + (640 - 96 * v9) / (v9 + 1); | |
3367 v13 = *(int *)((char *)&stru_505708[0].arr_6C[0][1] + v10) + 327; | |
3368 amuint_4FAA5C_blt_xy[0] = v12; | |
3369 amuint_4FAA5C_blt_xy[1] = v13; | |
3370 amuint_4FAA54_blt_xy[0] = (272 - v12) / 5; | |
3371 v14 = &pCards[v5->arr_44[v6]]; | |
3372 v5->field_38 -= LOBYTE(v14->field_28); | |
3373 v15 = BYTE1(v14->field_28); | |
3374 v5->field_40 -= BYTE2(v14->field_28); | |
3375 v5->field_3C -= v15; | |
3376 result = 4 * v11 + 5265228; | |
3377 v16 = stru_505708[0].arr_44[v11]; | |
3378 stru_505708[0].arr_44[v11] = -1; | |
3379 amuint_4FABC0 = v16; | |
3380 LOBYTE(result) = 1; | |
3381 } | |
3382 else | |
3383 { | |
3384 LABEL_12: | |
3385 LOBYTE(result) = 0; | |
3386 } | |
3387 return result; | |
3388 } | |
3389 | |
3390 //----- (0040BF15) -------------------------------------------------------- | |
3391 bool __fastcall am_40BF15(int a1, int a2) | |
3392 { | |
3393 ArcomageGame_stru0 *v2; // esi@1 | |
3394 bool result; // eax@1 | |
3395 ArcomageCard *v4; // ecx@1 | |
3396 | |
3397 v2 = &stru_505708[a1]; | |
3398 LOBYTE(result) = 1; | |
3399 v4 = &pCards[v2->arr_44[a2]]; | |
3400 if ( SBYTE1(v4->field_24) > v2->field_2C ) | |
3401 LOBYTE(result) = 0; | |
3402 if ( SBYTE2(v4->field_24) > v2->field_30 ) | |
3403 LOBYTE(result) = 0; | |
3404 if ( SBYTE3(v4->field_24) > v2->field_34 ) | |
3405 LOBYTE(result) = 0; | |
3406 if ( SLOBYTE(v4->field_28) > v2->field_38 ) | |
3407 LOBYTE(result) = 0; | |
3408 if ( SBYTE1(v4->field_28) > v2->field_3C ) | |
3409 LOBYTE(result) = 0; | |
3410 if ( SBYTE2(v4->field_28) > v2->field_40 ) | |
3411 LOBYTE(result) = 0; | |
3412 return result; | |
3413 } | |
3414 | |
3415 | |
3416 | |
3417 | |
3418 //----- (0040BF77) -------------------------------------------------------- | |
3419 void __fastcall am_40BF77(int a1, unsigned int uCardID) | |
3420 { | |
3421 ArcomageGame_stru0 *v2; // esi@1 | |
3422 int v3; // eax@1 | |
3423 ArcomageGame_stru0 *v4; // edi@1 | |
3424 int v5; // eax@2 | |
3425 char v6; // sf@2 | |
3426 unsigned __int8 v7; // of@2 | |
3427 int v8; // eax@3 | |
3428 int v9; // eax@4 | |
3429 char v10; // zf@5 | |
3430 int v11; // eax@8 | |
3431 unsigned __int8 v12; // zf@8 | |
3432 char v13; // sf@8 | |
3433 unsigned __int8 v14; // of@8 | |
3434 int v15; // eax@9 | |
3435 int v16; // eax@10 | |
3436 char v17; // zf@12 | |
3437 char v18; // al@15 | |
3438 int v19; // eax@16 | |
3439 int v20; // eax@17 | |
3440 int v21; // eax@22 | |
3441 int v22; // eax@23 | |
3442 int v23; // eax@26 | |
3443 int v24; // edx@26 | |
3444 signed int v25; // ebx@26 | |
3445 ArcomageCard *v26; // ebx@28 | |
3446 int v27; // eax@28 | |
3447 int v28; // edx@33 | |
3448 int v29; // eax@33 | |
3449 int v30; // eax@35 | |
3450 int v31; // edx@40 | |
3451 int v32; // eax@40 | |
3452 int v33; // eax@42 | |
3453 int v34; // edx@47 | |
3454 int v35; // eax@47 | |
3455 int v36; // eax@49 | |
3456 int v37; // edx@54 | |
3457 int v38; // eax@54 | |
3458 bool v39; // eax@56 | |
3459 int v40; // edx@61 | |
3460 int v41; // eax@61 | |
3461 int v42; // eax@63 | |
3462 int v43; // edx@68 | |
3463 int v44; // eax@68 | |
3464 char v45; // al@70 | |
3465 int v46; // eax@72 | |
3466 int v47; // edx@77 | |
3467 int v48; // eax@77 | |
3468 int v49; // eax@79 | |
3469 int v50; // edx@84 | |
3470 int v51; // eax@84 | |
3471 int v52; // eax@86 | |
3472 int v53; // eax@91 | |
3473 int v54; // edx@91 | |
3474 int v55; // eax@93 | |
3475 int v56; // eax@98 | |
3476 int v57; // edx@98 | |
3477 int v58; // eax@100 | |
3478 int v59; // eax@105 | |
3479 int v60; // edx@105 | |
3480 int v61; // eax@107 | |
3481 int v62; // eax@112 | |
3482 int v63; // edx@112 | |
3483 int v64; // eax@114 | |
3484 int v65; // eax@119 | |
3485 int v66; // edx@119 | |
3486 int v67; // eax@121 | |
3487 int v68; // eax@126 | |
3488 int v69; // edx@126 | |
3489 char v70; // al@128 | |
3490 int v71; // eax@130 | |
3491 int v72; // eax@135 | |
3492 int v73; // edx@135 | |
3493 int v74; // eax@137 | |
3494 int v75; // eax@142 | |
3495 int v76; // edx@142 | |
3496 int v77; // eax@144 | |
3497 int v78; // eax@151 | |
3498 int v79; // ecx@151 | |
3499 int v80; // eax@155 | |
3500 int v81; // eax@162 | |
3501 int v82; // ecx@162 | |
3502 int v83; // eax@166 | |
3503 int v84; // eax@173 | |
3504 int v85; // ecx@173 | |
3505 int v86; // eax@177 | |
3506 int v87; // eax@184 | |
3507 int v88; // ecx@184 | |
3508 bool v89; // eax@188 | |
3509 int v90; // eax@195 | |
3510 int v91; // ecx@195 | |
3511 int v92; // eax@199 | |
3512 int v93; // eax@206 | |
3513 int v94; // ecx@206 | |
3514 char v95; // al@210 | |
3515 int v96; // eax@211 | |
3516 int v97; // edx@211 | |
3517 int v98; // eax@211 | |
3518 int v99; // eax@211 | |
3519 int v100; // eax@212 | |
3520 int v101; // eax@219 | |
3521 int v102; // ecx@219 | |
3522 int v103; // eax@223 | |
3523 int v104; // eax@231 | |
3524 int v105; // edx@231 | |
3525 signed int v106; // ebx@231 | |
3526 ArcomageCard *v107; // ebx@233 | |
3527 int v108; // eax@233 | |
3528 int v109; // edx@238 | |
3529 int v110; // eax@238 | |
3530 int v111; // eax@240 | |
3531 int v112; // edx@245 | |
3532 int v113; // eax@245 | |
3533 int v114; // eax@247 | |
3534 int v115; // edx@252 | |
3535 int v116; // eax@252 | |
3536 int v117; // eax@254 | |
3537 int v118; // edx@259 | |
3538 int v119; // eax@259 | |
3539 bool v120; // eax@261 | |
3540 int v121; // edx@266 | |
3541 int v122; // eax@266 | |
3542 int v123; // eax@268 | |
3543 int v124; // edx@273 | |
3544 int v125; // eax@273 | |
3545 char v126; // al@275 | |
3546 int v127; // eax@277 | |
3547 int v128; // edx@282 | |
3548 int v129; // eax@282 | |
3549 int v130; // eax@284 | |
3550 int v131; // edx@289 | |
3551 int v132; // eax@289 | |
3552 int v133; // eax@291 | |
3553 int v134; // eax@296 | |
3554 int v135; // edx@296 | |
3555 int v136; // eax@298 | |
3556 int v137; // eax@303 | |
3557 int v138; // edx@303 | |
3558 int v139; // eax@305 | |
3559 int v140; // eax@310 | |
3560 int v141; // edx@310 | |
3561 int v142; // eax@312 | |
3562 int v143; // eax@317 | |
3563 int v144; // edx@317 | |
3564 int v145; // eax@319 | |
3565 int v146; // eax@324 | |
3566 int v147; // edx@324 | |
3567 int v148; // eax@326 | |
3568 int v149; // eax@331 | |
3569 int v150; // edx@331 | |
3570 char v151; // al@333 | |
3571 int v152; // eax@335 | |
3572 int v153; // eax@340 | |
3573 int v154; // edx@340 | |
3574 int v155; // eax@342 | |
3575 int v156; // eax@347 | |
3576 int v157; // edx@347 | |
3577 int v158; // eax@349 | |
3578 int v159; // eax@356 | |
3579 int v160; // ecx@356 | |
3580 int v161; // eax@360 | |
3581 int v162; // eax@367 | |
3582 int v163; // ecx@367 | |
3583 int v164; // eax@371 | |
3584 int v165; // eax@378 | |
3585 int v166; // ecx@378 | |
3586 int v167; // eax@382 | |
3587 int v168; // eax@389 | |
3588 int v169; // ecx@389 | |
3589 bool v170; // eax@393 | |
3590 int v171; // eax@400 | |
3591 int v172; // ecx@400 | |
3592 int v173; // eax@404 | |
3593 int v174; // eax@411 | |
3594 int v175; // ecx@411 | |
3595 char v176; // al@415 | |
3596 int v177; // eax@416 | |
3597 int v178; // edx@416 | |
3598 int v179; // eax@416 | |
3599 int v180; // eax@416 | |
3600 int v181; // eax@417 | |
3601 int v182; // eax@424 | |
3602 int v183; // ecx@424 | |
3603 int v184; // eax@429 | |
3604 int v185; // ecx@429 | |
3605 signed int v186; // esi@511 | |
3606 Vec2_int_ v187; // [sp+Ch] [bp-64h]@488 | |
3607 //int v188; // [sp+10h] [bp-60h]@488 | |
3608 int v189; // [sp+14h] [bp-5Ch]@1 | |
3609 ArcomageCard *pCard; // [sp+18h] [bp-58h]@1 | |
3610 int v191; // [sp+1Ch] [bp-54h]@1 | |
3611 int v192; // [sp+20h] [bp-50h]@1 | |
3612 int v193; // [sp+24h] [bp-4Ch]@1 | |
3613 int v194; // [sp+28h] [bp-48h]@1 | |
3614 int v195; // [sp+2Ch] [bp-44h]@1 | |
3615 int v196; // [sp+30h] [bp-40h]@1 | |
3616 int v197; // [sp+34h] [bp-3Ch]@1 | |
3617 int v198; // [sp+38h] [bp-38h]@1 | |
3618 int v199; // [sp+3Ch] [bp-34h]@1 | |
3619 int v200; // [sp+40h] [bp-30h]@1 | |
3620 int v201; // [sp+44h] [bp-2Ch]@1 | |
3621 int v202; // [sp+48h] [bp-28h]@1 | |
3622 int v203; // [sp+4Ch] [bp-24h]@1 | |
3623 int v204; // [sp+50h] [bp-20h]@1 | |
3624 bool v205; // [sp+54h] [bp-1Ch]@1 | |
3625 int v206; // [sp+58h] [bp-18h]@1 | |
3626 int v207; // [sp+5Ch] [bp-14h]@1 | |
3627 int v208; // [sp+60h] [bp-10h]@1 | |
3628 int v209; // [sp+64h] [bp-Ch]@1 | |
3629 int v210; // [sp+68h] [bp-8h]@1 | |
3630 int v211; // [sp+6Ch] [bp-4h]@1 | |
3631 | |
3632 v194 = 0; | |
3633 v210 = 0; | |
3634 v208 = 0; | |
3635 v197 = 0; | |
3636 v205 = 0; | |
3637 v203 = 0; | |
3638 v201 = 0; | |
3639 v199 = 0; | |
3640 v192 = 0; | |
3641 v196 = 0; | |
3642 v211 = 0; | |
3643 v209 = 0; | |
3644 v207 = 0; | |
3645 v206 = 0; | |
3646 v204 = 0; | |
3647 v202 = 0; | |
3648 v200 = 0; | |
3649 v198 = 0; | |
3650 v191 = 0; | |
3651 v195 = 0; | |
3652 v193 = a1; | |
3653 v2 = &stru_505708[a1]; | |
3654 pCard = &pCards[uCardID]; | |
3655 v3 = pCard->field_2C; | |
3656 v189 = (a1 + 1) % 2; | |
3657 v4 = &stru_505708[v189]; | |
3658 switch ( v3 ) | |
3659 { | |
3660 case 2: | |
3661 v5 = v2->field_2C; | |
3662 v7 = __OFSUB__(v5, v4->field_2C); | |
3663 v6 = v5 - v4->field_2C < 0; | |
3664 goto LABEL_18; | |
3665 case 3: | |
3666 v8 = v2->field_30; | |
3667 v7 = __OFSUB__(v8, v4->field_30); | |
3668 v6 = v8 - v4->field_30 < 0; | |
3669 goto LABEL_18; | |
3670 case 4: | |
3671 v9 = v2->field_34; | |
3672 v7 = __OFSUB__(v9, v4->field_34); | |
3673 v6 = v9 - v4->field_34 < 0; | |
3674 goto LABEL_18; | |
3675 case 5: | |
3676 v10 = v2->field_2C == v4->field_2C; | |
3677 goto LABEL_21; | |
3678 case 6: | |
3679 v10 = v2->field_30 == v4->field_30; | |
3680 goto LABEL_21; | |
3681 case 7: | |
3682 v10 = v2->field_34 == v4->field_34; | |
3683 goto LABEL_21; | |
3684 case 8: | |
3685 v11 = v2->field_2C; | |
3686 v14 = __OFSUB__(v11, v4->field_2C); | |
3687 v12 = v11 == v4->field_2C; | |
3688 v13 = v11 - v4->field_2C < 0; | |
3689 goto LABEL_24; | |
3690 case 9: | |
3691 v15 = v2->field_30; | |
3692 v14 = __OFSUB__(v15, v4->field_30); | |
3693 v12 = v15 == v4->field_30; | |
3694 v13 = v15 - v4->field_30 < 0; | |
3695 goto LABEL_24; | |
3696 case 10: | |
3697 v16 = v2->field_34; | |
3698 v14 = __OFSUB__(v16, v4->field_34); | |
3699 v12 = v16 == v4->field_34; | |
3700 v13 = v16 - v4->field_34 < 0; | |
3701 goto LABEL_24; | |
3702 case 11: | |
3703 v10 = v2->field_28 == 0; | |
3704 goto LABEL_21; | |
3705 case 12: | |
3706 v17 = v2->field_28 == 0; | |
3707 goto LABEL_15; | |
3708 case 13: | |
3709 v10 = v4->field_28 == 0; | |
3710 goto LABEL_21; | |
3711 case 14: | |
3712 v17 = v4->field_28 == 0; | |
3713 LABEL_15: | |
3714 v18 = !v17; | |
3715 goto LABEL_25; | |
3716 case 15: | |
3717 v19 = v2->field_28; | |
3718 v7 = __OFSUB__(v19, v4->field_28); | |
3719 v6 = v19 - v4->field_28 < 0; | |
3720 goto LABEL_18; | |
3721 case 16: | |
3722 v20 = v2->field_24; | |
3723 v7 = __OFSUB__(v20, v4->field_24); | |
3724 v6 = v20 - v4->field_24 < 0; | |
3725 LABEL_18: | |
3726 v18 = v6 ^ v7; | |
3727 goto LABEL_25; | |
3728 case 17: | |
3729 v10 = v2->field_28 == v4->field_28; | |
3730 goto LABEL_21; | |
3731 case 18: | |
3732 v10 = v2->field_24 == v4->field_24; | |
3733 LABEL_21: | |
3734 v18 = v10; | |
3735 goto LABEL_25; | |
3736 case 19: | |
3737 v21 = v2->field_28; | |
3738 v14 = __OFSUB__(v21, v4->field_28); | |
3739 v12 = v21 == v4->field_28; | |
3740 v13 = v21 - v4->field_28 < 0; | |
3741 goto LABEL_24; | |
3742 case 20: | |
3743 v22 = v2->field_24; | |
3744 v14 = __OFSUB__(v22, v4->field_24); | |
3745 v12 = v22 == v4->field_24; | |
3746 v13 = v22 - v4->field_24 < 0; | |
3747 LABEL_24: | |
3748 v18 = !((unsigned __int8)(v13 ^ v14) | v12); | |
3749 LABEL_25: | |
3750 if ( v18 ) | |
3751 goto LABEL_26; | |
3752 goto LABEL_231; | |
3753 default: | |
3754 LABEL_26: | |
3755 v23 = BYTE1(pCard->field_30); | |
3756 v24 = v23 + (LOBYTE(pCard->field_30) == 1); | |
3757 v25 = 0; | |
3758 dword_4FAA68 = v23 + (LOBYTE(pCard->field_30) == 1); | |
3759 dword_4FAA64 = v23; | |
3760 if ( v23 > 0 ) | |
3761 { | |
3762 do | |
3763 { | |
3764 am_40A283(v193, v24); | |
3765 ++v25; | |
3766 } | |
3767 while ( v25 < SBYTE1(pCard->field_30) ); | |
3768 } | |
3769 v26 = pCard; | |
3770 am_byte_4FAA77 = am_40BB49(v193) > dword_4E1874; | |
3771 LOBYTE(v27) = BYTE2(pCard->field_30); | |
3772 if ( (_BYTE)v27 ) | |
3773 { | |
3774 if ( (_BYTE)v27 == 99 ) | |
3775 { | |
3776 v28 = v2->field_2C; | |
3777 v29 = v4->field_2C; | |
3778 if ( v28 < v29 ) | |
3779 { | |
3780 v2->field_2C = v29; | |
3781 v194 = v29 - v28; | |
3782 } | |
3783 } | |
3784 else | |
3785 { | |
3786 v27 = (char)v27; | |
3787 v6 = (char)v27 + v2->field_2C < 0; | |
3788 v2->field_2C += (char)v27; | |
3789 if ( v6 ) | |
3790 v2->field_2C = 0; | |
3791 v194 = v27; | |
3792 } | |
3793 } | |
3794 LOBYTE(v30) = BYTE3(v26->field_30); | |
3795 if ( (_BYTE)v30 ) | |
3796 { | |
3797 if ( (_BYTE)v30 == 99 ) | |
3798 { | |
3799 v31 = v2->field_30; | |
3800 v32 = v4->field_30; | |
3801 if ( v31 < v32 ) | |
3802 { | |
3803 v2->field_30 = v32; | |
3804 v210 = v32 - v31; | |
3805 } | |
3806 } | |
3807 else | |
3808 { | |
3809 v30 = (char)v30; | |
3810 v6 = (char)v30 + v2->field_30 < 0; | |
3811 v2->field_30 += (char)v30; | |
3812 if ( v6 ) | |
3813 v2->field_30 = 0; | |
3814 v210 = v30; | |
3815 } | |
3816 } | |
3817 LOBYTE(v33) = LOBYTE(v26->field_34); | |
3818 if ( (_BYTE)v33 ) | |
3819 { | |
3820 if ( (_BYTE)v33 == 99 ) | |
3821 { | |
3822 v34 = v2->field_34; | |
3823 v35 = v4->field_34; | |
3824 if ( v34 < v35 ) | |
3825 { | |
3826 v2->field_34 = v35; | |
3827 v208 = v35 - v34; | |
3828 } | |
3829 } | |
3830 else | |
3831 { | |
3832 v33 = (char)v33; | |
3833 v6 = (char)v33 + v2->field_34 < 0; | |
3834 v2->field_34 += (char)v33; | |
3835 if ( v6 ) | |
3836 v2->field_34 = 0; | |
3837 v208 = v33; | |
3838 } | |
3839 } | |
3840 LOBYTE(v36) = BYTE1(v26->field_34); | |
3841 if ( (_BYTE)v36 ) | |
3842 { | |
3843 if ( (_BYTE)v36 == 99 ) | |
3844 { | |
3845 v37 = v2->field_38; | |
3846 v38 = v4->field_38; | |
3847 if ( v37 < v38 ) | |
3848 { | |
3849 v2->field_38 = v38; | |
3850 v197 = v38 - v37; | |
3851 } | |
3852 } | |
3853 else | |
3854 { | |
3855 v36 = (char)v36; | |
3856 v6 = (char)v36 + v2->field_38 < 0; | |
3857 v2->field_38 += (char)v36; | |
3858 if ( v6 ) | |
3859 v2->field_38 = 0; | |
3860 v197 = v36; | |
3861 } | |
3862 } | |
3863 LOBYTE(v39) = BYTE2(v26->field_34); | |
3864 if ( v39 ) | |
3865 { | |
3866 if ( v39 == 99 ) | |
3867 { | |
3868 v40 = v2->field_3C; | |
3869 v41 = v4->field_3C; | |
3870 if ( v40 < v41 ) | |
3871 { | |
3872 v2->field_3C = v41; | |
3873 v205 = v41 - v40; | |
3874 } | |
3875 } | |
3876 else | |
3877 { | |
3878 v39 = v39; | |
3879 v6 = v39 + v2->field_3C < 0; | |
3880 v2->field_3C += v39; | |
3881 if ( v6 ) | |
3882 v2->field_3C = 0; | |
3883 v205 = v39; | |
3884 } | |
3885 } | |
3886 LOBYTE(v42) = BYTE3(v26->field_34); | |
3887 if ( (_BYTE)v42 ) | |
3888 { | |
3889 if ( (_BYTE)v42 == 99 ) | |
3890 { | |
3891 v43 = v2->field_40; | |
3892 v44 = v4->field_40; | |
3893 if ( v43 < v44 ) | |
3894 { | |
3895 v2->field_40 = v44; | |
3896 v203 = v44 - v43; | |
3897 } | |
3898 } | |
3899 else | |
3900 { | |
3901 v42 = (char)v42; | |
3902 v6 = (char)v42 + v2->field_40 < 0; | |
3903 v2->field_40 += (char)v42; | |
3904 if ( v6 ) | |
3905 v2->field_40 = 0; | |
3906 v203 = v42; | |
3907 } | |
3908 } | |
3909 v45 = v26->field_38[0]; | |
3910 if ( v45 ) | |
3911 { | |
3912 v196 = am_40D402(v193, v45); | |
3913 v192 = v26->field_38[0] - v196; | |
3914 } | |
3915 LOBYTE(v46) = v26->field_38[1]; | |
3916 if ( (_BYTE)v46 ) | |
3917 { | |
3918 if ( (_BYTE)v46 == 99 ) | |
3919 { | |
3920 v47 = v2->field_28; | |
3921 v48 = v4->field_28; | |
3922 if ( v47 < v48 ) | |
3923 { | |
3924 v2->field_28 = v48; | |
3925 v201 = v48 - v47; | |
3926 } | |
3927 } | |
3928 else | |
3929 { | |
3930 v46 = (char)v46; | |
3931 v6 = (char)v46 + v2->field_28 < 0; | |
3932 v2->field_28 += (char)v46; | |
3933 if ( v6 ) | |
3934 v2->field_28 = 0; | |
3935 v201 = v46; | |
3936 } | |
3937 } | |
3938 LOBYTE(v49) = v26->field_38[2]; | |
3939 if ( (_BYTE)v49 ) | |
3940 { | |
3941 if ( (_BYTE)v49 == 99 ) | |
3942 { | |
3943 v50 = v2->field_24; | |
3944 v51 = v4->field_24; | |
3945 if ( v50 < v51 ) | |
3946 { | |
3947 v2->field_24 = v51; | |
3948 v199 = v51 - v50; | |
3949 } | |
3950 } | |
3951 else | |
3952 { | |
3953 v49 = (char)v49; | |
3954 v6 = (char)v49 + v2->field_24 < 0; | |
3955 v2->field_24 += (char)v49; | |
3956 if ( v6 ) | |
3957 v2->field_24 = 0; | |
3958 v199 = v49; | |
3959 } | |
3960 } | |
3961 LOBYTE(v52) = v26->field_38[3]; | |
3962 if ( (_BYTE)v52 ) | |
3963 { | |
3964 if ( (_BYTE)v52 == 99 ) | |
3965 { | |
3966 v53 = v2->field_2C; | |
3967 v54 = v4->field_2C; | |
3968 if ( v53 > v54 ) | |
3969 { | |
3970 v4->field_2C = v53; | |
3971 v211 = v53 - v54; | |
3972 } | |
3973 } | |
3974 else | |
3975 { | |
3976 v52 = (char)v52; | |
3977 v6 = (char)v52 + v4->field_2C < 0; | |
3978 v4->field_2C += (char)v52; | |
3979 if ( v6 ) | |
3980 v4->field_2C = 0; | |
3981 v211 = v52; | |
3982 } | |
3983 } | |
3984 LOBYTE(v55) = v26->field_38[4]; | |
3985 if ( (_BYTE)v55 ) | |
3986 { | |
3987 if ( (_BYTE)v55 == 99 ) | |
3988 { | |
3989 v56 = v2->field_30; | |
3990 v57 = v4->field_30; | |
3991 if ( v56 > v57 ) | |
3992 { | |
3993 v4->field_30 = v56; | |
3994 v209 = v56 - v57; | |
3995 } | |
3996 } | |
3997 else | |
3998 { | |
3999 v55 = (char)v55; | |
4000 v6 = (char)v55 + v4->field_30 < 0; | |
4001 v4->field_30 += (char)v55; | |
4002 if ( v6 ) | |
4003 v4->field_30 = 0; | |
4004 v209 = v55; | |
4005 } | |
4006 } | |
4007 LOBYTE(v58) = v26->field_38[5]; | |
4008 if ( (_BYTE)v58 ) | |
4009 { | |
4010 if ( (_BYTE)v58 == 99 ) | |
4011 { | |
4012 v59 = v2->field_34; | |
4013 v60 = v4->field_34; | |
4014 if ( v59 > v60 ) | |
4015 { | |
4016 v4->field_34 = v59; | |
4017 v207 = v59 - v60; | |
4018 } | |
4019 } | |
4020 else | |
4021 { | |
4022 v58 = (char)v58; | |
4023 v6 = (char)v58 + v4->field_34 < 0; | |
4024 v4->field_34 += (char)v58; | |
4025 if ( v6 ) | |
4026 v4->field_34 = 0; | |
4027 v207 = v58; | |
4028 } | |
4029 } | |
4030 LOBYTE(v61) = v26->field_38[6]; | |
4031 if ( (_BYTE)v61 ) | |
4032 { | |
4033 if ( (_BYTE)v61 == 99 ) | |
4034 { | |
4035 v62 = v2->field_38; | |
4036 v63 = v4->field_38; | |
4037 if ( v62 > v63 ) | |
4038 { | |
4039 v4->field_38 = v62; | |
4040 v206 = v62 - v63; | |
4041 } | |
4042 } | |
4043 else | |
4044 { | |
4045 v61 = (char)v61; | |
4046 v6 = (char)v61 + v4->field_38 < 0; | |
4047 v4->field_38 += (char)v61; | |
4048 if ( v6 ) | |
4049 v4->field_38 = 0; | |
4050 v206 = v61; | |
4051 } | |
4052 } | |
4053 LOBYTE(v64) = v26->field_38[7]; | |
4054 if ( (_BYTE)v64 ) | |
4055 { | |
4056 if ( (_BYTE)v64 == 99 ) | |
4057 { | |
4058 v65 = v2->field_3C; | |
4059 v66 = v4->field_3C; | |
4060 if ( v65 > v66 ) | |
4061 { | |
4062 v4->field_3C = v65; | |
4063 v204 = v65 - v66; | |
4064 } | |
4065 } | |
4066 else | |
4067 { | |
4068 v64 = (char)v64; | |
4069 v6 = (char)v64 + v4->field_3C < 0; | |
4070 v4->field_3C += (char)v64; | |
4071 if ( v6 ) | |
4072 v4->field_3C = 0; | |
4073 v204 = v64; | |
4074 } | |
4075 } | |
4076 LOBYTE(v67) = v26->field_38[8]; | |
4077 if ( (_BYTE)v67 ) | |
4078 { | |
4079 if ( (_BYTE)v67 == 99 ) | |
4080 { | |
4081 v68 = v2->field_40; | |
4082 v69 = v4->field_40; | |
4083 if ( v68 > v69 ) | |
4084 { | |
4085 v4->field_40 = v68; | |
4086 v202 = v68 - v69; | |
4087 } | |
4088 } | |
4089 else | |
4090 { | |
4091 v67 = (char)v67; | |
4092 v6 = (char)v67 + v4->field_40 < 0; | |
4093 v4->field_40 += (char)v67; | |
4094 if ( v6 ) | |
4095 v4->field_40 = 0; | |
4096 v202 = v67; | |
4097 } | |
4098 } | |
4099 v70 = v26->field_38[9]; | |
4100 if ( v70 ) | |
4101 { | |
4102 v195 = am_40D402(v189, v70); | |
4103 v191 = v26->field_38[9] - v195; | |
4104 } | |
4105 LOBYTE(v71) = v26->field_38[10]; | |
4106 if ( (_BYTE)v71 ) | |
4107 { | |
4108 if ( (_BYTE)v71 == 99 ) | |
4109 { | |
4110 v72 = v2->field_28; | |
4111 v73 = v4->field_28; | |
4112 if ( v72 > v73 ) | |
4113 { | |
4114 v4->field_28 = v72; | |
4115 v200 = v72 - v73; | |
4116 } | |
4117 } | |
4118 else | |
4119 { | |
4120 v71 = (char)v71; | |
4121 v6 = (char)v71 + v4->field_28 < 0; | |
4122 v4->field_28 += (char)v71; | |
4123 if ( v6 ) | |
4124 v4->field_28 = 0; | |
4125 v200 = v71; | |
4126 } | |
4127 } | |
4128 LOBYTE(v74) = v26->field_38[11]; | |
4129 if ( (_BYTE)v74 ) | |
4130 { | |
4131 if ( (_BYTE)v74 == 99 ) | |
4132 { | |
4133 v75 = v2->field_24; | |
4134 v76 = v4->field_24; | |
4135 if ( v75 > v76 ) | |
4136 { | |
4137 v4->field_24 = v75; | |
4138 v198 = v75 - v76; | |
4139 } | |
4140 } | |
4141 else | |
4142 { | |
4143 v74 = (char)v74; | |
4144 v6 = (char)v74 + v4->field_24 < 0; | |
4145 v4->field_24 += (char)v74; | |
4146 if ( v6 ) | |
4147 v4->field_24 = 0; | |
4148 v198 = v74; | |
4149 } | |
4150 } | |
4151 LOBYTE(v77) = v26->field_38[12]; | |
4152 if ( (_BYTE)v77 ) | |
4153 { | |
4154 if ( (_BYTE)v77 == 99 ) | |
4155 { | |
4156 v78 = v2->field_2C; | |
4157 v79 = v4->field_2C; | |
4158 if ( v78 != v79 ) | |
4159 { | |
4160 if ( v78 <= v79 ) | |
4161 { | |
4162 v2->field_2C = v79; | |
4163 v194 = v79 - v78; | |
4164 } | |
4165 else | |
4166 { | |
4167 v4->field_2C = v78; | |
4168 v211 = v78 - v79; | |
4169 } | |
4170 } | |
4171 } | |
4172 else | |
4173 { | |
4174 v77 = (char)v77; | |
4175 v2->field_2C += (char)v77; | |
4176 v4->field_2C += (char)v77; | |
4177 if ( v2->field_2C < 0 ) | |
4178 v2->field_2C = 0; | |
4179 if ( v4->field_2C < 0 ) | |
4180 v4->field_2C = 0; | |
4181 v194 = v77; | |
4182 v211 = v77; | |
4183 } | |
4184 } | |
4185 LOBYTE(v80) = v26->field_38[13]; | |
4186 if ( (_BYTE)v80 ) | |
4187 { | |
4188 if ( (_BYTE)v80 == 99 ) | |
4189 { | |
4190 v81 = v2->field_30; | |
4191 v82 = v4->field_30; | |
4192 if ( v81 != v82 ) | |
4193 { | |
4194 if ( v81 <= v82 ) | |
4195 { | |
4196 v2->field_30 = v82; | |
4197 v210 = v82 - v81; | |
4198 } | |
4199 else | |
4200 { | |
4201 v4->field_30 = v81; | |
4202 v209 = v81 - v82; | |
4203 } | |
4204 } | |
4205 } | |
4206 else | |
4207 { | |
4208 v80 = (char)v80; | |
4209 v2->field_30 += (char)v80; | |
4210 v4->field_30 += (char)v80; | |
4211 if ( v2->field_30 < 0 ) | |
4212 v2->field_30 = 0; | |
4213 if ( v4->field_30 < 0 ) | |
4214 v4->field_30 = 0; | |
4215 v209 = v80; | |
4216 v210 = v80; | |
4217 } | |
4218 } | |
4219 LOBYTE(v83) = v26->field_38[14]; | |
4220 if ( (_BYTE)v83 ) | |
4221 { | |
4222 if ( (_BYTE)v83 == 99 ) | |
4223 { | |
4224 v84 = v2->field_34; | |
4225 v85 = v4->field_34; | |
4226 if ( v84 != v85 ) | |
4227 { | |
4228 if ( v84 <= v85 ) | |
4229 { | |
4230 v2->field_34 = v85; | |
4231 v208 = v85 - v84; | |
4232 } | |
4233 else | |
4234 { | |
4235 v4->field_34 = v84; | |
4236 v207 = v84 - v85; | |
4237 } | |
4238 } | |
4239 } | |
4240 else | |
4241 { | |
4242 v83 = (char)v83; | |
4243 v2->field_34 += (char)v83; | |
4244 v4->field_34 += (char)v83; | |
4245 if ( v2->field_34 < 0 ) | |
4246 v2->field_34 = 0; | |
4247 if ( v4->field_34 < 0 ) | |
4248 v4->field_34 = 0; | |
4249 v208 = v83; | |
4250 v207 = v83; | |
4251 } | |
4252 } | |
4253 LOBYTE(v86) = v26->field_38[15]; | |
4254 if ( (_BYTE)v86 ) | |
4255 { | |
4256 if ( (_BYTE)v86 == 99 ) | |
4257 { | |
4258 v87 = v2->field_38; | |
4259 v88 = v4->field_38; | |
4260 if ( v87 != v88 ) | |
4261 { | |
4262 if ( v87 <= v88 ) | |
4263 { | |
4264 v2->field_38 = v88; | |
4265 v197 = v88 - v87; | |
4266 } | |
4267 else | |
4268 { | |
4269 v4->field_38 = v87; | |
4270 v206 = v87 - v88; | |
4271 } | |
4272 } | |
4273 } | |
4274 else | |
4275 { | |
4276 v86 = (char)v86; | |
4277 v2->field_38 += (char)v86; | |
4278 v4->field_38 += (char)v86; | |
4279 if ( v2->field_38 < 0 ) | |
4280 v2->field_38 = 0; | |
4281 if ( v4->field_38 < 0 ) | |
4282 v4->field_38 = 0; | |
4283 v197 = v86; | |
4284 v206 = v86; | |
4285 } | |
4286 } | |
4287 LOBYTE(v89) = v26->field_48[0]; | |
4288 if ( v89 ) | |
4289 { | |
4290 if ( v89 == 99 ) | |
4291 { | |
4292 v90 = v2->field_3C; | |
4293 v91 = v4->field_3C; | |
4294 if ( v90 != v91 ) | |
4295 { | |
4296 if ( v90 <= v91 ) | |
4297 { | |
4298 v205 = v91 > v90; | |
4299 v2->field_3C = v91; | |
4300 } | |
4301 else | |
4302 { | |
4303 v204 = 1; | |
4304 v4->field_3C = v90; | |
4305 } | |
4306 } | |
4307 } | |
4308 else | |
4309 { | |
4310 v89 = v89; | |
4311 v2->field_3C += v89; | |
4312 v4->field_3C += v89; | |
4313 if ( v2->field_3C < 0 ) | |
4314 v2->field_3C = 0; | |
4315 if ( v4->field_3C < 0 ) | |
4316 v4->field_3C = 0; | |
4317 v205 = v89; | |
4318 v204 = v89; | |
4319 } | |
4320 } | |
4321 LOBYTE(v92) = v26->field_48[1]; | |
4322 if ( (_BYTE)v92 ) | |
4323 { | |
4324 if ( (_BYTE)v92 == 99 ) | |
4325 { | |
4326 v93 = v2->field_40; | |
4327 v94 = v4->field_40; | |
4328 if ( v93 != v94 ) | |
4329 { | |
4330 if ( v93 <= v94 ) | |
4331 { | |
4332 v2->field_40 = v94; | |
4333 v203 = v94 - v93; | |
4334 } | |
4335 else | |
4336 { | |
4337 v4->field_40 = v93; | |
4338 v202 = v93 - v94; | |
4339 } | |
4340 } | |
4341 } | |
4342 else | |
4343 { | |
4344 v92 = (char)v92; | |
4345 v2->field_40 += (char)v92; | |
4346 v4->field_40 += (char)v92; | |
4347 if ( v2->field_40 < 0 ) | |
4348 v2->field_40 = 0; | |
4349 if ( v4->field_40 < 0 ) | |
4350 v4->field_40 = 0; | |
4351 v203 = v92; | |
4352 v202 = v92; | |
4353 } | |
4354 } | |
4355 v95 = v26->field_48[2]; | |
4356 if ( v95 ) | |
4357 { | |
4358 v96 = am_40D402(v193, v95); | |
4359 v97 = v26->field_48[2]; | |
4360 v196 = v96; | |
4361 v98 = am_40D402(v189, v97); | |
4362 v195 = v98; | |
4363 v99 = v26->field_48[2] - v98; | |
4364 v192 = v26->field_48[2] - v196; | |
4365 v191 = v99; | |
4366 } | |
4367 LOBYTE(v100) = v26->field_48[3]; | |
4368 if ( (_BYTE)v100 ) | |
4369 { | |
4370 if ( (_BYTE)v100 == 99 ) | |
4371 { | |
4372 v101 = v2->field_28; | |
4373 v102 = v4->field_28; | |
4374 if ( v101 != v102 ) | |
4375 { | |
4376 if ( v101 <= v102 ) | |
4377 { | |
4378 v2->field_28 = v102; | |
4379 v201 = v102 - v101; | |
4380 } | |
4381 else | |
4382 { | |
4383 v4->field_28 = v101; | |
4384 v200 = v101 - v102; | |
4385 } | |
4386 } | |
4387 } | |
4388 else | |
4389 { | |
4390 v100 = (char)v100; | |
4391 v2->field_28 += (char)v100; | |
4392 v4->field_28 += (char)v100; | |
4393 if ( v2->field_28 < 0 ) | |
4394 v2->field_28 = 0; | |
4395 if ( v4->field_28 < 0 ) | |
4396 v4->field_28 = 0; | |
4397 v201 = v100; | |
4398 v200 = v100; | |
4399 } | |
4400 } | |
4401 LOBYTE(v103) = v26->field_48[4]; | |
4402 break; | |
4403 case 0: | |
4404 LABEL_231: | |
4405 v104 = pCard->field_48[6]; | |
4406 v105 = v104 + (pCard->field_48[5] == 1); | |
4407 v106 = 0; | |
4408 dword_4FAA68 = v104 + (pCard->field_48[5] == 1); | |
4409 dword_4FAA64 = v104; | |
4410 if ( v104 > 0 ) | |
4411 { | |
4412 do | |
4413 { | |
4414 am_40A283(v193, v105); | |
4415 ++v106; | |
4416 } | |
4417 while ( v106 < pCard->field_48[6] ); | |
4418 } | |
4419 v107 = pCard; | |
4420 am_byte_4FAA77 = am_40BB49(v193) > dword_4E1874; | |
4421 LOBYTE(v108) = pCard->field_48[7]; | |
4422 if ( (_BYTE)v108 ) | |
4423 { | |
4424 if ( (_BYTE)v108 == 99 ) | |
4425 { | |
4426 v109 = v2->field_2C; | |
4427 v110 = v4->field_2C; | |
4428 if ( v109 < v110 ) | |
4429 { | |
4430 v2->field_2C = v110; | |
4431 v194 = v110 - v109; | |
4432 } | |
4433 } | |
4434 else | |
4435 { | |
4436 v108 = (char)v108; | |
4437 v6 = (char)v108 + v2->field_2C < 0; | |
4438 v2->field_2C += (char)v108; | |
4439 if ( v6 ) | |
4440 v2->field_2C = 0; | |
4441 v194 = v108; | |
4442 } | |
4443 } | |
4444 LOBYTE(v111) = v107->field_48[8]; | |
4445 if ( (_BYTE)v111 ) | |
4446 { | |
4447 if ( (_BYTE)v111 == 99 ) | |
4448 { | |
4449 v112 = v2->field_30; | |
4450 v113 = v4->field_30; | |
4451 if ( v112 < v113 ) | |
4452 { | |
4453 v2->field_30 = v113; | |
4454 v210 = v113 - v112; | |
4455 } | |
4456 } | |
4457 else | |
4458 { | |
4459 v111 = (char)v111; | |
4460 v6 = (char)v111 + v2->field_30 < 0; | |
4461 v2->field_30 += (char)v111; | |
4462 if ( v6 ) | |
4463 v2->field_30 = 0; | |
4464 v210 = v111; | |
4465 } | |
4466 } | |
4467 LOBYTE(v114) = v107->field_48[9]; | |
4468 if ( (_BYTE)v114 ) | |
4469 { | |
4470 if ( (_BYTE)v114 == 99 ) | |
4471 { | |
4472 v115 = v2->field_34; | |
4473 v116 = v4->field_34; | |
4474 if ( v115 < v116 ) | |
4475 { | |
4476 v2->field_34 = v116; | |
4477 v208 = v116 - v115; | |
4478 } | |
4479 } | |
4480 else | |
4481 { | |
4482 v114 = (char)v114; | |
4483 v6 = (char)v114 + v2->field_34 < 0; | |
4484 v2->field_34 += (char)v114; | |
4485 if ( v6 ) | |
4486 v2->field_34 = 0; | |
4487 v208 = v114; | |
4488 } | |
4489 } | |
4490 LOBYTE(v117) = v107->field_48[10]; | |
4491 if ( (_BYTE)v117 ) | |
4492 { | |
4493 if ( (_BYTE)v117 == 99 ) | |
4494 { | |
4495 v118 = v2->field_38; | |
4496 v119 = v4->field_38; | |
4497 if ( v118 < v119 ) | |
4498 { | |
4499 v2->field_38 = v119; | |
4500 v197 = v119 - v118; | |
4501 } | |
4502 } | |
4503 else | |
4504 { | |
4505 v117 = (char)v117; | |
4506 v6 = (char)v117 + v2->field_38 < 0; | |
4507 v2->field_38 += (char)v117; | |
4508 if ( v6 ) | |
4509 v2->field_38 = 0; | |
4510 v197 = v117; | |
4511 } | |
4512 } | |
4513 LOBYTE(v120) = v107->field_48[11]; | |
4514 if ( v120 ) | |
4515 { | |
4516 if ( v120 == 99 ) | |
4517 { | |
4518 v121 = v2->field_3C; | |
4519 v122 = v4->field_3C; | |
4520 if ( v121 < v122 ) | |
4521 { | |
4522 v2->field_3C = v122; | |
4523 v205 = v122 - v121; | |
4524 } | |
4525 } | |
4526 else | |
4527 { | |
4528 v120 = v120; | |
4529 v6 = v120 + v2->field_3C < 0; | |
4530 v2->field_3C += v120; | |
4531 if ( v6 ) | |
4532 v2->field_3C = 0; | |
4533 v205 = v120; | |
4534 } | |
4535 } | |
4536 LOBYTE(v123) = v107->field_48[12]; | |
4537 if ( (_BYTE)v123 ) | |
4538 { | |
4539 if ( (_BYTE)v123 == 99 ) | |
4540 { | |
4541 v124 = v2->field_40; | |
4542 v125 = v4->field_40; | |
4543 if ( v124 < v125 ) | |
4544 { | |
4545 v2->field_40 = v125; | |
4546 v203 = v125 - v124; | |
4547 } | |
4548 } | |
4549 else | |
4550 { | |
4551 v123 = (char)v123; | |
4552 v6 = (char)v123 + v2->field_40 < 0; | |
4553 v2->field_40 += (char)v123; | |
4554 if ( v6 ) | |
4555 v2->field_40 = 0; | |
4556 v203 = v123; | |
4557 } | |
4558 } | |
4559 v126 = v107->field_48[13]; | |
4560 if ( v126 ) | |
4561 { | |
4562 v196 = am_40D402(v193, v126); | |
4563 v192 = v107->field_48[13] - v196; | |
4564 } | |
4565 LOBYTE(v127) = v107->field_48[14]; | |
4566 if ( (_BYTE)v127 ) | |
4567 { | |
4568 if ( (_BYTE)v127 == 99 ) | |
4569 { | |
4570 v128 = v2->field_28; | |
4571 v129 = v4->field_28; | |
4572 if ( v128 < v129 ) | |
4573 { | |
4574 v2->field_28 = v129; | |
4575 v201 = v129 - v128; | |
4576 } | |
4577 } | |
4578 else | |
4579 { | |
4580 v127 = (char)v127; | |
4581 v6 = (char)v127 + v2->field_28 < 0; | |
4582 v2->field_28 += (char)v127; | |
4583 if ( v6 ) | |
4584 v2->field_28 = 0; | |
4585 v201 = v127; | |
4586 } | |
4587 } | |
4588 LOBYTE(v130) = v107->field_48[15]; | |
4589 if ( (_BYTE)v130 ) | |
4590 { | |
4591 if ( (_BYTE)v130 == 99 ) | |
4592 { | |
4593 v131 = v2->field_24; | |
4594 v132 = v4->field_24; | |
4595 if ( v131 < v132 ) | |
4596 { | |
4597 v2->field_24 = v132; | |
4598 v199 = v132 - v131; | |
4599 } | |
4600 } | |
4601 else | |
4602 { | |
4603 v130 = (char)v130; | |
4604 v6 = (char)v130 + v2->field_24 < 0; | |
4605 v2->field_24 += (char)v130; | |
4606 if ( v6 ) | |
4607 v2->field_24 = 0; | |
4608 v199 = v130; | |
4609 } | |
4610 } | |
4611 LOBYTE(v133) = v107->field_58[0]; | |
4612 if ( (_BYTE)v133 ) | |
4613 { | |
4614 if ( (_BYTE)v133 == 99 ) | |
4615 { | |
4616 v134 = v2->field_2C; | |
4617 v135 = v4->field_2C; | |
4618 if ( v134 > v135 ) | |
4619 { | |
4620 v4->field_2C = v134; | |
4621 v211 = v134 - v135; | |
4622 } | |
4623 } | |
4624 else | |
4625 { | |
4626 v133 = (char)v133; | |
4627 v6 = (char)v133 + v4->field_2C < 0; | |
4628 v4->field_2C += (char)v133; | |
4629 if ( v6 ) | |
4630 v4->field_2C = 0; | |
4631 v211 = v133; | |
4632 } | |
4633 } | |
4634 LOBYTE(v136) = v107->field_58[1]; | |
4635 if ( (_BYTE)v136 ) | |
4636 { | |
4637 if ( (_BYTE)v136 == 99 ) | |
4638 { | |
4639 v137 = v2->field_30; | |
4640 v138 = v4->field_30; | |
4641 if ( v137 > v138 ) | |
4642 { | |
4643 v4->field_30 = v137; | |
4644 v209 = v137 - v138; | |
4645 } | |
4646 } | |
4647 else | |
4648 { | |
4649 v136 = (char)v136; | |
4650 v6 = (char)v136 + v4->field_30 < 0; | |
4651 v4->field_30 += (char)v136; | |
4652 if ( v6 ) | |
4653 v4->field_30 = 0; | |
4654 v209 = v136; | |
4655 } | |
4656 } | |
4657 LOBYTE(v139) = v107->field_58[2]; | |
4658 if ( (_BYTE)v139 ) | |
4659 { | |
4660 if ( (_BYTE)v139 == 99 ) | |
4661 { | |
4662 v140 = v2->field_34; | |
4663 v141 = v4->field_34; | |
4664 if ( v140 > v141 ) | |
4665 { | |
4666 v4->field_34 = v140; | |
4667 v207 = v140 - v141; | |
4668 } | |
4669 } | |
4670 else | |
4671 { | |
4672 v139 = (char)v139; | |
4673 v6 = (char)v139 + v4->field_34 < 0; | |
4674 v4->field_34 += (char)v139; | |
4675 if ( v6 ) | |
4676 v4->field_34 = 0; | |
4677 v207 = v139; | |
4678 } | |
4679 } | |
4680 LOBYTE(v142) = v107->field_58[3]; | |
4681 if ( (_BYTE)v142 ) | |
4682 { | |
4683 if ( (_BYTE)v142 == 99 ) | |
4684 { | |
4685 v143 = v2->field_38; | |
4686 v144 = v4->field_38; | |
4687 if ( v143 > v144 ) | |
4688 { | |
4689 v4->field_38 = v143; | |
4690 v206 = v143 - v144; | |
4691 } | |
4692 } | |
4693 else | |
4694 { | |
4695 v142 = (char)v142; | |
4696 v6 = (char)v142 + v4->field_38 < 0; | |
4697 v4->field_38 += (char)v142; | |
4698 if ( v6 ) | |
4699 v4->field_38 = 0; | |
4700 v206 = v142; | |
4701 } | |
4702 } | |
4703 LOBYTE(v145) = v107->field_58[4]; | |
4704 if ( (_BYTE)v145 ) | |
4705 { | |
4706 if ( (_BYTE)v145 == 99 ) | |
4707 { | |
4708 v146 = v2->field_3C; | |
4709 v147 = v4->field_3C; | |
4710 if ( v146 > v147 ) | |
4711 { | |
4712 v4->field_3C = v146; | |
4713 v204 = v146 - v147; | |
4714 } | |
4715 } | |
4716 else | |
4717 { | |
4718 v145 = (char)v145; | |
4719 v6 = (char)v145 + v4->field_3C < 0; | |
4720 v4->field_3C += (char)v145; | |
4721 if ( v6 ) | |
4722 v4->field_3C = 0; | |
4723 v204 = v145; | |
4724 } | |
4725 } | |
4726 LOBYTE(v148) = v107->field_58[5]; | |
4727 if ( (_BYTE)v148 ) | |
4728 { | |
4729 if ( (_BYTE)v148 == 99 ) | |
4730 { | |
4731 v149 = v2->field_40; | |
4732 v150 = v4->field_40; | |
4733 if ( v149 > v150 ) | |
4734 { | |
4735 v4->field_40 = v149; | |
4736 v202 = v149 - v150; | |
4737 } | |
4738 } | |
4739 else | |
4740 { | |
4741 v148 = (char)v148; | |
4742 v6 = (char)v148 + v4->field_40 < 0; | |
4743 v4->field_40 += (char)v148; | |
4744 if ( v6 ) | |
4745 v4->field_40 = 0; | |
4746 v202 = v148; | |
4747 } | |
4748 } | |
4749 v151 = v107->field_58[6]; | |
4750 if ( v151 ) | |
4751 { | |
4752 v195 = am_40D402(v189, v151); | |
4753 v191 = v107->field_58[6] - v195; | |
4754 } | |
4755 LOBYTE(v152) = v107->field_58[7]; | |
4756 if ( (_BYTE)v152 ) | |
4757 { | |
4758 if ( (_BYTE)v152 == 99 ) | |
4759 { | |
4760 v153 = v2->field_28; | |
4761 v154 = v4->field_28; | |
4762 if ( v153 > v154 ) | |
4763 { | |
4764 v4->field_28 = v153; | |
4765 v200 = v153 - v154; | |
4766 } | |
4767 } | |
4768 else | |
4769 { | |
4770 v152 = (char)v152; | |
4771 v6 = (char)v152 + v4->field_28 < 0; | |
4772 v4->field_28 += (char)v152; | |
4773 if ( v6 ) | |
4774 v4->field_28 = 0; | |
4775 v200 = v152; | |
4776 } | |
4777 } | |
4778 LOBYTE(v155) = v107->field_58[8]; | |
4779 if ( (_BYTE)v155 ) | |
4780 { | |
4781 if ( (_BYTE)v155 == 99 ) | |
4782 { | |
4783 v156 = v2->field_24; | |
4784 v157 = v4->field_24; | |
4785 if ( v156 > v157 ) | |
4786 { | |
4787 v4->field_24 = v156; | |
4788 v198 = v156 - v157; | |
4789 } | |
4790 } | |
4791 else | |
4792 { | |
4793 v155 = (char)v155; | |
4794 v6 = (char)v155 + v4->field_24 < 0; | |
4795 v4->field_24 += (char)v155; | |
4796 if ( v6 ) | |
4797 v4->field_24 = 0; | |
4798 v198 = v155; | |
4799 } | |
4800 } | |
4801 LOBYTE(v158) = v107->field_58[9]; | |
4802 if ( (_BYTE)v158 ) | |
4803 { | |
4804 if ( (_BYTE)v158 == 99 ) | |
4805 { | |
4806 v159 = v2->field_2C; | |
4807 v160 = v4->field_2C; | |
4808 if ( v159 != v160 ) | |
4809 { | |
4810 if ( v159 <= v160 ) | |
4811 { | |
4812 v2->field_2C = v160; | |
4813 v194 = v160 - v159; | |
4814 } | |
4815 else | |
4816 { | |
4817 v4->field_2C = v159; | |
4818 v211 = v159 - v160; | |
4819 } | |
4820 } | |
4821 } | |
4822 else | |
4823 { | |
4824 v158 = (char)v158; | |
4825 v2->field_2C += (char)v158; | |
4826 v4->field_2C += (char)v158; | |
4827 if ( v2->field_2C < 0 ) | |
4828 v2->field_2C = 0; | |
4829 if ( v4->field_2C < 0 ) | |
4830 v4->field_2C = 0; | |
4831 v194 = v158; | |
4832 v211 = v158; | |
4833 } | |
4834 } | |
4835 LOBYTE(v161) = v107->field_58[10]; | |
4836 if ( (_BYTE)v161 ) | |
4837 { | |
4838 if ( (_BYTE)v161 == 99 ) | |
4839 { | |
4840 v162 = v2->field_30; | |
4841 v163 = v4->field_30; | |
4842 if ( v162 != v163 ) | |
4843 { | |
4844 if ( v162 <= v163 ) | |
4845 { | |
4846 v2->field_30 = v163; | |
4847 v210 = v163 - v162; | |
4848 } | |
4849 else | |
4850 { | |
4851 v4->field_30 = v162; | |
4852 v209 = v162 - v163; | |
4853 } | |
4854 } | |
4855 } | |
4856 else | |
4857 { | |
4858 v161 = (char)v161; | |
4859 v2->field_30 += (char)v161; | |
4860 v4->field_30 += (char)v161; | |
4861 if ( v2->field_30 < 0 ) | |
4862 v2->field_30 = 0; | |
4863 if ( v4->field_30 < 0 ) | |
4864 v4->field_30 = 0; | |
4865 v209 = v161; | |
4866 v210 = v161; | |
4867 } | |
4868 } | |
4869 LOBYTE(v164) = v107->field_58[11]; | |
4870 if ( (_BYTE)v164 ) | |
4871 { | |
4872 if ( (_BYTE)v164 == 99 ) | |
4873 { | |
4874 v165 = v2->field_34; | |
4875 v166 = v4->field_34; | |
4876 if ( v165 != v166 ) | |
4877 { | |
4878 if ( v165 <= v166 ) | |
4879 { | |
4880 v2->field_34 = v166; | |
4881 v208 = v166 - v165; | |
4882 } | |
4883 else | |
4884 { | |
4885 v4->field_34 = v165; | |
4886 v207 = v165 - v166; | |
4887 } | |
4888 } | |
4889 } | |
4890 else | |
4891 { | |
4892 v164 = (char)v164; | |
4893 v2->field_34 += (char)v164; | |
4894 v4->field_34 += (char)v164; | |
4895 if ( v2->field_34 < 0 ) | |
4896 v2->field_34 = 0; | |
4897 if ( v4->field_34 < 0 ) | |
4898 v4->field_34 = 0; | |
4899 v208 = v164; | |
4900 v207 = v164; | |
4901 } | |
4902 } | |
4903 LOBYTE(v167) = v107->field_58[12]; | |
4904 if ( (_BYTE)v167 ) | |
4905 { | |
4906 if ( (_BYTE)v167 == 99 ) | |
4907 { | |
4908 v168 = v2->field_38; | |
4909 v169 = v4->field_38; | |
4910 if ( v168 != v169 ) | |
4911 { | |
4912 if ( v168 <= v169 ) | |
4913 { | |
4914 v2->field_38 = v169; | |
4915 v197 = v169 - v168; | |
4916 } | |
4917 else | |
4918 { | |
4919 v4->field_38 = v168; | |
4920 v206 = v168 - v169; | |
4921 } | |
4922 } | |
4923 } | |
4924 else | |
4925 { | |
4926 v167 = (char)v167; | |
4927 v2->field_38 += (char)v167; | |
4928 v4->field_38 += (char)v167; | |
4929 if ( v2->field_38 < 0 ) | |
4930 v2->field_38 = 0; | |
4931 if ( v4->field_38 < 0 ) | |
4932 v4->field_38 = 0; | |
4933 v197 = v167; | |
4934 v206 = v167; | |
4935 } | |
4936 } | |
4937 LOBYTE(v170) = v107->field_58[13]; | |
4938 if ( v170 ) | |
4939 { | |
4940 if ( v170 == 99 ) | |
4941 { | |
4942 v171 = v2->field_3C; | |
4943 v172 = v4->field_3C; | |
4944 if ( v171 != v172 ) | |
4945 { | |
4946 if ( v171 <= v172 ) | |
4947 { | |
4948 v205 = v172 > v171; | |
4949 v2->field_3C = v172; | |
4950 } | |
4951 else | |
4952 { | |
4953 v204 = 1; | |
4954 v4->field_3C = v171; | |
4955 } | |
4956 } | |
4957 } | |
4958 else | |
4959 { | |
4960 v170 = v170; | |
4961 v2->field_3C += v170; | |
4962 v4->field_3C += v170; | |
4963 if ( v2->field_3C < 0 ) | |
4964 v2->field_3C = 0; | |
4965 if ( v4->field_3C < 0 ) | |
4966 v4->field_3C = 0; | |
4967 v205 = v170; | |
4968 v204 = v170; | |
4969 } | |
4970 } | |
4971 LOBYTE(v173) = v107->field_58[14]; | |
4972 if ( (_BYTE)v173 ) | |
4973 { | |
4974 if ( (_BYTE)v173 == 99 ) | |
4975 { | |
4976 v174 = v2->field_40; | |
4977 v175 = v4->field_40; | |
4978 if ( v174 != v175 ) | |
4979 { | |
4980 if ( v174 <= v175 ) | |
4981 { | |
4982 v2->field_40 = v175; | |
4983 v203 = v175 - v174; | |
4984 } | |
4985 else | |
4986 { | |
4987 v4->field_40 = v174; | |
4988 v202 = v174 - v175; | |
4989 } | |
4990 } | |
4991 } | |
4992 else | |
4993 { | |
4994 v173 = (char)v173; | |
4995 v2->field_40 += (char)v173; | |
4996 v4->field_40 += (char)v173; | |
4997 if ( v2->field_40 < 0 ) | |
4998 v2->field_40 = 0; | |
4999 if ( v4->field_40 < 0 ) | |
5000 v4->field_40 = 0; | |
5001 v203 = v173; | |
5002 v202 = v173; | |
5003 } | |
5004 } | |
5005 v176 = v107->field_58[15]; | |
5006 if ( v176 ) | |
5007 { | |
5008 v177 = am_40D402(v193, v176); | |
5009 v178 = v107->field_58[15]; | |
5010 v196 = v177; | |
5011 v179 = am_40D402(v189, v178); | |
5012 v195 = v179; | |
5013 v180 = v107->field_58[15] - v179; | |
5014 v192 = v107->field_58[15] - v196; | |
5015 v191 = v180; | |
5016 } | |
5017 LOBYTE(v181) = LOBYTE(v107->field_68); | |
5018 if ( (_BYTE)v181 ) | |
5019 { | |
5020 if ( (_BYTE)v181 == 99 ) | |
5021 { | |
5022 v182 = v2->field_28; | |
5023 v183 = v4->field_28; | |
5024 if ( v182 != v183 ) | |
5025 { | |
5026 if ( v182 <= v183 ) | |
5027 { | |
5028 v2->field_28 = v183; | |
5029 v201 = v183 - v182; | |
5030 } | |
5031 else | |
5032 { | |
5033 v4->field_28 = v182; | |
5034 v200 = v182 - v183; | |
5035 } | |
5036 } | |
5037 } | |
5038 else | |
5039 { | |
5040 v181 = (char)v181; | |
5041 v2->field_28 += (char)v181; | |
5042 v4->field_28 += (char)v181; | |
5043 if ( v2->field_28 < 0 ) | |
5044 v2->field_28 = 0; | |
5045 if ( v4->field_28 < 0 ) | |
5046 v4->field_28 = 0; | |
5047 v201 = v181; | |
5048 v200 = v181; | |
5049 } | |
5050 } | |
5051 LOBYTE(v103) = BYTE1(v107->field_68); | |
5052 break; | |
5053 } | |
5054 if ( (_BYTE)v103 ) | |
5055 { | |
5056 if ( (_BYTE)v103 == 99 ) | |
5057 { | |
5058 v184 = v2->field_24; | |
5059 v185 = v4->field_24; | |
5060 if ( v184 != v185 ) | |
5061 { | |
5062 if ( v184 <= v185 ) | |
5063 { | |
5064 v2->field_24 = v185; | |
5065 v199 = v185 - v184; | |
5066 } | |
5067 else | |
5068 { | |
5069 v4->field_24 = v184; | |
5070 v198 = v184 - v185; | |
5071 } | |
5072 } | |
5073 } | |
5074 else | |
5075 { | |
5076 v103 = (char)v103; | |
5077 v2->field_24 += (char)v103; | |
5078 v4->field_24 += (char)v103; | |
5079 if ( v2->field_24 < 0 ) | |
5080 v2->field_24 = 0; | |
5081 if ( v4->field_24 < 0 ) | |
5082 v4->field_24 = 0; | |
5083 v199 = v103; | |
5084 v198 = v103; | |
5085 } | |
5086 } | |
5087 if ( v194 > 0 || v211 > 0 ) | |
5088 ArcomageGame::PlaySound(0x1Eu); | |
5089 if ( v194 < 0 || v211 < 0 ) | |
5090 ArcomageGame::PlaySound(0x1Fu); | |
5091 if ( v210 > 0 || v209 > 0 ) | |
5092 ArcomageGame::PlaySound(0x21u); | |
5093 if ( v210 < 0 || v209 < 0 ) | |
5094 ArcomageGame::PlaySound(0x22u); | |
5095 if ( v208 > 0 || v207 > 0 ) | |
5096 ArcomageGame::PlaySound(0x24u); | |
5097 if ( v208 < 0 || v207 < 0 ) | |
5098 ArcomageGame::PlaySound(0x25u); | |
5099 if ( v197 > 0 || v206 > 0 ) | |
5100 ArcomageGame::PlaySound(0x27u); | |
5101 if ( v197 < 0 || v206 < 0 ) | |
5102 ArcomageGame::PlaySound(0x28u); | |
5103 if ( v205 > 0 || v204 > 0 ) | |
5104 ArcomageGame::PlaySound(0x2Au); | |
5105 if ( v205 < 0 || v204 < 0 ) | |
5106 ArcomageGame::PlaySound(0x2Bu); | |
5107 if ( v203 > 0 || v202 > 0 ) | |
5108 ArcomageGame::PlaySound(0x2Du); | |
5109 if ( v203 < 0 || v202 < 0 ) | |
5110 ArcomageGame::PlaySound(0x2Eu); | |
5111 if ( v192 || v191 || v196 || v195 ) | |
5112 ArcomageGame::PlaySound(0x30u); | |
5113 if ( v201 > 0 || v200 > 0 ) | |
5114 ArcomageGame::PlaySound(0x31u); | |
5115 if ( v201 < 0 || v200 < 0 ) | |
5116 ArcomageGame::PlaySound(0x32u); | |
5117 if ( v199 > 0 || v198 > 0 ) | |
5118 ArcomageGame::PlaySound(0x34u); | |
5119 if ( v199 < 0 || v198 < 0 ) | |
5120 ArcomageGame::PlaySound(0x35u); | |
5121 if ( v193 ) | |
5122 { | |
5123 if ( v194 ) | |
5124 { | |
5125 v187.x = 573; | |
5126 v187.y = 92; | |
5127 am_40D2B4(&v187, v194); | |
5128 } | |
5129 if ( v211 ) | |
5130 { | |
5131 v187.x = 26; | |
5132 v187.y = 92; | |
5133 am_40D2B4(&v187, v211); | |
5134 } | |
5135 if ( v210 ) | |
5136 { | |
5137 v187.x = 573; | |
5138 v187.y = 164; | |
5139 am_40D2B4(&v187, v210); | |
5140 } | |
5141 if ( v209 ) | |
5142 { | |
5143 v187.x = 26; | |
5144 v187.y = 164; | |
5145 am_40D2B4(&v187, v209); | |
5146 } | |
5147 if ( v208 ) | |
5148 { | |
5149 v187.x = 573; | |
5150 v187.y = 236; | |
5151 am_40D2B4(&v187, v208); | |
5152 } | |
5153 if ( v207 ) | |
5154 { | |
5155 v187.x = 26; | |
5156 v187.y = 236; | |
5157 am_40D2B4(&v187, v207); | |
5158 } | |
5159 if ( v197 ) | |
5160 { | |
5161 v187.x = 563; | |
5162 v187.y = 114; | |
5163 am_40D2B4(&v187, v197); | |
5164 } | |
5165 if ( v206 ) | |
5166 { | |
5167 v187.x = 16; | |
5168 v187.y = 114; | |
5169 am_40D2B4(&v187, v206); | |
5170 } | |
5171 if ( v205 ) | |
5172 { | |
5173 v187.x = 563; | |
5174 v187.y = 186; | |
5175 am_40D2B4(&v187, v205); | |
5176 } | |
5177 if ( v204 ) | |
5178 { | |
5179 v187.x = 16; | |
5180 v187.y = 186; | |
5181 am_40D2B4(&v187, v204); | |
5182 } | |
5183 if ( v203 ) | |
5184 { | |
5185 v187.x = 563; | |
5186 v187.y = 258; | |
5187 am_40D2B4(&v187, v203); | |
5188 } | |
5189 if ( v202 ) | |
5190 { | |
5191 v187.x = 16; | |
5192 v187.y = 258; | |
5193 am_40D2B4(&v187, v202); | |
5194 } | |
5195 v186 = 296; | |
5196 if ( v201 ) | |
5197 { | |
5198 v187.x = 442; | |
5199 v187.y = 296; | |
5200 am_40D2B4(&v187, v201); | |
5201 } | |
5202 if ( v200 ) | |
5203 { | |
5204 v187.x = 180; | |
5205 v187.y = 296; | |
5206 am_40D2B4(&v187, v200); | |
5207 } | |
5208 if ( v199 ) | |
5209 { | |
5210 v187.x = 514; | |
5211 v187.y = 296; | |
5212 am_40D2B4(&v187, v199); | |
5213 } | |
5214 if ( v198 ) | |
5215 { | |
5216 v187.x = 122; | |
5217 v187.y = 296; | |
5218 am_40D2B4(&v187, v198); | |
5219 } | |
5220 if ( v196 ) | |
5221 { | |
5222 v187.x = 442; | |
5223 v187.y = 296; | |
5224 am_40D2B4(&v187, v196); | |
5225 } | |
5226 if ( v192 ) | |
5227 { | |
5228 v187.x = 514; | |
5229 v187.y = 296; | |
5230 am_40D2B4(&v187, v192); | |
5231 } | |
5232 if ( v195 ) | |
5233 { | |
5234 v187.x = 180; | |
5235 v187.y = 296; | |
5236 am_40D2B4(&v187, v195); | |
5237 } | |
5238 if ( v191 ) | |
5239 { | |
5240 v187.x = 122; | |
5241 goto LABEL_567; | |
5242 } | |
5243 } | |
5244 else | |
5245 { | |
5246 if ( v194 ) | |
5247 { | |
5248 v187.x = 26; | |
5249 v187.y = 92; | |
5250 am_40D2B4(&v187, v194); | |
5251 } | |
5252 if ( v211 ) | |
5253 { | |
5254 v187.x = 573; | |
5255 v187.y = 92; | |
5256 am_40D2B4(&v187, v211); | |
5257 } | |
5258 if ( v210 ) | |
5259 { | |
5260 v187.x = 26; | |
5261 v187.y = 164; | |
5262 am_40D2B4(&v187, v210); | |
5263 } | |
5264 if ( v209 ) | |
5265 { | |
5266 v187.x = 573; | |
5267 v187.y = 164; | |
5268 am_40D2B4(&v187, v209); | |
5269 } | |
5270 if ( v208 ) | |
5271 { | |
5272 v187.x = 26; | |
5273 v187.y = 236; | |
5274 am_40D2B4(&v187, v208); | |
5275 } | |
5276 if ( v207 ) | |
5277 { | |
5278 v187.x = 573; | |
5279 v187.y = 236; | |
5280 am_40D2B4(&v187, v207); | |
5281 } | |
5282 if ( v197 ) | |
5283 { | |
5284 v187.x = 16; | |
5285 v187.y = 114; | |
5286 am_40D2B4(&v187, v197); | |
5287 } | |
5288 if ( v206 ) | |
5289 { | |
5290 v187.x = 563; | |
5291 v187.y = 114; | |
5292 am_40D2B4(&v187, v206); | |
5293 } | |
5294 if ( v205 ) | |
5295 { | |
5296 v187.x = 16; | |
5297 v187.y = 186; | |
5298 am_40D2B4(&v187, v205); | |
5299 } | |
5300 if ( v204 ) | |
5301 { | |
5302 v187.x = 563; | |
5303 v187.y = 186; | |
5304 am_40D2B4(&v187, v204); | |
5305 } | |
5306 if ( v203 ) | |
5307 { | |
5308 v187.x = 16; | |
5309 v187.y = 258; | |
5310 am_40D2B4(&v187, v203); | |
5311 } | |
5312 if ( v202 ) | |
5313 { | |
5314 v187.x = 563; | |
5315 v187.y = 258; | |
5316 am_40D2B4(&v187, v202); | |
5317 } | |
5318 v186 = 296; | |
5319 if ( v201 ) | |
5320 { | |
5321 v187.x = 180; | |
5322 v187.y = 296; | |
5323 am_40D2B4(&v187, v201); | |
5324 } | |
5325 if ( v200 ) | |
5326 { | |
5327 v187.x = 442; | |
5328 v187.y = 296; | |
5329 am_40D2B4(&v187, v200); | |
5330 } | |
5331 if ( v199 ) | |
5332 { | |
5333 v187.x = 122; | |
5334 v187.y = 296; | |
5335 am_40D2B4(&v187, v199); | |
5336 } | |
5337 if ( v198 ) | |
5338 { | |
5339 v187.x = 514; | |
5340 v187.y = 296; | |
5341 am_40D2B4(&v187, v198); | |
5342 } | |
5343 if ( v196 ) | |
5344 { | |
5345 v187.x = 180; | |
5346 v187.y = 296; | |
5347 am_40D2B4(&v187, v196); | |
5348 } | |
5349 if ( v192 ) | |
5350 { | |
5351 v187.x = 122; | |
5352 v187.y = 296; | |
5353 am_40D2B4(&v187, v192); | |
5354 } | |
5355 if ( v195 ) | |
5356 { | |
5357 v187.x = 442; | |
5358 v187.y = 296; | |
5359 am_40D2B4(&v187, v195); | |
5360 } | |
5361 if ( v191 ) | |
5362 { | |
5363 v187.x = 514; | |
5364 LABEL_567: | |
5365 v187.y = v186; | |
5366 am_40D2B4(&v187, v191); | |
5367 return; | |
5368 } | |
5369 } | |
5370 } | |
5371 | |
5372 | |
5373 | |
5374 | |
5375 //----- (0040D2B4) -------------------------------------------------------- | |
5376 int __fastcall am_40D2B4(Vec2_int_ *a1, int a2) | |
5377 { | |
5378 int v2; // ebp@1 | |
5379 Vec2_int_ *v3; // edi@1 | |
5380 char *v4; // ebx@1 | |
5381 int result; // eax@3 | |
5382 unsigned int v6; // esi@7 | |
5383 stru272_stru0 *v7; // ecx@10 | |
5384 stru272_stru0 *v8; // ecx@12 | |
5385 int v9; // edx@17 | |
5386 int v10; // ecx@17 | |
5387 signed int v11; // [sp+10h] [bp-8h]@1 | |
5388 stru272_stru0 **v12; // [sp+14h] [bp-4h]@1 | |
5389 | |
5390 v11 = 0; | |
5391 v2 = a2; | |
5392 v3 = a1; | |
5393 v4 = byte_4FABD0; | |
5394 v12 = (stru272_stru0 **)array_4FAC10; | |
5395 while ( *v4 ) | |
5396 { | |
5397 result = (*v12)->_40E2A7(); | |
5398 if ( !result ) | |
5399 { | |
5400 *v4 = 0; | |
5401 --v11; | |
5402 v12 -= 1067; | |
5403 v4 -= 4268; | |
5404 } | |
5405 ++v11; | |
5406 v12 += 1067; | |
5407 v4 += 4268; | |
5408 if ( v11 >= 10 ) | |
5409 return result; | |
5410 } | |
5411 v6 = 4268 * v11; | |
5412 byte_4FABD0[4268 * v11] = 1; | |
5413 if ( v2 <= 0 ) | |
5414 { | |
5415 byte_4FABD1[v6] = 0; | |
5416 v2 = -v2; | |
5417 } | |
5418 else | |
5419 { | |
5420 byte_4FABD1[v6] = 1; | |
5421 } | |
5422 *(unsigned int *)((char *)&unk_4FABD4 + v6) = v3->x - 20; | |
5423 dword_4FABDC[v6 / 4] = v3->x + 20; | |
5424 dword_4FABD8[v6 / 4] = v3->y - 20; | |
5425 dword_4FABE0[v6 / 4] = v3->y + 20; | |
5426 v7 = array_4FAC10[v6 / 0x10AC].ptr_0; | |
5427 dword_4FABE4[v6 / 4] = -60; | |
5428 dword_4FABE8[v6 / 4] = 60; | |
5429 dword_4FABEC[v6 / 4] = 180; | |
5430 dword_4FABF0[v6 / 4] = 0x3F000000u; | |
5431 dword_4FABF4[v6 / 4] = 150; | |
5432 dword_4FABF8[v6 / 4] = 0x42480000u; | |
5433 dword_4FABFC[v6 / 4] = 0x40400000u; | |
5434 dword_4FAC00[v6 / 4] = 0x41000000u; | |
5435 dword_4FAC04[v6 / 4] = 5; | |
5436 dword_4FAC08[v6 / 4] = 15; | |
5437 dword_4FAC0C[v6 / 4] = (int)array_4FAC10[v6 / 0x10AC].field_4; | |
5438 v7->_40E01A((int)((char *)&unk_4FABD4 + v6)); | |
5439 if ( 10 * v2 > 150 ) | |
5440 v2 = 15; | |
5441 v8 = array_4FAC10[v6 / 0x10AC].ptr_0; | |
5442 if ( v8->field_0 != 0x67707274 ) | |
5443 return 2; | |
5444 if ( !v8->field_59 ) | |
5445 return 3; | |
5446 v8->field_8 = 10 * v2; | |
5447 v9 = v8->field_4; | |
5448 v8->field_30 = 0.0; | |
5449 v8->field_58 = 0; | |
5450 v8->field_44 = 0; | |
5451 v8->field_4C = 0; | |
5452 v8->field_48 = 0; | |
5453 v8->field_50 = 0; | |
5454 v10 = v8->field_54; | |
5455 do | |
5456 { | |
5457 *(unsigned int *)v10 = 0; | |
5458 v10 += 28; | |
5459 --v9; | |
5460 } | |
5461 while ( v9 ); | |
5462 return 0; | |
5463 } | |
5464 // 40D2B4: using guessed type int __fastcall am_40D2B4(uint, uint); | |
5465 // 4FABD8: using guessed type int dword_4FABD8[]; | |
5466 // 4FABDC: using guessed type int dword_4FABDC[]; | |
5467 // 4FABE0: using guessed type int dword_4FABE0[]; | |
5468 // 4FABE4: using guessed type int dword_4FABE4[]; | |
5469 // 4FABE8: using guessed type int dword_4FABE8[]; | |
5470 // 4FABEC: using guessed type int dword_4FABEC[]; | |
5471 // 4FABF0: using guessed type int dword_4FABF0[]; | |
5472 // 4FABF4: using guessed type int dword_4FABF4[]; | |
5473 // 4FABF8: using guessed type int dword_4FABF8[]; | |
5474 // 4FABFC: using guessed type int dword_4FABFC[]; | |
5475 // 4FAC00: using guessed type int dword_4FAC00[]; | |
5476 // 4FAC04: using guessed type int dword_4FAC04[]; | |
5477 // 4FAC08: using guessed type int dword_4FAC08[]; | |
5478 // 4FAC0C: using guessed type int dword_4FAC0C[]; | |
5479 | |
5480 //----- (0040D402) -------------------------------------------------------- | |
5481 int __fastcall am_40D402(int a1, int a2) | |
5482 { | |
5483 ArcomageGame_stru0 *v2; // ecx@1 | |
5484 int v3; // esi@1 | |
5485 int result; // eax@3 | |
5486 | |
5487 v2 = &stru_505708[a1]; | |
5488 v3 = v2->field_28; | |
5489 if ( v3 <= 0 ) | |
5490 { | |
5491 result = 0; | |
5492 } | |
5493 else | |
5494 { | |
5495 if ( v3 >= -a2 ) | |
5496 { | |
5497 result = a2; | |
5498 v2->field_28 = a2 + v3; | |
5499 goto LABEL_7; | |
5500 } | |
5501 a2 += v3; | |
5502 result = -v3; | |
5503 v2->field_28 = 0; | |
5504 } | |
5505 v2->field_24 += a2; | |
5506 LABEL_7: | |
5507 if ( v2->field_24 < 0 ) | |
5508 v2->field_24 = 0; | |
5509 return result; | |
5510 } | |
5511 // 40D402: using guessed type int __fastcall am_40D402(uint, uint); | |
5512 | |
5513 //----- (0040D444) -------------------------------------------------------- | |
5514 int __cdecl am_40D444() | |
5515 { | |
5516 int v0; // esi@1 | |
5517 int v1; // edi@1 | |
5518 int v2; // eax@1 | |
5519 int v3; // eax@23 | |
5520 int v4; // edx@25 | |
5521 int v5; // ecx@28 | |
5522 int v6; // eax@28 | |
5523 GUIWindow *v7; // ecx@50 | |
5524 signed int v8; // eax@50 | |
5525 char *v9; // eax@52 | |
5526 signed int v10; // eax@54 | |
5527 char *v11; // esi@59 | |
5528 char *v12; // esi@65 | |
5529 signed int v14; // [sp-4h] [bp-58h]@46 | |
5530 char pText[64]; // [sp+Ch] [bp-48h]@1 | |
5531 int xy[2]; // [sp+4Ch] [bp-8h]@1 | |
5532 | |
5533 v0 = -1; | |
5534 v1 = -1; | |
5535 //nullsub_1(); | |
5536 xy[0] = 0; | |
5537 xy[1] = 0; | |
5538 inv_strcpy("Ïîáåäè", pText); | |
5539 v2 = 0; | |
5540 xy[1] = 160; | |
5541 xy[0] = 320 - 12 * v2 / 2; | |
5542 pPrimaryWindow_draws_text(-1, pText, xy); | |
5543 if ( stru_505708[0].field_24 < dword_4E1884 ) | |
5544 { | |
5545 if ( stru_505708[1].field_24 < dword_4E1884 ) | |
5546 goto LABEL_10; | |
5547 v0 = 2; | |
5548 } | |
5549 else | |
5550 { | |
5551 if ( stru_505708[1].field_24 < dword_4E1884 ) | |
5552 { | |
5553 v0 = 1; | |
5554 } | |
5555 else | |
5556 { | |
5557 if ( stru_505708[0].field_24 == stru_505708[1].field_24 ) | |
5558 { | |
5559 v0 = 0; | |
5560 v1 = 4; | |
5561 goto LABEL_10; | |
5562 } | |
5563 v0 = (stru_505708[0].field_24 <= stru_505708[1].field_24) + 1; | |
5564 } | |
5565 } | |
5566 v1 = 0; | |
5567 LABEL_10: | |
5568 if ( stru_505708[0].field_24 <= 0 ) | |
5569 { | |
5570 if ( stru_505708[1].field_24 > 0 ) | |
5571 { | |
5572 v0 = 2; | |
5573 } | |
5574 else | |
5575 { | |
5576 if ( stru_505708[0].field_24 == stru_505708[1].field_24 ) | |
5577 { | |
5578 LABEL_20: | |
5579 if ( stru_505708[0].field_28 == stru_505708[1].field_28 ) | |
5580 { | |
5581 v0 = 0; | |
5582 v1 = 4; | |
5583 } | |
5584 else | |
5585 { | |
5586 v0 = (stru_505708[0].field_28 <= stru_505708[1].field_28) + 1; | |
5587 v1 = 1; | |
5588 } | |
5589 goto LABEL_23; | |
5590 } | |
5591 v0 = (stru_505708[0].field_24 <= stru_505708[1].field_24) + 1; | |
5592 } | |
5593 goto LABEL_17; | |
5594 } | |
5595 if ( stru_505708[1].field_24 <= 0 ) | |
5596 { | |
5597 v0 = 1; | |
5598 LABEL_17: | |
5599 v1 = 2; | |
5600 } | |
5601 if ( !v0 && v1 == 4 ) | |
5602 goto LABEL_20; | |
5603 LABEL_23: | |
5604 v3 = stru_505708[0].field_38; | |
5605 if ( stru_505708[0].field_38 <= stru_505708[0].field_3C ) | |
5606 { | |
5607 v3 = stru_505708[0].field_40; | |
5608 v4 = stru_505708[0].field_3C; | |
5609 if ( stru_505708[0].field_3C > stru_505708[0].field_40 ) | |
5610 goto LABEL_28; | |
5611 } | |
5612 else | |
5613 { | |
5614 if ( stru_505708[0].field_38 <= stru_505708[0].field_40 ) | |
5615 { | |
5616 v4 = stru_505708[0].field_40; | |
5617 goto LABEL_28; | |
5618 } | |
5619 } | |
5620 v4 = v3; | |
5621 LABEL_28: | |
5622 v5 = stru_505708[1].field_38; | |
5623 v6 = stru_505708[1].field_3C; | |
5624 if ( stru_505708[1].field_38 <= stru_505708[1].field_3C ) | |
5625 { | |
5626 v5 = stru_505708[1].field_40; | |
5627 if ( stru_505708[1].field_3C > stru_505708[1].field_40 ) | |
5628 goto LABEL_33; | |
5629 goto LABEL_32; | |
5630 } | |
5631 v6 = stru_505708[1].field_40; | |
5632 if ( stru_505708[1].field_38 > stru_505708[1].field_40 ) | |
5633 LABEL_32: | |
5634 v6 = v5; | |
5635 LABEL_33: | |
5636 if ( v0 == -1 ) | |
5637 { | |
5638 if ( v1 != -1 ) | |
5639 goto LABEL_49; | |
5640 if ( v4 < dword_4E1888 ) | |
5641 { | |
5642 if ( v6 < dword_4E1888 ) | |
5643 goto LABEL_49; | |
5644 v0 = 2; | |
5645 } | |
5646 else | |
5647 { | |
5648 if ( v6 < dword_4E1888 ) | |
5649 { | |
5650 v0 = 1; | |
5651 } | |
5652 else | |
5653 { | |
5654 if ( v4 == v6 ) | |
5655 goto LABEL_46; | |
5656 v0 = (v4 <= v6) + 1; | |
5657 } | |
5658 } | |
5659 v1 = 3; | |
5660 } | |
5661 if ( !v0 && v1 == 4 ) | |
5662 { | |
5663 if ( v4 != v6 ) | |
5664 { | |
5665 v14 = 5; | |
5666 v0 = (v4 <= v6) + 1; | |
5667 goto LABEL_48; | |
5668 } | |
5669 LABEL_46: | |
5670 v0 = 0; | |
5671 v14 = 4; | |
5672 LABEL_48: | |
5673 v1 = v14; | |
5674 } | |
5675 LABEL_49: | |
5676 pArcomageGame->field_B0 = v1; | |
5677 pArcomageGame->uGameResult = v0; | |
5678 if ( v0 == 1 ) | |
5679 { | |
336 | 5680 v7 = window_SpeakInHouse; |
5681 v8 = (signed int)window_SpeakInHouse->ptr_1C; | |
0 | 5682 if ( v8 >= 108 ) |
5683 { | |
5684 if ( v8 <= 120 ) | |
5685 { | |
5686 v9 = (char *)&pParty->uNumGoldInBank + v8 + 1; | |
5687 if ( !*v9 ) | |
5688 { | |
5689 *v9 = 1; | |
5690 | |
5691 //auto _a = (signed __int64)(p2DEvents_minus1__20[13 * (unsigned int)v7->ptr_1C] * 100.0); | |
5692 auto _a = (signed __int64)(p2DEvents[(unsigned int)v7->ptr_1C - 1].fPriceMultiplier * 100.0); | |
5693 party_finds_gold(_a, 0); | |
5694 } | |
5695 } | |
5696 } | |
5697 v10 = 108; | |
5698 do | |
5699 { | |
5700 if ( !*((unsigned char *)&pParty->uNumGoldInBank + v10 + 1) ) | |
5701 break; | |
5702 ++v10; | |
5703 } | |
5704 while ( v10 <= 120 ); | |
5705 if ( v10 == 121 ) | |
484 | 5706 _449B7E_toggle_bit(pParty->_quest_bits, 238, 1u); |
735 | 5707 v11 = (char *)pParty->pPlayers[0]._guilds_member_bits; |
0 | 5708 do |
5709 { | |
5710 if ( !(unsigned __int16)_449B57_test_bit((unsigned __int8 *)v11, 1) ) | |
949 | 5711 _449B7E_toggle_bit((unsigned char *)v11, PLAYER_GUILD_BITS__ARCOMAGE_WIN, 1); |
0 | 5712 v11 += 6972; |
5713 } | |
463 | 5714 while ( (signed int)v11 < (signed int)((char *)&pParty->StandartItemsInShops[36] + 2) ); |
949 | 5715 ++pParty->uNumArcomageWins; |
5716 if ( pParty->uNumArcomageWins > 1000000 ) | |
5717 pParty->uNumArcomageWins = 1000000; | |
0 | 5718 } |
5719 else | |
5720 { | |
735 | 5721 v12 = (char *)pParty->pPlayers[0]._guilds_member_bits; |
0 | 5722 do |
5723 { | |
5724 if ( !(unsigned __int16)_449B57_test_bit((unsigned __int8 *)v12, 1) ) | |
949 | 5725 _449B7E_toggle_bit((unsigned char *)v12, PLAYER_GUILD_BITS__ARCOMAGE_LOSE, 1); |
0 | 5726 v12 += 6972; |
5727 } | |
463 | 5728 while ( (signed int)v12 < (signed int)((char *)&pParty->StandartItemsInShops[36] + 2) ); |
949 | 5729 ++pParty->uNumArcomageLoses; |
5730 if ( pParty->uNumArcomageLoses > 1000000 ) | |
5731 pParty->uNumArcomageLoses = 1000000; | |
0 | 5732 } |
5733 return 0; | |
5734 } | |
5735 | |
5736 | |
5737 | |
5738 //----- (00409C8B) -------------------------------------------------------- | |
5739 void __cdecl PrepareArcomage() | |
5740 { | |
5741 int v0; // ecx@3 | |
5742 signed __int64 v1; // qax@4 | |
5743 int v2; // esi@4 | |
5744 __int16 *v3; // esi@5 | |
5745 signed int v4; // edi@5 | |
5746 stru272 *v5; // esi@7 | |
5747 int v6; // edx@9 | |
5748 int v7; // ecx@9 | |
5749 int pXYZW[4]; // [sp+8h] [bp-1Ch]@5 | |
5750 int pXY[2]; // [sp+18h] [bp-Ch]@5 | |
5751 int v10; // [sp+20h] [bp-4h]@3 | |
5752 | |
5753 pAudioPlayer->StopChannels(-1, -1); | |
5754 strcpy(pArcomageGame->pPlayer1Name, pArcomagePlayer1Name); | |
5755 strcpy(pArcomageGame->pPlayer2Name, pArcomagePlayer2Name); | |
5756 am_byte_4FAA76 = 0; | |
5757 am_byte_4FAA75 = 0; | |
5758 v10 = 1; | |
5759 v0 = (int)am_byte_4FAA7C; | |
5760 do | |
5761 { | |
5762 v1 = v10; | |
5763 *(int *)(v0 - 4) = -1; | |
5764 *(char *)v0 = 0; | |
5765 v0 += 32; | |
5766 v2 = 138 * (unsigned __int64)(v1 / 4) + 18; | |
5767 HIDWORD(v1) = 100 * (unsigned __int64)(v1 % 4) + 120; | |
5768 *(int *)(v0 - 28) = HIDWORD(v1); | |
5769 *(int *)(v0 - 24) = v2; | |
5770 *(int *)(v0 - 20) = (120 - HIDWORD(v1)) / 5; | |
5771 ++v10; | |
5772 *(int *)(v0 - 16) = (18 - v2) / 5; | |
5773 *(int *)(v0 - 12) = *(int *)(v0 - 28); | |
5774 *(int *)(v0 - 8) = *(int *)(v0 - 24); | |
5775 } | |
5776 while ( v10 - 1 < 10 ); | |
5777 pXY[0] = 0; | |
5778 pXY[1] = 0; | |
5779 ArcomageGame::LoadBackground(); | |
5780 pXYZW[0] = 0; | |
5781 pXYZW[2] = 640; | |
5782 pXYZW[1] = 0; | |
5783 pXYZW[3] = 480; | |
5784 am_BeginScene(pArcomageGame->pBackgroundPixels, -1, 1); | |
5785 Blt_Copy((ArcomageRect *)pXYZW, pXY, 2); | |
5786 am_EndScene(); | |
5787 pRenderer->Present(); | |
5788 ArcomageGame::LoadSprites(); | |
5789 CallRenderPresent(); | |
5790 v3 = am_sounds; | |
5791 v4 = 120; | |
5792 do | |
5793 { | |
5794 *v3 = pSoundList->LoadSound(v4++, 0); | |
5795 ++v3; | |
5796 } | |
5797 while ( (signed int)v3 <= (signed int)&unk_4FAA20 ); | |
5798 v5 = array_4FAC10; | |
5799 do | |
5800 { | |
5801 v5->_40DFD1(); | |
5802 ++v5; | |
5803 } | |
5804 while ( (signed int)v5 < (signed int)&unk_5052C8 ); | |
5805 dword_4FABBC = -1; | |
5806 amuint_4FAA4C = -1; | |
5807 byte_4FAA74 = 0; | |
5808 pArcomageGame->field_F4 = 0; | |
5809 byte_4FAA2C = 0; | |
5810 byte_505880 = 0; | |
5811 dword_4FAA70 = 0; | |
5812 am_byte_4FAA77 = 0; | |
5813 am_409FE9(); | |
5814 am_40A255(v7, v6); | |
5815 //nullsub_1(); | |
5816 pArcomageGame->field_F5 = 0; | |
5817 pArcomageGame->pFont1 = pFontComic; | |
5818 pArcomageGame->pFont2 = pFontArrus; | |
5819 } | |
5820 | |
5821 | |
5822 //----- (0040D711) -------------------------------------------------------- | |
5823 ArcomageGame::ArcomageGame() | |
5824 { | |
5825 ArcomageGame *v1; // esi@1 | |
5826 | |
5827 v1 = this; | |
5828 this->field_4 = 0; | |
5829 //RGBTexture::RGBTexture(&this->pGameBackground); | |
5830 //RGBTexture::RGBTexture(&v1->pSprites); | |
5831 v1->bGameInProgress = 0; | |
5832 v1->field_F9 = 0; | |
5833 } | |
938 | 5834 |
5835 | |
5836 | |
5837 | |
5838 | |
5839 | |
5840 //----- (00409BE8) -------------------------------------------------------- | |
5841 void __cdecl sub_409BE8() | |
5842 { | |
5843 void *v0; // eax@1 | |
5844 stru348 *v1; // eax@1 | |
5845 int v2; // ecx@1 | |
5846 int v3; // eax@1 | |
5847 | |
5848 v0 = window_SpeakInHouse->ptr_1C; | |
5849 dword_4E1874 = 5; | |
5850 v1 = &stru_4E1890[(int)((char *)v0 - 108)]; | |
5851 amuint_4E1860 = v1->field_4; | |
5852 amuint_4E1864 = v1->field_6; | |
5853 amuint_4E1868 = v1->field_8 - 1; | |
5854 amuint_4E186C = v1->field_A - 1; | |
5855 amuint_4E1870 = v1->field_C - 1; | |
5856 amuint_505884 = v1->field_E; | |
5857 amuint_505888 = v1->field_10; | |
5858 amuint_50588C = v1->field_12; | |
5859 dword_4E1878 = 1; | |
5860 dword_4E187C = 1; | |
5861 dword_4E1880 = 1; | |
5862 dword_4E1884 = v1->field_0; | |
5863 v2 = v1->field_2; | |
5864 v3 = v1->field_14; | |
5865 dword_4E1888 = v2; | |
5866 dword_4DF3A4 = v3; | |
5867 } |