annotate Arcomage.cpp @ 1165:29a8defbad9e

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