annotate Arcomage.cpp @ 23:509744251c8e

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