annotate Arcomage.cpp @ 1191:f30e67ca6f72

m
author Ritor1
date Fri, 07 Jun 2013 13:20:59 +0600
parents 569216b4f54d
children 9baf16113199
rev   line source
1165
29a8defbad9e temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents: 1138
diff changeset
1 #ifdef _MSC_VER
29a8defbad9e temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents: 1138
diff changeset
2 #define _CRT_SECURE_NO_WARNINGS
29a8defbad9e temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents: 1138
diff changeset
3 #endif
29a8defbad9e temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents: 1138
diff changeset
4
0
Ritor1
parents:
diff changeset
5 #include <string>
1033
3a5c8df8381d * UI cleans and moves
Nomad
parents: 1016
diff changeset
6 #include <assert.h>
0
Ritor1
parents:
diff changeset
7
1016
c45d51b3f4f4 Included header files cleanup
Grumpy7
parents: 949
diff changeset
8 #include "LightmapBuilder.h"
0
Ritor1
parents:
diff changeset
9 #include "Arcomage.h"
Ritor1
parents:
diff changeset
10 #include "VideoPlayer.h"
Ritor1
parents:
diff changeset
11 #include "AudioPlayer.h"
Ritor1
parents:
diff changeset
12 #include "Mouse.h"
Ritor1
parents:
diff changeset
13 #include "Game.h"
Ritor1
parents:
diff changeset
14 #include "Viewport.h"
Ritor1
parents:
diff changeset
15 #include "Time.h"
Ritor1
parents:
diff changeset
16 #include "GUIFont.h"
Ritor1
parents:
diff changeset
17 #include "Party.h"
Ritor1
parents:
diff changeset
18 #include "GUIWindow.h"
Ritor1
parents:
diff changeset
19 #include "Events2D.h"
Ritor1
parents:
diff changeset
20 #include "VectorTypes.h"
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 0
diff changeset
21 #include "texts.h"
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
22 #include <windef.h>
0
Ritor1
parents:
diff changeset
23
Ritor1
parents:
diff changeset
24
Ritor1
parents:
diff changeset
25
938
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
26 void sub_409BE8();
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
27
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
28
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
29 void am_409FE9();
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
30 char __cdecl am_40A198();
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
31 void am_40A255();
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
32 void am_40A283(int a1);
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
33 int GetEmptyCardSlotIndex(int player_num);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
34 void am_40A346(int player_num);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
35 void __cdecl am_40A383();
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
36 bool am_40A514();
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
37 char __thiscall am_40A560(unsigned int _this);
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
38 void am_blts(int a1); // idb
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
39 void am_40AA4E();
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
40 void __cdecl am_chroma_blts();
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
41 void __cdecl am_DrawUI();
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
42 void __fastcall am_40B102(int a1, char *a2, POINT *pXY); // idb
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
43 void am_40B17E(int a1, char* a2, POINT *pXY); // idb
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
44 void am_40B1F3(int a1, char* a2, POINT* a3);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
45 void am_40B268(int a1, char *a2, POINT *pXY); // idb
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
46 void __cdecl am_chroma_and_copy_blts();
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
47 void __cdecl am_chroma_blt();
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
48 void __cdecl am_40B4B9();
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
49 void __fastcall am_40B76F(int a1);
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
50 int GetPlayerHandCardCount(int player_num);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
51 signed int __fastcall am_40BB67(int a1);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
52 char __fastcall am_40BCFB(int a1, signed int a2);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
53 bool __fastcall am_40BE0E(int a1, signed int a2);
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
54 bool am_40BF15(int player_num, int hand_card_indx);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
55 void __fastcall am_40BF77(int a1, unsigned int uCardID); // idb
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
56 int am_40D2B4(POINT* a1, int a2); // weak
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
57 int __fastcall am_40D402(int, int); // weak
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
58 int __cdecl am_40D444();
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
59
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
60 void pPrimaryWindow_draws_text(int a1, const char *pText, POINT *pXY);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
61 void __thiscall am_BeginScene(unsigned __int16 *pPcxPixels, int a2, int a3); // idb
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
62 void __fastcall Blt_Chroma(RECT *pSrcXYZW, POINT *pTargetXY, int a3, int a4);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
63 void Blt_Copy(RECT *pSrcRect, POINT *pTargetXY, int a3);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
64 void __cdecl am_EndScene();
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
65 void __fastcall DrawRect(RECT *pXYZW, unsigned __int16 uColor, char bSolidFill); // idb
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
66 void SetPixel(POINT *pTargetXY, unsigned __int16 uColor);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
67 int __fastcall rand_interval(int a, int b); // idb
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
68 char *__fastcall inv_strcat(const char *Source, char *Dest);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
69 char *__fastcall inv_strcpy(const char *Source, char *Dest);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
70 void __fastcall intToString(int val, char *pOut);
938
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
71
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
72 /* 388 */
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
73 #pragma pack(push, 1)
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
74 struct stru348
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
75 {
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
76 __int16 field_0;
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
77 __int16 field_2;
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
78 __int16 field_4;
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
79 __int16 field_6;
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
80 __int16 field_8;
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
81 __int16 field_A;
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
82 __int16 field_C;
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
83 __int16 field_E;
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
84 __int16 field_10;
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
85 __int16 field_12;
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
86 int field_14;
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
87 };
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
88 #pragma pack(pop)
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
89 stru348 stru_4E1890[13] =
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
90 {
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
91 { 30, 100, 15, 5, 2, 2, 2, 10, 10, 10, 0},
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
92 { 50, 150, 20, 5, 2, 2, 2, 5, 5, 5, 1},
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
93 { 50, 150, 20, 5, 2, 2, 2, 5, 5, 5, 2},
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
94 { 75, 200, 25, 10, 3, 3, 3, 5, 5, 5, 2},
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
95 { 75, 200, 20, 10, 3, 3, 3, 5, 5, 5, 1},
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
96 {100, 300, 30, 15, 4, 4, 4, 10, 10, 10, 1},
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
97 {100, 300, 30, 15, 4, 4, 4, 10, 10, 10, 2},
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
98 {150, 400, 20, 10, 5, 5, 5, 25, 25, 25, 0},
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
99 {200, 500, 20, 10, 1, 1, 1, 15, 15, 15, 2},
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
100 {100, 300, 20, 50, 1, 1, 5, 5, 5, 25, 0},
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
101 {125, 350, 10, 20, 3, 1, 2, 15, 5, 10, 2},
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
102 {125, 350, 10, 20, 3, 1, 2, 15, 5, 10, 1},
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
103 {100, 300, 50, 50, 5, 3, 5, 20, 10, 20, 0}
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
104 };
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
105
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
106 #define SIG_trpg 0x67707274
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
107 #define SIG_xxxx 0x78787878
0
Ritor1
parents:
diff changeset
108
Ritor1
parents:
diff changeset
109 ArcomageGame *pArcomageGame = new ArcomageGame;
1191
Ritor1
parents: 1186
diff changeset
110 //ArcomageCard pCards[87];
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
111 ArcomagePlayer am_Players[2];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
112
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
113 Acromage_st1 struct_st1[10];
0
Ritor1
parents:
diff changeset
114
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
115 stru272 array_4FABD0[10];
935
b462b598b97a stru272.h removed, stuff moved to arcomage
Nomad
parents: 856
diff changeset
116
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
117 char byte_5052A8[108];
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
118 int dword_505314[108]; // weak
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
119
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
120 char byte_5054C8[32]; // idb
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
121 char byte_5054E8[108];
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
122 int dword_505554[108];
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
123
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
124 char pArcomagePlayer2Name[8];
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
125 char pArcomagePlayer1Name[8];
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
126 char pDeckMaster[12];
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
127
0
Ritor1
parents:
diff changeset
128
Ritor1
parents:
diff changeset
129 /* 267 */
Ritor1
parents:
diff changeset
130 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
131 struct stru273
Ritor1
parents:
diff changeset
132 {
Ritor1
parents:
diff changeset
133 bool _40DD2F();
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
134 bool Inside(RECT*pXYZW);
0
Ritor1
parents:
diff changeset
135
Ritor1
parents:
diff changeset
136 int x;
Ritor1
parents:
diff changeset
137 int y;
Ritor1
parents:
diff changeset
138 char field_8;
Ritor1
parents:
diff changeset
139 char field_9;
Ritor1
parents:
diff changeset
140 char field_A;
Ritor1
parents:
diff changeset
141 char field_B;
Ritor1
parents:
diff changeset
142 };
Ritor1
parents:
diff changeset
143 #pragma pack(pop)
Ritor1
parents:
diff changeset
144
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
145
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
146
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
147 char am_byte_4E185D; // weak
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
148
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
149 int amuint_4E1860; // weak
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
150 int amuint_4E1864; // weak
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
151 int amuint_4E1868; // weak
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
152 int amuint_4E186C; // weak
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
153 int amuint_4E1870; // weak
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
154
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
155
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
156 int dword_4E1874 = 5; // weak
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
157 int dword_4E1878 = 1; // weak
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
158 int dword_4E187C = 1; // weak
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
159 int dword_4E1880 = 1; // weak
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
160 int dword_4E1884 = 50; // weak
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
161 int dword_4E1888 = 100 ; // weak
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
162
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
163 int dword_4DF3A4; // weak
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
164
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
165 char byte_4FAA2C; // weak
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
166 char byte_4FAA2D; // weak
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
167
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
168 int amuint_4FAA6C; // idb
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
169 char am_byte_4FAA77; // weak
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
170
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
171 signed int dword_4FABBC; // idb
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
172 unsigned int amuint_4FABC0; // idb
0
Ritor1
parents:
diff changeset
173
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
174 int dword_4FABC8; // weak
0
Ritor1
parents:
diff changeset
175
Ritor1
parents:
diff changeset
176
Ritor1
parents:
diff changeset
177 //----- (0040DD2F) --------------------------------------------------------
Ritor1
parents:
diff changeset
178 bool stru273::_40DD2F()
Ritor1
parents:
diff changeset
179 {
Ritor1
parents:
diff changeset
180
Ritor1
parents:
diff changeset
181 this->x = pArcomageGame->mouse_x;
Ritor1
parents:
diff changeset
182 this->y = pArcomageGame->mouse_y;
Ritor1
parents:
diff changeset
183 this->field_8 = pArcomageGame->mouse_left;
Ritor1
parents:
diff changeset
184 this->field_9 = pArcomageGame->mouse_left == pArcomageGame->field_F7;
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
185 this->field_A = pArcomageGame->mouse_right;
0
Ritor1
parents:
diff changeset
186 this->field_B = pArcomageGame->mouse_right == pArcomageGame->field_F8;
Ritor1
parents:
diff changeset
187 pArcomageGame->field_F7 = pArcomageGame->mouse_left;
Ritor1
parents:
diff changeset
188 pArcomageGame->field_F8 = pArcomageGame->mouse_right;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
189 return true;
0
Ritor1
parents:
diff changeset
190 }
Ritor1
parents:
diff changeset
191
Ritor1
parents:
diff changeset
192 //----- (0040DD93) --------------------------------------------------------
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
193 bool stru273::Inside(RECT*pXYZW )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
194 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
195
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
196 return (x >= pXYZW->left) && (x <= pXYZW->right) &&
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
197 (y>= pXYZW->top) && (y <= pXYZW->bottom);
0
Ritor1
parents:
diff changeset
198 }
Ritor1
parents:
diff changeset
199
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
200 //----- (0040DFD1) --------------------------------------------------------
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
201 void stru272_stru0::_40DFD1(stru272_stru0 *a1)
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
202 {
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
203 stru272_stru0 *v2; // eax@1
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
204 v2 = (stru272_stru0 *)malloc(0x5Cu);
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
205 a1 = v2;
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
206 v2->signature = SIG_trpg;
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
207 v2->field_8 = 0;
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
208 v2->field_30 = 0.0;
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
209 v2->field_58 = 0;
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
210 v2->field_59 = 0;
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
211 }
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
212
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
213 //----- (0040DFFE) --------------------------------------------------------
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
214 int stru272_stru0::_40DFFE()
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
215 {
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
216
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
217 if ( this->signature == SIG_trpg )
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
218 {
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
219 this->signature = SIG_xxxx;
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
220 free(this);
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
221 return 0;
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
222 }
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
223 else
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
224 return 2;
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
225
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
226 }
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
227
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
228 //----- (0040E01A) --------------------------------------------------------
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
229 int stru272_stru0::_40E01A( stru272_stru2* a2 )
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
230 {
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
231 auto a1 = this;
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
232 if ( a1->signature == SIG_trpg )
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
233 {
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
234 a1->field_4 = a2->field_20;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
235 a1->field_C = a2->field_0 << 16;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
236 a1->field_10 = a2->field_4 << 16;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
237 a1->field_14 = a2->field_8 << 16;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
238 a1->field_18 = a2->field_C << 16;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
239 a1->field_1C = a2->field_10;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
240 a1->field_20 = a2->field_14;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
241 a1->field_24 = a2->field_18;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
242 a1->field_28 = (float)(a2->field_1Cf * 65536.0);
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
243 a1->field_2C = a2->field_24f;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
244 a1->field_34 = (int)(a2->field_28f * 65536.0);
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
245 a1->field_38 = (int)(a2->field_2Cf * 65536.0);
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
246 a1->field_3C = a2->field_30;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
247 a1->field_40 = a2->field_34;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
248 a1->field_54 = a2->field_38;
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
249 a1->field_59 = 1;
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
250
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
251 return 0;
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
252 }
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
253 else
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
254 return 2;
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
255 }
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
256
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
257 //----- (0040E0F5) --------------------------------------------------------
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
258 int stru272_stru0::_40E0F5(char a2, char a3)
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
259 {
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
260 if ( signature == SIG_trpg)
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
261 {
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
262 if ( a2 )
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
263 {
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
264 field_8 = 0;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
265 field_30 = 0.0;
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
266 }
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
267 if ( field_59 && a3 )
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
268 {
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
269
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
270 for (int i=0; i<field_4; ++i)
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
271 field_54[i].field_0 = 0;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
272 field_58 = 0;
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
273 }
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
274 return 0;
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
275 }
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
276 else
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
277 return 2;
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
278 }
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
279
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
280 //----- (0040E133) --------------------------------------------------------
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
281 int stru272_stru0::_40E133()
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
282 {
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
283
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
284 stru272_stru0 *v1; // edi@1
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
285 int v3; // ST18_4@3
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
286 double v4; // st7@3
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
287 double v5; // st6@4
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
288 char v6; // bl@8
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
289 stru272_stru1 *v7; // esi@8
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
290 int v8; // ecx@10
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
291 signed int v9; // eax@10
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
292 int v10; // ecx@10
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
293 signed int v11; // eax@10
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
294 int v12; // ebx@12
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
295 int v13; // ST1C_4@12
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
296 int v14; // ebx@12
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
297 int v15; // ST1C_4@12
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
298 signed int v16; // edx@12
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
299 int v17; // ebx@12
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
300 int v18; // ST1C_4@12
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
301 signed int v19; // edx@12
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
302 int v20; // [sp+8h] [bp-10h]@8
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
303 int v21; // [sp+Ch] [bp-Ch]@8
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
304 float v22; // [sp+14h] [bp-4h]@3
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
305
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
306 v1 = this;
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
307 if ( this->signature != SIG_trpg )
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
308 return 2;
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
309 v3 = this->field_8;
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
310 v22 = this->field_30;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
311 v4 = v3;
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
312 if ( v3 > 0 )
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
313 {
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
314 v5 = v22 + this->field_2C;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
315 v22 = v5;
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
316 if ( v5 > v4 )
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
317 v22 = v4;
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
318 }
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
319 if ( v22 >= 1.0 || this->field_58 )
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
320 {
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
321 v6 = 0;
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
322 v7 = this->field_54;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
323 v20 = this->field_28;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
324 v21 = this->field_4;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
325 while ( v7->field_0 <= 0 )
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
326 {
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
327 if ( v22 >= 1.0 )
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
328 {
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
329 v12 = v1->field_40;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
330 v13 = v1->field_3C;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
331 v7->field_0 = v13 + rand() % (v12 - v13 + 1);
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
332 v7->field_14 = (rand() % 17 - 8) << 16;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
333 v7->field_18 = (rand() % 17 - 8) << 16;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
334 v14 = v1->field_14 - 1;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
335 v15 = v1->field_C;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
336 v16 = v15 + rand() % (v14 - v15 + 1);
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
337 v7->field_C = v16;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
338 v7->field_4.x = v16 >> 16;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
339
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
340 v17 = v1->field_18 - 1;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
341 v18 = v1->field_10;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
342 v22 = v22 - 1.0;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
343 v19 = v18 + rand() % (v17 - v18 + 1);
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
344 v7->field_10 = v19;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
345 v7->field_4.y = v19 >> 16;
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
346 --v1->field_8;
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
347 goto LABEL_13;
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
348 }
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
349 LABEL_14:
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
350 ++v7;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
351 --v21;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
352 if ( !v21 )
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
353 {
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
354 v1->field_58 = v6;
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
355 v1->field_30 = v22;
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
356 return 0;
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
357 }
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
358 }
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
359 v8 = v7->field_14;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
360 --v7->field_0;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
361 v9 = v8 + v7->field_C;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
362
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
363 v10 = v20 + v7->field_18;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
364 v7->field_C = v9;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
365 v7->field_4.x = v9 >> 16;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
366
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
367 v11 = v10 + v7->field_10;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
368 v7->field_18 = v10;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
369 v7->field_10 = v11;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
370 v7->field_4.y = v11 >> 16;
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
371 LABEL_13:
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
372 v6 = 1;
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
373 goto LABEL_14;
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
374 }
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
375 return 0;
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
376 }
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
377
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
378 //----- (0040E2A7) --------------------------------------------------------
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
379 int stru272_stru0::_40E2A7()
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
380 {
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
381
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
382 if (signature == SIG_trpg )
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
383 {
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
384 if ( field_8 <= 0 )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
385 return field_58 != 0 ? 2 : 0;
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
386 else
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
387 return 1;
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
388 }
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
389 else
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
390 return 3;
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
391 }
0
Ritor1
parents:
diff changeset
392
Ritor1
parents:
diff changeset
393
Ritor1
parents:
diff changeset
394 //----- (0040DFAF) --------------------------------------------------------
Ritor1
parents:
diff changeset
395 void ArcomageGame::OnMouseClick(char right_left, bool bDown)
Ritor1
parents:
diff changeset
396 {
Ritor1
parents:
diff changeset
397 if ( right_left )
Ritor1
parents:
diff changeset
398 pArcomageGame->mouse_right = bDown;
Ritor1
parents:
diff changeset
399 else
Ritor1
parents:
diff changeset
400 pArcomageGame->mouse_left = bDown;
Ritor1
parents:
diff changeset
401 }
Ritor1
parents:
diff changeset
402
Ritor1
parents:
diff changeset
403 //----- (0040DFC1) --------------------------------------------------------
Ritor1
parents:
diff changeset
404 void ArcomageGame::OnMouseMove(POINT *pXY)
Ritor1
parents:
diff changeset
405 {
Ritor1
parents:
diff changeset
406 pArcomageGame->mouse_x = pXY->x;
Ritor1
parents:
diff changeset
407 pArcomageGame->mouse_y = pXY->y;
Ritor1
parents:
diff changeset
408 }
Ritor1
parents:
diff changeset
409
Ritor1
parents:
diff changeset
410
Ritor1
parents:
diff changeset
411 //----- (0040DF47) --------------------------------------------------------
Ritor1
parents:
diff changeset
412 void DoBlt_Copy(unsigned __int16 *pPixels)
Ritor1
parents:
diff changeset
413 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
414 RECT pSrcRect;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
415 POINT pTargetPoint; // [sp+1Ch] [bp-8h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
416
0
Ritor1
parents:
diff changeset
417 pRenderer->Present();
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
418
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
419 pTargetPoint.x = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
420 pTargetPoint.y = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
421
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
422 pSrcRect.left = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
423 pSrcRect.right = 640;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
424 pSrcRect.top = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
425 pSrcRect.bottom = 480;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
426
0
Ritor1
parents:
diff changeset
427 pRenderer->BeginScene();
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
428 pArcomageGame->pBlit_Copy_pixels = pPixels;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
429 Blt_Copy(&pSrcRect, &pTargetPoint, 2);
0
Ritor1
parents:
diff changeset
430 pRenderer->EndScene();
Ritor1
parents:
diff changeset
431 pArcomageGame->pBlit_Copy_pixels = 0;
Ritor1
parents:
diff changeset
432 }
Ritor1
parents:
diff changeset
433
Ritor1
parents:
diff changeset
434 //----- (0040DDC9) --------------------------------------------------------
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
435 void ArcomageGame::PlaySound( unsigned int event_id )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
436 {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
437 SoundID play_sound_id; // eax@10
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
438
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
439 switch ( event_id )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
440 {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
441 case 40:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
442 case 43:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
443 case 46:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
444 play_sound_id = SOUND_Arcomage_LoseResources;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
445 break;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
446 case 39:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
447 case 41:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
448 case 42:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
449 case 44:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
450 case 45:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
451 case 47:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
452 play_sound_id = SOUND_Arcomage_AddResources;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
453 break;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
454 case 0:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
455 case 12:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
456 case 14:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
457 case 15:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
458 case 16:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
459 case 48:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
460 case 50:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
461 case 53:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
462 play_sound_id = SOUND_Arcomage_TowerWallDamage;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
463 break;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
464 case 21:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
465 case 22:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
466 case 23:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
467 play_sound_id = SOUND_Arcomage_DrawCard;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
468 break;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
469 case 56:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
470 play_sound_id = SOUND_Arcomage_124;
0
Ritor1
parents:
diff changeset
471 break;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
472 case 31:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
473 case 34:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
474 case 37:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
475 play_sound_id = SOUND_Arcomage_ProductionDamage;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
476 break;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
477 case 1:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
478 case 30:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
479 case 32:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
480 case 33:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
481 case 35:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
482 case 36:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
483 case 38:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
484 play_sound_id = SOUND_Arcomage_ProductionUpgrade;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
485 break;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
486 case 20:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
487 play_sound_id = SOUND_Arcomage_127;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
488 break;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
489 case 3:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
490 play_sound_id = SOUND_Arcomage_128;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
491 break;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
492 case 52:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
493 case 54:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
494 play_sound_id = SOUND_Arcomage_TowerUpgrade;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
495 break;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
496 case 10:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
497 case 11:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
498 case 13:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
499 play_sound_id = SOUND_Arcomage_130;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
500 break;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
501 case 55u:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
502 play_sound_id = SOUND_Arcomage_131;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
503 break;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
504 case 49:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
505 case 51:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
506 play_sound_id = SOUND_Arcomage_WallUpgrade;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
507 break;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
508 default:
0
Ritor1
parents:
diff changeset
509 return;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
510 }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
511 pAudioPlayer->PlaySound(play_sound_id, 0, 0, -1, 0, 0, 0, 0);
0
Ritor1
parents:
diff changeset
512 }
Ritor1
parents:
diff changeset
513
Ritor1
parents:
diff changeset
514 //----- (0040DC2D) --------------------------------------------------------
Ritor1
parents:
diff changeset
515 bool ArcomageGame::MsgLoop(int a1, ArcomageGame_stru1 *a2)
Ritor1
parents:
diff changeset
516 {
Ritor1
parents:
diff changeset
517 void *v2; // ebp@1
Ritor1
parents:
diff changeset
518 BOOL v3; // eax@1
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
519 //int v4; // edx@6
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
520 //int v5; // edx@6
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
521 //int v6; // eax@6
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
522 //int v7; // edx@7
0
Ritor1
parents:
diff changeset
523
Ritor1
parents:
diff changeset
524 v2 = a2;
Ritor1
parents:
diff changeset
525 pArcomageGame->field_0 = 0;
Ritor1
parents:
diff changeset
526 pArcomageGame->stru1.field_0 = 0;
Ritor1
parents:
diff changeset
527 v3 = PeekMessageA(&pArcomageGame->msg, 0, 0, 0, PM_REMOVE);
Ritor1
parents:
diff changeset
528 if ( pArcomageGame->msg.message == WM_QUIT )
Ritor1
parents:
diff changeset
529 Game_DeinitializeAndTerminate(0);
Ritor1
parents:
diff changeset
530 if ( v3 > 0 )
Ritor1
parents:
diff changeset
531 {
Ritor1
parents:
diff changeset
532 TranslateMessage(&pArcomageGame->msg);
Ritor1
parents:
diff changeset
533 DispatchMessageA(&pArcomageGame->msg);
Ritor1
parents:
diff changeset
534 }
1038
39f42990698f Cleanings
Nomad
parents: 1033
diff changeset
535 /*if (pAsyncMouse)
0
Ritor1
parents:
diff changeset
536 {
Ritor1
parents:
diff changeset
537 EnterCriticalSection(&pGame->pThreadWardInstance->csAsyncMouse);
Ritor1
parents:
diff changeset
538 v4 = *((unsigned int *)pAsyncMouse + 7);
Ritor1
parents:
diff changeset
539 pArcomageGame->mouse_x = *((unsigned int *)pAsyncMouse + 6);
Ritor1
parents:
diff changeset
540 pArcomageGame->mouse_y = v4;
Ritor1
parents:
diff changeset
541 v5 = *((unsigned int *)pAsyncMouse + 27);
Ritor1
parents:
diff changeset
542 v6 = *(unsigned int *)v5;
Ritor1
parents:
diff changeset
543 if ( *(unsigned int *)v5 != v5 )
Ritor1
parents:
diff changeset
544 {
Ritor1
parents:
diff changeset
545 do
Ritor1
parents:
diff changeset
546 {
Ritor1
parents:
diff changeset
547 v7 = *(unsigned int *)(v6 + 20);
Ritor1
parents:
diff changeset
548 if ( v7 & 1 )
Ritor1
parents:
diff changeset
549 {
Ritor1
parents:
diff changeset
550 pArcomageGame->stru1.field_0 = 7;
Ritor1
parents:
diff changeset
551 }
Ritor1
parents:
diff changeset
552 else
Ritor1
parents:
diff changeset
553 {
Ritor1
parents:
diff changeset
554 if ( v7 & 2 )
Ritor1
parents:
diff changeset
555 pArcomageGame->stru1.field_0 = 8;
Ritor1
parents:
diff changeset
556 }
Ritor1
parents:
diff changeset
557 v6 = *(unsigned int *)v6;
Ritor1
parents:
diff changeset
558 }
Ritor1
parents:
diff changeset
559 while ( v6 != *((unsigned int *)pAsyncMouse + 27) );
Ritor1
parents:
diff changeset
560 }
Ritor1
parents:
diff changeset
561 pAsyncMouse->_46B944();
Ritor1
parents:
diff changeset
562 if ( !*((unsigned char *)pAsyncMouse + 90) )
Ritor1
parents:
diff changeset
563 pArcomageGame->field_F6 = 1;
Ritor1
parents:
diff changeset
564 LeaveCriticalSection(&pGame->pThreadWardInstance->csAsyncMouse);
1038
39f42990698f Cleanings
Nomad
parents: 1033
diff changeset
565 }*/
0
Ritor1
parents:
diff changeset
566 memcpy(v2, &pArcomageGame->stru1, 0xCu);
Ritor1
parents:
diff changeset
567 return pArcomageGame->stru1.field_0 != 0;
Ritor1
parents:
diff changeset
568 }
Ritor1
parents:
diff changeset
569
Ritor1
parents:
diff changeset
570
Ritor1
parents:
diff changeset
571 //----- (0040D7D5) --------------------------------------------------------
Ritor1
parents:
diff changeset
572 void am_BeginScene(unsigned __int16 *pPcxPixels, int a2, int a3)
Ritor1
parents:
diff changeset
573 {
Ritor1
parents:
diff changeset
574 pRenderer->BeginScene();
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
575 pArcomageGame->pBlit_Copy_pixels = pPcxPixels;
0
Ritor1
parents:
diff changeset
576 }
Ritor1
parents:
diff changeset
577
Ritor1
parents:
diff changeset
578 //----- (0040D7EC) --------------------------------------------------------
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
579 void __fastcall Blt_Chroma(RECT *pSrcRect, POINT *pTargetPoint, int a3, int blend_mode)
0
Ritor1
parents:
diff changeset
580 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
581
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
582 unsigned __int16 *pSrc; // eax@2
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
583 unsigned __int16 *dest_surf_pos; // edi@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
584 int uSrcTotalWidth; // ecx@4
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
585 unsigned int v10; // esi@9
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
586 int v21; // [sp+Ch] [bp-18h]@8
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
587 unsigned __int16 *src_surf_pos; // [sp+10h] [bp-14h]@9
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
588 __int32 src_width; // [sp+14h] [bp-10h]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
589 __int32 src_height; // [sp+18h] [bp-Ch]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
590 int uSrcPitch; // [sp+1Ch] [bp-8h]@5
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
591
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
592
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
593 if ( !pRenderer->uNumSceneBegins )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
594 return;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
595 if ( !pArcomageGame->pBlit_Copy_pixels )
0
Ritor1
parents:
diff changeset
596 return;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
597
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
598 dest_surf_pos = &pRenderer->pTargetSurface[pTargetPoint->x + pTargetPoint->y * pRenderer->uTargetSurfacePitch];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
599 src_width = pSrcRect->right - pSrcRect->left;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
600 src_height = pSrcRect->bottom - pSrcRect->top;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
601
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
602 if ( pArcomageGame->pBlit_Copy_pixels == pArcomageGame->pBackgroundPixels )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
603 uSrcTotalWidth = pArcomageGame->pGameBackground.uWidth;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
604 else if ( pArcomageGame->pBlit_Copy_pixels == pArcomageGame->pSpritesPixels )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
605 uSrcTotalWidth = pArcomageGame->pSprites.uWidth;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
606
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
607 //v20 = 157;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
608 //v19 = "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\am_nw.cpp";
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
609 //v21 = &v18;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
610 //std__string_char_40E2C8(&v18, "Problem in Blit_Chroma", &a3a);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
611 //466D09_xcpt_string(&v21, v18, v19, v20);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
612 //pSrc = pArcomageGame.pBlit_Copy_pixels;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
613 //LABEL_9:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
614 pSrc = pArcomageGame->pBlit_Copy_pixels;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
615 uSrcPitch = uSrcTotalWidth;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
616
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
617 src_surf_pos = &pSrc[pSrcRect->left + uSrcPitch * pSrcRect->top];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
618 v10 = 0xFFu >> (8 - (unsigned __int8)pRenderer->uTargetBBits);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
619 v21 = (pRenderer->uTargetGBits != 6 ? 0x31EF : 0x7BEF);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
620
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
621
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
622 if ( blend_mode == 2 )
0
Ritor1
parents:
diff changeset
623 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
624 uSrcPitch = 2 * (uSrcPitch - src_width);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
625 for (int i=0; i< src_height; ++i)
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
626 {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
627 for (int j=0; j< src_width; ++j)
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
628 {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
629 if ( *src_surf_pos != v10 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
630 *dest_surf_pos = *src_surf_pos;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
631 ++dest_surf_pos;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
632 ++src_surf_pos;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
633 }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
634 src_surf_pos+=uSrcPitch;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
635 dest_surf_pos += pRenderer->uTargetSurfacePitch - src_width;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
636 }
0
Ritor1
parents:
diff changeset
637 }
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
638 else
0
Ritor1
parents:
diff changeset
639 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
640 uSrcPitch = 2 * (uSrcPitch - src_width);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
641 for (int i=0; i< src_height; ++i)
0
Ritor1
parents:
diff changeset
642 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
643 for (int j=0; j< src_width; ++j)
0
Ritor1
parents:
diff changeset
644 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
645 if ( *src_surf_pos != v10 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
646 *dest_surf_pos = (v21 & (*dest_surf_pos >> 1)) + (v21 & (*src_surf_pos >> 1));
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
647 ++dest_surf_pos;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
648 ++src_surf_pos;
0
Ritor1
parents:
diff changeset
649 }
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
650 src_surf_pos+=uSrcPitch;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
651 dest_surf_pos += pRenderer->uTargetSurfacePitch - src_width;
0
Ritor1
parents:
diff changeset
652 }
Ritor1
parents:
diff changeset
653 }
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
654
0
Ritor1
parents:
diff changeset
655 }
Ritor1
parents:
diff changeset
656
Ritor1
parents:
diff changeset
657 //----- (0040D9B1) --------------------------------------------------------
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
658 void Blt_Copy( RECT *pSrcRect, POINT *pTargetPoint, int blend_mode )
0
Ritor1
parents:
diff changeset
659 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
660
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
661 unsigned __int16 *pSrc; // eax@2
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
662 unsigned __int16 *dest_surf_pos; // edi@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
663 int uSrcTotalWidth; // ecx@4
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
664 int v21; // [sp+Ch] [bp-18h]@8
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
665 unsigned __int16 *src_surf_pos; // [sp+10h] [bp-14h]@9
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
666 __int32 src_width; // [sp+14h] [bp-10h]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
667 __int32 src_height; // [sp+18h] [bp-Ch]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
668 int uSrcPitch; // [sp+1Ch] [bp-8h]@5
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
669
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
670 if ( !pRenderer->uNumSceneBegins )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
671 return;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
672 if ( !pArcomageGame->pBlit_Copy_pixels )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
673 return;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
674
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
675 dest_surf_pos = &pRenderer->pTargetSurface[pTargetPoint->x + pTargetPoint->y * pRenderer->uTargetSurfacePitch];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
676 src_width = pSrcRect->right - pSrcRect->left;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
677 src_height = pSrcRect->bottom - pSrcRect->top;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
678
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
679 if ( pArcomageGame->pBlit_Copy_pixels == pArcomageGame->pBackgroundPixels )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
680 uSrcTotalWidth = pArcomageGame->pGameBackground.uWidth;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
681 else if ( pArcomageGame->pBlit_Copy_pixels == pArcomageGame->pSpritesPixels )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
682 uSrcTotalWidth = pArcomageGame->pSprites.uWidth;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
683
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
684 //v20 = 157;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
685 //v19 = "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\am_nw.cpp";
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
686 //v21 = &v18;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
687 //std__string_char_40E2C8(&v18, "Problem in Blit_Chroma", &a3a);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
688 //466D09_xcpt_string(&v21, v18, v19, v20);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
689 //pSrc = pArcomageGame.pBlit_Copy_pixels;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
690 //LABEL_9:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
691 pSrc = pArcomageGame->pBlit_Copy_pixels;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
692 uSrcPitch = uSrcTotalWidth;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
693
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
694 src_surf_pos = &pSrc[pSrcRect->left + uSrcPitch * pSrcRect->top];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
695 v21 = (pRenderer->uTargetGBits != 6 ? 0x31EF : 0x7BEF);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
696
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
697 if ( blend_mode == 2 )
0
Ritor1
parents:
diff changeset
698 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
699 uSrcPitch = 2 * (uSrcPitch - src_width);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
700 for (int i=0; i< src_height; ++i)
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
701 {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
702 for (int j=0; j< src_width; ++j)
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
703 {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
704 *dest_surf_pos = *src_surf_pos;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
705 ++dest_surf_pos;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
706 ++src_surf_pos;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
707 }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
708 src_surf_pos+=uSrcPitch;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
709 dest_surf_pos += pRenderer->uTargetSurfacePitch - src_width;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
710 }
0
Ritor1
parents:
diff changeset
711 }
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
712 else
0
Ritor1
parents:
diff changeset
713 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
714 uSrcPitch = 2 * (uSrcPitch - src_width);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
715 for (int i=0; i< src_height; ++i)
0
Ritor1
parents:
diff changeset
716 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
717 for (int j=0; j< src_width; ++j)
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
718 {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
719 *dest_surf_pos = (v21 & (*dest_surf_pos >> 1)) + (v21 & (*src_surf_pos >> 1));
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
720 ++dest_surf_pos;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
721 ++src_surf_pos;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
722 }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
723 src_surf_pos+=uSrcPitch;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
724 dest_surf_pos += pRenderer->uTargetSurfacePitch - src_width;
0
Ritor1
parents:
diff changeset
725 }
Ritor1
parents:
diff changeset
726 }
Ritor1
parents:
diff changeset
727 }
Ritor1
parents:
diff changeset
728
Ritor1
parents:
diff changeset
729 //----- (0040DB10) --------------------------------------------------------
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
730 void am_EndScene()
0
Ritor1
parents:
diff changeset
731 {
Ritor1
parents:
diff changeset
732 pRenderer->EndScene();
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
733 pArcomageGame->pBlit_Copy_pixels = NULL;
0
Ritor1
parents:
diff changeset
734 }
Ritor1
parents:
diff changeset
735
Ritor1
parents:
diff changeset
736 //----- (0040D7B7) --------------------------------------------------------
Ritor1
parents:
diff changeset
737 bool ArcomageGame::LoadSprites()
Ritor1
parents:
diff changeset
738 {
Ritor1
parents:
diff changeset
739 pArcomageGame->pSprites.Load("sprites.pcx", 2);
Ritor1
parents:
diff changeset
740 pArcomageGame->pSpritesPixels = pArcomageGame->pSprites.pPixels;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
741 return true;
0
Ritor1
parents:
diff changeset
742 }
Ritor1
parents:
diff changeset
743
Ritor1
parents:
diff changeset
744 //----- (0040D799) --------------------------------------------------------
Ritor1
parents:
diff changeset
745 bool ArcomageGame::LoadBackground()
Ritor1
parents:
diff changeset
746 {
Ritor1
parents:
diff changeset
747 pArcomageGame->pGameBackground.Load("layout.pcx", 2);
Ritor1
parents:
diff changeset
748 pArcomageGame->pBackgroundPixels = pArcomageGame->pGameBackground.pPixels;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
749 return true;
0
Ritor1
parents:
diff changeset
750 }
Ritor1
parents:
diff changeset
751
Ritor1
parents:
diff changeset
752 //----- (00408BB4) --------------------------------------------------------
Ritor1
parents:
diff changeset
753 bool __fastcall am_408BB4(int a1)
Ritor1
parents:
diff changeset
754 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
755 // char result; // al@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
756 // signed int v3; // ebx@8
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
757 // int v4; // esi@8
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
758 // int v5; // eax@9
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
759 // int v6; // edi@9
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
760 // int v7; // eax@11
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
761 // signed int v8; // eax@11
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
762 // int v9; // ebx@5
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
763 // int v10; // eax@5
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
764 // int v11; // ecx@18
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
765 // char v12; // bl@20
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
766 // int v13; // eax@20
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
767 // ArcomageCard *v14; // ecx@20
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
768 // char v15; // dl@20
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
769 // char v16; // dl@24
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
770 // int v17; // edx@25
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
771 // int v18; // edx@27
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
772 // char v19; // dl@31
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
773 // int v20; // edx@32
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
774 // char v21; // dl@35
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
775 // char v22; // dl@39
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
776 // int v23; // edx@40
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
777 // char v24; // dl@45
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
778 // int v25; // edx@46
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
779 // char v26; // dl@52
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
780 // int v27; // edx@53
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
781 // char v28; // dl@58
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
782 // int v29; // edx@59
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
783 // char v30; // dl@64
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
784 // int v31; // edx@65
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
785 // char v32; // dl@70
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
786 // int v33; // edx@71
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
787 // char v34; // dl@76
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
788 // int v35; // edx@77
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
789 // char v36; // dl@82
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
790 // int v37; // edx@83
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
791 // char v38; // dl@86
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
792 // char v39; // dl@90
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
793 // int v40; // edi@93
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
794 // char v41; // dl@93
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
795 // int v42; // esi@93
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
796 // char v43; // bl@94
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
797 // int v44; // esi@95
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
798 // char v45; // dl@99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
799 // char v46; // dl@103
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
800 // char v47; // dl@107
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
801 // char v48; // dl@111
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
802 // char v49; // dl@115
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
803 // ArcomagePlayer *v50; // ebx@116
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
804 // ArcomagePlayer *v51; // edx@116
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
805 // int v52; // esi@124
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
806 // int v53; // edx@124
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
807 // int v54; // edx@127
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
808 // int v55; // esi@130
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
809 // int v56; // edi@138
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
810 // int l; // esi@138
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
811 // int v58; // eax@140
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
812 // int v59; // ecx@142
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
813 // int v60; // edx@142
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
814 // int v61; // ebx@142
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
815 // int v62; // eax@145
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
816 // int v63; // esi@146
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
817 // int v64; // ebx@4
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
818 // int v65; // eax@4
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
819 // int v66; // ecx@168
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
820 // char v67; // bl@170
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
821 // int v68; // eax@170
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
822 // ArcomageCard *v69; // ecx@170
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
823 // char v70; // dl@170
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
824 // char v71; // dl@174
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
825 // int v72; // edx@175
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
826 // int v73; // edx@177
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
827 // char v74; // dl@181
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
828 // char v75; // dl@184
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
829 // char v76; // dl@188
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
830 // int v77; // edx@189
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
831 // char v78; // dl@194
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
832 // char v79; // dl@200
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
833 // int v80; // edx@201
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
834 // char v81; // dl@206
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
835 // int v82; // edx@207
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
836 // char v83; // dl@212
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
837 // int v84; // edx@213
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
838 // char v85; // dl@218
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
839 // int v86; // edx@219
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
840 // char v87; // dl@224
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
841 // int v88; // edx@225
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
842 // char v89; // dl@230
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
843 // int v90; // edx@231
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
844 // char v91; // dl@234
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
845 // int v92; // edx@235
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
846 // char v93; // dl@238
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
847 // int v94; // edx@239
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
848 // int v95; // esi@241
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
849 // char v96; // dl@241
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
850 // int v97; // esi@241
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
851 // char v98; // bl@242
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
852 // int v99; // edi@243
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
853 // int v100; // edx@245
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
854 // int v101; // edi@246
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
855 // char v102; // dl@247
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
856 // int v103; // edx@248
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
857 // char v104; // dl@251
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
858 // int v105; // edx@252
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
859 // char v106; // dl@255
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
860 // int v107; // edx@256
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
861 // char v108; // dl@259
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
862 // int v109; // edx@260
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
863 // char v110; // dl@263
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
864 // ArcomagePlayer *v111; // ebx@264
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
865 // ArcomagePlayer *v112; // edx@264
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
866 // int v113; // esi@272
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
867 // int v114; // edx@272
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
868 // int v115; // edx@275
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
869 // int v116; // esi@278
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
870 // int v117; // edi@286
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
871 // int j; // esi@286
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
872 // int v119; // eax@288
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
873 // int v120; // ecx@290
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
874 // int v121; // edx@290
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
875 // int v122; // ebx@290
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
876 // int v123; // eax@293
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
877 // int v124; // esi@294
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
878 // int v125; // [sp-28h] [bp-28h]@130
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
879 // int v126; // [sp-28h] [bp-28h]@278
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
880 // int k; // [sp-24h] [bp-24h]@18
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
881 // int i; // [sp-24h] [bp-24h]@168
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
882 // int v129; // [sp-20h] [bp-20h]@5
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
883 // int v130; // [sp-20h] [bp-20h]@4
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
884 // int v131; // [sp-1Ch] [bp-1Ch]@17
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
885 // int v132; // [sp-1Ch] [bp-1Ch]@140
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
886 // int v133; // [sp-1Ch] [bp-1Ch]@167
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
887 // int v134; // [sp-1Ch] [bp-1Ch]@288
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
888 // int v135; // [sp-18h] [bp-18h]@5
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
889 // int v136; // [sp-18h] [bp-18h]@4
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
890 // signed int v137; // [sp-14h] [bp-14h]@0
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
891 // int v138; // [sp-14h] [bp-14h]@93
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
892 // int v139; // [sp-14h] [bp-14h]@130
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
893 // int v140; // [sp-14h] [bp-14h]@241
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
894 // int v141; // [sp-14h] [bp-14h]@278
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
895 // ArcomagePlayer *v142; // [sp-10h] [bp-10h]@5
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
896 // ArcomagePlayer *v143; // [sp-10h] [bp-10h]@4
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
897 // ArcomagePlayer *v144; // [sp-Ch] [bp-Ch]@5
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
898 // ArcomagePlayer *v145; // [sp-Ch] [bp-Ch]@4
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
899 // char v146; // [sp-8h] [bp-8h]@35
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
900 // char v147; // [sp-8h] [bp-8h]@184
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
901 // char v148; // [sp-5h] [bp-5h]@20
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
902 // char v149; // [sp-5h] [bp-5h]@170
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
903 //
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
904 // byte_4FAA00 = 1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
905 // if ( dword_4DF3A4 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
906 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
907 // if ( dword_4DF3A4 != 1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
908 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
909 // result = dword_4DF3A4 - 2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
910 // if ( dword_4DF3A4 != 2 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
911 // return result != 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
912 // v64 = a1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
913 // v145 = &stru_505708[a1];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
914 // v130 = a1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
915 // v143 = &stru_505708[(a1 + 1) % 2];
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
916 // v136 = GetPlayerHandCardCount(a1);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
917 // v65 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
918 // do
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
919 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
920 // if ( v65 >= v136 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
921 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
922 // dword_4FA9B0[2 * v65] = -1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
923 // dword_4FA9B4[2 * v65] = -9999;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
924 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
925 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
926 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
927 // dword_4FA9B0[2 * v65] = v65;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
928 // dword_4FA9B4[2 * v65] = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
929 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
930 // ++v65;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
931 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
932 // while ( v65 < 10 );
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
933 // v133 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
934 // if ( v136 > 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
935 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
936 // v66 = 47 * v64;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
937 // for ( i = 47 * v64; ; v66 = i )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
938 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
939 // v67 = 99;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
940 // v68 = 2 * v133;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
941 // v69 = &pCards[stru_505708[0].cards_at_hand[v66 + dword_4FA9B0[2 * v133]]];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
942 // v70 = v69->field_38[2];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
943 // v149 = v69->field_38[2];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
944 // if ( v145->field_24 >= 10 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
945 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
946 // if ( v70 == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
947 // || v69->field_48[4] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
948 // || v69->field_48[15] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
949 // || (v74 = BYTE1(v69->field_68), v74 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
950 // v73 = 5 * (v143->field_24 - v145->field_24);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
951 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
952 // v73 = 5 * (v149 + v69->field_48[4] + v69->field_48[15] + v74);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
953 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
954 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
955 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
956 // if ( v70 == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
957 // || v69->field_48[4] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
958 // || v69->field_48[15] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
959 // || (v71 = BYTE1(v69->field_68), v71 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
960 // v72 = 5 * (v143->field_24 - v145->field_24);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
961 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
962 // v72 = 5 * (v149 + v69->field_48[4] + v69->field_48[15] + v71);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
963 // v73 = 4 * v72;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
964 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
965 // dword_4FA9B4[v68] += v73;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
966 // v75 = v69->field_38[1];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
967 // v147 = v69->field_38[1];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
968 // if ( v145->field_28 >= 10 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
969 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
970 // if ( v75 == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
971 // || v69->field_48[3] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
972 // || v69->field_48[14] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
973 // || (v78 = LOBYTE(v69->field_68), v78 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
974 // v77 = v143->field_28 - v145->field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
975 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
976 // v77 = v147 + v69->field_48[3] + v69->field_48[14] + v78;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
977 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
978 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
979 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
980 // if ( v75 == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
981 // || v69->field_48[3] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
982 // || v69->field_48[14] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
983 // || (v76 = LOBYTE(v69->field_68), v76 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
984 // v77 = 5 * (v143->field_28 - v145->field_28);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
985 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
986 // v77 = 5 * (v147 + v69->field_48[3] + v69->field_48[14] + v76);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
987 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
988 // dword_4FA9B4[v68] += v77;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
989 // dword_4FA9B4[v68] += 7 * (v69->field_38[0] + v69->field_48[2] + v69->field_48[13] + v69->field_58[15]);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
990 // if ( BYTE2(v69->field_30) == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
991 // || v69->field_38[12] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
992 // || v69->field_48[7] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
993 // || (v79 = v69->field_58[9], v79 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
994 // v80 = 5 * (v143->field_2C - v145->field_2C);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
995 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
996 // v80 = 5 * (BYTE2(v69->field_30) + v69->field_38[12] + v69->field_48[7] + v79);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
997 // dword_4FA9B4[v68] += 8 * v80;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
998 // if ( BYTE3(v69->field_30) == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
999 // || v69->field_38[13] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1000 // || v69->field_48[8] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1001 // || (v81 = v69->field_58[10], v81 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1002 // v82 = 5 * (v143->field_30 - v145->field_30);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1003 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1004 // v82 = 5 * (BYTE3(v69->field_30) + v69->field_38[13] + v69->field_48[8] + v81);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1005 // dword_4FA9B4[v68] += 8 * v82;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1006 // if ( LOBYTE(v69->field_34) == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1007 // || v69->field_38[14] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1008 // || v69->field_48[9] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1009 // || (v83 = v69->field_58[11], v83 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1010 // v84 = 5 * (v143->field_34 - v145->field_34);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1011 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1012 // v84 = 5 * (LOBYTE(v69->field_34) + v69->field_38[14] + v69->field_48[9] + v83);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1013 // dword_4FA9B4[v68] += 8 * v84;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1014 // if ( BYTE1(v69->field_34) == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1015 // || v69->field_38[15] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1016 // || v69->field_48[10] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1017 // || (v85 = v69->field_58[12], v85 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1018 // v86 = v143->field_38 - v145->field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1019 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1020 // v86 = BYTE1(v69->field_34) + v69->field_38[15] + v69->field_48[10] + v85;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1021 // dword_4FA9B4[v68] += 2 * v86;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1022 // if ( BYTE2(v69->field_34) == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1023 // || v69->field_48[0] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1024 // || v69->field_48[11] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1025 // || (v87 = v69->field_58[13], v87 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1026 // v88 = v143->field_3C - v145->field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1027 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1028 // v88 = BYTE2(v69->field_34) + v69->field_48[0] + v69->field_48[11] + v87;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1029 // dword_4FA9B4[v68] += 2 * v88;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1030 // if ( BYTE3(v69->field_34) == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1031 // || v69->field_48[1] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1032 // || v69->field_48[12] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1033 // || (v89 = v69->field_58[14], v89 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1034 // v90 = v143->field_40 - v145->field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1035 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1036 // v90 = BYTE3(v69->field_34) + v69->field_48[1] + v69->field_48[12] + v89;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1037 // dword_4FA9B4[v68] += 2 * v90;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1038 // if ( v69->field_38[11] == 99 || (v91 = v69->field_58[8], v91 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1039 // v92 = 10 * (v145->field_24 - v143->field_24);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1040 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1041 // v92 = -10 * (v69->field_38[11] + v91);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1042 // dword_4FA9B4[v68] += v92;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1043 // if ( v69->field_38[10] == 99 || (v93 = v69->field_58[7], v93 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1044 // v94 = 3 * (v145->field_28 - v143->field_28);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1045 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1046 // v94 = -3 * (v69->field_38[10] + v93);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1047 // dword_4FA9B4[v68] += v94;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1048 // v95 = v69->field_38[9];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1049 // v140 = v95;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1050 // v96 = v69->field_38[3];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1051 // dword_4FA9B4[v68] += -7 * (v69->field_58[6] + v95);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1052 // v97 = dword_4FA9B4[v68];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1053 // if ( v96 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1054 // goto LABEL_245;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1055 // v98 = v69->field_58[0];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1056 // if ( v98 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1057 // break;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1058 // v99 = v96 + v98;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1059 // v67 = 99;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1060 // dword_4FA9B4[v68] = v97 - 5 * v99;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1061 //LABEL_246:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1062 // v101 = v140;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1063 // if ( v69->field_38[4] == v67 || (v102 = v69->field_58[1], v102 == v67) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1064 // v103 = 5 * (v145->field_30 - v143->field_30);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1065 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1066 // v103 = -5 * (v69->field_38[4] + v102);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1067 // dword_4FA9B4[v68] += v103;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1068 // if ( v69->field_38[5] == v67 || (v104 = v69->field_58[2], v104 == v67) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1069 // v105 = 5 * (v145->field_34 - v143->field_34);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1070 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1071 // v105 = -5 * (v69->field_38[5] + v104);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1072 // dword_4FA9B4[v68] += v105;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1073 // if ( v69->field_38[6] == v67 || (v106 = v69->field_58[3], v106 == v67) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1074 // v107 = v145->field_38 - v143->field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1075 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1076 // v107 = -(v69->field_38[6] + v106);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1077 // dword_4FA9B4[v68] += 2 * v107;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1078 // if ( v69->field_38[7] == v67 || (v108 = v69->field_58[4], v108 == v67) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1079 // v109 = v145->field_3C - v143->field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1080 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1081 // v109 = -(v69->field_38[7] + v108);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1082 // dword_4FA9B4[v68] += 2 * v109;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1083 // if ( v69->field_38[8] == v67 || (v110 = v69->field_58[5], v110 == v67) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1084 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1085 // v112 = v145;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1086 // v111 = v143;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1087 // dword_4FA9B4[v68] += 2 * (v145->field_40 - v143->field_40);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1088 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1089 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1090 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1091 // v111 = v143;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1092 // dword_4FA9B4[v68] += -2 * (v69->field_38[8] + v110);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1093 // v112 = v145;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1094 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1095 // if ( LOBYTE(v69->field_30) || v69->field_48[5] )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1096 // dword_4FA9B4[v68] *= 10;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1097 // if ( LOBYTE(v69->field_24) == 1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1098 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1099 // v113 = LOBYTE(v69->field_28);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1100 // v114 = v112->field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1101 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1102 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1103 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1104 // if ( LOBYTE(v69->field_24) == 2 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1105 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1106 // v113 = BYTE1(v69->field_28);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1107 // v114 = v112->field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1108 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1109 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1110 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1111 // if ( LOBYTE(v69->field_24) != 3 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1112 // goto LABEL_278;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1113 // v113 = BYTE2(v69->field_28);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1114 // v114 = v112->field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1115 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1116 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1117 // v115 = v114 - v113;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1118 // if ( v115 > 3 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1119 // v115 = 3;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1120 // dword_4FA9B4[v68] += 5 * v115;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1121 //LABEL_278:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1122 // v116 = v69->field_58[8];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1123 // v141 = v111->field_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1124 // v126 = v69->field_38[11];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1125 // if ( v141 <= v116 + v126 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1126 // dword_4FA9B4[v68] += 9999;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1127 // v137 = v111->field_28 + v141;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1128 // if ( v137 <= v116 + v126 + v69->field_58[6] + v69->field_58[7] + v101 + v69->field_38[10] )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1129 // dword_4FA9B4[v68] += 9999;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1130 // if ( v69->field_48[15] + (signed int)BYTE1(v69->field_68) + v145->field_24 + v69->field_48[4] + v149 >= dword_4E1884 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1131 // dword_4FA9B4[v68] += 9999;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1132 // ++v133;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1133 // if ( v133 >= v136 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1134 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1135 // v64 = v130;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1136 // goto LABEL_286;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1137 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1138 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1139 // v67 = 99;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1140 //LABEL_245:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1141 // v100 = v145->field_2C - v143->field_2C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1142 // dword_4FA9B4[v68] = v97 + 4 * v100 + v100;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1143 // goto LABEL_246;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1144 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1145 //LABEL_286:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1146 // v117 = v136 - 1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1147 // for ( j = v136 - 1; j >= 0; --j )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1148 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1149 // v137 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1150 // if ( j > 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1151 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1152 // v119 = (int)dword_4FA9B0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1153 // v134 = j;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1154 // v137 = j;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1155 // do
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1156 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1157 // if ( *(unsigned int *)(v119 + 4) < *(unsigned int *)(v119 + 12) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1158 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1159 // v120 = *(unsigned int *)v119;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1160 // v121 = *(unsigned int *)(v119 + 4);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1161 // *(unsigned int *)v119 = *(unsigned int *)(v119 + 8);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1162 // v122 = *(unsigned int *)(v119 + 12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1163 // *(unsigned int *)(v119 + 8) = v120;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1164 // *(unsigned int *)(v119 + 4) = v122;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1165 // v64 = v130;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1166 // *(unsigned int *)(v119 + 12) = v121;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1167 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1168 // v119 += 8;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1169 // --v134;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1170 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1171 // while ( v134 );
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1172 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1173 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1174 // v123 = v136 - 1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1175 // if ( am_byte_4FAA77 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1176 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1177 // if ( v117 >= 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1178 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1179 // while ( !BYTE3(pCards[stru_505708[0].cards_at_hand[47 * v64 + dword_4FA9B0[2 * v123]]].field_28) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1180 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1181 // --v123;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1182 // if ( v123 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1183 // return am_40BCFB(v64, v137) != 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1184 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1185 // v137 = dword_4FA9B0[2 * v123];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1186 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1187 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1188 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1189 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1190 // v124 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1191 // if ( v117 >= 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1192 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1193 // while ( !BYTE3(pCards[stru_505708[0].cards_at_hand[47 * v64 + dword_4FA9B0[2 * v123]]].field_28) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1194 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1195 // --v123;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1196 // if ( v123 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1197 // goto LABEL_299;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1198 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1199 // v137 = dword_4FA9B0[2 * v123];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1200 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1201 //LABEL_299:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1202 // if ( v136 > 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1203 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1204 // while ( !am_40BF15(v64, dword_4FA9B0[2 * v124]) || dword_4FA9B4[2 * v124] < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1205 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1206 // ++v124;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1207 // if ( v124 >= v136 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1208 // return am_40BCFB(v64, v137) != 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1209 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1210 // return am_40BE0E(v64, dword_4FA9B0[2 * v124]) != 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1211 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1212 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1213 // return am_40BCFB(v64, v137) != 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1214 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1215 // v9 = a1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1216 // v144 = &stru_505708[a1];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1217 // v129 = a1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1218 // v142 = &stru_505708[(a1 + 1) % 2];
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1219 // v135 = GetPlayerHandCardCount(a1);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1220 // v10 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1221 // do
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1222 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1223 // if ( v10 >= v135 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1224 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1225 // dword_4FA9B0[2 * v10] = -1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1226 // dword_4FA9B4[2 * v10] = -9999;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1227 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1228 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1229 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1230 // dword_4FA9B0[2 * v10] = v10;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1231 // dword_4FA9B4[2 * v10] = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1232 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1233 // ++v10;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1234 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1235 // while ( v10 < 10 );
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1236 // v131 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1237 // if ( v135 > 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1238 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1239 // v11 = 47 * v9;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1240 // for ( k = 47 * v9; ; v11 = k )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1241 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1242 // v12 = 99;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1243 // v13 = 2 * v131;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1244 // v14 = &pCards[stru_505708[0].cards_at_hand[v11 + dword_4FA9B0[2 * v131]]];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1245 // v15 = v14->field_38[2];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1246 // v148 = v14->field_38[2];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1247 // if ( v144->field_24 >= 10 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1248 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1249 // if ( v15 == 99 || v14->field_48[4] == 99 || v14->field_48[15] == 99 || (v19 = BYTE1(v14->field_68), v19 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1250 // v20 = 5 * (v142->field_24 - v144->field_24);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1251 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1252 // v20 = 5 * (v148 + v14->field_48[4] + v14->field_48[15] + v19);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1253 // v18 = 2 * v20;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1254 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1255 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1256 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1257 // if ( v15 == 99 || v14->field_48[4] == 99 || v14->field_48[15] == 99 || (v16 = BYTE1(v14->field_68), v16 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1258 // v17 = 5 * (v142->field_24 - v144->field_24);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1259 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1260 // v17 = 5 * (v148 + v14->field_48[4] + v14->field_48[15] + v16);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1261 // v18 = 4 * v17;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1262 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1263 // dword_4FA9B4[v13] += v18;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1264 // v21 = v14->field_38[1];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1265 // v146 = v14->field_38[1];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1266 // if ( v144->field_28 >= 10 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1267 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1268 // if ( v21 == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1269 // || v14->field_48[3] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1270 // || v14->field_48[14] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1271 // || (v24 = LOBYTE(v14->field_68), v24 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1272 // v25 = v142->field_28 - v144->field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1273 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1274 // v25 = v146 + v14->field_48[3] + v14->field_48[14] + v24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1275 // v23 = 2 * v25;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1276 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1277 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1278 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1279 // if ( v21 == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1280 // || v14->field_48[3] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1281 // || v14->field_48[14] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1282 // || (v22 = LOBYTE(v14->field_68), v22 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1283 // v23 = 5 * (v142->field_28 - v144->field_28);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1284 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1285 // v23 = 5 * (v146 + v14->field_48[3] + v14->field_48[14] + v22);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1286 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1287 // dword_4FA9B4[v13] += v23;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1288 // dword_4FA9B4[v13] += 7 * (v14->field_38[0] + v14->field_48[2] + v14->field_48[13] + v14->field_58[15]);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1289 // if ( BYTE2(v14->field_30) == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1290 // || v14->field_38[12] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1291 // || v14->field_48[7] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1292 // || (v26 = v14->field_58[9], v26 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1293 // v27 = 5 * (v142->field_2C - v144->field_2C);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1294 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1295 // v27 = 5 * (BYTE2(v14->field_30) + v14->field_38[12] + v14->field_48[7] + v26);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1296 // dword_4FA9B4[v13] += 8 * v27;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1297 // if ( BYTE3(v14->field_30) == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1298 // || v14->field_38[13] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1299 // || v14->field_48[8] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1300 // || (v28 = v14->field_58[10], v28 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1301 // v29 = 5 * (v142->field_30 - v144->field_30);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1302 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1303 // v29 = 5 * (BYTE3(v14->field_30) + v14->field_38[13] + v14->field_48[8] + v28);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1304 // dword_4FA9B4[v13] += 8 * v29;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1305 // if ( LOBYTE(v14->field_34) == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1306 // || v14->field_38[14] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1307 // || v14->field_48[9] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1308 // || (v30 = v14->field_58[11], v30 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1309 // v31 = 5 * (v142->field_34 - v144->field_34);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1310 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1311 // v31 = 5 * (LOBYTE(v14->field_34) + v14->field_38[14] + v14->field_48[9] + v30);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1312 // dword_4FA9B4[v13] += 8 * v31;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1313 // if ( BYTE1(v14->field_34) == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1314 // || v14->field_38[15] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1315 // || v14->field_48[10] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1316 // || (v32 = v14->field_58[12], v32 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1317 // v33 = v142->field_38 - v144->field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1318 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1319 // v33 = BYTE1(v14->field_34) + v14->field_38[15] + v14->field_48[10] + v32;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1320 // dword_4FA9B4[v13] += 2 * v33;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1321 // if ( BYTE2(v14->field_34) == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1322 // || v14->field_48[0] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1323 // || v14->field_48[11] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1324 // || (v34 = v14->field_58[13], v34 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1325 // v35 = v142->field_3C - v144->field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1326 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1327 // v35 = BYTE2(v14->field_34) + v14->field_48[0] + v14->field_48[11] + v34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1328 // dword_4FA9B4[v13] += 2 * v35;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1329 // if ( BYTE3(v14->field_34) == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1330 // || v14->field_48[1] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1331 // || v14->field_48[12] == 99
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1332 // || (v36 = v14->field_58[14], v36 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1333 // v37 = v142->field_40 - v144->field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1334 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1335 // v37 = BYTE3(v14->field_34) + v14->field_48[1] + v14->field_48[12] + v36;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1336 // dword_4FA9B4[v13] += 2 * v37;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1337 // if ( v14->field_38[11] == 99 || (v38 = v14->field_58[8], v38 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1338 // dword_4FA9B4[v13] += v144->field_24 - v142->field_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1339 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1340 // dword_4FA9B4[v13] -= v14->field_38[11] + v38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1341 // if ( v14->field_38[10] == 99 || (v39 = v14->field_58[7], v39 == 99) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1342 // dword_4FA9B4[v13] += v144->field_28 - v142->field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1343 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1344 // dword_4FA9B4[v13] -= v14->field_38[10] + v39;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1345 // v40 = v14->field_38[9];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1346 // v138 = v14->field_38[9];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1347 // dword_4FA9B4[v13] -= v40 + v14->field_58[6];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1348 // v41 = v14->field_38[3];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1349 // v42 = dword_4FA9B4[v13];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1350 // if ( v41 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1351 // goto LABEL_97;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1352 // v43 = v14->field_58[0];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1353 // if ( v43 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1354 // break;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1355 // v44 = v42 - v43;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1356 // v12 = 99;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1357 // dword_4FA9B4[v13] = v44 - v41;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1358 //LABEL_98:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1359 // if ( v14->field_38[4] == v12 || (v45 = v14->field_58[1], v45 == v12) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1360 // dword_4FA9B4[v13] += v144->field_30 - v142->field_30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1361 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1362 // dword_4FA9B4[v13] -= v14->field_38[4] + v45;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1363 // if ( v14->field_38[5] == v12 || (v46 = v14->field_58[2], v46 == v12) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1364 // dword_4FA9B4[v13] += v144->field_34 - v142->field_34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1365 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1366 // dword_4FA9B4[v13] -= v14->field_38[5] + v46;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1367 // if ( v14->field_38[6] == v12 || (v47 = v14->field_58[3], v47 == v12) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1368 // dword_4FA9B4[v13] += v144->field_38 - v142->field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1369 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1370 // dword_4FA9B4[v13] -= v14->field_38[6] + v47;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1371 // if ( v14->field_38[7] == v12 || (v48 = v14->field_58[4], v48 == v12) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1372 // dword_4FA9B4[v13] += v144->field_3C - v142->field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1373 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1374 // dword_4FA9B4[v13] -= v14->field_38[7] + v48;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1375 // if ( v14->field_38[8] == v12 || (v49 = v14->field_58[5], v49 == v12) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1376 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1377 // v51 = v144;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1378 // v50 = v142;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1379 // dword_4FA9B4[v13] += v144->field_40 - v142->field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1380 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1381 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1382 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1383 // v50 = v142;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1384 // dword_4FA9B4[v13] -= v14->field_38[8] + v49;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1385 // v51 = v144;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1386 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1387 // if ( LOBYTE(v14->field_30) || v14->field_48[5] )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1388 // dword_4FA9B4[v13] *= 10;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1389 // if ( LOBYTE(v14->field_24) == 1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1390 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1391 // v52 = LOBYTE(v14->field_28);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1392 // v53 = v51->field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1393 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1394 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1395 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1396 // if ( LOBYTE(v14->field_24) == 2 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1397 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1398 // v52 = BYTE1(v14->field_28);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1399 // v53 = v51->field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1400 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1401 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1402 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1403 // if ( LOBYTE(v14->field_24) != 3 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1404 // goto LABEL_130;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1405 // v52 = BYTE2(v14->field_28);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1406 // v53 = v51->field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1407 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1408 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1409 // v54 = v53 - v52;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1410 // if ( v54 > 3 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1411 // v54 = 3;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1412 // dword_4FA9B4[v13] += 5 * v54;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1413 //LABEL_130:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1414 // v55 = v14->field_58[8];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1415 // v139 = v50->field_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1416 // v125 = v14->field_38[11];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1417 // if ( v139 <= v55 + v125 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1418 // dword_4FA9B4[v13] += 9999;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1419 // v137 = v50->field_28 + v139;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1420 // if ( v137 <= v55 + v125 + v14->field_58[6] + v14->field_58[7] + v40 + v14->field_38[10] )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1421 // dword_4FA9B4[v13] += 9999;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1422 // if ( v14->field_48[15] + (signed int)BYTE1(v14->field_68) + v144->field_24 + v14->field_48[4] + v148 >= dword_4E1884 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1423 // dword_4FA9B4[v13] += 9999;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1424 // ++v131;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1425 // if ( v131 >= v135 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1426 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1427 // v9 = v129;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1428 // goto LABEL_138;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1429 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1430 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1431 // v12 = 99;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1432 //LABEL_97:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1433 // v40 = v138;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1434 // dword_4FA9B4[v13] = v42 + v144->field_2C - v142->field_2C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1435 // goto LABEL_98;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1436 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1437 //LABEL_138:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1438 // v56 = v135 - 1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1439 // for ( l = v135 - 1; l >= 0; --l )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1440 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1441 // v137 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1442 // if ( l > 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1443 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1444 // v58 = (int)dword_4FA9B0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1445 // v132 = l;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1446 // v137 = l;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1447 // do
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1448 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1449 // if ( *(unsigned int *)(v58 + 4) < *(unsigned int *)(v58 + 12) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1450 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1451 // v59 = *(unsigned int *)v58;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1452 // v60 = *(unsigned int *)(v58 + 4);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1453 // *(unsigned int *)v58 = *(unsigned int *)(v58 + 8);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1454 // v61 = *(unsigned int *)(v58 + 12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1455 // *(unsigned int *)(v58 + 8) = v59;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1456 // *(unsigned int *)(v58 + 4) = v61;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1457 // v9 = v129;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1458 // *(unsigned int *)(v58 + 12) = v60;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1459 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1460 // v58 += 8;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1461 // --v132;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1462 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1463 // while ( v132 );
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1464 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1465 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1466 // v62 = v135 - 1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1467 // if ( am_byte_4FAA77 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1468 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1469 // if ( v56 >= 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1470 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1471 // while ( !BYTE3(pCards[stru_505708[0].cards_at_hand[47 * v9 + dword_4FA9B0[2 * v62]]].field_28) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1472 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1473 // --v62;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1474 // if ( v62 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1475 // return am_40BCFB(v9, v137) != 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1476 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1477 // v137 = dword_4FA9B0[2 * v62];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1478 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1479 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1480 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1481 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1482 // v63 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1483 // if ( v56 >= 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1484 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1485 // while ( !BYTE3(pCards[stru_505708[0].cards_at_hand[47 * v9 + dword_4FA9B0[2 * v62]]].field_28) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1486 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1487 // --v62;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1488 // if ( v62 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1489 // goto LABEL_151;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1490 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1491 // v137 = dword_4FA9B0[2 * v62];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1492 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1493 //LABEL_151:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1494 // if ( v135 > 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1495 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1496 // while ( !am_40BF15(v9, dword_4FA9B0[2 * v63]) || dword_4FA9B4[2 * v63] < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1497 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1498 // ++v63;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1499 // if ( v63 >= v135 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1500 // return am_40BCFB(v9, v137) != 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1501 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1502 // return am_40BE0E(v9, dword_4FA9B0[2 * v63]) != 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1503 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1504 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1505 // return am_40BCFB(v9, v137) != 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1506 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1507 // v3 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1508 // v4 = a1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1509 // if ( am_byte_4FAA77 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1510 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1511 //LABEL_11:
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1512 // v7 = GetPlayerHandCardCount(v4);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1513 // v8 = rand_interval(0, v7 - 1);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1514 // result = am_40BCFB(v4, v8);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1515 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1516 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1517 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1518 // while ( 1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1519 // {
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1520 // v5 = GetPlayerHandCardCount(v4);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1521 // v6 = rand_interval(0, v5 - 1);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1522 // if ( am_40BF15(v4, v6) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1523 // break;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1524 // ++v3;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1525 // if ( v3 >= 10 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1526 // goto LABEL_11;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1527 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1528 // result = am_40BE0E(v4, v6);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1529 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1530 return true;//result != 0;
0
Ritor1
parents:
diff changeset
1531 }
Ritor1
parents:
diff changeset
1532 // 408BB4: could not find valid save-restore pair for ebp
Ritor1
parents:
diff changeset
1533 // 4DF3A4: using guessed type int dword_4DF3A4;
Ritor1
parents:
diff changeset
1534 // 4E1884: using guessed type int dword_4E1884;
Ritor1
parents:
diff changeset
1535 // 4FA9B0: using guessed type int dword_4FA9B0[];
Ritor1
parents:
diff changeset
1536 // 4FA9B4: using guessed type int dword_4FA9B4[];
Ritor1
parents:
diff changeset
1537 // 4FAA00: using guessed type char byte_4FAA00;
Ritor1
parents:
diff changeset
1538 // 4FAA77: using guessed type char am_byte_4FAA77;
Ritor1
parents:
diff changeset
1539
Ritor1
parents:
diff changeset
1540
Ritor1
parents:
diff changeset
1541
Ritor1
parents:
diff changeset
1542 //----- (00409E6A) --------------------------------------------------------
Ritor1
parents:
diff changeset
1543 void ArcomageGame::Loop()
Ritor1
parents:
diff changeset
1544 {
Ritor1
parents:
diff changeset
1545 int v0; // edx@2
Ritor1
parents:
diff changeset
1546 int v1; // ecx@14
Ritor1
parents:
diff changeset
1547 signed int v2; // eax@15
Ritor1
parents:
diff changeset
1548 stru272 *v3; // esi@17
Ritor1
parents:
diff changeset
1549 __int16 *v4; // esi@23
Ritor1
parents:
diff changeset
1550
Ritor1
parents:
diff changeset
1551 while ( !pArcomageGame->field_F5 )
Ritor1
parents:
diff changeset
1552 {
Ritor1
parents:
diff changeset
1553 pArcomageGame->field_F6 = 1;
Ritor1
parents:
diff changeset
1554 byte_4FAA24 = 1;
Ritor1
parents:
diff changeset
1555 am_40A346(amuint_4FAA6C);
Ritor1
parents:
diff changeset
1556 LABEL_8:
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1557 while ( byte_4FAA24 )
0
Ritor1
parents:
diff changeset
1558 {
Ritor1
parents:
diff changeset
1559 amuint_4FABC0 = -1;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1560 am_40A283(amuint_4FAA6C);
0
Ritor1
parents:
diff changeset
1561 while ( 1 )
Ritor1
parents:
diff changeset
1562 {
Ritor1
parents:
diff changeset
1563 byte_4FAA24 = am_40A560(amuint_4FAA6C);
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1564 if ( GetPlayerHandCardCount(amuint_4FAA6C) <= dword_4E1874 )
0
Ritor1
parents:
diff changeset
1565 break;
Ritor1
parents:
diff changeset
1566 am_byte_4FAA77 = 1;
Ritor1
parents:
diff changeset
1567 if ( pArcomageGame->field_F4 )
Ritor1
parents:
diff changeset
1568 goto LABEL_8;
Ritor1
parents:
diff changeset
1569 }
Ritor1
parents:
diff changeset
1570 am_byte_4FAA77 = 0;
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1571 }
0
Ritor1
parents:
diff changeset
1572 pArcomageGame->field_F5 = am_40A514();
Ritor1
parents:
diff changeset
1573 if ( !pArcomageGame->field_F5 )
Ritor1
parents:
diff changeset
1574 am_40A383();
Ritor1
parents:
diff changeset
1575 if ( pArcomageGame->field_F4 )
Ritor1
parents:
diff changeset
1576 pArcomageGame->field_F5 = 1;
Ritor1
parents:
diff changeset
1577 }
Ritor1
parents:
diff changeset
1578 am_40D444();
Ritor1
parents:
diff changeset
1579 if ( byte_4FAA2C )
Ritor1
parents:
diff changeset
1580 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1581 // v2 = retzero_sub_40DFA7((int)dword_4FAA28);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1582 // v1 = 1000;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1583 // dword_4FAA70 = v2 / 1000;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1584 dword_4FAA70 = 0;
0
Ritor1
parents:
diff changeset
1585 }
Ritor1
parents:
diff changeset
1586 else
Ritor1
parents:
diff changeset
1587 {
Ritor1
parents:
diff changeset
1588 dword_4FAA70 = -1;
Ritor1
parents:
diff changeset
1589 }
Ritor1
parents:
diff changeset
1590 pVideoPlayer->BinkUpdatePalette(dword_4FAA28);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1591
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
1592 for(int i=0; i<10; ++i)
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
1593 {
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
1594 array_4FABD0[i].field_40->_40E0F5(1,1);
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
1595 array_4FABD0[i].field_40->_40DFFE();
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
1596 }
1038
39f42990698f Cleanings
Nomad
parents: 1033
diff changeset
1597
0
Ritor1
parents:
diff changeset
1598 pArcomageGame->pGameBackground.Release();
Ritor1
parents:
diff changeset
1599 pArcomageGame->pSprites.Release();
Ritor1
parents:
diff changeset
1600 pArcomageGame->bGameInProgress = 0;
Ritor1
parents:
diff changeset
1601 viewparams->bRedrawGameUI = 1;
Ritor1
parents:
diff changeset
1602 if ( pVideoPlayer->AnyMovieLoaded() )
Ritor1
parents:
diff changeset
1603 pVideoPlayer->_4BF5B2();
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1604 for(int i=0; i<12; ++i)
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1605 pSoundList->UnloadSound(am_sounds[i], 1);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1606
0
Ritor1
parents:
diff changeset
1607 }
938
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
1608
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
1609
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
1610
0
Ritor1
parents:
diff changeset
1611
Ritor1
parents:
diff changeset
1612 //----- (00409FE9) --------------------------------------------------------
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1613 void am_409FE9()
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1614 {
0
Ritor1
parents:
diff changeset
1615 signed int v0; // edi@1
Ritor1
parents:
diff changeset
1616 signed int v1; // esi@4
Ritor1
parents:
diff changeset
1617 int *v2; // ecx@7
Ritor1
parents:
diff changeset
1618 int *v3; // eax@7
Ritor1
parents:
diff changeset
1619 signed int v4; // edx@7
Ritor1
parents:
diff changeset
1620 int v5; // edx@13
Ritor1
parents:
diff changeset
1621 signed int v6; // ecx@13
Ritor1
parents:
diff changeset
1622 signed int v7; // eax@13
Ritor1
parents:
diff changeset
1623
Ritor1
parents:
diff changeset
1624 amuint_4FAA6C = dword_505890;
Ritor1
parents:
diff changeset
1625 sub_409BE8();
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1626 for(v0=0; v0<2; ++v0 )
0
Ritor1
parents:
diff changeset
1627 {
Ritor1
parents:
diff changeset
1628 if ( v0 )
Ritor1
parents:
diff changeset
1629 {
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1630 inv_strcpy(pArcomageGame->pPlayer2Name, am_Players[1].pPlayerName);
0
Ritor1
parents:
diff changeset
1631 if ( byte_4E185C )
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1632 am_Players[1].field_20 = 0;
0
Ritor1
parents:
diff changeset
1633 else
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1634 am_Players[1].field_20 = 1;
0
Ritor1
parents:
diff changeset
1635 }
Ritor1
parents:
diff changeset
1636 else
Ritor1
parents:
diff changeset
1637 {
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1638 inv_strcpy(pArcomageGame->pPlayer1Name, am_Players[0].pPlayerName);
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1639 am_Players[0].field_20 = 1;
0
Ritor1
parents:
diff changeset
1640 }
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1641 am_Players[v0].field_24 = amuint_4E1860;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1642 am_Players[v0].field_28 = amuint_4E1864;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1643 am_Players[v0].field_2C = amuint_4E1868;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1644 am_Players[v0].field_30 = amuint_4E186C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1645 am_Players[v0].field_34 = amuint_4E1870;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1646 am_Players[v0].field_38 = amuint_505884;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1647 am_Players[v0].field_3C = amuint_505888;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1648 am_Players[v0].field_40 = amuint_50588C;
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1649
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1650 for (v4=0; v4<10; ++v4 )
0
Ritor1
parents:
diff changeset
1651 {
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1652 am_Players[v0].cards_at_hand[v4] = -1;
0
Ritor1
parents:
diff changeset
1653 if ( am_byte_4E185D )
Ritor1
parents:
diff changeset
1654 {
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1655 am_Players[v0].arr_6C[v4].field_0 = -1;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1656 am_Players[v0].arr_6C[v4].field_4 = -1;
0
Ritor1
parents:
diff changeset
1657 }
Ritor1
parents:
diff changeset
1658 else
Ritor1
parents:
diff changeset
1659 {
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1660 am_Players[v0].arr_6C[v4].field_0 = 0;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1661 am_Players[v0].arr_6C[v4].field_4 = 0;
0
Ritor1
parents:
diff changeset
1662 }
Ritor1
parents:
diff changeset
1663 }
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1664
0
Ritor1
parents:
diff changeset
1665 }
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1666
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1667
0
Ritor1
parents:
diff changeset
1668 inv_strcpy(pDeckMaster, byte_5054C8);
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1669 for (v6=0, v7=-2, v5=0; v6<108; ++v6, ++v7)
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1670 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1671 byte_5054E8[v6] = 0;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1672 dword_505554[v6] =v5;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1673 switch ( v7 )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1674 {
0
Ritor1
parents:
diff changeset
1675 case 0:
Ritor1
parents:
diff changeset
1676 case 2:
Ritor1
parents:
diff changeset
1677 case 6:
Ritor1
parents:
diff changeset
1678 case 9:
Ritor1
parents:
diff changeset
1679 case 13:
Ritor1
parents:
diff changeset
1680 case 18:
Ritor1
parents:
diff changeset
1681 case 23:
Ritor1
parents:
diff changeset
1682 case 33:
Ritor1
parents:
diff changeset
1683 case 36:
Ritor1
parents:
diff changeset
1684 case 38:
Ritor1
parents:
diff changeset
1685 case 44:
Ritor1
parents:
diff changeset
1686 case 46:
Ritor1
parents:
diff changeset
1687 case 52:
Ritor1
parents:
diff changeset
1688 case 57:
Ritor1
parents:
diff changeset
1689 case 69:
Ritor1
parents:
diff changeset
1690 case 71:
Ritor1
parents:
diff changeset
1691 case 75:
Ritor1
parents:
diff changeset
1692 case 79:
Ritor1
parents:
diff changeset
1693 case 81:
Ritor1
parents:
diff changeset
1694 case 84:
Ritor1
parents:
diff changeset
1695 case 89:
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1696 break;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1697 default:
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1698 ++v5;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1699 }
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1700 }
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1701
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1702 am_40A198();
0
Ritor1
parents:
diff changeset
1703 }
Ritor1
parents:
diff changeset
1704 // 4E185C: using guessed type char byte_4E185C;
Ritor1
parents:
diff changeset
1705 // 4E185D: using guessed type char am_byte_4E185D;
Ritor1
parents:
diff changeset
1706 // 4E1860: using guessed type int amuint_4E1860;
Ritor1
parents:
diff changeset
1707 // 4E1864: using guessed type int amuint_4E1864;
Ritor1
parents:
diff changeset
1708 // 4E1868: using guessed type int amuint_4E1868;
Ritor1
parents:
diff changeset
1709 // 4E186C: using guessed type int amuint_4E186C;
Ritor1
parents:
diff changeset
1710 // 4E1870: using guessed type int amuint_4E1870;
Ritor1
parents:
diff changeset
1711 // 505554: using guessed type int dword_505554[];
Ritor1
parents:
diff changeset
1712 // 505884: using guessed type int amuint_505884;
Ritor1
parents:
diff changeset
1713 // 505888: using guessed type int amuint_505888;
Ritor1
parents:
diff changeset
1714 // 50588C: using guessed type int amuint_50588C;
Ritor1
parents:
diff changeset
1715 // 505890: using guessed type int dword_505890;
Ritor1
parents:
diff changeset
1716
Ritor1
parents:
diff changeset
1717 //----- (0040A198) --------------------------------------------------------
Ritor1
parents:
diff changeset
1718 char __cdecl am_40A198()
Ritor1
parents:
diff changeset
1719 {
Ritor1
parents:
diff changeset
1720 int *v0; // edi@1
Ritor1
parents:
diff changeset
1721 int *v1; // edx@2
Ritor1
parents:
diff changeset
1722 signed int v2; // esi@2
Ritor1
parents:
diff changeset
1723 signed int v3; // eax@4
Ritor1
parents:
diff changeset
1724 signed int v4; // esi@12
Ritor1
parents:
diff changeset
1725 int v5; // eax@13
Ritor1
parents:
diff changeset
1726 int v6; // edx@13
Ritor1
parents:
diff changeset
1727 char *v7; // eax@13
Ritor1
parents:
diff changeset
1728 char result; // al@14
Ritor1
parents:
diff changeset
1729 char v9[108]; // [sp+8h] [bp-6Ch]@1
Ritor1
parents:
diff changeset
1730
Ritor1
parents:
diff changeset
1731 ArcomageGame::PlaySound(0x14u);
Ritor1
parents:
diff changeset
1732 memset(byte_5054E8, 0, sizeof(byte_5054E8));
Ritor1
parents:
diff changeset
1733 memset(v9, 0, sizeof(v9));
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1734 v0 = am_Players[0].cards_at_hand;//variable incorrect
0
Ritor1
parents:
diff changeset
1735 do
Ritor1
parents:
diff changeset
1736 {
Ritor1
parents:
diff changeset
1737 v1 = v0;
Ritor1
parents:
diff changeset
1738 v2 = 10;
Ritor1
parents:
diff changeset
1739 do
Ritor1
parents:
diff changeset
1740 {
Ritor1
parents:
diff changeset
1741 if ( *v1 > -1 )
Ritor1
parents:
diff changeset
1742 {
Ritor1
parents:
diff changeset
1743 v3 = 0;
Ritor1
parents:
diff changeset
1744 while ( dword_505554[v3] != *v1 || byte_5054E8[v3] )
Ritor1
parents:
diff changeset
1745 {
Ritor1
parents:
diff changeset
1746 ++v3;
Ritor1
parents:
diff changeset
1747 if ( v3 >= 108 )
Ritor1
parents:
diff changeset
1748 goto LABEL_10;
Ritor1
parents:
diff changeset
1749 }
Ritor1
parents:
diff changeset
1750 byte_5054E8[v3] = 1;
Ritor1
parents:
diff changeset
1751 }
Ritor1
parents:
diff changeset
1752 LABEL_10:
Ritor1
parents:
diff changeset
1753 ++v1;
Ritor1
parents:
diff changeset
1754 --v2;
Ritor1
parents:
diff changeset
1755 }
Ritor1
parents:
diff changeset
1756 while ( v2 );
Ritor1
parents:
diff changeset
1757 v0 += 47;
Ritor1
parents:
diff changeset
1758 }
1135
Ritor1
parents: 1038
diff changeset
1759 while ( (signed int)v0 < 2 );//(signed int)&pArcomageGame->msg.pt.y );
0
Ritor1
parents:
diff changeset
1760 v4 = 0;
Ritor1
parents:
diff changeset
1761 do
Ritor1
parents:
diff changeset
1762 {
Ritor1
parents:
diff changeset
1763 do
Ritor1
parents:
diff changeset
1764 {
Ritor1
parents:
diff changeset
1765 v5 = rand();
Ritor1
parents:
diff changeset
1766 v6 = v5 % 108;
Ritor1
parents:
diff changeset
1767 v7 = &v9[v5 % 108];
Ritor1
parents:
diff changeset
1768 }
Ritor1
parents:
diff changeset
1769 while ( *v7 == 1 );
Ritor1
parents:
diff changeset
1770 *v7 = 1;
Ritor1
parents:
diff changeset
1771 dword_505314[v4] = dword_505554[v6];
Ritor1
parents:
diff changeset
1772 result = byte_5054E8[v6];
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
1773 //array_4FABD0[9].field_4[v4++ + 4232] = result;//çàòèðàåò pArcomageGame
0
Ritor1
parents:
diff changeset
1774 }
Ritor1
parents:
diff changeset
1775 while ( v4 < 108 );
Ritor1
parents:
diff changeset
1776 dword_4FABC8 = 0;
Ritor1
parents:
diff changeset
1777 amuint_4FABC4 = -1;
Ritor1
parents:
diff changeset
1778 pArcomageGame->field_F6 = 1;
Ritor1
parents:
diff changeset
1779 return result;
Ritor1
parents:
diff changeset
1780 }
Ritor1
parents:
diff changeset
1781 // 4FABC4: using guessed type int amuint_4FABC4;
Ritor1
parents:
diff changeset
1782 // 4FABC8: using guessed type int dword_4FABC8;
Ritor1
parents:
diff changeset
1783 // 505314: using guessed type int dword_505314[];
Ritor1
parents:
diff changeset
1784 // 505554: using guessed type int dword_505554[];
Ritor1
parents:
diff changeset
1785 // 40A198: using guessed type char var_6C[108];
Ritor1
parents:
diff changeset
1786
Ritor1
parents:
diff changeset
1787 //----- (0040A255) --------------------------------------------------------
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1788 void am_40A255()
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1789 {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1790 for (int i = 0; i < dword_4E1874; ++i )
0
Ritor1
parents:
diff changeset
1791 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1792 am_40A283(0);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1793 am_40A283(1);
0
Ritor1
parents:
diff changeset
1794 }
Ritor1
parents:
diff changeset
1795 pArcomageGame->field_F6 = 1;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1796
0
Ritor1
parents:
diff changeset
1797 }
Ritor1
parents:
diff changeset
1798 // 4E1874: using guessed type int dword_4E1874;
Ritor1
parents:
diff changeset
1799
Ritor1
parents:
diff changeset
1800 //----- (0040A283) --------------------------------------------------------
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1801 void am_40A283( int a1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1802 {
0
Ritor1
parents:
diff changeset
1803 signed int v2; // eax@1
Ritor1
parents:
diff changeset
1804 int v3; // edi@1
Ritor1
parents:
diff changeset
1805 int v4; // esi@1
Ritor1
parents:
diff changeset
1806 char v5; // bl@1
Ritor1
parents:
diff changeset
1807 signed int result; // eax@7
Ritor1
parents:
diff changeset
1808 int v7; // esi@8
Ritor1
parents:
diff changeset
1809
Ritor1
parents:
diff changeset
1810 v2 = dword_4FABC8;
Ritor1
parents:
diff changeset
1811 v3 = a1;
Ritor1
parents:
diff changeset
1812 v4 = a1;
Ritor1
parents:
diff changeset
1813 v5 = 0;
Ritor1
parents:
diff changeset
1814 do
Ritor1
parents:
diff changeset
1815 {
Ritor1
parents:
diff changeset
1816 if ( v2 >= 108 )
Ritor1
parents:
diff changeset
1817 {
Ritor1
parents:
diff changeset
1818 am_40A198();
Ritor1
parents:
diff changeset
1819 v2 = dword_4FABC8;
Ritor1
parents:
diff changeset
1820 }
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
1821 if ( !byte_5052A8[v2] )
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
1822 {
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
1823 v3 = dword_505314[v2];
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
1824 v5 = 1;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
1825 }
0
Ritor1
parents:
diff changeset
1826 ++v2;
Ritor1
parents:
diff changeset
1827 dword_4FABC8 = v2;
Ritor1
parents:
diff changeset
1828 }
Ritor1
parents:
diff changeset
1829 while ( !v5 );
Ritor1
parents:
diff changeset
1830 ArcomageGame::PlaySound(0x15u);
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1831 result = GetEmptyCardSlotIndex(v4);
0
Ritor1
parents:
diff changeset
1832 if ( result != -1 )
Ritor1
parents:
diff changeset
1833 {
Ritor1
parents:
diff changeset
1834 amuint_4FAA4C = result;
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
1835 am_Players[a1].cards_at_hand[result] = v3;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
1836 am_Players[a1].arr_6C[result].field_0 = rand_interval(-4, 4);
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
1837 am_Players[a1].arr_6C[result].field_4 = rand_interval(-4, 4);
0
Ritor1
parents:
diff changeset
1838 pArcomageGame->field_F6 = 1;
Ritor1
parents:
diff changeset
1839 byte_4FAA2D = 1;
Ritor1
parents:
diff changeset
1840 }
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1841
0
Ritor1
parents:
diff changeset
1842 }
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
1843
0
Ritor1
parents:
diff changeset
1844
Ritor1
parents:
diff changeset
1845 //----- (0040A324) --------------------------------------------------------
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1846 int GetEmptyCardSlotIndex( int player_num )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1847 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1848 int i;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1849 for (i=0; i<10; ++i )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1850 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1851 if (am_Players[player_num].cards_at_hand[i]==-1)
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1852 break;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1853 }
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1854 if ( i >= 10 )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1855 return -1;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1856 else
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1857 return i;
0
Ritor1
parents:
diff changeset
1858 }
Ritor1
parents:
diff changeset
1859
Ritor1
parents:
diff changeset
1860 //----- (0040A346) --------------------------------------------------------
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1861 void am_40A346( int player_num )
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1862 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1863 am_Players[player_num].field_38 += dword_4E1878 + am_Players[player_num].field_2C;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1864 am_Players[player_num].field_3C += dword_4E187C + am_Players[player_num].field_30;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
1865 am_Players[player_num].field_40 += dword_4E1880 + am_Players[player_num].field_34;
0
Ritor1
parents:
diff changeset
1866 }
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1867
0
Ritor1
parents:
diff changeset
1868
Ritor1
parents:
diff changeset
1869 //----- (0040A383) --------------------------------------------------------
Ritor1
parents:
diff changeset
1870 void __cdecl am_40A383()
Ritor1
parents:
diff changeset
1871 {
Ritor1
parents:
diff changeset
1872 int v0; // eax@4
Ritor1
parents:
diff changeset
1873 int v1; // ecx@4
Ritor1
parents:
diff changeset
1874 unsigned __int8 v2; // sf@4
Ritor1
parents:
diff changeset
1875 unsigned __int8 v3; // of@4
Ritor1
parents:
diff changeset
1876 int v4; // eax@6
Ritor1
parents:
diff changeset
1877 char Dest[64]; // [sp+4h] [bp-64h]@4
Ritor1
parents:
diff changeset
1878 int v6; // [sp+44h] [bp-24h]@6
Ritor1
parents:
diff changeset
1879 int v7; // [sp+48h] [bp-20h]@6
Ritor1
parents:
diff changeset
1880 int v8; // [sp+4Ch] [bp-1Ch]@6
Ritor1
parents:
diff changeset
1881 int v9; // [sp+50h] [bp-18h]@6
Ritor1
parents:
diff changeset
1882 ArcomageGame_stru1 v10; // [sp+54h] [bp-14h]@7
Ritor1
parents:
diff changeset
1883 int v11[2]; // [sp+60h] [bp-8h]@4
Ritor1
parents:
diff changeset
1884
Ritor1
parents:
diff changeset
1885 if ( !pArcomageGame->field_F4 )
Ritor1
parents:
diff changeset
1886 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1887 if ( LOBYTE(am_Players[0].field_20) != 1 || LOBYTE(am_Players[1].field_20) != 1 )
0
Ritor1
parents:
diff changeset
1888 {
Ritor1
parents:
diff changeset
1889 ++amuint_4FAA6C;
Ritor1
parents:
diff changeset
1890 am_byte_4FAA75 = 1;
Ritor1
parents:
diff changeset
1891 if ( amuint_4FAA6C >= 2 )
Ritor1
parents:
diff changeset
1892 amuint_4FAA6C = 0;
Ritor1
parents:
diff changeset
1893 }
Ritor1
parents:
diff changeset
1894 else
Ritor1
parents:
diff changeset
1895 {
Ritor1
parents:
diff changeset
1896 //nullsub_1();
Ritor1
parents:
diff changeset
1897 v11[0] = 0;
Ritor1
parents:
diff changeset
1898 v11[1] = 0;
Ritor1
parents:
diff changeset
1899 inv_strcpy("Ñëåä", Dest);
Ritor1
parents:
diff changeset
1900 v0 = 0;
Ritor1
parents:
diff changeset
1901 v11[1] = 200;
Ritor1
parents:
diff changeset
1902 v11[0] = 320 - 12 * v0 / 2;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1903 // pPrimaryWindow_draws_text(-1, Dest, v11);
0
Ritor1
parents:
diff changeset
1904 am_byte_4FAA75 = 1;
Ritor1
parents:
diff changeset
1905 v1 = amuint_4FAA6C + 1;
Ritor1
parents:
diff changeset
1906 v3 = __OFSUB__(amuint_4FAA6C + 1, 2);
Ritor1
parents:
diff changeset
1907 v2 = amuint_4FAA6C++ - 1 < 0;
Ritor1
parents:
diff changeset
1908 if ( !(v2 ^ v3) )
Ritor1
parents:
diff changeset
1909 {
Ritor1
parents:
diff changeset
1910 v1 = 0;
Ritor1
parents:
diff changeset
1911 amuint_4FAA6C = 0;
Ritor1
parents:
diff changeset
1912 }
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1913 inv_strcpy(am_Players[v1].pPlayerName, Dest);
0
Ritor1
parents:
diff changeset
1914 v4 = 0;
Ritor1
parents:
diff changeset
1915 v11[1] = 260;
Ritor1
parents:
diff changeset
1916 v11[0] = 320 - 12 * v4 / 2;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1917 // pPrimaryWindow_draws_text(-1, Dest, v11);
0
Ritor1
parents:
diff changeset
1918 v6 = 0;
Ritor1
parents:
diff changeset
1919 v8 = 640;
Ritor1
parents:
diff changeset
1920 v7 = 0;
Ritor1
parents:
diff changeset
1921 v9 = 480;
Ritor1
parents:
diff changeset
1922 //nullsub_1();
Ritor1
parents:
diff changeset
1923 CallRenderPresent();
Ritor1
parents:
diff changeset
1924 //nullsub_1();
Ritor1
parents:
diff changeset
1925 while ( 1 )
Ritor1
parents:
diff changeset
1926 {
Ritor1
parents:
diff changeset
1927 while ( 1 )
Ritor1
parents:
diff changeset
1928 {
Ritor1
parents:
diff changeset
1929 while ( !ArcomageGame::MsgLoop(20, &v10) )
Ritor1
parents:
diff changeset
1930 ;
Ritor1
parents:
diff changeset
1931 if ( v10.field_0 != 1 )
Ritor1
parents:
diff changeset
1932 break;
Ritor1
parents:
diff changeset
1933 if ( v10.field_4 )
Ritor1
parents:
diff changeset
1934 goto LABEL_13;
Ritor1
parents:
diff changeset
1935 //nullsub_1();
Ritor1
parents:
diff changeset
1936 }
Ritor1
parents:
diff changeset
1937 if ( v10.field_0 > 4 )
Ritor1
parents:
diff changeset
1938 {
Ritor1
parents:
diff changeset
1939 if ( v10.field_0 <= 8 )
Ritor1
parents:
diff changeset
1940 goto LABEL_13;
Ritor1
parents:
diff changeset
1941 if ( v10.field_0 == 10 )
Ritor1
parents:
diff changeset
1942 break;
Ritor1
parents:
diff changeset
1943 }
Ritor1
parents:
diff changeset
1944 }
Ritor1
parents:
diff changeset
1945 pArcomageGame->field_F4 = 1;
Ritor1
parents:
diff changeset
1946 byte_4FAA74 = 1;
Ritor1
parents:
diff changeset
1947 LABEL_13:
Ritor1
parents:
diff changeset
1948 v11[0] = 0;
Ritor1
parents:
diff changeset
1949 v11[1] = 0;
Ritor1
parents:
diff changeset
1950 v6 = 0;
Ritor1
parents:
diff changeset
1951 v8 = 640;
Ritor1
parents:
diff changeset
1952 v7 = 0;
Ritor1
parents:
diff changeset
1953 v9 = 480;
Ritor1
parents:
diff changeset
1954 //nullsub_1();
Ritor1
parents:
diff changeset
1955 CallRenderPresent();
Ritor1
parents:
diff changeset
1956 }
Ritor1
parents:
diff changeset
1957 }
Ritor1
parents:
diff changeset
1958 }
Ritor1
parents:
diff changeset
1959
Ritor1
parents:
diff changeset
1960
Ritor1
parents:
diff changeset
1961 //----- (0040A514) --------------------------------------------------------
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1962 bool am_40A514()
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1963 {
0
Ritor1
parents:
diff changeset
1964 bool result; // eax@1
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1965
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1966 result = false;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1967 for(int i=0; i<2; ++i)
0
Ritor1
parents:
diff changeset
1968 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1969 if ( am_Players[i].field_24 <= 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1970 result = true;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1971 if ( am_Players[i].field_24 >= dword_4E1884 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1972 result = true;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1973 if ( am_Players[i].field_38 >= dword_4E1888
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1974 || am_Players[i].field_3C >= dword_4E1888
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1975 || am_Players[i].field_40 >= dword_4E1888 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1976 result = true;
0
Ritor1
parents:
diff changeset
1977 }
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
1978
0
Ritor1
parents:
diff changeset
1979 if ( result )
Ritor1
parents:
diff changeset
1980 byte_4FAA2C = 1;
Ritor1
parents:
diff changeset
1981 return result;
Ritor1
parents:
diff changeset
1982 }
Ritor1
parents:
diff changeset
1983 // 4E1884: using guessed type int dword_4E1884;
Ritor1
parents:
diff changeset
1984 // 4E1888: using guessed type int dword_4E1888;
Ritor1
parents:
diff changeset
1985 // 4FAA2C: using guessed type char byte_4FAA2C;
Ritor1
parents:
diff changeset
1986
Ritor1
parents:
diff changeset
1987 //----- (0040A560) --------------------------------------------------------
Ritor1
parents:
diff changeset
1988 char am_40A560(unsigned int _this)
Ritor1
parents:
diff changeset
1989 {
Ritor1
parents:
diff changeset
1990 int v1; // ebp@0
Ritor1
parents:
diff changeset
1991 unsigned __int64 v2; // qax@3
Ritor1
parents:
diff changeset
1992 unsigned __int64 v3; // kr00_8@3
Ritor1
parents:
diff changeset
1993 int v4; // ecx@17
Ritor1
parents:
diff changeset
1994 int v5; // esi@67
Ritor1
parents:
diff changeset
1995 char Dest[100]; // [sp+8h] [bp-A8h]@67
Ritor1
parents:
diff changeset
1996 int v8; // [sp+6Ch] [bp-44h]@3
Ritor1
parents:
diff changeset
1997 int pSrcXYZW[4]; // [sp+70h] [bp-40h]@75
Ritor1
parents:
diff changeset
1998 int v10[4]; // [sp+80h] [bp-30h]@69
Ritor1
parents:
diff changeset
1999 int pTargetXY[2]; // [sp+90h] [bp-20h]@75
Ritor1
parents:
diff changeset
2000 ArcomageGame_stru1 a2; // [sp+98h] [bp-18h]@8
Ritor1
parents:
diff changeset
2001 int v13; // [sp+A4h] [bp-Ch]@1
Ritor1
parents:
diff changeset
2002 int a1; // [sp+A8h] [bp-8h]@1
Ritor1
parents:
diff changeset
2003 char v15; // [sp+AEh] [bp-2h]@63
Ritor1
parents:
diff changeset
2004 char v16; // [sp+AFh] [bp-1h]@1
Ritor1
parents:
diff changeset
2005
Ritor1
parents:
diff changeset
2006 uCardID = -1;
Ritor1
parents:
diff changeset
2007 a1 = _this;
Ritor1
parents:
diff changeset
2008 v16 = 0;
Ritor1
parents:
diff changeset
2009 v13 = 20;
Ritor1
parents:
diff changeset
2010 byte_4FAA00 = 0;
Ritor1
parents:
diff changeset
2011 dword_4FAA68 = 0;
Ritor1
parents:
diff changeset
2012 amuint_4FAA38 = 10;
Ritor1
parents:
diff changeset
2013 amuint_4FAA34 = 5;
Ritor1
parents:
diff changeset
2014 if ( amuint_4FAA4C != -1 )
Ritor1
parents:
diff changeset
2015 byte_4FAA2D = 1;
Ritor1
parents:
diff changeset
2016 do
Ritor1
parents:
diff changeset
2017 {
Ritor1
parents:
diff changeset
2018 do
Ritor1
parents:
diff changeset
2019 {
Ritor1
parents:
diff changeset
2020 do
Ritor1
parents:
diff changeset
2021 {
Ritor1
parents:
diff changeset
2022 v2 = pEventTimer->Time();
Ritor1
parents:
diff changeset
2023 v3 = v2 - pArcomageGame->event_timer_time;
Ritor1
parents:
diff changeset
2024 v8 = HIDWORD(v3);
Ritor1
parents:
diff changeset
2025 }
Ritor1
parents:
diff changeset
2026 while ( SHIDWORD(v3) < 0 );
Ritor1
parents:
diff changeset
2027 }
Ritor1
parents:
diff changeset
2028 while ( SHIDWORD(v2) < (signed int)(((unsigned int)v2 < pArcomageGame->event_timer_time)
Ritor1
parents:
diff changeset
2029 + ((unsigned __int64)pArcomageGame->event_timer_time >> 32)) | HIDWORD(v3) == 0
Ritor1
parents:
diff changeset
2030 && (unsigned int)v3 < 6 );
Ritor1
parents:
diff changeset
2031 pArcomageGame->event_timer_time = pEventTimer->Time();
Ritor1
parents:
diff changeset
2032 if ( pArcomageGame->field_F4 )
Ritor1
parents:
diff changeset
2033 v16 = 1;
Ritor1
parents:
diff changeset
2034 ArcomageGame::MsgLoop(0, &a2);
Ritor1
parents:
diff changeset
2035 switch ( a2.field_0 )
Ritor1
parents:
diff changeset
2036 {
Ritor1
parents:
diff changeset
2037 case 2:
Ritor1
parents:
diff changeset
2038 if ( a2.field_4 == 129 && a2.field_8 == 1 )
Ritor1
parents:
diff changeset
2039 {
Ritor1
parents:
diff changeset
2040 pAudioPlayer->StopChannels(-1, -1);
Ritor1
parents:
diff changeset
2041 dword_4FAA68 = 0;
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2042 v16 = 1;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2043 pArcomageGame->field_F4 = 1;
0
Ritor1
parents:
diff changeset
2044 }
Ritor1
parents:
diff changeset
2045 break;
Ritor1
parents:
diff changeset
2046 case 9:
Ritor1
parents:
diff changeset
2047 pArcomageGame->field_F6 = 1;
Ritor1
parents:
diff changeset
2048 break;
Ritor1
parents:
diff changeset
2049 case 0xA:
Ritor1
parents:
diff changeset
2050 pAudioPlayer->StopChannels(-1, -1);
Ritor1
parents:
diff changeset
2051 byte_4FAA74 = 1;
Ritor1
parents:
diff changeset
2052 v16 = 1;
Ritor1
parents:
diff changeset
2053 pArcomageGame->field_F4 = 1;
Ritor1
parents:
diff changeset
2054 break;
Ritor1
parents:
diff changeset
2055 }
Ritor1
parents:
diff changeset
2056 v4 = amuint_4FAA6C;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2057 if ( LOBYTE(am_Players[amuint_4FAA6C].field_20) != 1 && !byte_4FAA00 && !byte_4FAA2E && !byte_4FAA2D )
0
Ritor1
parents:
diff changeset
2058 {
Ritor1
parents:
diff changeset
2059 if ( am_byte_4FAA75 )
Ritor1
parents:
diff changeset
2060 am_byte_4FAA76 = 1;
Ritor1
parents:
diff changeset
2061 am_408BB4(amuint_4FAA6C);
Ritor1
parents:
diff changeset
2062 v4 = amuint_4FAA6C;
Ritor1
parents:
diff changeset
2063 byte_4FAA2E = 1;
Ritor1
parents:
diff changeset
2064 }
Ritor1
parents:
diff changeset
2065 if ( amuint_4FAA4C != -1 && amuint_4FAA38 > 10 )
Ritor1
parents:
diff changeset
2066 amuint_4FAA38 = 10;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2067 if ( byte_4FAA2E || byte_4FAA2D || LOBYTE(am_Players[v4].field_20) != 1 )
0
Ritor1
parents:
diff changeset
2068 {
Ritor1
parents:
diff changeset
2069 pArcomageGame->field_F6 = 1;
Ritor1
parents:
diff changeset
2070 if ( byte_4FAA2D )
Ritor1
parents:
diff changeset
2071 {
Ritor1
parents:
diff changeset
2072 --amuint_4FAA38;
Ritor1
parents:
diff changeset
2073 if ( amuint_4FAA38 < 0 )
Ritor1
parents:
diff changeset
2074 {
Ritor1
parents:
diff changeset
2075 byte_4FAA2D = 0;
Ritor1
parents:
diff changeset
2076 amuint_4FAA38 = 10;
Ritor1
parents:
diff changeset
2077 v16 = 0;
Ritor1
parents:
diff changeset
2078 }
Ritor1
parents:
diff changeset
2079 }
Ritor1
parents:
diff changeset
2080 if ( byte_4FAA2E )
Ritor1
parents:
diff changeset
2081 {
Ritor1
parents:
diff changeset
2082 --v13;
Ritor1
parents:
diff changeset
2083 if ( v13 < 0 )
Ritor1
parents:
diff changeset
2084 {
Ritor1
parents:
diff changeset
2085 if ( dword_4FAA68 > 1 )
Ritor1
parents:
diff changeset
2086 {
Ritor1
parents:
diff changeset
2087 --dword_4FAA68;
Ritor1
parents:
diff changeset
2088 byte_4FAA00 = 0;
Ritor1
parents:
diff changeset
2089 }
Ritor1
parents:
diff changeset
2090 else
Ritor1
parents:
diff changeset
2091 {
Ritor1
parents:
diff changeset
2092 v16 = 1;
Ritor1
parents:
diff changeset
2093 }
Ritor1
parents:
diff changeset
2094 byte_4FAA2E = 0;
Ritor1
parents:
diff changeset
2095 v13 = 20;
Ritor1
parents:
diff changeset
2096 }
Ritor1
parents:
diff changeset
2097 }
Ritor1
parents:
diff changeset
2098 }
Ritor1
parents:
diff changeset
2099 else
Ritor1
parents:
diff changeset
2100 {
Ritor1
parents:
diff changeset
2101 if ( am_byte_4FAA77 )
Ritor1
parents:
diff changeset
2102 {
Ritor1
parents:
diff changeset
2103 if ( a2.field_0 == 7 && am_40BCFB(a1, dword_4FABBC) )
Ritor1
parents:
diff changeset
2104 {
Ritor1
parents:
diff changeset
2105 if ( am_byte_4FAA75 )
Ritor1
parents:
diff changeset
2106 am_byte_4FAA76 = 1;
Ritor1
parents:
diff changeset
2107 if ( dword_4FAA64 > 0 )
Ritor1
parents:
diff changeset
2108 {
Ritor1
parents:
diff changeset
2109 --dword_4FAA64;
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2110 am_byte_4FAA77 = GetPlayerHandCardCount(a1) > dword_4E1874;
0
Ritor1
parents:
diff changeset
2111 }
Ritor1
parents:
diff changeset
2112 byte_4FAA2E = 1;
Ritor1
parents:
diff changeset
2113 }
Ritor1
parents:
diff changeset
2114 if ( a2.field_0 == 8 && am_40BCFB(a1, dword_4FABBC) )
Ritor1
parents:
diff changeset
2115 {
Ritor1
parents:
diff changeset
2116 if ( am_byte_4FAA75 )
Ritor1
parents:
diff changeset
2117 am_byte_4FAA76 = 1;
Ritor1
parents:
diff changeset
2118 if ( dword_4FAA64 > 0 )
Ritor1
parents:
diff changeset
2119 {
Ritor1
parents:
diff changeset
2120 --dword_4FAA64;
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2121 am_byte_4FAA77 = GetPlayerHandCardCount(a1) > dword_4E1874;
0
Ritor1
parents:
diff changeset
2122 }
Ritor1
parents:
diff changeset
2123 byte_4FAA2E = 1;
Ritor1
parents:
diff changeset
2124 }
Ritor1
parents:
diff changeset
2125 }
Ritor1
parents:
diff changeset
2126 else
Ritor1
parents:
diff changeset
2127 {
Ritor1
parents:
diff changeset
2128 if ( a2.field_0 == 7 )
Ritor1
parents:
diff changeset
2129 {
Ritor1
parents:
diff changeset
2130 if ( am_40BE0E(a1, dword_4FABBC) )
Ritor1
parents:
diff changeset
2131 {
Ritor1
parents:
diff changeset
2132 byte_4FAA2E = 1;
Ritor1
parents:
diff changeset
2133 if ( am_byte_4FAA75 )
Ritor1
parents:
diff changeset
2134 am_byte_4FAA76 = 1;
Ritor1
parents:
diff changeset
2135 }
Ritor1
parents:
diff changeset
2136 }
Ritor1
parents:
diff changeset
2137 if ( a2.field_0 == 8 )
Ritor1
parents:
diff changeset
2138 {
Ritor1
parents:
diff changeset
2139 if ( am_40BCFB(a1, dword_4FABBC) )
Ritor1
parents:
diff changeset
2140 {
Ritor1
parents:
diff changeset
2141 byte_4FAA2E = 1;
Ritor1
parents:
diff changeset
2142 if ( am_byte_4FAA75 )
Ritor1
parents:
diff changeset
2143 am_byte_4FAA76 = 1;
Ritor1
parents:
diff changeset
2144 }
Ritor1
parents:
diff changeset
2145 }
Ritor1
parents:
diff changeset
2146 }
Ritor1
parents:
diff changeset
2147 }
Ritor1
parents:
diff changeset
2148 //nullsub_1();
Ritor1
parents:
diff changeset
2149 if ( false )
Ritor1
parents:
diff changeset
2150 {
Ritor1
parents:
diff changeset
2151 if ( !v15 )
Ritor1
parents:
diff changeset
2152 {
Ritor1
parents:
diff changeset
2153 //nullsub_1();
Ritor1
parents:
diff changeset
2154 v15 = 1;
Ritor1
parents:
diff changeset
2155 }
Ritor1
parents:
diff changeset
2156 }
Ritor1
parents:
diff changeset
2157 else
Ritor1
parents:
diff changeset
2158 {
Ritor1
parents:
diff changeset
2159 v15 = 0;
Ritor1
parents:
diff changeset
2160 }
Ritor1
parents:
diff changeset
2161 if ( false )
Ritor1
parents:
diff changeset
2162 {
Ritor1
parents:
diff changeset
2163 //nullsub_1();
Ritor1
parents:
diff changeset
2164 //nullsub_1();
1033
3a5c8df8381d * UI cleans and moves
Nomad
parents: 1016
diff changeset
2165 assert(false && "Invalid strcpy params");
3a5c8df8381d * UI cleans and moves
Nomad
parents: 1016
diff changeset
2166 inv_strcpy(nullptr, Dest);
0
Ritor1
parents:
diff changeset
2167 v5 = 0;//unk::const_0(&unk_4E19FC, 0);
Ritor1
parents:
diff changeset
2168 //nullsub_1();
Ritor1
parents:
diff changeset
2169 if ( v5 == 1 )
Ritor1
parents:
diff changeset
2170 {
Ritor1
parents:
diff changeset
2171 pAudioPlayer->StopChannels(-1, -1);
Ritor1
parents:
diff changeset
2172 v16 = 1;
Ritor1
parents:
diff changeset
2173 pArcomageGame->field_F4 = 1;
Ritor1
parents:
diff changeset
2174 dword_4FAA68 = 0;
Ritor1
parents:
diff changeset
2175 }
Ritor1
parents:
diff changeset
2176 v10[0] = 0;
Ritor1
parents:
diff changeset
2177 v10[2] = 640;
Ritor1
parents:
diff changeset
2178 v10[1] = 0;
Ritor1
parents:
diff changeset
2179 v10[3] = 480;
Ritor1
parents:
diff changeset
2180 //nullsub_1();
Ritor1
parents:
diff changeset
2181 }
Ritor1
parents:
diff changeset
2182 if ( dword_4FABB8 != am_40BB67(a1) )
Ritor1
parents:
diff changeset
2183 {
Ritor1
parents:
diff changeset
2184 dword_4FABB8 = am_40BB67(a1);
Ritor1
parents:
diff changeset
2185 pArcomageGame->field_F6 = 1;
Ritor1
parents:
diff changeset
2186 }
Ritor1
parents:
diff changeset
2187 if ( pArcomageGame->field_F6 )
Ritor1
parents:
diff changeset
2188 {
Ritor1
parents:
diff changeset
2189 am_blts(v13);
Ritor1
parents:
diff changeset
2190 DoBlt_Copy(pArcomageGame->pBackgroundPixels);
Ritor1
parents:
diff changeset
2191 pArcomageGame->field_F6 = 0;
Ritor1
parents:
diff changeset
2192 }
Ritor1
parents:
diff changeset
2193 if ( pArcomageGame->field_F9 )
Ritor1
parents:
diff changeset
2194 {
Ritor1
parents:
diff changeset
2195 pTargetXY[0] = 0;
Ritor1
parents:
diff changeset
2196 pTargetXY[1] = 0;
Ritor1
parents:
diff changeset
2197 pSrcXYZW[0] = 0;
Ritor1
parents:
diff changeset
2198 pSrcXYZW[2] = 640;
Ritor1
parents:
diff changeset
2199 pSrcXYZW[1] = 0;
Ritor1
parents:
diff changeset
2200 pSrcXYZW[3] = 480;
Ritor1
parents:
diff changeset
2201 am_BeginScene(pArcomageGame->pBackgroundPixels, -1, 1);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2202 // Blt_Copy(pSrcXYZW, pTargetXY, 2);
0
Ritor1
parents:
diff changeset
2203 am_EndScene();
Ritor1
parents:
diff changeset
2204 am_blts(v13);
Ritor1
parents:
diff changeset
2205 pRenderer->Present();
Ritor1
parents:
diff changeset
2206 pArcomageGame->field_F9 = 0;
Ritor1
parents:
diff changeset
2207 }
Ritor1
parents:
diff changeset
2208 }
Ritor1
parents:
diff changeset
2209 while ( !v16 );
Ritor1
parents:
diff changeset
2210 return dword_4FAA68 > 0;
Ritor1
parents:
diff changeset
2211 }
Ritor1
parents:
diff changeset
2212 // 40DB22: using guessed type uint __stdcall unk__const_0(uint, uint);
Ritor1
parents:
diff changeset
2213 // 4E1874: using guessed type int dword_4E1874;
Ritor1
parents:
diff changeset
2214 // 4FAA00: using guessed type char byte_4FAA00;
Ritor1
parents:
diff changeset
2215 // 4FAA2D: using guessed type char byte_4FAA2D;
Ritor1
parents:
diff changeset
2216 // 4FAA2E: using guessed type char byte_4FAA2E;
Ritor1
parents:
diff changeset
2217 // 4FAA34: using guessed type int amuint_4FAA34;
Ritor1
parents:
diff changeset
2218 // 4FAA38: using guessed type int amuint_4FAA38;
Ritor1
parents:
diff changeset
2219 // 4FAA4C: using guessed type int amuint_4FAA4C;
Ritor1
parents:
diff changeset
2220 // 4FAA64: using guessed type int dword_4FAA64;
Ritor1
parents:
diff changeset
2221 // 4FAA68: using guessed type int dword_4FAA68;
Ritor1
parents:
diff changeset
2222 // 4FAA74: using guessed type char byte_4FAA74;
Ritor1
parents:
diff changeset
2223 // 4FAA75: using guessed type char am_byte_4FAA75;
Ritor1
parents:
diff changeset
2224 // 4FAA76: using guessed type char am_byte_4FAA76;
Ritor1
parents:
diff changeset
2225 // 4FAA77: using guessed type char am_byte_4FAA77;
Ritor1
parents:
diff changeset
2226 // 4FABB8: using guessed type int dword_4FABB8;
Ritor1
parents:
diff changeset
2227
Ritor1
parents:
diff changeset
2228 //----- (0040A9AF) --------------------------------------------------------
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2229 void am_blts( int a1 )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2230 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2231
0
Ritor1
parents:
diff changeset
2232 am_BeginScene(pArcomageGame->pSpritesPixels, -1, 1);
Ritor1
parents:
diff changeset
2233 am_chroma_blts();
Ritor1
parents:
diff changeset
2234 am_EndScene();
Ritor1
parents:
diff changeset
2235 am_BeginScene(pArcomageGame->pSpritesPixels, -1, 1);
Ritor1
parents:
diff changeset
2236 am_40B4B9();
Ritor1
parents:
diff changeset
2237 am_chroma_and_copy_blts();
Ritor1
parents:
diff changeset
2238 am_chroma_blt();
Ritor1
parents:
diff changeset
2239 am_DrawUI();
Ritor1
parents:
diff changeset
2240 am_EndScene();
Ritor1
parents:
diff changeset
2241 am_BeginScene(pArcomageGame->pSpritesPixels, -1, 1);
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2242 am_40B76F(a1);
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2243
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2244 for( int i=0; i<10; ++i)
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2245 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2246 if (array_4FABD0[i].field_0)
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2247 array_4FABD0[i].field_40->_40E133();
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2248 }
0
Ritor1
parents:
diff changeset
2249 dword_4FABBC = am_40BB67(amuint_4FAA6C);
Ritor1
parents:
diff changeset
2250 am_40AA4E();
Ritor1
parents:
diff changeset
2251 am_EndScene();
Ritor1
parents:
diff changeset
2252 }
Ritor1
parents:
diff changeset
2253
Ritor1
parents:
diff changeset
2254 //----- (0040AA4E) --------------------------------------------------------
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2255 void am_40AA4E()
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2256 {
0
Ritor1
parents:
diff changeset
2257 int v5; // [sp-4h] [bp-2Ch]@4
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2258 unsigned int v7;
0
Ritor1
parents:
diff changeset
2259 int v8; // [sp+14h] [bp-14h]@10
Ritor1
parents:
diff changeset
2260 int v9; // [sp+18h] [bp-10h]@10
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2261 RECT pXYZW;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2262
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2263 v9 = 0x0000FF00;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2264 v8 = 0x000000FF;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2265
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2266 for (int i=0; i<10; ++i)
0
Ritor1
parents:
diff changeset
2267 {
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2268 if(array_4FABD0[i].field_0 && (array_4FABD0[i].field_40->_40E2A7()==2))
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2269 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2270
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2271 v5 = v9;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2272 if ( !array_4FABD0[i].field_1 )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2273 v5 = v8;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2274
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2275 v7 = R8G8B8_to_TargetFormat(v5);
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2276 for(int j=0; j<150; ++j )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2277 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2278 if (array_4FABD0[i].field_44[j].field_0 > 0)
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2279 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2280 if (j%2)
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2281 SetPixel(&array_4FABD0[i].field_44[j].field_4, v7);
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2282 else
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2283 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2284 pXYZW.left = array_4FABD0[i].field_44[j].field_4.x;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2285 pXYZW.right = pXYZW.left + 2;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2286 pXYZW.top = array_4FABD0[i].field_44[j].field_4.y;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2287 pXYZW.bottom = pXYZW.top + 2;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2288 DrawRect(&pXYZW, v7, 1);
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2289 }
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2290 }
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2291 }
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2292 }
0
Ritor1
parents:
diff changeset
2293 }
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2294
0
Ritor1
parents:
diff changeset
2295 }
Ritor1
parents:
diff changeset
2296
Ritor1
parents:
diff changeset
2297 //----- (0040AB0A) --------------------------------------------------------
Ritor1
parents:
diff changeset
2298 void __cdecl am_chroma_blts()
Ritor1
parents:
diff changeset
2299 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2300
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2301 RECT pSrcRect; // [sp+Ch] [bp-18h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2302 POINT pTargetXY; // [sp+1Ch] [bp-8h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2303
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2304 pSrcRect.top = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2305 pSrcRect.left = 765;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2306 pSrcRect.right = 843;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2307 pSrcRect.bottom = 216;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2308
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2309 pTargetXY.x = 8;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2310 pTargetXY.y = 56;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2311 Blt_Copy(&pSrcRect, &pTargetXY, 2);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2312
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2313 pTargetXY.x = 555;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2314 pTargetXY.y = 56;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2315 Blt_Copy(&pSrcRect, &pTargetXY, 2);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2316
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2317 pSrcRect.left = 283;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2318 pSrcRect.right = 361;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2319 pSrcRect.top = 166;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2320 pSrcRect.bottom = 190;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2321 pTargetXY.x = 8;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2322 pTargetXY.y = 13;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2323 Blt_Chroma(&pSrcRect, &pTargetXY, pArcomageGame->field_54, 2);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2324
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2325 pTargetXY.x = 555;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2326 pTargetXY.y = 13;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2327 Blt_Chroma(&pSrcRect, &pTargetXY, pArcomageGame->field_54, 2);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2328
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2329 pSrcRect.left = 234;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2330 pSrcRect.right = 283;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2331 pSrcRect.top = 166;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2332 pSrcRect.bottom = 190;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2333 pTargetXY.x = 100;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2334 pTargetXY.y = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2335 Blt_Chroma(&pSrcRect, &pTargetXY, pArcomageGame->field_54, 2);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2336
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2337
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2338 pTargetXY.x = 492;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2339 pTargetXY.y = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2340 Blt_Chroma(&pSrcRect, &pTargetXY, pArcomageGame->field_54, 2);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2341
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2342
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2343 pSrcRect.left = 192;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2344 pSrcRect.right = 234;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2345 pSrcRect.top = 166;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2346 pSrcRect.bottom = 190;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2347 pTargetXY.x = 168;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2348 pTargetXY.y = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2349 Blt_Chroma(&pSrcRect, &pTargetXY, pArcomageGame->field_54, 2);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2350
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2351 pTargetXY.x = 430;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2352 pTargetXY.y = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2353 Blt_Chroma(&pSrcRect, &pTargetXY, pArcomageGame->field_54, 2);
0
Ritor1
parents:
diff changeset
2354 }
Ritor1
parents:
diff changeset
2355
Ritor1
parents:
diff changeset
2356 //----- (0040AC5F) --------------------------------------------------------
Ritor1
parents:
diff changeset
2357 void __cdecl am_DrawUI()
Ritor1
parents:
diff changeset
2358 {
Ritor1
parents:
diff changeset
2359 int v0; // ecx@7
Ritor1
parents:
diff changeset
2360 int v1; // ecx@9
Ritor1
parents:
diff changeset
2361 int v2; // eax@11
Ritor1
parents:
diff changeset
2362 int v3; // ecx@12
Ritor1
parents:
diff changeset
2363 int v4; // eax@14
Ritor1
parents:
diff changeset
2364 int v5; // ecx@14
Ritor1
parents:
diff changeset
2365 int v6; // eax@16
Ritor1
parents:
diff changeset
2366 int v7; // ecx@16
Ritor1
parents:
diff changeset
2367 int v8; // eax@18
Ritor1
parents:
diff changeset
2368 int v9; // ecx@18
Ritor1
parents:
diff changeset
2369 int v10; // eax@20
Ritor1
parents:
diff changeset
2370 char Dest[32]; // [sp+Ch] [bp-28h]@2
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2371 POINT v12; // [sp+2Ch] [bp-8h]@2
0
Ritor1
parents:
diff changeset
2372
Ritor1
parents:
diff changeset
2373 if ( am_byte_4FAA77 )
Ritor1
parents:
diff changeset
2374 {
Ritor1
parents:
diff changeset
2375 inv_strcpy(pGlobalTXT_LocalizationStrings[266], Dest);// DISCARD A CARD
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2376 v12.x = 320 - pArcomageGame->pfntArrus->GetLineWidth(Dest) / 2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2377 v12.y = 306;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2378 pPrimaryWindow_draws_text(-1, Dest, &v12);
0
Ritor1
parents:
diff changeset
2379 }
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2380 inv_strcpy(am_Players[0].pPlayerName, Dest);
0
Ritor1
parents:
diff changeset
2381 if ( !amuint_4FAA6C )
Ritor1
parents:
diff changeset
2382 inv_strcat("***", Dest);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2383 v12.x = 47 - pArcomageGame->pfntComic->GetLineWidth(Dest) / 2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2384 v12.y = 21;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2385 pPrimaryWindow_draws_text(-1, Dest, &v12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2386
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2387 inv_strcpy(am_Players[1].pPlayerName, Dest);
0
Ritor1
parents:
diff changeset
2388 if ( amuint_4FAA6C == 1 )
Ritor1
parents:
diff changeset
2389 inv_strcat("***", Dest);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2390 v12.x = 595 - pArcomageGame->pfntComic->GetLineWidth(Dest) / 2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2391 v12.y = 21;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2392 pPrimaryWindow_draws_text(-1, Dest, &v12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2393
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2394 intToString(am_Players[0].field_24, Dest);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2395 v12.x = 123 - pArcomageGame->pfntComic->GetLineWidth(Dest) / 2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2396 v12.y = 305;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2397 pPrimaryWindow_draws_text(-1, Dest, &v12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2398
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2399 intToString(am_Players[1].field_24, Dest);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2400 v12.x = 515 - pArcomageGame->pfntComic->GetLineWidth(Dest) / 2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2401 v12.y = 305;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2402 pPrimaryWindow_draws_text(-1, Dest, &v12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2403
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2404 intToString(am_Players[0].field_28, Dest);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2405 v12.x = 188 - pArcomageGame->pfntComic->GetLineWidth(Dest) / 2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2406 v12.y = 305;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2407 pPrimaryWindow_draws_text(-1, Dest, &v12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2408
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2409 intToString(am_Players[1].field_28, Dest);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2410 v12.x = 451 - pArcomageGame->pfntComic->GetLineWidth(Dest) / 2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2411 v12.y = 305;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2412 pPrimaryWindow_draws_text(-1, Dest, &v12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2413
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2414 v0 = am_Players[0].field_2C;
0
Ritor1
parents:
diff changeset
2415 if ( byte_4E185E )
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2416 v0 = dword_4E1878 + am_Players[0].field_2C;
0
Ritor1
parents:
diff changeset
2417 intToString(v0, Dest);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2418 v12.x = 14 - 6 * 0 / 2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2419 v12.y = 92;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2420 am_40B102(-1, Dest, &v12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2421
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2422 v1 = am_Players[1].field_2C;
0
Ritor1
parents:
diff changeset
2423 if ( byte_4E185E )
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2424 v1 = dword_4E1878 + am_Players[1].field_2C;
0
Ritor1
parents:
diff changeset
2425 intToString(v1, Dest);
Ritor1
parents:
diff changeset
2426 v2 = 0;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2427 v12.y = 92;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2428 v12.x = 561 - 6 * v2 / 2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2429 am_40B102(-1, Dest, &v12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2430
0
Ritor1
parents:
diff changeset
2431 if ( byte_4E185E )
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2432 v3 = am_Players[0].field_30 + dword_4E187C;
0
Ritor1
parents:
diff changeset
2433 else
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2434 v3 = am_Players[0].field_30;
0
Ritor1
parents:
diff changeset
2435 intToString(v3, Dest);
Ritor1
parents:
diff changeset
2436 v4 = 0;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2437 v12.y = 164;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2438 v12.x = 14 - 6 * v4 / 2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2439 am_40B102(-1, Dest, &v12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2440
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2441 v5 = am_Players[1].field_30;
0
Ritor1
parents:
diff changeset
2442 if ( byte_4E185E )
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2443 v5 = dword_4E187C + am_Players[1].field_30;
0
Ritor1
parents:
diff changeset
2444 intToString(v5, Dest);
Ritor1
parents:
diff changeset
2445 v6 = 0;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2446 v12.y = 164;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2447 v12.x = 561 - 6 * v6 / 2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2448 am_40B102(-1, Dest, &v12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2449
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2450 v7 = am_Players[0].field_34;
0
Ritor1
parents:
diff changeset
2451 if ( byte_4E185E )
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2452 v7 = dword_4E1880 + am_Players[0].field_34;
0
Ritor1
parents:
diff changeset
2453 intToString(v7, Dest);
Ritor1
parents:
diff changeset
2454 v8 = 0;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2455 v12.y = 236;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2456 v12.x = 14 - 6 * v8 / 2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2457 am_40B102(-1, Dest, &v12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2458
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2459 v9 = am_Players[1].field_34;
0
Ritor1
parents:
diff changeset
2460 if ( byte_4E185E )
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2461 v9 = dword_4E1880 + am_Players[1].field_34;
0
Ritor1
parents:
diff changeset
2462 intToString(v9, Dest);
Ritor1
parents:
diff changeset
2463 v10 = 0;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2464 v12.y = 236;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2465 v12.x = 561 - 6 * v10 / 2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2466 am_40B102(-1, Dest, &v12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2467
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2468 intToString(am_Players[0].field_38, Dest);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2469 v12.y = 114;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2470 v12.x = 10;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2471 am_40B17E(-1, Dest, &v12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2472
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2473 intToString(am_Players[1].field_38, Dest);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2474 v12.x = 557;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2475 v12.y = 114;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2476 am_40B17E(-1, Dest, &v12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2477
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2478 intToString(am_Players[0].field_3C, Dest);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2479 v12.x = 10;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2480 v12.y = 186;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2481 am_40B1F3(-1, Dest, &v12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2482
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2483 intToString(am_Players[1].field_3C, Dest);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2484 v12.x = 557;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2485 v12.y = 186;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2486 am_40B1F3(-1, Dest, &v12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2487
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2488 intToString(am_Players[0].field_40, Dest);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2489 v12.x = 10;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2490 v12.y = 258;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2491 am_40B268(-1, Dest, &v12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2492
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2493 intToString(am_Players[1].field_40, Dest);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2494 v12.x = 557;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2495 v12.y = 258;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2496 am_40B268(-1, Dest, &v12);
0
Ritor1
parents:
diff changeset
2497 }
Ritor1
parents:
diff changeset
2498 // 4E185E: using guessed type char byte_4E185E;
Ritor1
parents:
diff changeset
2499 // 4E1878: using guessed type int dword_4E1878;
Ritor1
parents:
diff changeset
2500 // 4E187C: using guessed type int dword_4E187C;
Ritor1
parents:
diff changeset
2501 // 4E1880: using guessed type int dword_4E1880;
Ritor1
parents:
diff changeset
2502 // 4FAA77: using guessed type char am_byte_4FAA77;
Ritor1
parents:
diff changeset
2503
Ritor1
parents:
diff changeset
2504 //----- (0040B102) --------------------------------------------------------
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2505 void __fastcall am_40B102( int a1, char *a2, POINT *pXY )
0
Ritor1
parents:
diff changeset
2506 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2507 //char *v3; // esi@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2508 //int v4; // eax@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2509 //unsigned __int8 v5; // bl@2
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2510 //char v6; // zf@2
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2511 //int v7; // eax@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2512 //int v8; // ecx@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2513 //int v9; // [sp+8h] [bp-18h]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2514 //int v10; // [sp+Ch] [bp-14h]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2515 //int v11; // [sp+10h] [bp-10h]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2516 //int v12; // [sp+14h] [bp-Ch]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2517 //int v13; // [sp+18h] [bp-8h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2518 //int v14; // [sp+1Ch] [bp-4h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2519
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2520 //v3 = a2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2521 //am_BeginScene(pArcomageGame->pSpritesPixels, -1, 1);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2522 //v4 = pXY[1];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2523 //v13 = *pXY;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2524 //v14 = v4;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2525 //do
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2526 //{
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2527 // v5 = *v3++;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2528 // v6 = v5 == 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2529 // if ( v5 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2530 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2531 // v7 = 22 * v5;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2532 // v8 = v7 - 864;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2533 // v7 -= 842;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2534 // v11 = v7;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2535 // LOWORD(v7) = pArcomageGame->field_54;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2536 // v9 = v8;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2537 // v10 = 190;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2538 // v12 = 207;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2539 // Blt_Chroma(&v9, &v13, v7, 1);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2540 // v13 += 22;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2541 // v6 = v5 == 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2542 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2543 //}
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2544 //while ( !v6 );
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2545 //am_EndScene();
0
Ritor1
parents:
diff changeset
2546 }
Ritor1
parents:
diff changeset
2547
Ritor1
parents:
diff changeset
2548 //----- (0040B17E) --------------------------------------------------------
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2549 void am_40B17E( int a1, char* a2, POINT *pXY )
0
Ritor1
parents:
diff changeset
2550 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2551 //int v3; // esi@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2552 //int v4; // eax@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2553 //unsigned __int8 v5; // bl@2
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2554 //char v6; // zf@2
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2555 //int v7; // eax@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2556 //int v8; // [sp+8h] [bp-18h]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2557 //int v9; // [sp+Ch] [bp-14h]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2558 //int v10; // [sp+10h] [bp-10h]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2559 //int v11; // [sp+14h] [bp-Ch]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2560 //int v12; // [sp+18h] [bp-8h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2561 //int v13; // [sp+1Ch] [bp-4h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2562
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2563 //v3 = a2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2564 //am_BeginScene(pArcomageGame->pSpritesPixels, -1, 1);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2565 //v4 = pXY[1];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2566 //v12 = *pXY;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2567 //v13 = v4;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2568 //do
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2569 //{
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2570 // v5 = *(unsigned char *)v3++;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2571 // v6 = v5 == 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2572 // if ( v5 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2573 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2574 // v7 = 13 * v5;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2575 // v8 = v7 - 370;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2576 // v10 = v7 - 357;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2577 // v9 = 128;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2578 // v11 = 138;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2579 // Blt_Copy(&v8, &v12, 2);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2580 // v12 += 13;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2581 // v6 = v5 == 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2582 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2583 //}
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2584 //while ( !v6 );
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2585 //am_EndScene();
0
Ritor1
parents:
diff changeset
2586 }
Ritor1
parents:
diff changeset
2587
Ritor1
parents:
diff changeset
2588 //----- (0040B1F3) --------------------------------------------------------
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2589 void am_40B1F3( int a1, char* a2, POINT* a3 )
0
Ritor1
parents:
diff changeset
2590 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2591 //int v3; // esi@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2592 //int v4; // eax@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2593 //unsigned __int8 v5; // bl@2
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2594 //char v6; // zf@2
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2595 //int v7; // eax@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2596 //int v8; // [sp+8h] [bp-18h]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2597 //int v9; // [sp+Ch] [bp-14h]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2598 //int v10; // [sp+10h] [bp-10h]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2599 //int v11; // [sp+14h] [bp-Ch]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2600 //int v12; // [sp+18h] [bp-8h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2601 //int v13; // [sp+1Ch] [bp-4h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2602
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2603 //v3 = a2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2604 //am_BeginScene(pArcomageGame->pSpritesPixels, -1, 1);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2605 //v4 = *(unsigned int *)(a3 + 4);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2606 //v12 = *(unsigned int *)a3;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2607 //v13 = v4;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2608 //do
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2609 //{
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2610 // v5 = *(unsigned char *)v3++;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2611 // v6 = v5 == 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2612 // if ( v5 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2613 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2614 // v7 = 13 * v5;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2615 // v8 = v7 - 370;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2616 // v10 = v7 - 357;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2617 // v9 = 138;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2618 // v11 = 148;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2619 // Blt_Copy(&v8, &v12, 2);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2620 // v12 += 13;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2621 // v6 = v5 == 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2622 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2623 //}
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2624 //while ( !v6 );
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2625 //am_EndScene();
0
Ritor1
parents:
diff changeset
2626 }
Ritor1
parents:
diff changeset
2627
Ritor1
parents:
diff changeset
2628 //----- (0040B268) --------------------------------------------------------
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2629 void am_40B268( int a1, char *a2, POINT *pXY )
0
Ritor1
parents:
diff changeset
2630 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2631 //char *v3; // esi@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2632 //int v4; // eax@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2633 //unsigned __int8 v5; // bl@2
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2634 //char v6; // zf@2
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2635 //int v7; // eax@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2636 //int v8; // [sp+8h] [bp-18h]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2637 //int v9; // [sp+Ch] [bp-14h]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2638 //int v10; // [sp+10h] [bp-10h]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2639 //int v11; // [sp+14h] [bp-Ch]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2640 //int v12; // [sp+18h] [bp-8h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2641 //int v13; // [sp+1Ch] [bp-4h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2642
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2643 //v3 = a2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2644 //am_BeginScene(pArcomageGame->pSpritesPixels, -1, 1);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2645 //v4 = pXY[1];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2646 //v12 = *pXY;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2647 //v13 = v4;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2648 //do
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2649 //{
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2650 // v5 = *v3++;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2651 // v6 = v5 == 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2652 // if ( v5 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2653 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2654 // v7 = 13 * v5;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2655 // v8 = v7 - 370;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2656 // v10 = v7 - 357;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2657 // v9 = 148;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2658 // v11 = 158;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2659 // Blt_Copy(&v8, &v12, 2);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2660 // v12 += 13;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2661 // v6 = v5 == 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2662 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2663 //}
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2664 //while ( !v6 );
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2665 //am_EndScene();
0
Ritor1
parents:
diff changeset
2666 }
Ritor1
parents:
diff changeset
2667
Ritor1
parents:
diff changeset
2668 //----- (0040B2DD) --------------------------------------------------------
Ritor1
parents:
diff changeset
2669 void __cdecl am_chroma_and_copy_blts()
Ritor1
parents:
diff changeset
2670 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2671 //int v0; // eax@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2672 //int v1; // esi@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2673 //int v2; // eax@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2674 //int v3; // eax@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2675 //int v4; // esi@5
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2676 //int v5; // eax@5
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2677 //int pSrcXYZW[4]; // [sp+0h] [bp-18h]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2678 //int v7; // [sp+4h] [bp-14h]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2679 //int v8; // [sp+8h] [bp-10h]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2680 //int v9; // [sp+Ch] [bp-Ch]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2681 //int pTargetXY[2]; // [sp+10h] [bp-8h]@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2682
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2683 //v0 = stru_505708[0].field_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2684 //if ( stru_505708[0].field_24 > dword_4E1884 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2685 // v0 = dword_4E1884;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2686 //v7 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2687 //pSrcXYZW[0] = 892;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2688 //v8 = 937;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2689 //pTargetXY[0] = 102;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2690 //v1 = 200 * v0 / dword_4E1884;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2691 //v9 = v1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2692 //pTargetXY[1] = 297 - v1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2693 //Blt_Copy(pSrcXYZW, pTargetXY, 2);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2694 //v7 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2695 //v2 = 203 - v1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2696 //pTargetXY[1] = 203 - v1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2697 //LOWORD(v2) = pArcomageGame->field_54;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2698 //pSrcXYZW[0] = 384;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2699 //v8 = 452;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2700 //v9 = 94;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2701 //pTargetXY[0] = 91;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2702 //Blt_Chroma(pSrcXYZW, pTargetXY, v2, 2);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2703 //v3 = stru_505708[1].field_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2704 //if ( stru_505708[1].field_24 > dword_4E1884 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2705 // v3 = dword_4E1884;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2706 //v7 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2707 //pSrcXYZW[0] = 892;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2708 //v8 = 937;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2709 //pTargetXY[0] = 494;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2710 //v4 = 200 * v3 / dword_4E1884;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2711 //v9 = v4;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2712 //pTargetXY[1] = 297 - v4;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2713 //Blt_Copy(pSrcXYZW, pTargetXY, 2);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2714 //LOWORD(v5) = pArcomageGame->field_54;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2715 //pSrcXYZW[0] = 384;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2716 //v8 = 452;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2717 //v7 = 94;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2718 //v9 = 188;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2719 //pTargetXY[0] = 483;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2720 //pTargetXY[1] = 203 - v4;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2721 //Blt_Chroma(pSrcXYZW, pTargetXY, v5, 2);
0
Ritor1
parents:
diff changeset
2722 }
Ritor1
parents:
diff changeset
2723 // 4E1884: using guessed type int dword_4E1884;
Ritor1
parents:
diff changeset
2724
Ritor1
parents:
diff changeset
2725 //----- (0040B400) --------------------------------------------------------
Ritor1
parents:
diff changeset
2726 void __cdecl am_chroma_blt()
Ritor1
parents:
diff changeset
2727 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2728 // int v0; // eax@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2729 // int v1; // eax@4
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2730 // int v2; // ecx@4
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2731 // int v3; // eax@5
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2732 // int v4; // eax@8
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2733 // int v5; // esi@8
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2734 // int pSrcXYZW[4]; // [sp+4h] [bp-18h]@4
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2735 // int pTargetXY[2]; // [sp+14h] [bp-8h]@4
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2736 //
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2737 // v0 = stru_505708[0].field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2738 // if ( stru_505708[0].field_28 <= 100 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2739 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2740 // if ( stru_505708[0].field_28 <= 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2741 // goto LABEL_5;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2742 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2743 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2744 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2745 // v0 = 100;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2746 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2747 // pSrcXYZW[1] = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2748 // pSrcXYZW[0] = 843;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2749 // v1 = 200 * v0 / 100;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2750 // pSrcXYZW[2] = 867;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2751 // pTargetXY[0] = 177;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2752 // pSrcXYZW[3] = v1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2753 // v2 = 297 - v1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2754 // LOWORD(v1) = pArcomageGame->field_54;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2755 // pTargetXY[1] = v2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2756 // Blt_Chroma(pSrcXYZW, pTargetXY, v1, 2);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2757 //LABEL_5:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2758 // v3 = stru_505708[1].field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2759 // if ( stru_505708[1].field_28 <= 100 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2760 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2761 // if ( stru_505708[1].field_28 <= 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2762 // return;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2763 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2764 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2765 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2766 // v3 = 100;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2767 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2768 // pSrcXYZW[1] = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2769 // pSrcXYZW[0] = 843;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2770 // v4 = 200 * v3 / 100;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2771 // pSrcXYZW[2] = 867;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2772 // pTargetXY[0] = 439;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2773 // pSrcXYZW[3] = v4;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2774 // v5 = 297 - v4;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2775 // LOWORD(v4) = pArcomageGame->field_54;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2776 // pTargetXY[1] = v5;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2777 // Blt_Chroma(pSrcXYZW, pTargetXY, v4, 2);
0
Ritor1
parents:
diff changeset
2778 }
Ritor1
parents:
diff changeset
2779
Ritor1
parents:
diff changeset
2780 //----- (0040B4B9) --------------------------------------------------------
Ritor1
parents:
diff changeset
2781 void __cdecl am_40B4B9()
Ritor1
parents:
diff changeset
2782 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2783 // int v0; // esi@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2784 // int v1; // ebx@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2785 // int v2; // edi@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2786 // int v3; // edx@2
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2787 // int v4; // eax@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2788 // int v5; // ecx@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2789 // int v6; // eax@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2790 // unsigned int v7; // ecx@4
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2791 // int v8; // eax@16
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2792 // int v9; // ecx@16
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2793 // int v10; // eax@16
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2794 // signed int v11; // edi@18
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2795 // int v12; // esi@20
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2796 // unsigned int v13; // ecx@20
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2797 // int v14; // eax@23
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2798 // unsigned int v15; // eax@25
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2799 // unsigned int v16; // ecx@25
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2800 // int *v17; // esi@26
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2801 // unsigned int v18; // eax@29
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2802 // int *v19; // ecx@29
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2803 // int v20; // ecx@31
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2804 // int v21; // [sp-4h] [bp-2Ch]@8
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2805 // int pSrcXYZW[4]; // [sp+Ch] [bp-1Ch]@8
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2806 // int pTargetXY[2]; // [sp+1Ch] [bp-Ch]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2807 // int v24; // [sp+24h] [bp-4h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2808 //
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2809 // v0 = GetPlayerHandCardCount(amuint_4FAA6C);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2810 // v1 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2811 // v2 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2812 // pTargetXY[1] = 327;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2813 // v24 = (640 - 96 * v0) / (v0 + 1);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2814 // pTargetXY[0] = (640 - 96 * v0) / (v0 + 1);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2815 // while ( v2 < v0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2816 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2817 // v3 = amuint_4FAA6C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2818 // if ( am_byte_4E185D != (_BYTE)v1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2819 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2820 // v4 = 188 * amuint_4FAA6C + 8 * v2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2821 // v5 = *(int *)((char *)stru_505708[0].arr_6C[0] + v4);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2822 // v6 = *(int *)((char *)&stru_505708[0].arr_6C[0][1] + v4);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2823 // pTargetXY[0] += v5;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2824 // pTargetXY[1] += v6;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2825 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2826 // v7 = stru_505708[0].cards_at_hand[v2 + 47 * amuint_4FAA6C];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2827 // if ( v7 == -1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2828 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2829 // ++v0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2830 // goto LABEL_15;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2831 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2832 // if ( v2 != amuint_4FAA4C )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2833 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2834 // if ( LOBYTE(stru_505708[amuint_4FAA6C].field_20) == (_BYTE)v1 && byte_505881 == (_BYTE)v1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2835 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2836 // pSrcXYZW[0] = 192;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2837 // pSrcXYZW[2] = 288;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2838 // pSrcXYZW[1] = v1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2839 // pSrcXYZW[3] = 128;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2840 // v21 = 2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2841 //LABEL_12:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2842 // Blt_Copy(pSrcXYZW, pTargetXY, v21);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2843 // goto LABEL_13;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2844 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2845 // ArcomageGame::GetCardRect(v7, pSrcXYZW);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2846 // if ( !am_40BF15(amuint_4FAA6C, v2) )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2847 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2848 // v1 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2849 // v21 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2850 // goto LABEL_12;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2851 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2852 // Blt_Copy(pSrcXYZW, pTargetXY, 2);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2853 // v1 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2854 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2855 //LABEL_13:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2856 // v3 = amuint_4FAA6C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2857 // pTargetXY[0] += v24 + 96;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2858 //LABEL_15:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2859 // if ( am_byte_4E185D != (_BYTE)v1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2860 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2861 // v8 = 188 * v3 + 8 * v2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2862 // v9 = *(int *)((char *)stru_505708[0].arr_6C[0] + v8);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2863 // v10 = *(int *)((char *)&stru_505708[0].arr_6C[0][1] + v8);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2864 // pTargetXY[0] -= v9;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2865 // pTargetXY[1] -= v10;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2866 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2867 // ++v2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2868 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2869 // v11 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2870 // do
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2871 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2872 // if ( am_byte_4FAA76 == (_BYTE)v1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2873 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2874 // v12 = 4 * v11;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2875 // v13 = amuint_4FAA78[8 * v11];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2876 // if ( v13 != -1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2877 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2878 // ArcomageGame::GetCardRect(v13, pSrcXYZW);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2879 // Blt_Copy((ArcomageRect *)pSrcXYZW, amuint_4FAA90[v12], v1);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2880 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2881 // if ( am_byte_4FAA7C[v12 * 8] != (_BYTE)v1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2882 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2883 // pTargetXY[0] = amuint_4FAA90[v12][0] + 12;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2884 // v14 = amuint_4FAA90[v12][1] + 40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2885 // pTargetXY[1] = amuint_4FAA90[v12][1] + 40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2886 // LOWORD(v14) = pArcomageGame->field_54;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2887 // pSrcXYZW[0] = 843;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2888 // pSrcXYZW[2] = 916;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2889 // pSrcXYZW[1] = 200;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2890 // pSrcXYZW[3] = 216;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2891 // Blt_Chroma(pSrcXYZW, pTargetXY, v14, 2);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2892 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2893 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2894 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2895 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2896 // if ( amuint_4FAA34 <= v1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2897 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2898 // if ( v11 == 9 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2899 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2900 // am_byte_4FAA76 = v1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2901 // am_byte_4FAA75 = v1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2902 // amuint_4FAA34 = 5;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2903 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2904 // v18 = 32 * v11;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2905 // v19 = &amuint_4FAA78[8 * v11];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2906 // if ( *v19 != -1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2907 // amuint_4FABC4 = *v19;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2908 // *v19 = -1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2909 // amuint_4FAA90[v18 / 8][0] = amuint_4FAA80[v18 / 4];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2910 // v20 = amuint_4FAA84[v18 / 4];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2911 // am_byte_4FAA7C[v18] = v1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2912 // amuint_4FAA90[v18 / 8][1] = v20;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2913 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2914 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2915 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2916 // v15 = 32 * v11;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2917 // v16 = amuint_4FAA78[8 * v11];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2918 // if ( v16 != -1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2919 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2920 // v17 = amuint_4FAA90[v15 / 8];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2921 // *v17 += amuint_4FAA88[v15 / 4];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2922 // amuint_4FAA90[v15 / 8][1] += amuint_4FAA8C[v15 / 4];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2923 // ArcomageGame::GetCardRect(v16, pSrcXYZW);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2924 // Blt_Copy(pSrcXYZW, v17, v1);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2925 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2926 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2927 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2928 // ++v11;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2929 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2930 // while ( v11 < 10 );
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2931 // if ( am_byte_4FAA76 != (_BYTE)v1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2932 // --amuint_4FAA34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2933 // pSrcXYZW[0] = 192;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2934 // pSrcXYZW[2] = 288;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2935 // pSrcXYZW[1] = v1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2936 // pSrcXYZW[3] = 128;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2937 // pTargetXY[0] = 120;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2938 // pTargetXY[1] = 18;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2939 // Blt_Copy(pSrcXYZW, pTargetXY, v1);
0
Ritor1
parents:
diff changeset
2940 }
Ritor1
parents:
diff changeset
2941 // 4E185D: using guessed type char am_byte_4E185D;
Ritor1
parents:
diff changeset
2942 // 4FAA34: using guessed type int amuint_4FAA34;
Ritor1
parents:
diff changeset
2943 // 4FAA4C: using guessed type int amuint_4FAA4C;
Ritor1
parents:
diff changeset
2944 // 4FAA75: using guessed type char am_byte_4FAA75;
Ritor1
parents:
diff changeset
2945 // 4FAA76: using guessed type char am_byte_4FAA76;
Ritor1
parents:
diff changeset
2946 // 4FAA78: using guessed type int amuint_4FAA78[];
Ritor1
parents:
diff changeset
2947 // 4FAA80: using guessed type int amuint_4FAA80[];
Ritor1
parents:
diff changeset
2948 // 4FAA84: using guessed type int amuint_4FAA84[];
Ritor1
parents:
diff changeset
2949 // 4FAA88: using guessed type int amuint_4FAA88[];
Ritor1
parents:
diff changeset
2950 // 4FAA8C: using guessed type int amuint_4FAA8C[];
Ritor1
parents:
diff changeset
2951 // 4FABC4: using guessed type int amuint_4FABC4;
Ritor1
parents:
diff changeset
2952 // 505881: using guessed type char byte_505881;
Ritor1
parents:
diff changeset
2953
Ritor1
parents:
diff changeset
2954
Ritor1
parents:
diff changeset
2955
Ritor1
parents:
diff changeset
2956 //----- (0040B76F) --------------------------------------------------------
Ritor1
parents:
diff changeset
2957 void __fastcall am_40B76F(int a1)
Ritor1
parents:
diff changeset
2958 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2959 // int v1; // eax@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2960 // int v2; // eax@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2961 // int v3; // esi@4
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2962 // int v4; // eax@4
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2963 // int *v5; // edx@6
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2964 // int *v6; // ecx@6
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2965 // signed int v7; // ebx@11
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2966 // int v8; // eax@15
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2967 // signed int v9; // ecx@15
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2968 // int v10; // eax@20
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2969 // int v11; // ecx@20
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2970 // int v12; // eax@20
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2971 // unsigned int v13; // ecx@21
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2972 // double v14; // st7@22
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2973 // int *v15; // edx@23
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2974 // int v16; // eax@32
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2975 // char v17; // zf@37
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2976 // int v18; // eax@41
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2977 // int v19; // eax@46
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2978 // int v20; // ecx@46
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2979 // int v21; // eax@46
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2980 // int v22; // [sp-4h] [bp-2Ch]@6
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2981 // int v23; // [sp-4h] [bp-2Ch]@28
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2982 // int pSrcXYZW[4]; // [sp+Ch] [bp-1Ch]@6
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2983 // int pTargetXY[2]; // [sp+1Ch] [bp-Ch]@20
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2984 // int v26; // [sp+24h] [bp-4h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2985 //
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2986 // v26 = a1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2987 // if ( amuint_4FAA4C != -1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2988 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2989 // if ( amuint_4FAA38 >= 9 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2990 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2991 // am_uint_4FAA44_blt_xy[1] = 18;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2992 // am_uint_4FAA44_blt_xy[0] = 120;
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
2993 // v1 = GetPlayerHandCardCount(amuint_4FAA6C);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2994 // v2 = (640 - 96 * v1) / v1 + 96;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2995 // if ( am_byte_4E185D )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2996 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2997 // v3 = 188 * amuint_4FAA6C + 8 * amuint_4FAA4C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2998 // amuint_4FAA3C_blt_xy[0] = (amuint_4FAA4C * v2 + *(int *)((char *)stru_505708[0].arr_6C[0] + v3) - 120) / 10;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
2999 // v4 = (*(int *)((char *)&stru_505708[0].arr_6C[0][1] + v3) + 309) / 10;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3000 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3001 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3002 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3003 // amuint_4FAA3C_blt_xy[0] = (amuint_4FAA4C * v2 - 120) / 10;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3004 // v4 = 30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3005 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3006 // am_uint_4FAA44_blt_xy[1] += v4;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3007 // am_uint_4FAA44_blt_xy[0] += amuint_4FAA3C_blt_xy[0];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3008 // pSrcXYZW[1] = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3009 // amuint_4FAA3C_blt_xy[1] = v4;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3010 // pSrcXYZW[0] = 192;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3011 // pSrcXYZW[2] = 288;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3012 // pSrcXYZW[3] = 128;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3013 // v5 = am_uint_4FAA44_blt_xy;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3014 // v6 = pSrcXYZW;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3015 // goto LABEL_7;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3016 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3017 // pSrcXYZW[1] = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3018 // v6 = pSrcXYZW;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3019 // v5 = am_uint_4FAA44_blt_xy;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3020 //
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3021 // pSrcXYZW[3] = 128;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3022 // pSrcXYZW[2] = 288;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3023 // pSrcXYZW[0] = 192;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3024 // if ( amuint_4FAA38 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3025 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3026 // am_uint_4FAA44_blt_xy[0] += amuint_4FAA3C_blt_xy[0];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3027 // am_uint_4FAA44_blt_xy[1] += amuint_4FAA3C_blt_xy[1];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3028 //LABEL_7:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3029 // Blt_Copy(v6, v5, 2);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3030 // goto LABEL_11;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3031 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3032 // am_uint_4FAA44_blt_xy[0] += amuint_4FAA3C_blt_xy[0];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3033 // am_uint_4FAA44_blt_xy[1] += amuint_4FAA3C_blt_xy[1];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3034 // Blt_Copy(pSrcXYZW, am_uint_4FAA44_blt_xy, 2);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3035 // amuint_4FAA4C = -1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3036 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3037 //LABEL_11:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3038 // v7 = (signed int)amuint_4FAA78;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3039 // if ( uCardID != -1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3040 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3041 // if ( v26 <= 10 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3042 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3043 // if ( v26 == 10 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3044 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3045 // ArcomageGame::GetCardRect(uCardID, pSrcXYZW);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3046 // v8 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3047 // v9 = (signed int)amuint_4FAA78;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3048 // while ( *(unsigned int *)v9 != -1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3049 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3050 // v9 += 32;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3051 // ++v8;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3052 // if ( v9 >= (signed int)&dword_4FABB8 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3053 // goto LABEL_20;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3054 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3055 // amuint_4FAA78[8 * v8] = uCardID;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3056 // am_byte_4FAA7C[32 * v8] = 1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3057 //LABEL_20:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3058 // v10 = 8 * v8;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3059 // v11 = amuint_4FAA80[v10];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3060 // v12 = amuint_4FAA84[v10];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3061 // pTargetXY[0] = v11;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3062 // pTargetXY[1] = v12;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3063 // Blt_Copy((ArcomageRect *)pSrcXYZW, pTargetXY, 0);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3064 // uCardID = -1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3065 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3066 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3067 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3068 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3069 // ArcomageGame::GetCardRect(uCardID, pSrcXYZW);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3070 // amuint_4FAA5C_blt_xy[0] += amuint_4FAA54_blt_xy[0];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3071 // amuint_4FAA5C_blt_xy[1] += amuint_4FAA54_blt_xy[1];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3072 // Blt_Copy(pSrcXYZW, amuint_4FAA5C_blt_xy, 0);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3073 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3074 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3075 // v13 = amuint_4FABC0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3076 // if ( amuint_4FABC0 != -1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3077 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3078 // v14 = (double)v26;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3079 // if ( v14 > 15.0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3080 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3081 // ArcomageGame::GetCardRect(amuint_4FABC0, pSrcXYZW);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3082 // v15 = amuint_4FAA5C_blt_xy;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3083 // amuint_4FAA5C_blt_xy[0] += amuint_4FAA54_blt_xy[0];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3084 // amuint_4FAA5C_blt_xy[1] += amuint_4FAA54_blt_xy[1];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3085 //LABEL_28:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3086 // v23 = 2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3087 //LABEL_29:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3088 // Blt_Copy(pSrcXYZW, v15, v23);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3089 // return;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3090 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3091 // if ( v14 == 15.0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3092 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3093 // am_40BF77(amuint_4FAA6C, amuint_4FABC0);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3094 // v13 = amuint_4FABC0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3095 // goto LABEL_26;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3096 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3097 // if ( v14 == 5.0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3098 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3099 // amuint_4FAA5C_blt_xy[0] = 272;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3100 // amuint_4FAA5C_blt_xy[1] = 173;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3101 // v16 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3102 // do
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3103 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3104 // if ( *(unsigned int *)v7 == -1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3105 // break;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3106 // v7 += 32;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3107 // ++v16;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3108 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3109 // while ( v7 < (signed int)&dword_4FABB8 );
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3110 // v26 = 32 * v16;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3111 // amuint_4FAA54_blt_xy[0] = (amuint_4FAA80[8 * v16] - 272) / 5;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3112 // amuint_4FAA54_blt_xy[1] = (amuint_4FAA84[8 * v16] - 173) / 5;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3113 // ArcomageGame::GetCardRect(amuint_4FABC0, pSrcXYZW);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3114 // pTargetXY[0] = 272;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3115 // pTargetXY[1] = 173;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3116 // goto LABEL_27;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3117 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3118 // if ( v14 >= 5.0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3119 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3120 // v17 = v26 == 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3121 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3122 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3123 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3124 // v17 = v26 == 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3125 // if ( v26 > 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3126 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3127 // ArcomageGame::GetCardRect(amuint_4FABC0, pSrcXYZW);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3128 // v15 = amuint_4FAA5C_blt_xy;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3129 // amuint_4FAA5C_blt_xy[0] += amuint_4FAA54_blt_xy[0];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3130 // amuint_4FAA5C_blt_xy[1] += amuint_4FAA54_blt_xy[1];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3131 // v23 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3132 // goto LABEL_29;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3133 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3134 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3135 // if ( !v17 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3136 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3137 //LABEL_26:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3138 // ArcomageGame::GetCardRect(v13, pSrcXYZW);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3139 // pTargetXY[0] = 272;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3140 // pTargetXY[1] = 173;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3141 //LABEL_27:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3142 // v15 = pTargetXY;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3143 // goto LABEL_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3144 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3145 // ArcomageGame::GetCardRect(amuint_4FABC0, pSrcXYZW);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3146 // v18 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3147 // while ( *(unsigned int *)v7 != -1 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3148 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3149 // v7 += 32;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3150 // ++v18;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3151 // if ( v7 >= (signed int)&dword_4FABB8 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3152 // goto LABEL_46;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3153 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3154 // amuint_4FAA78[8 * v18] = amuint_4FABC0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3155 //LABEL_46:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3156 // v19 = 8 * v18;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3157 // v20 = amuint_4FAA80[v19];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3158 // v21 = amuint_4FAA84[v19];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3159 // pTargetXY[0] = v20;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3160 // pTargetXY[1] = v21;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3161 // Blt_Copy((ArcomageRect *)pSrcXYZW, pTargetXY, 0);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3162 // amuint_4FABC0 = -1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3163 // }
0
Ritor1
parents:
diff changeset
3164 }
Ritor1
parents:
diff changeset
3165 // 4E185D: using guessed type char am_byte_4E185D;
Ritor1
parents:
diff changeset
3166 // 4FAA38: using guessed type int amuint_4FAA38;
Ritor1
parents:
diff changeset
3167 // 4FAA4C: using guessed type int amuint_4FAA4C;
Ritor1
parents:
diff changeset
3168 // 4FAA78: using guessed type int amuint_4FAA78[];
Ritor1
parents:
diff changeset
3169 // 4FAA80: using guessed type int amuint_4FAA80[];
Ritor1
parents:
diff changeset
3170 // 4FAA84: using guessed type int amuint_4FAA84[];
Ritor1
parents:
diff changeset
3171 // 4FABB8: using guessed type int dword_4FABB8;
Ritor1
parents:
diff changeset
3172
Ritor1
parents:
diff changeset
3173 //----- (0040BB12) --------------------------------------------------------
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3174 void ArcomageGame::GetCardRect(unsigned int uCardID, RECT *pCardRect)
0
Ritor1
parents:
diff changeset
3175 {
Ritor1
parents:
diff changeset
3176 int v3; // edx@1
Ritor1
parents:
diff changeset
3177 int v4; // ecx@1
Ritor1
parents:
diff changeset
3178
Ritor1
parents:
diff changeset
3179 v3 = pCards[uCardID].slot % 10;
Ritor1
parents:
diff changeset
3180 v4 = (pCards[uCardID].slot / 10 << 7) + 220;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3181 pCardRect->top = v4;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3182 pCardRect->left = 96 * v3;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3183 pCardRect->bottom = v4 + 128;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3184 pCardRect->right = 96 * v3 + 96;
0
Ritor1
parents:
diff changeset
3185 }
Ritor1
parents:
diff changeset
3186
Ritor1
parents:
diff changeset
3187 //----- (0040BB49) --------------------------------------------------------
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3188 int GetPlayerHandCardCount( int player_num )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3189 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3190 int card_count; // eax@1
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3191
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3192 card_count = 0;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3193 for(int i=0; i<10; ++i)
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3194 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3195 if (am_Players[player_num].cards_at_hand[i]!=-1)
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3196 ++card_count;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3197 }
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3198 return card_count;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3199
0
Ritor1
parents:
diff changeset
3200 }
Ritor1
parents:
diff changeset
3201
Ritor1
parents:
diff changeset
3202 //----- (0040BB67) --------------------------------------------------------
Ritor1
parents:
diff changeset
3203 signed int __fastcall am_40BB67(int a1)
Ritor1
parents:
diff changeset
3204 {
Ritor1
parents:
diff changeset
3205 int v1; // esi@1
Ritor1
parents:
diff changeset
3206 signed int result; // eax@1
Ritor1
parents:
diff changeset
3207 int v3; // ebx@1
Ritor1
parents:
diff changeset
3208 char v4; // zf@1
Ritor1
parents:
diff changeset
3209 int v5; // eax@3
Ritor1
parents:
diff changeset
3210 int v6; // eax@4
Ritor1
parents:
diff changeset
3211 int v7; // ecx@6
Ritor1
parents:
diff changeset
3212 char *v8; // eax@6
Ritor1
parents:
diff changeset
3213 int v9; // eax@10
Ritor1
parents:
diff changeset
3214 int v10; // ecx@10
Ritor1
parents:
diff changeset
3215 int v11; // eax@10
Ritor1
parents:
diff changeset
3216 char v12; // ch@2@11
Ritor1
parents:
diff changeset
3217 int v13; // ST00_4@12
Ritor1
parents:
diff changeset
3218 unsigned __int16 v14; // ax@12
Ritor1
parents:
diff changeset
3219 int v15; // eax@13
Ritor1
parents:
diff changeset
3220 int v16; // ecx@13
Ritor1
parents:
diff changeset
3221 int v17; // eax@13
Ritor1
parents:
diff changeset
3222 char v18; // al@16
Ritor1
parents:
diff changeset
3223 char v19; // ch@2@16
Ritor1
parents:
diff changeset
3224 int v20; // ST00_4@19
Ritor1
parents:
diff changeset
3225 unsigned __int16 v21; // ax@19
Ritor1
parents:
diff changeset
3226 int pXYZW[4]; // [sp+Ch] [bp-3Ch]@3
Ritor1
parents:
diff changeset
3227 stru273 v26; // [sp+1Ch] [bp-2Ch]@2
Ritor1
parents:
diff changeset
3228 int a1a; // [sp+28h] [bp-20h]@1
Ritor1
parents:
diff changeset
3229 int v25; // [sp+2Ch] [bp-1Ch]@3
Ritor1
parents:
diff changeset
3230 int var18; // [sp+30h] [bp-18h]@3
Ritor1
parents:
diff changeset
3231 int i; // [sp+34h] [bp-14h]@4
Ritor1
parents:
diff changeset
3232 int v28; // [sp+38h] [bp-10h]@1
Ritor1
parents:
diff changeset
3233 int a2; // [sp+3Ch] [bp-Ch]@3
Ritor1
parents:
diff changeset
3234 int v30; // [sp+40h] [bp-8h]@1
Ritor1
parents:
diff changeset
3235 char v31; // [sp+44h] [bp-4h]@12
Ritor1
parents:
diff changeset
3236 char v32; // [sp+45h] [bp-3h]@12
Ritor1
parents:
diff changeset
3237 char v33; // [sp+46h] [bp-2h]@12
Ritor1
parents:
diff changeset
3238
Ritor1
parents:
diff changeset
3239 v1 = a1;
Ritor1
parents:
diff changeset
3240 v30 = 0;
Ritor1
parents:
diff changeset
3241 result = -1;
Ritor1
parents:
diff changeset
3242 v3 = 188 * a1;
Ritor1
parents:
diff changeset
3243 a1a = a1;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3244 v4 = LOBYTE(am_Players[a1].field_20) == 0;
0
Ritor1
parents:
diff changeset
3245 v28 = -1;
Ritor1
parents:
diff changeset
3246 if ( !v4 )
Ritor1
parents:
diff changeset
3247 {
Ritor1
parents:
diff changeset
3248 if ( v26._40DD2F() )
Ritor1
parents:
diff changeset
3249 {
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3250 v5 = GetPlayerHandCardCount(v1);
0
Ritor1
parents:
diff changeset
3251 a2 = 0;
Ritor1
parents:
diff changeset
3252 v25 = v5;
Ritor1
parents:
diff changeset
3253 pXYZW[1] = 327;
Ritor1
parents:
diff changeset
3254 pXYZW[3] = 455;
Ritor1
parents:
diff changeset
3255 pXYZW[0] = (640 - 96 * v5) / (v5 + 1);
Ritor1
parents:
diff changeset
3256 var18 = pXYZW[0] + 96;
Ritor1
parents:
diff changeset
3257 pXYZW[2] = pXYZW[0] + 96;
Ritor1
parents:
diff changeset
3258 if ( v5 > 0 )
Ritor1
parents:
diff changeset
3259 {
Ritor1
parents:
diff changeset
3260 v6 = 47 * v1;
Ritor1
parents:
diff changeset
3261 for ( i = 47 * v1; ; v6 = i )
Ritor1
parents:
diff changeset
3262 {
Ritor1
parents:
diff changeset
3263 v7 = v30;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3264 v8 = (char *)&am_Players[0].cards_at_hand[v30 + v6];
0
Ritor1
parents:
diff changeset
3265 if ( *(unsigned int *)v8 == -1 )
Ritor1
parents:
diff changeset
3266 {
Ritor1
parents:
diff changeset
3267 do
Ritor1
parents:
diff changeset
3268 {
Ritor1
parents:
diff changeset
3269 v8 += 4;
Ritor1
parents:
diff changeset
3270 ++v7;
Ritor1
parents:
diff changeset
3271 }
Ritor1
parents:
diff changeset
3272 while ( *(unsigned int *)v8 == -1 );
Ritor1
parents:
diff changeset
3273 v30 = v7;
Ritor1
parents:
diff changeset
3274 }
Ritor1
parents:
diff changeset
3275 if ( am_byte_4E185D )
Ritor1
parents:
diff changeset
3276 {
Ritor1
parents:
diff changeset
3277 v9 = v3 + 8 * v7;
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3278 // v10 = *(int *)((char *)am_Players[0].arr_6C[0] + v9);
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3279 // v11 = *(int *)((char *)&am_Players[0].arr_6C[0][1] + v9);
0
Ritor1
parents:
diff changeset
3280 pXYZW[0] += v10;
Ritor1
parents:
diff changeset
3281 pXYZW[2] += v10;
Ritor1
parents:
diff changeset
3282 pXYZW[1] += v11;
Ritor1
parents:
diff changeset
3283 pXYZW[3] += v11;
Ritor1
parents:
diff changeset
3284 }
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3285 if ( true)//v26.Inside(pXYZW) )
0
Ritor1
parents:
diff changeset
3286 break;
Ritor1
parents:
diff changeset
3287 v31 = 0;
Ritor1
parents:
diff changeset
3288 v32 = 0;
Ritor1
parents:
diff changeset
3289 v33 = 0;
Ritor1
parents:
diff changeset
3290 BYTE3(v13) = v12;
Ritor1
parents:
diff changeset
3291 LOWORD(v13) = *(_WORD *)&v31;
Ritor1
parents:
diff changeset
3292 BYTE2(v13) = 0;
Ritor1
parents:
diff changeset
3293 v14 = R8G8B8_to_TargetFormat(v13);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3294 // DrawRect(pXYZW, v14, 0);
0
Ritor1
parents:
diff changeset
3295 pXYZW[0] += var18;
Ritor1
parents:
diff changeset
3296 pXYZW[2] += var18;
Ritor1
parents:
diff changeset
3297 if ( am_byte_4E185D )
Ritor1
parents:
diff changeset
3298 {
Ritor1
parents:
diff changeset
3299 v15 = v3 + 8 * v30;
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3300 // v16 = *(int *)((char *)am_Players[0].arr_6C[0] + v15);
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3301 // v17 = *(int *)((char *)&am_Players[0].arr_6C[0][1] + v15);
0
Ritor1
parents:
diff changeset
3302 pXYZW[0] -= v16;
Ritor1
parents:
diff changeset
3303 pXYZW[2] -= v16;
Ritor1
parents:
diff changeset
3304 pXYZW[1] -= v17;
Ritor1
parents:
diff changeset
3305 pXYZW[3] -= v17;
Ritor1
parents:
diff changeset
3306 }
Ritor1
parents:
diff changeset
3307 ++v30;
Ritor1
parents:
diff changeset
3308 ++a2;
Ritor1
parents:
diff changeset
3309 if ( a2 >= v25 )
Ritor1
parents:
diff changeset
3310 goto LABEL_20;
Ritor1
parents:
diff changeset
3311 }
Ritor1
parents:
diff changeset
3312 v28 = a2;
Ritor1
parents:
diff changeset
3313 v18 = am_40BF15(a1a, a2);
Ritor1
parents:
diff changeset
3314 v31 = -1;
Ritor1
parents:
diff changeset
3315 if ( v18 )
Ritor1
parents:
diff changeset
3316 {
Ritor1
parents:
diff changeset
3317 v32 = -1;
Ritor1
parents:
diff changeset
3318 v33 = -1;
Ritor1
parents:
diff changeset
3319 }
Ritor1
parents:
diff changeset
3320 else
Ritor1
parents:
diff changeset
3321 {
Ritor1
parents:
diff changeset
3322 v32 = 0;
Ritor1
parents:
diff changeset
3323 v33 = 0;
Ritor1
parents:
diff changeset
3324 }
Ritor1
parents:
diff changeset
3325 BYTE3(v20) = v19;
Ritor1
parents:
diff changeset
3326 LOWORD(v20) = *(_WORD *)&v31;
Ritor1
parents:
diff changeset
3327 BYTE2(v20) = v33;
Ritor1
parents:
diff changeset
3328 v21 = R8G8B8_to_TargetFormat(v20);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3329 // DrawRect(pXYZW, v21, 0);
0
Ritor1
parents:
diff changeset
3330 }
Ritor1
parents:
diff changeset
3331 }
Ritor1
parents:
diff changeset
3332 LABEL_20:
Ritor1
parents:
diff changeset
3333 result = v28;
Ritor1
parents:
diff changeset
3334 }
Ritor1
parents:
diff changeset
3335 return result;
Ritor1
parents:
diff changeset
3336 }
Ritor1
parents:
diff changeset
3337 // 4E185D: using guessed type char am_byte_4E185D;
Ritor1
parents:
diff changeset
3338
Ritor1
parents:
diff changeset
3339 //----- (0040BCFB) --------------------------------------------------------
Ritor1
parents:
diff changeset
3340 char __fastcall am_40BCFB(int a1, signed int a2)
Ritor1
parents:
diff changeset
3341 {
Ritor1
parents:
diff changeset
3342 int v2; // esi@2
Ritor1
parents:
diff changeset
3343 signed int v3; // edi@2
Ritor1
parents:
diff changeset
3344 char *v4; // eax@2
Ritor1
parents:
diff changeset
3345 int v5; // ecx@7
Ritor1
parents:
diff changeset
3346 int v6; // ebx@7
Ritor1
parents:
diff changeset
3347 int v7; // esi@8
Ritor1
parents:
diff changeset
3348 int v8; // eax@8
Ritor1
parents:
diff changeset
3349 int v9; // esi@8
Ritor1
parents:
diff changeset
3350 int v10; // ecx@8
Ritor1
parents:
diff changeset
3351 int v11; // eax@8
Ritor1
parents:
diff changeset
3352 int v12; // eax@8
Ritor1
parents:
diff changeset
3353 signed int v13; // edx@9
Ritor1
parents:
diff changeset
3354 unsigned int v14; // eax@12
Ritor1
parents:
diff changeset
3355 char result; // al@12
Ritor1
parents:
diff changeset
3356
Ritor1
parents:
diff changeset
3357 if ( a2 <= -1 )
Ritor1
parents:
diff changeset
3358 goto LABEL_16;
Ritor1
parents:
diff changeset
3359 v2 = 0;
Ritor1
parents:
diff changeset
3360 v3 = 0;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3361 v4 = (char *)am_Players[a1].cards_at_hand;
0
Ritor1
parents:
diff changeset
3362 do
Ritor1
parents:
diff changeset
3363 {
Ritor1
parents:
diff changeset
3364 if ( *(unsigned int *)v4 != -1 )
Ritor1
parents:
diff changeset
3365 {
Ritor1
parents:
diff changeset
3366 if ( a2 == v2 )
Ritor1
parents:
diff changeset
3367 break;
Ritor1
parents:
diff changeset
3368 ++v2;
Ritor1
parents:
diff changeset
3369 }
Ritor1
parents:
diff changeset
3370 ++v3;
Ritor1
parents:
diff changeset
3371 v4 += 4;
Ritor1
parents:
diff changeset
3372 }
Ritor1
parents:
diff changeset
3373 while ( v3 < 10 );
Ritor1
parents:
diff changeset
3374 v5 = v3 + 47 * a1;
Ritor1
parents:
diff changeset
3375 v6 = 4 * v5 + 5265228;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3376 if ( BYTE3(pCards[am_Players[0].cards_at_hand[v5]].field_28) )
0
Ritor1
parents:
diff changeset
3377 {
Ritor1
parents:
diff changeset
3378 ArcomageGame::PlaySound(0x16u);
Ritor1
parents:
diff changeset
3379 v7 = amuint_4FAA6C;
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3380 v8 = GetPlayerHandCardCount(amuint_4FAA6C);
0
Ritor1
parents:
diff changeset
3381 v9 = 188 * v7 + 8 * v3;
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3382 // v10 = 96 * v3 + *(int *)((char *)am_Players[0].arr_6C[0] + v9) + (640 - 96 * v8) / (v8 + 1);
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3383 // v11 = *(int *)((char *)&am_Players[0].arr_6C[0][1] + v9) + 327;
0
Ritor1
parents:
diff changeset
3384 amuint_4FAA5C_blt_xy[0] = v10;
Ritor1
parents:
diff changeset
3385 amuint_4FAA5C_blt_xy[1] = v11;
Ritor1
parents:
diff changeset
3386 v12 = 0;
Ritor1
parents:
diff changeset
3387 if ( !am_byte_4FAA75 )
Ritor1
parents:
diff changeset
3388 {
Ritor1
parents:
diff changeset
3389 v13 = (signed int)amuint_4FAA78;
Ritor1
parents:
diff changeset
3390 do
Ritor1
parents:
diff changeset
3391 {
Ritor1
parents:
diff changeset
3392 if ( *(unsigned int *)v13 == -1 )
Ritor1
parents:
diff changeset
3393 break;
Ritor1
parents:
diff changeset
3394 v13 += 32;
Ritor1
parents:
diff changeset
3395 ++v12;
Ritor1
parents:
diff changeset
3396 }
Ritor1
parents:
diff changeset
3397 while ( v13 < (signed int)&dword_4FABB8 );
Ritor1
parents:
diff changeset
3398 }
Ritor1
parents:
diff changeset
3399 pArcomageGame->field_F6 = 1;
Ritor1
parents:
diff changeset
3400 amuint_4FAA54_blt_xy[0] = (amuint_4FAA80[8 * v12] - v10) / 10;
Ritor1
parents:
diff changeset
3401 amuint_4FAA54_blt_xy[1] = (amuint_4FAA84[8 * v12] - 327) / 10;
Ritor1
parents:
diff changeset
3402 v14 = *(unsigned int *)v6;
Ritor1
parents:
diff changeset
3403 *(unsigned int *)v6 = -1;
Ritor1
parents:
diff changeset
3404 am_byte_4FAA77 = 0;
Ritor1
parents:
diff changeset
3405 uCardID = v14;
Ritor1
parents:
diff changeset
3406 result = 1;
Ritor1
parents:
diff changeset
3407 }
Ritor1
parents:
diff changeset
3408 else
Ritor1
parents:
diff changeset
3409 {
Ritor1
parents:
diff changeset
3410 LABEL_16:
Ritor1
parents:
diff changeset
3411 result = 0;
Ritor1
parents:
diff changeset
3412 }
Ritor1
parents:
diff changeset
3413 return result;
Ritor1
parents:
diff changeset
3414 }
Ritor1
parents:
diff changeset
3415 // 4FAA75: using guessed type char am_byte_4FAA75;
Ritor1
parents:
diff changeset
3416 // 4FAA77: using guessed type char am_byte_4FAA77;
Ritor1
parents:
diff changeset
3417 // 4FAA78: using guessed type int amuint_4FAA78[];
Ritor1
parents:
diff changeset
3418 // 4FAA80: using guessed type int amuint_4FAA80[];
Ritor1
parents:
diff changeset
3419 // 4FAA84: using guessed type int amuint_4FAA84[];
Ritor1
parents:
diff changeset
3420 // 4FABB8: using guessed type int dword_4FABB8;
Ritor1
parents:
diff changeset
3421
Ritor1
parents:
diff changeset
3422 //----- (0040BE0E) --------------------------------------------------------
Ritor1
parents:
diff changeset
3423 bool __fastcall am_40BE0E(int a1, signed int a2)
Ritor1
parents:
diff changeset
3424 {
Ritor1
parents:
diff changeset
3425 bool result; // eax@0
Ritor1
parents:
diff changeset
3426 int v3; // ebp@1
Ritor1
parents:
diff changeset
3427 int v4; // ecx@2
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3428 ArcomagePlayer *v5; // esi@2
0
Ritor1
parents:
diff changeset
3429 int v6; // edi@2
Ritor1
parents:
diff changeset
3430 int v7; // eax@2
Ritor1
parents:
diff changeset
3431 int v8; // ebx@8
Ritor1
parents:
diff changeset
3432 int v9; // eax@8
Ritor1
parents:
diff changeset
3433 int v10; // ebx@8
Ritor1
parents:
diff changeset
3434 int v11; // ebp@8
Ritor1
parents:
diff changeset
3435 int v12; // ecx@8
Ritor1
parents:
diff changeset
3436 int v13; // eax@8
Ritor1
parents:
diff changeset
3437 ArcomageCard *v14; // eax@8
Ritor1
parents:
diff changeset
3438 int v15; // ecx@8
Ritor1
parents:
diff changeset
3439 int v16; // ecx@8
Ritor1
parents:
diff changeset
3440
Ritor1
parents:
diff changeset
3441 v3 = a1;
Ritor1
parents:
diff changeset
3442 if ( a2 <= -1 )
Ritor1
parents:
diff changeset
3443 goto LABEL_12;
Ritor1
parents:
diff changeset
3444 v4 = 0;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3445 v5 = &am_Players[v3];
0
Ritor1
parents:
diff changeset
3446 v6 = 0;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3447 v7 = (int)v5->cards_at_hand;
0
Ritor1
parents:
diff changeset
3448 do
Ritor1
parents:
diff changeset
3449 {
Ritor1
parents:
diff changeset
3450 if ( *(unsigned int *)v7 != -1 )
Ritor1
parents:
diff changeset
3451 {
Ritor1
parents:
diff changeset
3452 if ( a2 == v4 )
Ritor1
parents:
diff changeset
3453 break;
Ritor1
parents:
diff changeset
3454 ++v4;
Ritor1
parents:
diff changeset
3455 }
Ritor1
parents:
diff changeset
3456 ++v6;
Ritor1
parents:
diff changeset
3457 v7 += 4;
Ritor1
parents:
diff changeset
3458 }
Ritor1
parents:
diff changeset
3459 while ( v6 < 10 );
Ritor1
parents:
diff changeset
3460 result = am_40BF15(v3, v6);
Ritor1
parents:
diff changeset
3461 if ( result )
Ritor1
parents:
diff changeset
3462 {
Ritor1
parents:
diff changeset
3463 ArcomageGame::PlaySound(0x17u);
Ritor1
parents:
diff changeset
3464 v8 = amuint_4FAA6C;
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3465 v9 = GetPlayerHandCardCount(amuint_4FAA6C);
0
Ritor1
parents:
diff changeset
3466 v10 = 188 * v8 + 8 * v6;
Ritor1
parents:
diff changeset
3467 v11 = v6 + 47 * v3;
Ritor1
parents:
diff changeset
3468 amuint_4FAA54_blt_xy[1] = -30;
Ritor1
parents:
diff changeset
3469 pArcomageGame->field_F6 = 1;
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3470 //v12 = 96 * v6 + *(int *)((char *)am_Players[0].arr_6C[0] + v10) + (640 - 96 * v9) / (v9 + 1);
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3471 // v13 = *(int *)((char *)&am_Players[0].arr_6C[0][1] + v10) + 327;
0
Ritor1
parents:
diff changeset
3472 amuint_4FAA5C_blt_xy[0] = v12;
Ritor1
parents:
diff changeset
3473 amuint_4FAA5C_blt_xy[1] = v13;
Ritor1
parents:
diff changeset
3474 amuint_4FAA54_blt_xy[0] = (272 - v12) / 5;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3475 v14 = &pCards[v5->cards_at_hand[v6]];
0
Ritor1
parents:
diff changeset
3476 v5->field_38 -= LOBYTE(v14->field_28);
Ritor1
parents:
diff changeset
3477 v15 = BYTE1(v14->field_28);
Ritor1
parents:
diff changeset
3478 v5->field_40 -= BYTE2(v14->field_28);
Ritor1
parents:
diff changeset
3479 v5->field_3C -= v15;
Ritor1
parents:
diff changeset
3480 result = 4 * v11 + 5265228;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3481 v16 = am_Players[0].cards_at_hand[v11];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3482 am_Players[0].cards_at_hand[v11] = -1;
0
Ritor1
parents:
diff changeset
3483 amuint_4FABC0 = v16;
Ritor1
parents:
diff changeset
3484 LOBYTE(result) = 1;
Ritor1
parents:
diff changeset
3485 }
Ritor1
parents:
diff changeset
3486 else
Ritor1
parents:
diff changeset
3487 {
Ritor1
parents:
diff changeset
3488 LABEL_12:
Ritor1
parents:
diff changeset
3489 LOBYTE(result) = 0;
Ritor1
parents:
diff changeset
3490 }
Ritor1
parents:
diff changeset
3491 return result;
Ritor1
parents:
diff changeset
3492 }
Ritor1
parents:
diff changeset
3493
Ritor1
parents:
diff changeset
3494 //----- (0040BF15) --------------------------------------------------------
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3495 bool am_40BF15( int player_num, int hand_card_indx )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3496 {
0
Ritor1
parents:
diff changeset
3497 bool result; // eax@1
Ritor1
parents:
diff changeset
3498 ArcomageCard *v4; // ecx@1
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3499 ArcomagePlayer *v2; // esi@1
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3500
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3501 v2 = &am_Players[player_num];
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3502 result = true;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3503 v4 = &pCards[am_Players[player_num].cards_at_hand[hand_card_indx]];
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3504 if ( v4->field_25 > v2->field_2C )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3505 result = false;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3506 if ( v4->field_26 > v2->field_30 )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3507 result = false;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3508 if ( v4->field_27 > v2->field_34 )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3509 result = false;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3510 if ( v4->field_28 > v2->field_38 )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3511 result = false;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3512 if ( v4->field_29 > v2->field_3C )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3513 result = false;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3514 if ( v4->field_2A > v2->field_40 )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3515 result = false;
0
Ritor1
parents:
diff changeset
3516 return result;
Ritor1
parents:
diff changeset
3517 }
Ritor1
parents:
diff changeset
3518
Ritor1
parents:
diff changeset
3519
Ritor1
parents:
diff changeset
3520
Ritor1
parents:
diff changeset
3521
Ritor1
parents:
diff changeset
3522 //----- (0040BF77) --------------------------------------------------------
Ritor1
parents:
diff changeset
3523 void __fastcall am_40BF77(int a1, unsigned int uCardID)
Ritor1
parents:
diff changeset
3524 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3525 // ArcomagePlayer *v2; // esi@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3526 // int v3; // eax@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3527 // ArcomagePlayer *v4; // edi@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3528 // int v5; // eax@2
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3529 // char v6; // sf@2
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3530 // unsigned __int8 v7; // of@2
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3531 // int v8; // eax@3
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3532 // int v9; // eax@4
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3533 // char v10; // zf@5
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3534 // int v11; // eax@8
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3535 // unsigned __int8 v12; // zf@8
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3536 // char v13; // sf@8
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3537 // unsigned __int8 v14; // of@8
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3538 // int v15; // eax@9
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3539 // int v16; // eax@10
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3540 // char v17; // zf@12
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3541 // char v18; // al@15
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3542 // int v19; // eax@16
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3543 // int v20; // eax@17
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3544 // int v21; // eax@22
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3545 // int v22; // eax@23
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3546 // int v23; // eax@26
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3547 // int v24; // edx@26
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3548 // signed int v25; // ebx@26
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3549 // ArcomageCard *v26; // ebx@28
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3550 // int v27; // eax@28
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3551 // int v28; // edx@33
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3552 // int v29; // eax@33
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3553 // int v30; // eax@35
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3554 // int v31; // edx@40
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3555 // int v32; // eax@40
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3556 // int v33; // eax@42
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3557 // int v34; // edx@47
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3558 // int v35; // eax@47
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3559 // int v36; // eax@49
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3560 // int v37; // edx@54
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3561 // int v38; // eax@54
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3562 // bool v39; // eax@56
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3563 // int v40; // edx@61
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3564 // int v41; // eax@61
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3565 // int v42; // eax@63
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3566 // int v43; // edx@68
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3567 // int v44; // eax@68
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3568 // char v45; // al@70
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3569 // int v46; // eax@72
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3570 // int v47; // edx@77
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3571 // int v48; // eax@77
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3572 // int v49; // eax@79
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3573 // int v50; // edx@84
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3574 // int v51; // eax@84
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3575 // int v52; // eax@86
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3576 // int v53; // eax@91
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3577 // int v54; // edx@91
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3578 // int v55; // eax@93
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3579 // int v56; // eax@98
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3580 // int v57; // edx@98
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3581 // int v58; // eax@100
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3582 // int v59; // eax@105
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3583 // int v60; // edx@105
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3584 // int v61; // eax@107
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3585 // int v62; // eax@112
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3586 // int v63; // edx@112
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3587 // int v64; // eax@114
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3588 // int v65; // eax@119
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3589 // int v66; // edx@119
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3590 // int v67; // eax@121
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3591 // int v68; // eax@126
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3592 // int v69; // edx@126
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3593 // char v70; // al@128
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3594 // int v71; // eax@130
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3595 // int v72; // eax@135
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3596 // int v73; // edx@135
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3597 // int v74; // eax@137
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3598 // int v75; // eax@142
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3599 // int v76; // edx@142
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3600 // int v77; // eax@144
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3601 // int v78; // eax@151
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3602 // int v79; // ecx@151
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3603 // int v80; // eax@155
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3604 // int v81; // eax@162
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3605 // int v82; // ecx@162
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3606 // int v83; // eax@166
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3607 // int v84; // eax@173
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3608 // int v85; // ecx@173
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3609 // int v86; // eax@177
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3610 // int v87; // eax@184
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3611 // int v88; // ecx@184
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3612 // bool v89; // eax@188
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3613 // int v90; // eax@195
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3614 // int v91; // ecx@195
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3615 // int v92; // eax@199
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3616 // int v93; // eax@206
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3617 // int v94; // ecx@206
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3618 // char v95; // al@210
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3619 // int v96; // eax@211
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3620 // int v97; // edx@211
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3621 // int v98; // eax@211
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3622 // int v99; // eax@211
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3623 // int v100; // eax@212
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3624 // int v101; // eax@219
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3625 // int v102; // ecx@219
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3626 // int v103; // eax@223
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3627 // int v104; // eax@231
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3628 // int v105; // edx@231
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3629 // signed int v106; // ebx@231
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3630 // ArcomageCard *v107; // ebx@233
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3631 // int v108; // eax@233
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3632 // int v109; // edx@238
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3633 // int v110; // eax@238
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3634 // int v111; // eax@240
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3635 // int v112; // edx@245
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3636 // int v113; // eax@245
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3637 // int v114; // eax@247
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3638 // int v115; // edx@252
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3639 // int v116; // eax@252
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3640 // int v117; // eax@254
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3641 // int v118; // edx@259
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3642 // int v119; // eax@259
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3643 // bool v120; // eax@261
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3644 // int v121; // edx@266
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3645 // int v122; // eax@266
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3646 // int v123; // eax@268
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3647 // int v124; // edx@273
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3648 // int v125; // eax@273
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3649 // char v126; // al@275
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3650 // int v127; // eax@277
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3651 // int v128; // edx@282
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3652 // int v129; // eax@282
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3653 // int v130; // eax@284
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3654 // int v131; // edx@289
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3655 // int v132; // eax@289
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3656 // int v133; // eax@291
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3657 // int v134; // eax@296
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3658 // int v135; // edx@296
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3659 // int v136; // eax@298
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3660 // int v137; // eax@303
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3661 // int v138; // edx@303
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3662 // int v139; // eax@305
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3663 // int v140; // eax@310
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3664 // int v141; // edx@310
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3665 // int v142; // eax@312
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3666 // int v143; // eax@317
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3667 // int v144; // edx@317
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3668 // int v145; // eax@319
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3669 // int v146; // eax@324
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3670 // int v147; // edx@324
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3671 // int v148; // eax@326
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3672 // int v149; // eax@331
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3673 // int v150; // edx@331
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3674 // char v151; // al@333
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3675 // int v152; // eax@335
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3676 // int v153; // eax@340
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3677 // int v154; // edx@340
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3678 // int v155; // eax@342
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3679 // int v156; // eax@347
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3680 // int v157; // edx@347
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3681 // int v158; // eax@349
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3682 // int v159; // eax@356
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3683 // int v160; // ecx@356
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3684 // int v161; // eax@360
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3685 // int v162; // eax@367
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3686 // int v163; // ecx@367
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3687 // int v164; // eax@371
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3688 // int v165; // eax@378
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3689 // int v166; // ecx@378
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3690 // int v167; // eax@382
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3691 // int v168; // eax@389
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3692 // int v169; // ecx@389
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3693 // bool v170; // eax@393
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3694 // int v171; // eax@400
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3695 // int v172; // ecx@400
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3696 // int v173; // eax@404
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3697 // int v174; // eax@411
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3698 // int v175; // ecx@411
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3699 // char v176; // al@415
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3700 // int v177; // eax@416
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3701 // int v178; // edx@416
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3702 // int v179; // eax@416
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3703 // int v180; // eax@416
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3704 // int v181; // eax@417
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3705 // int v182; // eax@424
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3706 // int v183; // ecx@424
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3707 // int v184; // eax@429
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3708 // int v185; // ecx@429
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3709 // signed int v186; // esi@511
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3710 // Vec2_int_ v187; // [sp+Ch] [bp-64h]@488
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3711 // //int v188; // [sp+10h] [bp-60h]@488
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3712 // int v189; // [sp+14h] [bp-5Ch]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3713 // ArcomageCard *pCard; // [sp+18h] [bp-58h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3714 // int v191; // [sp+1Ch] [bp-54h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3715 // int v192; // [sp+20h] [bp-50h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3716 // int v193; // [sp+24h] [bp-4Ch]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3717 // int v194; // [sp+28h] [bp-48h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3718 // int v195; // [sp+2Ch] [bp-44h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3719 // int v196; // [sp+30h] [bp-40h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3720 // int v197; // [sp+34h] [bp-3Ch]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3721 // int v198; // [sp+38h] [bp-38h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3722 // int v199; // [sp+3Ch] [bp-34h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3723 // int v200; // [sp+40h] [bp-30h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3724 // int v201; // [sp+44h] [bp-2Ch]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3725 // int v202; // [sp+48h] [bp-28h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3726 // int v203; // [sp+4Ch] [bp-24h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3727 // int v204; // [sp+50h] [bp-20h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3728 // bool v205; // [sp+54h] [bp-1Ch]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3729 // int v206; // [sp+58h] [bp-18h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3730 // int v207; // [sp+5Ch] [bp-14h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3731 // int v208; // [sp+60h] [bp-10h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3732 // int v209; // [sp+64h] [bp-Ch]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3733 // int v210; // [sp+68h] [bp-8h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3734 // int v211; // [sp+6Ch] [bp-4h]@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3735 //
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3736 // v194 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3737 // v210 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3738 // v208 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3739 // v197 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3740 // v205 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3741 // v203 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3742 // v201 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3743 // v199 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3744 // v192 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3745 // v196 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3746 // v211 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3747 // v209 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3748 // v207 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3749 // v206 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3750 // v204 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3751 // v202 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3752 // v200 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3753 // v198 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3754 // v191 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3755 // v195 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3756 // v193 = a1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3757 // v2 = &stru_505708[a1];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3758 // pCard = &pCards[uCardID];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3759 // v3 = pCard->field_2C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3760 // v189 = (a1 + 1) % 2;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3761 // v4 = &stru_505708[v189];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3762 // switch ( v3 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3763 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3764 // case 2:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3765 // v5 = v2->field_2C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3766 // v7 = __OFSUB__(v5, v4->field_2C);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3767 // v6 = v5 - v4->field_2C < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3768 // goto LABEL_18;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3769 // case 3:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3770 // v8 = v2->field_30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3771 // v7 = __OFSUB__(v8, v4->field_30);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3772 // v6 = v8 - v4->field_30 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3773 // goto LABEL_18;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3774 // case 4:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3775 // v9 = v2->field_34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3776 // v7 = __OFSUB__(v9, v4->field_34);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3777 // v6 = v9 - v4->field_34 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3778 // goto LABEL_18;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3779 // case 5:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3780 // v10 = v2->field_2C == v4->field_2C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3781 // goto LABEL_21;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3782 // case 6:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3783 // v10 = v2->field_30 == v4->field_30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3784 // goto LABEL_21;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3785 // case 7:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3786 // v10 = v2->field_34 == v4->field_34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3787 // goto LABEL_21;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3788 // case 8:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3789 // v11 = v2->field_2C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3790 // v14 = __OFSUB__(v11, v4->field_2C);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3791 // v12 = v11 == v4->field_2C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3792 // v13 = v11 - v4->field_2C < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3793 // goto LABEL_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3794 // case 9:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3795 // v15 = v2->field_30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3796 // v14 = __OFSUB__(v15, v4->field_30);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3797 // v12 = v15 == v4->field_30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3798 // v13 = v15 - v4->field_30 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3799 // goto LABEL_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3800 // case 10:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3801 // v16 = v2->field_34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3802 // v14 = __OFSUB__(v16, v4->field_34);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3803 // v12 = v16 == v4->field_34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3804 // v13 = v16 - v4->field_34 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3805 // goto LABEL_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3806 // case 11:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3807 // v10 = v2->field_28 == 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3808 // goto LABEL_21;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3809 // case 12:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3810 // v17 = v2->field_28 == 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3811 // goto LABEL_15;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3812 // case 13:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3813 // v10 = v4->field_28 == 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3814 // goto LABEL_21;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3815 // case 14:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3816 // v17 = v4->field_28 == 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3817 //LABEL_15:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3818 // v18 = !v17;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3819 // goto LABEL_25;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3820 // case 15:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3821 // v19 = v2->field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3822 // v7 = __OFSUB__(v19, v4->field_28);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3823 // v6 = v19 - v4->field_28 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3824 // goto LABEL_18;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3825 // case 16:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3826 // v20 = v2->field_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3827 // v7 = __OFSUB__(v20, v4->field_24);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3828 // v6 = v20 - v4->field_24 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3829 //LABEL_18:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3830 // v18 = v6 ^ v7;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3831 // goto LABEL_25;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3832 // case 17:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3833 // v10 = v2->field_28 == v4->field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3834 // goto LABEL_21;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3835 // case 18:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3836 // v10 = v2->field_24 == v4->field_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3837 //LABEL_21:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3838 // v18 = v10;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3839 // goto LABEL_25;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3840 // case 19:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3841 // v21 = v2->field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3842 // v14 = __OFSUB__(v21, v4->field_28);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3843 // v12 = v21 == v4->field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3844 // v13 = v21 - v4->field_28 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3845 // goto LABEL_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3846 // case 20:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3847 // v22 = v2->field_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3848 // v14 = __OFSUB__(v22, v4->field_24);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3849 // v12 = v22 == v4->field_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3850 // v13 = v22 - v4->field_24 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3851 //LABEL_24:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3852 // v18 = !((unsigned __int8)(v13 ^ v14) | v12);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3853 //LABEL_25:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3854 // if ( v18 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3855 // goto LABEL_26;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3856 // goto LABEL_231;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3857 // default:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3858 //LABEL_26:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3859 // v23 = BYTE1(pCard->field_30);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3860 // v24 = v23 + (LOBYTE(pCard->field_30) == 1);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3861 // v25 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3862 // dword_4FAA68 = v23 + (LOBYTE(pCard->field_30) == 1);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3863 // dword_4FAA64 = v23;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3864 // if ( v23 > 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3865 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3866 // do
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3867 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3868 // am_40A283(v193, v24);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3869 // ++v25;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3870 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3871 // while ( v25 < SBYTE1(pCard->field_30) );
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3872 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3873 // v26 = pCard;
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
3874 // am_byte_4FAA77 = GetPlayerHandCardCount(v193) > dword_4E1874;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3875 // LOBYTE(v27) = BYTE2(pCard->field_30);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3876 // if ( (_BYTE)v27 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3877 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3878 // if ( (_BYTE)v27 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3879 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3880 // v28 = v2->field_2C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3881 // v29 = v4->field_2C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3882 // if ( v28 < v29 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3883 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3884 // v2->field_2C = v29;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3885 // v194 = v29 - v28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3886 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3887 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3888 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3889 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3890 // v27 = (char)v27;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3891 // v6 = (char)v27 + v2->field_2C < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3892 // v2->field_2C += (char)v27;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3893 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3894 // v2->field_2C = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3895 // v194 = v27;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3896 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3897 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3898 // LOBYTE(v30) = BYTE3(v26->field_30);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3899 // if ( (_BYTE)v30 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3900 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3901 // if ( (_BYTE)v30 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3902 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3903 // v31 = v2->field_30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3904 // v32 = v4->field_30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3905 // if ( v31 < v32 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3906 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3907 // v2->field_30 = v32;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3908 // v210 = v32 - v31;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3909 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3910 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3911 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3912 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3913 // v30 = (char)v30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3914 // v6 = (char)v30 + v2->field_30 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3915 // v2->field_30 += (char)v30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3916 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3917 // v2->field_30 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3918 // v210 = v30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3919 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3920 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3921 // LOBYTE(v33) = LOBYTE(v26->field_34);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3922 // if ( (_BYTE)v33 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3923 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3924 // if ( (_BYTE)v33 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3925 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3926 // v34 = v2->field_34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3927 // v35 = v4->field_34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3928 // if ( v34 < v35 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3929 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3930 // v2->field_34 = v35;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3931 // v208 = v35 - v34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3932 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3933 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3934 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3935 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3936 // v33 = (char)v33;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3937 // v6 = (char)v33 + v2->field_34 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3938 // v2->field_34 += (char)v33;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3939 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3940 // v2->field_34 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3941 // v208 = v33;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3942 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3943 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3944 // LOBYTE(v36) = BYTE1(v26->field_34);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3945 // if ( (_BYTE)v36 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3946 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3947 // if ( (_BYTE)v36 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3948 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3949 // v37 = v2->field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3950 // v38 = v4->field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3951 // if ( v37 < v38 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3952 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3953 // v2->field_38 = v38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3954 // v197 = v38 - v37;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3955 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3956 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3957 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3958 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3959 // v36 = (char)v36;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3960 // v6 = (char)v36 + v2->field_38 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3961 // v2->field_38 += (char)v36;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3962 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3963 // v2->field_38 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3964 // v197 = v36;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3965 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3966 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3967 // LOBYTE(v39) = BYTE2(v26->field_34);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3968 // if ( v39 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3969 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3970 // if ( v39 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3971 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3972 // v40 = v2->field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3973 // v41 = v4->field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3974 // if ( v40 < v41 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3975 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3976 // v2->field_3C = v41;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3977 // v205 = v41 - v40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3978 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3979 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3980 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3981 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3982 // v39 = v39;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3983 // v6 = v39 + v2->field_3C < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3984 // v2->field_3C += v39;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3985 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3986 // v2->field_3C = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3987 // v205 = v39;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3988 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3989 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3990 // LOBYTE(v42) = BYTE3(v26->field_34);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3991 // if ( (_BYTE)v42 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3992 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3993 // if ( (_BYTE)v42 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3994 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3995 // v43 = v2->field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3996 // v44 = v4->field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3997 // if ( v43 < v44 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3998 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
3999 // v2->field_40 = v44;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4000 // v203 = v44 - v43;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4001 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4002 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4003 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4004 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4005 // v42 = (char)v42;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4006 // v6 = (char)v42 + v2->field_40 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4007 // v2->field_40 += (char)v42;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4008 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4009 // v2->field_40 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4010 // v203 = v42;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4011 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4012 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4013 // v45 = v26->field_38[0];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4014 // if ( v45 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4015 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4016 // v196 = am_40D402(v193, v45);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4017 // v192 = v26->field_38[0] - v196;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4018 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4019 // LOBYTE(v46) = v26->field_38[1];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4020 // if ( (_BYTE)v46 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4021 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4022 // if ( (_BYTE)v46 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4023 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4024 // v47 = v2->field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4025 // v48 = v4->field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4026 // if ( v47 < v48 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4027 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4028 // v2->field_28 = v48;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4029 // v201 = v48 - v47;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4030 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4031 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4032 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4033 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4034 // v46 = (char)v46;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4035 // v6 = (char)v46 + v2->field_28 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4036 // v2->field_28 += (char)v46;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4037 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4038 // v2->field_28 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4039 // v201 = v46;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4040 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4041 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4042 // LOBYTE(v49) = v26->field_38[2];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4043 // if ( (_BYTE)v49 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4044 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4045 // if ( (_BYTE)v49 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4046 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4047 // v50 = v2->field_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4048 // v51 = v4->field_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4049 // if ( v50 < v51 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4050 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4051 // v2->field_24 = v51;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4052 // v199 = v51 - v50;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4053 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4054 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4055 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4056 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4057 // v49 = (char)v49;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4058 // v6 = (char)v49 + v2->field_24 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4059 // v2->field_24 += (char)v49;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4060 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4061 // v2->field_24 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4062 // v199 = v49;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4063 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4064 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4065 // LOBYTE(v52) = v26->field_38[3];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4066 // if ( (_BYTE)v52 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4067 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4068 // if ( (_BYTE)v52 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4069 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4070 // v53 = v2->field_2C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4071 // v54 = v4->field_2C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4072 // if ( v53 > v54 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4073 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4074 // v4->field_2C = v53;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4075 // v211 = v53 - v54;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4076 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4077 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4078 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4079 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4080 // v52 = (char)v52;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4081 // v6 = (char)v52 + v4->field_2C < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4082 // v4->field_2C += (char)v52;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4083 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4084 // v4->field_2C = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4085 // v211 = v52;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4086 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4087 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4088 // LOBYTE(v55) = v26->field_38[4];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4089 // if ( (_BYTE)v55 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4090 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4091 // if ( (_BYTE)v55 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4092 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4093 // v56 = v2->field_30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4094 // v57 = v4->field_30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4095 // if ( v56 > v57 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4096 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4097 // v4->field_30 = v56;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4098 // v209 = v56 - v57;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4099 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4100 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4101 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4102 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4103 // v55 = (char)v55;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4104 // v6 = (char)v55 + v4->field_30 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4105 // v4->field_30 += (char)v55;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4106 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4107 // v4->field_30 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4108 // v209 = v55;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4109 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4110 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4111 // LOBYTE(v58) = v26->field_38[5];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4112 // if ( (_BYTE)v58 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4113 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4114 // if ( (_BYTE)v58 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4115 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4116 // v59 = v2->field_34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4117 // v60 = v4->field_34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4118 // if ( v59 > v60 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4119 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4120 // v4->field_34 = v59;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4121 // v207 = v59 - v60;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4122 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4123 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4124 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4125 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4126 // v58 = (char)v58;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4127 // v6 = (char)v58 + v4->field_34 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4128 // v4->field_34 += (char)v58;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4129 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4130 // v4->field_34 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4131 // v207 = v58;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4132 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4133 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4134 // LOBYTE(v61) = v26->field_38[6];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4135 // if ( (_BYTE)v61 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4136 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4137 // if ( (_BYTE)v61 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4138 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4139 // v62 = v2->field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4140 // v63 = v4->field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4141 // if ( v62 > v63 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4142 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4143 // v4->field_38 = v62;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4144 // v206 = v62 - v63;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4145 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4146 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4147 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4148 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4149 // v61 = (char)v61;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4150 // v6 = (char)v61 + v4->field_38 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4151 // v4->field_38 += (char)v61;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4152 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4153 // v4->field_38 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4154 // v206 = v61;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4155 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4156 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4157 // LOBYTE(v64) = v26->field_38[7];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4158 // if ( (_BYTE)v64 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4159 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4160 // if ( (_BYTE)v64 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4161 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4162 // v65 = v2->field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4163 // v66 = v4->field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4164 // if ( v65 > v66 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4165 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4166 // v4->field_3C = v65;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4167 // v204 = v65 - v66;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4168 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4169 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4170 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4171 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4172 // v64 = (char)v64;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4173 // v6 = (char)v64 + v4->field_3C < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4174 // v4->field_3C += (char)v64;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4175 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4176 // v4->field_3C = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4177 // v204 = v64;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4178 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4179 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4180 // LOBYTE(v67) = v26->field_38[8];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4181 // if ( (_BYTE)v67 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4182 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4183 // if ( (_BYTE)v67 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4184 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4185 // v68 = v2->field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4186 // v69 = v4->field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4187 // if ( v68 > v69 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4188 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4189 // v4->field_40 = v68;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4190 // v202 = v68 - v69;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4191 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4192 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4193 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4194 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4195 // v67 = (char)v67;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4196 // v6 = (char)v67 + v4->field_40 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4197 // v4->field_40 += (char)v67;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4198 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4199 // v4->field_40 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4200 // v202 = v67;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4201 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4202 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4203 // v70 = v26->field_38[9];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4204 // if ( v70 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4205 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4206 // v195 = am_40D402(v189, v70);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4207 // v191 = v26->field_38[9] - v195;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4208 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4209 // LOBYTE(v71) = v26->field_38[10];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4210 // if ( (_BYTE)v71 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4211 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4212 // if ( (_BYTE)v71 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4213 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4214 // v72 = v2->field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4215 // v73 = v4->field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4216 // if ( v72 > v73 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4217 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4218 // v4->field_28 = v72;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4219 // v200 = v72 - v73;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4220 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4221 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4222 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4223 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4224 // v71 = (char)v71;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4225 // v6 = (char)v71 + v4->field_28 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4226 // v4->field_28 += (char)v71;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4227 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4228 // v4->field_28 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4229 // v200 = v71;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4230 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4231 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4232 // LOBYTE(v74) = v26->field_38[11];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4233 // if ( (_BYTE)v74 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4234 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4235 // if ( (_BYTE)v74 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4236 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4237 // v75 = v2->field_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4238 // v76 = v4->field_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4239 // if ( v75 > v76 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4240 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4241 // v4->field_24 = v75;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4242 // v198 = v75 - v76;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4243 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4244 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4245 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4246 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4247 // v74 = (char)v74;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4248 // v6 = (char)v74 + v4->field_24 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4249 // v4->field_24 += (char)v74;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4250 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4251 // v4->field_24 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4252 // v198 = v74;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4253 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4254 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4255 // LOBYTE(v77) = v26->field_38[12];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4256 // if ( (_BYTE)v77 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4257 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4258 // if ( (_BYTE)v77 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4259 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4260 // v78 = v2->field_2C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4261 // v79 = v4->field_2C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4262 // if ( v78 != v79 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4263 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4264 // if ( v78 <= v79 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4265 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4266 // v2->field_2C = v79;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4267 // v194 = v79 - v78;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4268 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4269 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4270 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4271 // v4->field_2C = v78;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4272 // v211 = v78 - v79;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4273 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4274 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4275 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4276 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4277 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4278 // v77 = (char)v77;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4279 // v2->field_2C += (char)v77;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4280 // v4->field_2C += (char)v77;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4281 // if ( v2->field_2C < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4282 // v2->field_2C = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4283 // if ( v4->field_2C < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4284 // v4->field_2C = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4285 // v194 = v77;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4286 // v211 = v77;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4287 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4288 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4289 // LOBYTE(v80) = v26->field_38[13];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4290 // if ( (_BYTE)v80 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4291 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4292 // if ( (_BYTE)v80 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4293 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4294 // v81 = v2->field_30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4295 // v82 = v4->field_30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4296 // if ( v81 != v82 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4297 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4298 // if ( v81 <= v82 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4299 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4300 // v2->field_30 = v82;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4301 // v210 = v82 - v81;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4302 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4303 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4304 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4305 // v4->field_30 = v81;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4306 // v209 = v81 - v82;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4307 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4308 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4309 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4310 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4311 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4312 // v80 = (char)v80;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4313 // v2->field_30 += (char)v80;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4314 // v4->field_30 += (char)v80;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4315 // if ( v2->field_30 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4316 // v2->field_30 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4317 // if ( v4->field_30 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4318 // v4->field_30 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4319 // v209 = v80;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4320 // v210 = v80;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4321 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4322 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4323 // LOBYTE(v83) = v26->field_38[14];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4324 // if ( (_BYTE)v83 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4325 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4326 // if ( (_BYTE)v83 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4327 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4328 // v84 = v2->field_34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4329 // v85 = v4->field_34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4330 // if ( v84 != v85 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4331 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4332 // if ( v84 <= v85 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4333 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4334 // v2->field_34 = v85;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4335 // v208 = v85 - v84;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4336 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4337 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4338 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4339 // v4->field_34 = v84;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4340 // v207 = v84 - v85;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4341 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4342 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4343 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4344 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4345 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4346 // v83 = (char)v83;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4347 // v2->field_34 += (char)v83;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4348 // v4->field_34 += (char)v83;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4349 // if ( v2->field_34 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4350 // v2->field_34 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4351 // if ( v4->field_34 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4352 // v4->field_34 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4353 // v208 = v83;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4354 // v207 = v83;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4355 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4356 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4357 // LOBYTE(v86) = v26->field_38[15];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4358 // if ( (_BYTE)v86 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4359 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4360 // if ( (_BYTE)v86 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4361 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4362 // v87 = v2->field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4363 // v88 = v4->field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4364 // if ( v87 != v88 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4365 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4366 // if ( v87 <= v88 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4367 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4368 // v2->field_38 = v88;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4369 // v197 = v88 - v87;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4370 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4371 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4372 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4373 // v4->field_38 = v87;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4374 // v206 = v87 - v88;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4375 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4376 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4377 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4378 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4379 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4380 // v86 = (char)v86;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4381 // v2->field_38 += (char)v86;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4382 // v4->field_38 += (char)v86;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4383 // if ( v2->field_38 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4384 // v2->field_38 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4385 // if ( v4->field_38 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4386 // v4->field_38 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4387 // v197 = v86;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4388 // v206 = v86;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4389 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4390 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4391 // LOBYTE(v89) = v26->field_48[0];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4392 // if ( v89 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4393 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4394 // if ( v89 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4395 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4396 // v90 = v2->field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4397 // v91 = v4->field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4398 // if ( v90 != v91 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4399 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4400 // if ( v90 <= v91 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4401 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4402 // v205 = v91 > v90;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4403 // v2->field_3C = v91;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4404 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4405 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4406 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4407 // v204 = 1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4408 // v4->field_3C = v90;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4409 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4410 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4411 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4412 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4413 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4414 // v89 = v89;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4415 // v2->field_3C += v89;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4416 // v4->field_3C += v89;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4417 // if ( v2->field_3C < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4418 // v2->field_3C = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4419 // if ( v4->field_3C < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4420 // v4->field_3C = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4421 // v205 = v89;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4422 // v204 = v89;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4423 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4424 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4425 // LOBYTE(v92) = v26->field_48[1];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4426 // if ( (_BYTE)v92 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4427 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4428 // if ( (_BYTE)v92 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4429 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4430 // v93 = v2->field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4431 // v94 = v4->field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4432 // if ( v93 != v94 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4433 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4434 // if ( v93 <= v94 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4435 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4436 // v2->field_40 = v94;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4437 // v203 = v94 - v93;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4438 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4439 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4440 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4441 // v4->field_40 = v93;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4442 // v202 = v93 - v94;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4443 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4444 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4445 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4446 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4447 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4448 // v92 = (char)v92;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4449 // v2->field_40 += (char)v92;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4450 // v4->field_40 += (char)v92;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4451 // if ( v2->field_40 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4452 // v2->field_40 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4453 // if ( v4->field_40 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4454 // v4->field_40 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4455 // v203 = v92;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4456 // v202 = v92;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4457 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4458 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4459 // v95 = v26->field_48[2];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4460 // if ( v95 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4461 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4462 // v96 = am_40D402(v193, v95);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4463 // v97 = v26->field_48[2];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4464 // v196 = v96;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4465 // v98 = am_40D402(v189, v97);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4466 // v195 = v98;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4467 // v99 = v26->field_48[2] - v98;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4468 // v192 = v26->field_48[2] - v196;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4469 // v191 = v99;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4470 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4471 // LOBYTE(v100) = v26->field_48[3];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4472 // if ( (_BYTE)v100 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4473 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4474 // if ( (_BYTE)v100 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4475 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4476 // v101 = v2->field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4477 // v102 = v4->field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4478 // if ( v101 != v102 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4479 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4480 // if ( v101 <= v102 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4481 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4482 // v2->field_28 = v102;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4483 // v201 = v102 - v101;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4484 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4485 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4486 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4487 // v4->field_28 = v101;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4488 // v200 = v101 - v102;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4489 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4490 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4491 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4492 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4493 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4494 // v100 = (char)v100;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4495 // v2->field_28 += (char)v100;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4496 // v4->field_28 += (char)v100;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4497 // if ( v2->field_28 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4498 // v2->field_28 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4499 // if ( v4->field_28 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4500 // v4->field_28 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4501 // v201 = v100;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4502 // v200 = v100;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4503 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4504 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4505 // LOBYTE(v103) = v26->field_48[4];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4506 // break;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4507 // case 0:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4508 //LABEL_231:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4509 // v104 = pCard->field_48[6];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4510 // v105 = v104 + (pCard->field_48[5] == 1);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4511 // v106 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4512 // dword_4FAA68 = v104 + (pCard->field_48[5] == 1);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4513 // dword_4FAA64 = v104;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4514 // if ( v104 > 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4515 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4516 // do
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4517 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4518 // am_40A283(v193, v105);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4519 // ++v106;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4520 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4521 // while ( v106 < pCard->field_48[6] );
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4522 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4523 // v107 = pCard;
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
4524 // am_byte_4FAA77 = GetPlayerHandCardCount(v193) > dword_4E1874;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4525 // LOBYTE(v108) = pCard->field_48[7];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4526 // if ( (_BYTE)v108 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4527 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4528 // if ( (_BYTE)v108 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4529 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4530 // v109 = v2->field_2C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4531 // v110 = v4->field_2C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4532 // if ( v109 < v110 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4533 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4534 // v2->field_2C = v110;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4535 // v194 = v110 - v109;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4536 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4537 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4538 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4539 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4540 // v108 = (char)v108;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4541 // v6 = (char)v108 + v2->field_2C < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4542 // v2->field_2C += (char)v108;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4543 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4544 // v2->field_2C = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4545 // v194 = v108;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4546 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4547 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4548 // LOBYTE(v111) = v107->field_48[8];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4549 // if ( (_BYTE)v111 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4550 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4551 // if ( (_BYTE)v111 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4552 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4553 // v112 = v2->field_30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4554 // v113 = v4->field_30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4555 // if ( v112 < v113 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4556 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4557 // v2->field_30 = v113;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4558 // v210 = v113 - v112;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4559 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4560 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4561 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4562 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4563 // v111 = (char)v111;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4564 // v6 = (char)v111 + v2->field_30 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4565 // v2->field_30 += (char)v111;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4566 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4567 // v2->field_30 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4568 // v210 = v111;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4569 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4570 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4571 // LOBYTE(v114) = v107->field_48[9];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4572 // if ( (_BYTE)v114 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4573 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4574 // if ( (_BYTE)v114 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4575 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4576 // v115 = v2->field_34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4577 // v116 = v4->field_34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4578 // if ( v115 < v116 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4579 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4580 // v2->field_34 = v116;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4581 // v208 = v116 - v115;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4582 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4583 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4584 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4585 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4586 // v114 = (char)v114;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4587 // v6 = (char)v114 + v2->field_34 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4588 // v2->field_34 += (char)v114;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4589 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4590 // v2->field_34 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4591 // v208 = v114;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4592 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4593 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4594 // LOBYTE(v117) = v107->field_48[10];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4595 // if ( (_BYTE)v117 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4596 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4597 // if ( (_BYTE)v117 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4598 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4599 // v118 = v2->field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4600 // v119 = v4->field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4601 // if ( v118 < v119 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4602 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4603 // v2->field_38 = v119;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4604 // v197 = v119 - v118;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4605 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4606 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4607 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4608 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4609 // v117 = (char)v117;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4610 // v6 = (char)v117 + v2->field_38 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4611 // v2->field_38 += (char)v117;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4612 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4613 // v2->field_38 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4614 // v197 = v117;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4615 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4616 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4617 // LOBYTE(v120) = v107->field_48[11];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4618 // if ( v120 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4619 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4620 // if ( v120 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4621 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4622 // v121 = v2->field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4623 // v122 = v4->field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4624 // if ( v121 < v122 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4625 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4626 // v2->field_3C = v122;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4627 // v205 = v122 - v121;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4628 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4629 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4630 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4631 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4632 // v120 = v120;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4633 // v6 = v120 + v2->field_3C < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4634 // v2->field_3C += v120;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4635 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4636 // v2->field_3C = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4637 // v205 = v120;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4638 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4639 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4640 // LOBYTE(v123) = v107->field_48[12];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4641 // if ( (_BYTE)v123 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4642 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4643 // if ( (_BYTE)v123 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4644 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4645 // v124 = v2->field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4646 // v125 = v4->field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4647 // if ( v124 < v125 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4648 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4649 // v2->field_40 = v125;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4650 // v203 = v125 - v124;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4651 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4652 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4653 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4654 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4655 // v123 = (char)v123;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4656 // v6 = (char)v123 + v2->field_40 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4657 // v2->field_40 += (char)v123;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4658 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4659 // v2->field_40 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4660 // v203 = v123;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4661 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4662 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4663 // v126 = v107->field_48[13];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4664 // if ( v126 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4665 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4666 // v196 = am_40D402(v193, v126);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4667 // v192 = v107->field_48[13] - v196;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4668 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4669 // LOBYTE(v127) = v107->field_48[14];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4670 // if ( (_BYTE)v127 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4671 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4672 // if ( (_BYTE)v127 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4673 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4674 // v128 = v2->field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4675 // v129 = v4->field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4676 // if ( v128 < v129 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4677 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4678 // v2->field_28 = v129;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4679 // v201 = v129 - v128;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4680 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4681 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4682 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4683 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4684 // v127 = (char)v127;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4685 // v6 = (char)v127 + v2->field_28 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4686 // v2->field_28 += (char)v127;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4687 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4688 // v2->field_28 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4689 // v201 = v127;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4690 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4691 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4692 // LOBYTE(v130) = v107->field_48[15];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4693 // if ( (_BYTE)v130 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4694 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4695 // if ( (_BYTE)v130 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4696 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4697 // v131 = v2->field_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4698 // v132 = v4->field_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4699 // if ( v131 < v132 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4700 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4701 // v2->field_24 = v132;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4702 // v199 = v132 - v131;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4703 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4704 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4705 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4706 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4707 // v130 = (char)v130;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4708 // v6 = (char)v130 + v2->field_24 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4709 // v2->field_24 += (char)v130;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4710 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4711 // v2->field_24 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4712 // v199 = v130;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4713 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4714 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4715 // LOBYTE(v133) = v107->field_58[0];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4716 // if ( (_BYTE)v133 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4717 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4718 // if ( (_BYTE)v133 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4719 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4720 // v134 = v2->field_2C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4721 // v135 = v4->field_2C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4722 // if ( v134 > v135 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4723 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4724 // v4->field_2C = v134;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4725 // v211 = v134 - v135;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4726 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4727 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4728 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4729 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4730 // v133 = (char)v133;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4731 // v6 = (char)v133 + v4->field_2C < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4732 // v4->field_2C += (char)v133;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4733 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4734 // v4->field_2C = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4735 // v211 = v133;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4736 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4737 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4738 // LOBYTE(v136) = v107->field_58[1];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4739 // if ( (_BYTE)v136 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4740 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4741 // if ( (_BYTE)v136 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4742 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4743 // v137 = v2->field_30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4744 // v138 = v4->field_30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4745 // if ( v137 > v138 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4746 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4747 // v4->field_30 = v137;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4748 // v209 = v137 - v138;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4749 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4750 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4751 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4752 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4753 // v136 = (char)v136;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4754 // v6 = (char)v136 + v4->field_30 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4755 // v4->field_30 += (char)v136;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4756 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4757 // v4->field_30 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4758 // v209 = v136;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4759 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4760 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4761 // LOBYTE(v139) = v107->field_58[2];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4762 // if ( (_BYTE)v139 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4763 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4764 // if ( (_BYTE)v139 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4765 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4766 // v140 = v2->field_34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4767 // v141 = v4->field_34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4768 // if ( v140 > v141 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4769 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4770 // v4->field_34 = v140;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4771 // v207 = v140 - v141;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4772 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4773 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4774 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4775 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4776 // v139 = (char)v139;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4777 // v6 = (char)v139 + v4->field_34 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4778 // v4->field_34 += (char)v139;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4779 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4780 // v4->field_34 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4781 // v207 = v139;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4782 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4783 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4784 // LOBYTE(v142) = v107->field_58[3];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4785 // if ( (_BYTE)v142 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4786 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4787 // if ( (_BYTE)v142 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4788 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4789 // v143 = v2->field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4790 // v144 = v4->field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4791 // if ( v143 > v144 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4792 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4793 // v4->field_38 = v143;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4794 // v206 = v143 - v144;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4795 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4796 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4797 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4798 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4799 // v142 = (char)v142;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4800 // v6 = (char)v142 + v4->field_38 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4801 // v4->field_38 += (char)v142;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4802 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4803 // v4->field_38 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4804 // v206 = v142;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4805 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4806 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4807 // LOBYTE(v145) = v107->field_58[4];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4808 // if ( (_BYTE)v145 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4809 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4810 // if ( (_BYTE)v145 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4811 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4812 // v146 = v2->field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4813 // v147 = v4->field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4814 // if ( v146 > v147 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4815 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4816 // v4->field_3C = v146;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4817 // v204 = v146 - v147;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4818 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4819 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4820 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4821 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4822 // v145 = (char)v145;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4823 // v6 = (char)v145 + v4->field_3C < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4824 // v4->field_3C += (char)v145;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4825 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4826 // v4->field_3C = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4827 // v204 = v145;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4828 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4829 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4830 // LOBYTE(v148) = v107->field_58[5];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4831 // if ( (_BYTE)v148 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4832 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4833 // if ( (_BYTE)v148 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4834 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4835 // v149 = v2->field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4836 // v150 = v4->field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4837 // if ( v149 > v150 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4838 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4839 // v4->field_40 = v149;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4840 // v202 = v149 - v150;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4841 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4842 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4843 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4844 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4845 // v148 = (char)v148;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4846 // v6 = (char)v148 + v4->field_40 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4847 // v4->field_40 += (char)v148;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4848 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4849 // v4->field_40 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4850 // v202 = v148;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4851 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4852 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4853 // v151 = v107->field_58[6];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4854 // if ( v151 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4855 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4856 // v195 = am_40D402(v189, v151);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4857 // v191 = v107->field_58[6] - v195;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4858 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4859 // LOBYTE(v152) = v107->field_58[7];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4860 // if ( (_BYTE)v152 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4861 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4862 // if ( (_BYTE)v152 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4863 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4864 // v153 = v2->field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4865 // v154 = v4->field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4866 // if ( v153 > v154 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4867 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4868 // v4->field_28 = v153;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4869 // v200 = v153 - v154;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4870 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4871 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4872 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4873 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4874 // v152 = (char)v152;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4875 // v6 = (char)v152 + v4->field_28 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4876 // v4->field_28 += (char)v152;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4877 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4878 // v4->field_28 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4879 // v200 = v152;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4880 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4881 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4882 // LOBYTE(v155) = v107->field_58[8];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4883 // if ( (_BYTE)v155 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4884 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4885 // if ( (_BYTE)v155 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4886 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4887 // v156 = v2->field_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4888 // v157 = v4->field_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4889 // if ( v156 > v157 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4890 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4891 // v4->field_24 = v156;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4892 // v198 = v156 - v157;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4893 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4894 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4895 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4896 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4897 // v155 = (char)v155;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4898 // v6 = (char)v155 + v4->field_24 < 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4899 // v4->field_24 += (char)v155;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4900 // if ( v6 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4901 // v4->field_24 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4902 // v198 = v155;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4903 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4904 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4905 // LOBYTE(v158) = v107->field_58[9];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4906 // if ( (_BYTE)v158 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4907 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4908 // if ( (_BYTE)v158 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4909 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4910 // v159 = v2->field_2C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4911 // v160 = v4->field_2C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4912 // if ( v159 != v160 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4913 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4914 // if ( v159 <= v160 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4915 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4916 // v2->field_2C = v160;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4917 // v194 = v160 - v159;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4918 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4919 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4920 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4921 // v4->field_2C = v159;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4922 // v211 = v159 - v160;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4923 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4924 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4925 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4926 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4927 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4928 // v158 = (char)v158;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4929 // v2->field_2C += (char)v158;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4930 // v4->field_2C += (char)v158;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4931 // if ( v2->field_2C < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4932 // v2->field_2C = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4933 // if ( v4->field_2C < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4934 // v4->field_2C = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4935 // v194 = v158;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4936 // v211 = v158;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4937 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4938 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4939 // LOBYTE(v161) = v107->field_58[10];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4940 // if ( (_BYTE)v161 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4941 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4942 // if ( (_BYTE)v161 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4943 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4944 // v162 = v2->field_30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4945 // v163 = v4->field_30;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4946 // if ( v162 != v163 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4947 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4948 // if ( v162 <= v163 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4949 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4950 // v2->field_30 = v163;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4951 // v210 = v163 - v162;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4952 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4953 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4954 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4955 // v4->field_30 = v162;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4956 // v209 = v162 - v163;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4957 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4958 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4959 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4960 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4961 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4962 // v161 = (char)v161;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4963 // v2->field_30 += (char)v161;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4964 // v4->field_30 += (char)v161;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4965 // if ( v2->field_30 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4966 // v2->field_30 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4967 // if ( v4->field_30 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4968 // v4->field_30 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4969 // v209 = v161;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4970 // v210 = v161;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4971 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4972 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4973 // LOBYTE(v164) = v107->field_58[11];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4974 // if ( (_BYTE)v164 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4975 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4976 // if ( (_BYTE)v164 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4977 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4978 // v165 = v2->field_34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4979 // v166 = v4->field_34;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4980 // if ( v165 != v166 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4981 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4982 // if ( v165 <= v166 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4983 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4984 // v2->field_34 = v166;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4985 // v208 = v166 - v165;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4986 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4987 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4988 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4989 // v4->field_34 = v165;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4990 // v207 = v165 - v166;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4991 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4992 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4993 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4994 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4995 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4996 // v164 = (char)v164;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4997 // v2->field_34 += (char)v164;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4998 // v4->field_34 += (char)v164;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
4999 // if ( v2->field_34 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5000 // v2->field_34 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5001 // if ( v4->field_34 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5002 // v4->field_34 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5003 // v208 = v164;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5004 // v207 = v164;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5005 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5006 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5007 // LOBYTE(v167) = v107->field_58[12];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5008 // if ( (_BYTE)v167 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5009 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5010 // if ( (_BYTE)v167 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5011 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5012 // v168 = v2->field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5013 // v169 = v4->field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5014 // if ( v168 != v169 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5015 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5016 // if ( v168 <= v169 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5017 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5018 // v2->field_38 = v169;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5019 // v197 = v169 - v168;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5020 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5021 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5022 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5023 // v4->field_38 = v168;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5024 // v206 = v168 - v169;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5025 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5026 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5027 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5028 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5029 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5030 // v167 = (char)v167;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5031 // v2->field_38 += (char)v167;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5032 // v4->field_38 += (char)v167;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5033 // if ( v2->field_38 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5034 // v2->field_38 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5035 // if ( v4->field_38 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5036 // v4->field_38 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5037 // v197 = v167;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5038 // v206 = v167;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5039 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5040 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5041 // LOBYTE(v170) = v107->field_58[13];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5042 // if ( v170 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5043 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5044 // if ( v170 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5045 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5046 // v171 = v2->field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5047 // v172 = v4->field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5048 // if ( v171 != v172 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5049 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5050 // if ( v171 <= v172 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5051 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5052 // v205 = v172 > v171;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5053 // v2->field_3C = v172;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5054 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5055 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5056 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5057 // v204 = 1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5058 // v4->field_3C = v171;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5059 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5060 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5061 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5062 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5063 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5064 // v170 = v170;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5065 // v2->field_3C += v170;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5066 // v4->field_3C += v170;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5067 // if ( v2->field_3C < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5068 // v2->field_3C = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5069 // if ( v4->field_3C < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5070 // v4->field_3C = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5071 // v205 = v170;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5072 // v204 = v170;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5073 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5074 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5075 // LOBYTE(v173) = v107->field_58[14];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5076 // if ( (_BYTE)v173 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5077 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5078 // if ( (_BYTE)v173 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5079 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5080 // v174 = v2->field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5081 // v175 = v4->field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5082 // if ( v174 != v175 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5083 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5084 // if ( v174 <= v175 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5085 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5086 // v2->field_40 = v175;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5087 // v203 = v175 - v174;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5088 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5089 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5090 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5091 // v4->field_40 = v174;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5092 // v202 = v174 - v175;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5093 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5094 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5095 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5096 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5097 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5098 // v173 = (char)v173;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5099 // v2->field_40 += (char)v173;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5100 // v4->field_40 += (char)v173;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5101 // if ( v2->field_40 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5102 // v2->field_40 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5103 // if ( v4->field_40 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5104 // v4->field_40 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5105 // v203 = v173;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5106 // v202 = v173;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5107 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5108 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5109 // v176 = v107->field_58[15];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5110 // if ( v176 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5111 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5112 // v177 = am_40D402(v193, v176);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5113 // v178 = v107->field_58[15];
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5114 // v196 = v177;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5115 // v179 = am_40D402(v189, v178);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5116 // v195 = v179;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5117 // v180 = v107->field_58[15] - v179;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5118 // v192 = v107->field_58[15] - v196;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5119 // v191 = v180;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5120 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5121 // LOBYTE(v181) = LOBYTE(v107->field_68);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5122 // if ( (_BYTE)v181 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5123 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5124 // if ( (_BYTE)v181 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5125 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5126 // v182 = v2->field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5127 // v183 = v4->field_28;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5128 // if ( v182 != v183 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5129 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5130 // if ( v182 <= v183 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5131 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5132 // v2->field_28 = v183;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5133 // v201 = v183 - v182;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5134 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5135 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5136 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5137 // v4->field_28 = v182;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5138 // v200 = v182 - v183;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5139 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5140 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5141 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5142 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5143 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5144 // v181 = (char)v181;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5145 // v2->field_28 += (char)v181;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5146 // v4->field_28 += (char)v181;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5147 // if ( v2->field_28 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5148 // v2->field_28 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5149 // if ( v4->field_28 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5150 // v4->field_28 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5151 // v201 = v181;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5152 // v200 = v181;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5153 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5154 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5155 // LOBYTE(v103) = BYTE1(v107->field_68);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5156 // break;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5157 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5158 // if ( (_BYTE)v103 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5159 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5160 // if ( (_BYTE)v103 == 99 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5161 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5162 // v184 = v2->field_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5163 // v185 = v4->field_24;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5164 // if ( v184 != v185 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5165 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5166 // if ( v184 <= v185 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5167 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5168 // v2->field_24 = v185;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5169 // v199 = v185 - v184;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5170 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5171 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5172 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5173 // v4->field_24 = v184;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5174 // v198 = v184 - v185;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5175 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5176 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5177 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5178 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5179 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5180 // v103 = (char)v103;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5181 // v2->field_24 += (char)v103;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5182 // v4->field_24 += (char)v103;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5183 // if ( v2->field_24 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5184 // v2->field_24 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5185 // if ( v4->field_24 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5186 // v4->field_24 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5187 // v199 = v103;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5188 // v198 = v103;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5189 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5190 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5191 // if ( v194 > 0 || v211 > 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5192 // ArcomageGame::PlaySound(0x1Eu);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5193 // if ( v194 < 0 || v211 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5194 // ArcomageGame::PlaySound(0x1Fu);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5195 // if ( v210 > 0 || v209 > 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5196 // ArcomageGame::PlaySound(0x21u);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5197 // if ( v210 < 0 || v209 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5198 // ArcomageGame::PlaySound(0x22u);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5199 // if ( v208 > 0 || v207 > 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5200 // ArcomageGame::PlaySound(0x24u);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5201 // if ( v208 < 0 || v207 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5202 // ArcomageGame::PlaySound(0x25u);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5203 // if ( v197 > 0 || v206 > 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5204 // ArcomageGame::PlaySound(0x27u);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5205 // if ( v197 < 0 || v206 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5206 // ArcomageGame::PlaySound(0x28u);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5207 // if ( v205 > 0 || v204 > 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5208 // ArcomageGame::PlaySound(0x2Au);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5209 // if ( v205 < 0 || v204 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5210 // ArcomageGame::PlaySound(0x2Bu);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5211 // if ( v203 > 0 || v202 > 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5212 // ArcomageGame::PlaySound(0x2Du);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5213 // if ( v203 < 0 || v202 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5214 // ArcomageGame::PlaySound(0x2Eu);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5215 // if ( v192 || v191 || v196 || v195 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5216 // ArcomageGame::PlaySound(0x30u);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5217 // if ( v201 > 0 || v200 > 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5218 // ArcomageGame::PlaySound(0x31u);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5219 // if ( v201 < 0 || v200 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5220 // ArcomageGame::PlaySound(0x32u);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5221 // if ( v199 > 0 || v198 > 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5222 // ArcomageGame::PlaySound(0x34u);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5223 // if ( v199 < 0 || v198 < 0 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5224 // ArcomageGame::PlaySound(0x35u);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5225 // if ( v193 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5226 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5227 // if ( v194 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5228 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5229 // v187.x = 573;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5230 // v187.y = 92;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5231 // am_40D2B4(&v187, v194);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5232 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5233 // if ( v211 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5234 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5235 // v187.x = 26;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5236 // v187.y = 92;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5237 // am_40D2B4(&v187, v211);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5238 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5239 // if ( v210 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5240 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5241 // v187.x = 573;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5242 // v187.y = 164;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5243 // am_40D2B4(&v187, v210);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5244 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5245 // if ( v209 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5246 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5247 // v187.x = 26;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5248 // v187.y = 164;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5249 // am_40D2B4(&v187, v209);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5250 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5251 // if ( v208 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5252 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5253 // v187.x = 573;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5254 // v187.y = 236;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5255 // am_40D2B4(&v187, v208);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5256 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5257 // if ( v207 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5258 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5259 // v187.x = 26;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5260 // v187.y = 236;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5261 // am_40D2B4(&v187, v207);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5262 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5263 // if ( v197 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5264 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5265 // v187.x = 563;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5266 // v187.y = 114;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5267 // am_40D2B4(&v187, v197);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5268 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5269 // if ( v206 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5270 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5271 // v187.x = 16;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5272 // v187.y = 114;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5273 // am_40D2B4(&v187, v206);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5274 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5275 // if ( v205 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5276 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5277 // v187.x = 563;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5278 // v187.y = 186;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5279 // am_40D2B4(&v187, v205);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5280 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5281 // if ( v204 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5282 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5283 // v187.x = 16;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5284 // v187.y = 186;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5285 // am_40D2B4(&v187, v204);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5286 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5287 // if ( v203 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5288 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5289 // v187.x = 563;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5290 // v187.y = 258;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5291 // am_40D2B4(&v187, v203);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5292 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5293 // if ( v202 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5294 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5295 // v187.x = 16;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5296 // v187.y = 258;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5297 // am_40D2B4(&v187, v202);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5298 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5299 // v186 = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5300 // if ( v201 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5301 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5302 // v187.x = 442;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5303 // v187.y = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5304 // am_40D2B4(&v187, v201);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5305 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5306 // if ( v200 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5307 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5308 // v187.x = 180;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5309 // v187.y = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5310 // am_40D2B4(&v187, v200);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5311 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5312 // if ( v199 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5313 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5314 // v187.x = 514;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5315 // v187.y = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5316 // am_40D2B4(&v187, v199);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5317 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5318 // if ( v198 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5319 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5320 // v187.x = 122;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5321 // v187.y = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5322 // am_40D2B4(&v187, v198);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5323 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5324 // if ( v196 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5325 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5326 // v187.x = 442;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5327 // v187.y = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5328 // am_40D2B4(&v187, v196);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5329 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5330 // if ( v192 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5331 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5332 // v187.x = 514;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5333 // v187.y = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5334 // am_40D2B4(&v187, v192);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5335 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5336 // if ( v195 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5337 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5338 // v187.x = 180;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5339 // v187.y = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5340 // am_40D2B4(&v187, v195);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5341 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5342 // if ( v191 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5343 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5344 // v187.x = 122;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5345 // goto LABEL_567;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5346 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5347 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5348 // else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5349 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5350 // if ( v194 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5351 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5352 // v187.x = 26;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5353 // v187.y = 92;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5354 // am_40D2B4(&v187, v194);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5355 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5356 // if ( v211 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5357 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5358 // v187.x = 573;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5359 // v187.y = 92;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5360 // am_40D2B4(&v187, v211);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5361 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5362 // if ( v210 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5363 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5364 // v187.x = 26;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5365 // v187.y = 164;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5366 // am_40D2B4(&v187, v210);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5367 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5368 // if ( v209 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5369 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5370 // v187.x = 573;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5371 // v187.y = 164;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5372 // am_40D2B4(&v187, v209);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5373 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5374 // if ( v208 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5375 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5376 // v187.x = 26;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5377 // v187.y = 236;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5378 // am_40D2B4(&v187, v208);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5379 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5380 // if ( v207 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5381 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5382 // v187.x = 573;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5383 // v187.y = 236;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5384 // am_40D2B4(&v187, v207);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5385 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5386 // if ( v197 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5387 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5388 // v187.x = 16;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5389 // v187.y = 114;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5390 // am_40D2B4(&v187, v197);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5391 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5392 // if ( v206 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5393 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5394 // v187.x = 563;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5395 // v187.y = 114;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5396 // am_40D2B4(&v187, v206);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5397 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5398 // if ( v205 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5399 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5400 // v187.x = 16;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5401 // v187.y = 186;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5402 // am_40D2B4(&v187, v205);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5403 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5404 // if ( v204 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5405 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5406 // v187.x = 563;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5407 // v187.y = 186;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5408 // am_40D2B4(&v187, v204);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5409 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5410 // if ( v203 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5411 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5412 // v187.x = 16;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5413 // v187.y = 258;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5414 // am_40D2B4(&v187, v203);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5415 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5416 // if ( v202 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5417 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5418 // v187.x = 563;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5419 // v187.y = 258;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5420 // am_40D2B4(&v187, v202);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5421 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5422 // v186 = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5423 // if ( v201 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5424 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5425 // v187.x = 180;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5426 // v187.y = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5427 // am_40D2B4(&v187, v201);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5428 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5429 // if ( v200 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5430 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5431 // v187.x = 442;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5432 // v187.y = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5433 // am_40D2B4(&v187, v200);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5434 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5435 // if ( v199 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5436 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5437 // v187.x = 122;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5438 // v187.y = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5439 // am_40D2B4(&v187, v199);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5440 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5441 // if ( v198 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5442 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5443 // v187.x = 514;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5444 // v187.y = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5445 // am_40D2B4(&v187, v198);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5446 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5447 // if ( v196 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5448 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5449 // v187.x = 180;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5450 // v187.y = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5451 // am_40D2B4(&v187, v196);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5452 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5453 // if ( v192 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5454 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5455 // v187.x = 122;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5456 // v187.y = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5457 // am_40D2B4(&v187, v192);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5458 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5459 // if ( v195 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5460 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5461 // v187.x = 442;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5462 // v187.y = 296;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5463 // am_40D2B4(&v187, v195);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5464 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5465 // if ( v191 )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5466 // {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5467 // v187.x = 514;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5468 //LABEL_567:
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5469 // v187.y = v186;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5470 // am_40D2B4(&v187, v191);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5471 // return;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5472 // }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5473 // }
0
Ritor1
parents:
diff changeset
5474 }
Ritor1
parents:
diff changeset
5475
Ritor1
parents:
diff changeset
5476
Ritor1
parents:
diff changeset
5477
Ritor1
parents:
diff changeset
5478
Ritor1
parents:
diff changeset
5479 //----- (0040D2B4) --------------------------------------------------------
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5480 int am_40D2B4( POINT* a1, int a2 )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5481 {
0
Ritor1
parents:
diff changeset
5482 int v2; // ebp@1
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5483 POINT *v3; // edi@1
0
Ritor1
parents:
diff changeset
5484 char *v4; // ebx@1
Ritor1
parents:
diff changeset
5485 int result; // eax@3
Ritor1
parents:
diff changeset
5486 unsigned int v6; // esi@7
Ritor1
parents:
diff changeset
5487 stru272_stru0 *v7; // ecx@10
Ritor1
parents:
diff changeset
5488 stru272_stru0 *v8; // ecx@12
Ritor1
parents:
diff changeset
5489 int v9; // edx@17
Ritor1
parents:
diff changeset
5490 int v10; // ecx@17
Ritor1
parents:
diff changeset
5491 signed int v11; // [sp+10h] [bp-8h]@1
Ritor1
parents:
diff changeset
5492 stru272_stru0 **v12; // [sp+14h] [bp-4h]@1
Ritor1
parents:
diff changeset
5493
Ritor1
parents:
diff changeset
5494 v11 = 0;
Ritor1
parents:
diff changeset
5495 v2 = a2;
Ritor1
parents:
diff changeset
5496 v3 = a1;
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5497 while ( array_4FABD0[v11].field_0 )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5498 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5499 result = array_4FABD0[v11].field_40->_40E2A7();
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5500 if ( !result )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5501 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5502 array_4FABD0[v11].field_0 = 0;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5503 --v11;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5504 }
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5505 ++v11;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5506 if ( v11 >= 10 )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5507 return result;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5508 }
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5509 v6 = v11;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5510 array_4FABD0[v11].field_0 = 1;
0
Ritor1
parents:
diff changeset
5511 if ( v2 <= 0 )
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5512 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5513 array_4FABD0[v6].field_1 = 0;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5514 v2 = -v2;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5515 }
0
Ritor1
parents:
diff changeset
5516 else
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5517 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5518 array_4FABD0[v6].field_1 = 1;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5519 }
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
5520 array_4FABD0[v6].field_4.field_0 = v3->x - 20;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
5521 array_4FABD0[v6].field_4.field_8 = v3->x + 20;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
5522 array_4FABD0[v6].field_4.field_4 = v3->y - 20;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
5523 array_4FABD0[v6].field_4.field_C = v3->y + 20;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
5524 array_4FABD0[v6].field_4.field_10 = -60;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
5525 array_4FABD0[v6].field_4.field_14 = 60;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
5526 array_4FABD0[v6].field_4.field_18 = 180;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
5527 array_4FABD0[v6].field_4.field_1Cf = 0.5;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
5528 array_4FABD0[v6].field_4.field_20 = 150;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
5529 array_4FABD0[v6].field_4.field_24f= 50.0;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
5530 array_4FABD0[v6].field_4.field_28f = 3.0;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
5531 array_4FABD0[v6].field_4.field_2Cf = 8.0;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
5532 array_4FABD0[v6].field_4.field_30 = 5;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
5533 array_4FABD0[v6].field_4.field_34 = 15;
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
5534 array_4FABD0[v6].field_4.field_38 = &array_4FABD0[v6].field_44[0];
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5535 v8 = array_4FABD0[v6].field_40;
1186
569216b4f54d more on arcomage 2
Gloval
parents: 1185
diff changeset
5536 v8->_40E01A(&array_4FABD0[v6].field_4);
0
Ritor1
parents:
diff changeset
5537 if ( 10 * v2 > 150 )
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5538 v2 = 15;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5539
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
5540 if ( v8->signature != SIG_trpg )
0
Ritor1
parents:
diff changeset
5541 return 2;
Ritor1
parents:
diff changeset
5542 if ( !v8->field_59 )
Ritor1
parents:
diff changeset
5543 return 3;
Ritor1
parents:
diff changeset
5544 v8->field_8 = 10 * v2;
Ritor1
parents:
diff changeset
5545 v8->field_30 = 0.0;
Ritor1
parents:
diff changeset
5546 v8->field_58 = 0;
Ritor1
parents:
diff changeset
5547 v8->field_44 = 0;
Ritor1
parents:
diff changeset
5548 v8->field_4C = 0;
Ritor1
parents:
diff changeset
5549 v8->field_48 = 0;
Ritor1
parents:
diff changeset
5550 v8->field_50 = 0;
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5551 for (int i=0; i<v8->field_4; ++i)
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5552 v8->field_54[i].field_0=0;
0
Ritor1
parents:
diff changeset
5553 return 0;
Ritor1
parents:
diff changeset
5554 }
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5555
0
Ritor1
parents:
diff changeset
5556
Ritor1
parents:
diff changeset
5557 //----- (0040D402) --------------------------------------------------------
Ritor1
parents:
diff changeset
5558 int __fastcall am_40D402(int a1, int a2)
Ritor1
parents:
diff changeset
5559 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5560 ArcomagePlayer *v2; // ecx@1
0
Ritor1
parents:
diff changeset
5561 int v3; // esi@1
Ritor1
parents:
diff changeset
5562 int result; // eax@3
Ritor1
parents:
diff changeset
5563
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5564 v2 = &am_Players[a1];
0
Ritor1
parents:
diff changeset
5565 v3 = v2->field_28;
Ritor1
parents:
diff changeset
5566 if ( v3 <= 0 )
Ritor1
parents:
diff changeset
5567 {
Ritor1
parents:
diff changeset
5568 result = 0;
Ritor1
parents:
diff changeset
5569 }
Ritor1
parents:
diff changeset
5570 else
Ritor1
parents:
diff changeset
5571 {
Ritor1
parents:
diff changeset
5572 if ( v3 >= -a2 )
Ritor1
parents:
diff changeset
5573 {
Ritor1
parents:
diff changeset
5574 result = a2;
Ritor1
parents:
diff changeset
5575 v2->field_28 = a2 + v3;
Ritor1
parents:
diff changeset
5576 goto LABEL_7;
Ritor1
parents:
diff changeset
5577 }
Ritor1
parents:
diff changeset
5578 a2 += v3;
Ritor1
parents:
diff changeset
5579 result = -v3;
Ritor1
parents:
diff changeset
5580 v2->field_28 = 0;
Ritor1
parents:
diff changeset
5581 }
Ritor1
parents:
diff changeset
5582 v2->field_24 += a2;
Ritor1
parents:
diff changeset
5583 LABEL_7:
Ritor1
parents:
diff changeset
5584 if ( v2->field_24 < 0 )
Ritor1
parents:
diff changeset
5585 v2->field_24 = 0;
Ritor1
parents:
diff changeset
5586 return result;
Ritor1
parents:
diff changeset
5587 }
Ritor1
parents:
diff changeset
5588 // 40D402: using guessed type int __fastcall am_40D402(uint, uint);
Ritor1
parents:
diff changeset
5589
Ritor1
parents:
diff changeset
5590 //----- (0040D444) --------------------------------------------------------
Ritor1
parents:
diff changeset
5591 int __cdecl am_40D444()
Ritor1
parents:
diff changeset
5592 {
Ritor1
parents:
diff changeset
5593 int v0; // esi@1
Ritor1
parents:
diff changeset
5594 int v1; // edi@1
Ritor1
parents:
diff changeset
5595 int v2; // eax@1
Ritor1
parents:
diff changeset
5596 int v3; // eax@23
Ritor1
parents:
diff changeset
5597 int v4; // edx@25
Ritor1
parents:
diff changeset
5598 int v5; // ecx@28
Ritor1
parents:
diff changeset
5599 int v6; // eax@28
Ritor1
parents:
diff changeset
5600 GUIWindow *v7; // ecx@50
Ritor1
parents:
diff changeset
5601 signed int v8; // eax@50
Ritor1
parents:
diff changeset
5602 char *v9; // eax@52
Ritor1
parents:
diff changeset
5603 signed int v10; // eax@54
Ritor1
parents:
diff changeset
5604 char *v11; // esi@59
Ritor1
parents:
diff changeset
5605 char *v12; // esi@65
Ritor1
parents:
diff changeset
5606 signed int v14; // [sp-4h] [bp-58h]@46
Ritor1
parents:
diff changeset
5607 char pText[64]; // [sp+Ch] [bp-48h]@1
Ritor1
parents:
diff changeset
5608 int xy[2]; // [sp+4Ch] [bp-8h]@1
Ritor1
parents:
diff changeset
5609
Ritor1
parents:
diff changeset
5610 v0 = -1;
Ritor1
parents:
diff changeset
5611 v1 = -1;
Ritor1
parents:
diff changeset
5612 //nullsub_1();
Ritor1
parents:
diff changeset
5613 xy[0] = 0;
Ritor1
parents:
diff changeset
5614 xy[1] = 0;
Ritor1
parents:
diff changeset
5615 inv_strcpy("Ïîáåäè", pText);
Ritor1
parents:
diff changeset
5616 v2 = 0;
Ritor1
parents:
diff changeset
5617 xy[1] = 160;
Ritor1
parents:
diff changeset
5618 xy[0] = 320 - 12 * v2 / 2;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5619 // pPrimaryWindow_draws_text(-1, pText, xy);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5620 if ( am_Players[0].field_24 < dword_4E1884 )
0
Ritor1
parents:
diff changeset
5621 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5622 if ( am_Players[1].field_24 < dword_4E1884 )
0
Ritor1
parents:
diff changeset
5623 goto LABEL_10;
Ritor1
parents:
diff changeset
5624 v0 = 2;
Ritor1
parents:
diff changeset
5625 }
Ritor1
parents:
diff changeset
5626 else
Ritor1
parents:
diff changeset
5627 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5628 if ( am_Players[1].field_24 < dword_4E1884 )
0
Ritor1
parents:
diff changeset
5629 {
Ritor1
parents:
diff changeset
5630 v0 = 1;
Ritor1
parents:
diff changeset
5631 }
Ritor1
parents:
diff changeset
5632 else
Ritor1
parents:
diff changeset
5633 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5634 if ( am_Players[0].field_24 == am_Players[1].field_24 )
0
Ritor1
parents:
diff changeset
5635 {
Ritor1
parents:
diff changeset
5636 v0 = 0;
Ritor1
parents:
diff changeset
5637 v1 = 4;
Ritor1
parents:
diff changeset
5638 goto LABEL_10;
Ritor1
parents:
diff changeset
5639 }
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5640 v0 = (am_Players[0].field_24 <= am_Players[1].field_24) + 1;
0
Ritor1
parents:
diff changeset
5641 }
Ritor1
parents:
diff changeset
5642 }
Ritor1
parents:
diff changeset
5643 v1 = 0;
Ritor1
parents:
diff changeset
5644 LABEL_10:
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5645 if ( am_Players[0].field_24 <= 0 )
0
Ritor1
parents:
diff changeset
5646 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5647 if ( am_Players[1].field_24 > 0 )
0
Ritor1
parents:
diff changeset
5648 {
Ritor1
parents:
diff changeset
5649 v0 = 2;
Ritor1
parents:
diff changeset
5650 }
Ritor1
parents:
diff changeset
5651 else
Ritor1
parents:
diff changeset
5652 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5653 if ( am_Players[0].field_24 == am_Players[1].field_24 )
0
Ritor1
parents:
diff changeset
5654 {
Ritor1
parents:
diff changeset
5655 LABEL_20:
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5656 if ( am_Players[0].field_28 == am_Players[1].field_28 )
0
Ritor1
parents:
diff changeset
5657 {
Ritor1
parents:
diff changeset
5658 v0 = 0;
Ritor1
parents:
diff changeset
5659 v1 = 4;
Ritor1
parents:
diff changeset
5660 }
Ritor1
parents:
diff changeset
5661 else
Ritor1
parents:
diff changeset
5662 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5663 v0 = (am_Players[0].field_28 <= am_Players[1].field_28) + 1;
0
Ritor1
parents:
diff changeset
5664 v1 = 1;
Ritor1
parents:
diff changeset
5665 }
Ritor1
parents:
diff changeset
5666 goto LABEL_23;
Ritor1
parents:
diff changeset
5667 }
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5668 v0 = (am_Players[0].field_24 <= am_Players[1].field_24) + 1;
0
Ritor1
parents:
diff changeset
5669 }
Ritor1
parents:
diff changeset
5670 goto LABEL_17;
Ritor1
parents:
diff changeset
5671 }
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5672 if ( am_Players[1].field_24 <= 0 )
0
Ritor1
parents:
diff changeset
5673 {
Ritor1
parents:
diff changeset
5674 v0 = 1;
Ritor1
parents:
diff changeset
5675 LABEL_17:
Ritor1
parents:
diff changeset
5676 v1 = 2;
Ritor1
parents:
diff changeset
5677 }
Ritor1
parents:
diff changeset
5678 if ( !v0 && v1 == 4 )
Ritor1
parents:
diff changeset
5679 goto LABEL_20;
Ritor1
parents:
diff changeset
5680 LABEL_23:
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5681 v3 = am_Players[0].field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5682 if ( am_Players[0].field_38 <= am_Players[0].field_3C )
0
Ritor1
parents:
diff changeset
5683 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5684 v3 = am_Players[0].field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5685 v4 = am_Players[0].field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5686 if ( am_Players[0].field_3C > am_Players[0].field_40 )
0
Ritor1
parents:
diff changeset
5687 goto LABEL_28;
Ritor1
parents:
diff changeset
5688 }
Ritor1
parents:
diff changeset
5689 else
Ritor1
parents:
diff changeset
5690 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5691 if ( am_Players[0].field_38 <= am_Players[0].field_40 )
0
Ritor1
parents:
diff changeset
5692 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5693 v4 = am_Players[0].field_40;
0
Ritor1
parents:
diff changeset
5694 goto LABEL_28;
Ritor1
parents:
diff changeset
5695 }
Ritor1
parents:
diff changeset
5696 }
Ritor1
parents:
diff changeset
5697 v4 = v3;
Ritor1
parents:
diff changeset
5698 LABEL_28:
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5699 v5 = am_Players[1].field_38;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5700 v6 = am_Players[1].field_3C;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5701 if ( am_Players[1].field_38 <= am_Players[1].field_3C )
0
Ritor1
parents:
diff changeset
5702 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5703 v5 = am_Players[1].field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5704 if ( am_Players[1].field_3C > am_Players[1].field_40 )
0
Ritor1
parents:
diff changeset
5705 goto LABEL_33;
Ritor1
parents:
diff changeset
5706 goto LABEL_32;
Ritor1
parents:
diff changeset
5707 }
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5708 v6 = am_Players[1].field_40;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5709 if ( am_Players[1].field_38 > am_Players[1].field_40 )
0
Ritor1
parents:
diff changeset
5710 LABEL_32:
Ritor1
parents:
diff changeset
5711 v6 = v5;
Ritor1
parents:
diff changeset
5712 LABEL_33:
Ritor1
parents:
diff changeset
5713 if ( v0 == -1 )
Ritor1
parents:
diff changeset
5714 {
Ritor1
parents:
diff changeset
5715 if ( v1 != -1 )
Ritor1
parents:
diff changeset
5716 goto LABEL_49;
Ritor1
parents:
diff changeset
5717 if ( v4 < dword_4E1888 )
Ritor1
parents:
diff changeset
5718 {
Ritor1
parents:
diff changeset
5719 if ( v6 < dword_4E1888 )
Ritor1
parents:
diff changeset
5720 goto LABEL_49;
Ritor1
parents:
diff changeset
5721 v0 = 2;
Ritor1
parents:
diff changeset
5722 }
Ritor1
parents:
diff changeset
5723 else
Ritor1
parents:
diff changeset
5724 {
Ritor1
parents:
diff changeset
5725 if ( v6 < dword_4E1888 )
Ritor1
parents:
diff changeset
5726 {
Ritor1
parents:
diff changeset
5727 v0 = 1;
Ritor1
parents:
diff changeset
5728 }
Ritor1
parents:
diff changeset
5729 else
Ritor1
parents:
diff changeset
5730 {
Ritor1
parents:
diff changeset
5731 if ( v4 == v6 )
Ritor1
parents:
diff changeset
5732 goto LABEL_46;
Ritor1
parents:
diff changeset
5733 v0 = (v4 <= v6) + 1;
Ritor1
parents:
diff changeset
5734 }
Ritor1
parents:
diff changeset
5735 }
Ritor1
parents:
diff changeset
5736 v1 = 3;
Ritor1
parents:
diff changeset
5737 }
Ritor1
parents:
diff changeset
5738 if ( !v0 && v1 == 4 )
Ritor1
parents:
diff changeset
5739 {
Ritor1
parents:
diff changeset
5740 if ( v4 != v6 )
Ritor1
parents:
diff changeset
5741 {
Ritor1
parents:
diff changeset
5742 v14 = 5;
Ritor1
parents:
diff changeset
5743 v0 = (v4 <= v6) + 1;
Ritor1
parents:
diff changeset
5744 goto LABEL_48;
Ritor1
parents:
diff changeset
5745 }
Ritor1
parents:
diff changeset
5746 LABEL_46:
Ritor1
parents:
diff changeset
5747 v0 = 0;
Ritor1
parents:
diff changeset
5748 v14 = 4;
Ritor1
parents:
diff changeset
5749 LABEL_48:
Ritor1
parents:
diff changeset
5750 v1 = v14;
Ritor1
parents:
diff changeset
5751 }
Ritor1
parents:
diff changeset
5752 LABEL_49:
Ritor1
parents:
diff changeset
5753 pArcomageGame->field_B0 = v1;
Ritor1
parents:
diff changeset
5754 pArcomageGame->uGameResult = v0;
Ritor1
parents:
diff changeset
5755 if ( v0 == 1 )
Ritor1
parents:
diff changeset
5756 {
336
ea55d6414029 Event_proceccor preliminary
Gloval
parents: 189
diff changeset
5757 v7 = window_SpeakInHouse;
ea55d6414029 Event_proceccor preliminary
Gloval
parents: 189
diff changeset
5758 v8 = (signed int)window_SpeakInHouse->ptr_1C;
0
Ritor1
parents:
diff changeset
5759 if ( v8 >= 108 )
Ritor1
parents:
diff changeset
5760 {
Ritor1
parents:
diff changeset
5761 if ( v8 <= 120 )
Ritor1
parents:
diff changeset
5762 {
Ritor1
parents:
diff changeset
5763 v9 = (char *)&pParty->uNumGoldInBank + v8 + 1;
Ritor1
parents:
diff changeset
5764 if ( !*v9 )
Ritor1
parents:
diff changeset
5765 {
Ritor1
parents:
diff changeset
5766 *v9 = 1;
Ritor1
parents:
diff changeset
5767
Ritor1
parents:
diff changeset
5768 //auto _a = (signed __int64)(p2DEvents_minus1__20[13 * (unsigned int)v7->ptr_1C] * 100.0);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5769 auto _a = (signed int)(p2DEvents[(unsigned int)v7->ptr_1C - 1].fPriceMultiplier * 100.0);
0
Ritor1
parents:
diff changeset
5770 party_finds_gold(_a, 0);
Ritor1
parents:
diff changeset
5771 }
Ritor1
parents:
diff changeset
5772 }
Ritor1
parents:
diff changeset
5773 }
Ritor1
parents:
diff changeset
5774 v10 = 108;
Ritor1
parents:
diff changeset
5775 do
Ritor1
parents:
diff changeset
5776 {
Ritor1
parents:
diff changeset
5777 if ( !*((unsigned char *)&pParty->uNumGoldInBank + v10 + 1) )
Ritor1
parents:
diff changeset
5778 break;
Ritor1
parents:
diff changeset
5779 ++v10;
Ritor1
parents:
diff changeset
5780 }
Ritor1
parents:
diff changeset
5781 while ( v10 <= 120 );
Ritor1
parents:
diff changeset
5782 if ( v10 == 121 )
484
4bd56919f075 avard quest guild bits
Gloval
parents: 463
diff changeset
5783 _449B7E_toggle_bit(pParty->_quest_bits, 238, 1u);
735
6daaa2f18d0d Fixed some house sounds & shop-related stuff
Nomad
parents: 484
diff changeset
5784 v11 = (char *)pParty->pPlayers[0]._guilds_member_bits;
0
Ritor1
parents:
diff changeset
5785 do
Ritor1
parents:
diff changeset
5786 {
Ritor1
parents:
diff changeset
5787 if ( !(unsigned __int16)_449B57_test_bit((unsigned __int8 *)v11, 1) )
949
Nomad
parents: 938
diff changeset
5788 _449B7E_toggle_bit((unsigned char *)v11, PLAYER_GUILD_BITS__ARCOMAGE_WIN, 1);
0
Ritor1
parents:
diff changeset
5789 v11 += 6972;
Ritor1
parents:
diff changeset
5790 }
463
f7b91ef98ab2 shopgenerators done, except config tables
Gloval
parents: 336
diff changeset
5791 while ( (signed int)v11 < (signed int)((char *)&pParty->StandartItemsInShops[36] + 2) );
949
Nomad
parents: 938
diff changeset
5792 ++pParty->uNumArcomageWins;
Nomad
parents: 938
diff changeset
5793 if ( pParty->uNumArcomageWins > 1000000 )
Nomad
parents: 938
diff changeset
5794 pParty->uNumArcomageWins = 1000000;
0
Ritor1
parents:
diff changeset
5795 }
Ritor1
parents:
diff changeset
5796 else
Ritor1
parents:
diff changeset
5797 {
735
6daaa2f18d0d Fixed some house sounds & shop-related stuff
Nomad
parents: 484
diff changeset
5798 v12 = (char *)pParty->pPlayers[0]._guilds_member_bits;
0
Ritor1
parents:
diff changeset
5799 do
Ritor1
parents:
diff changeset
5800 {
Ritor1
parents:
diff changeset
5801 if ( !(unsigned __int16)_449B57_test_bit((unsigned __int8 *)v12, 1) )
949
Nomad
parents: 938
diff changeset
5802 _449B7E_toggle_bit((unsigned char *)v12, PLAYER_GUILD_BITS__ARCOMAGE_LOSE, 1);
0
Ritor1
parents:
diff changeset
5803 v12 += 6972;
Ritor1
parents:
diff changeset
5804 }
463
f7b91ef98ab2 shopgenerators done, except config tables
Gloval
parents: 336
diff changeset
5805 while ( (signed int)v12 < (signed int)((char *)&pParty->StandartItemsInShops[36] + 2) );
949
Nomad
parents: 938
diff changeset
5806 ++pParty->uNumArcomageLoses;
Nomad
parents: 938
diff changeset
5807 if ( pParty->uNumArcomageLoses > 1000000 )
Nomad
parents: 938
diff changeset
5808 pParty->uNumArcomageLoses = 1000000;
0
Ritor1
parents:
diff changeset
5809 }
Ritor1
parents:
diff changeset
5810 return 0;
Ritor1
parents:
diff changeset
5811 }
Ritor1
parents:
diff changeset
5812
Ritor1
parents:
diff changeset
5813
Ritor1
parents:
diff changeset
5814
Ritor1
parents:
diff changeset
5815 //----- (00409C8B) --------------------------------------------------------
Ritor1
parents:
diff changeset
5816 void __cdecl PrepareArcomage()
Ritor1
parents:
diff changeset
5817 {
Ritor1
parents:
diff changeset
5818 int v0; // ecx@3
Ritor1
parents:
diff changeset
5819 signed __int64 v1; // qax@4
Ritor1
parents:
diff changeset
5820 int v2; // esi@4
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5821 int v3; // esi@5
0
Ritor1
parents:
diff changeset
5822 signed int v4; // edi@5
Ritor1
parents:
diff changeset
5823 stru272 *v5; // esi@7
Ritor1
parents:
diff changeset
5824 int v6; // edx@9
Ritor1
parents:
diff changeset
5825 int v7; // ecx@9
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5826 RECT pXYZW; // [sp+8h] [bp-1Ch]@5
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5827 POINT pXY; // [sp+18h] [bp-Ch]@5
0
Ritor1
parents:
diff changeset
5828 int v10; // [sp+20h] [bp-4h]@3
Ritor1
parents:
diff changeset
5829
Ritor1
parents:
diff changeset
5830 pAudioPlayer->StopChannels(-1, -1);
Ritor1
parents:
diff changeset
5831 strcpy(pArcomageGame->pPlayer1Name, pArcomagePlayer1Name);
Ritor1
parents:
diff changeset
5832 strcpy(pArcomageGame->pPlayer2Name, pArcomagePlayer2Name);
Ritor1
parents:
diff changeset
5833 am_byte_4FAA76 = 0;
Ritor1
parents:
diff changeset
5834 am_byte_4FAA75 = 0;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5835
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5836 for (int i=0; i<10; ++i)
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5837 {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5838 v2 = (i+1) % 4;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5839 v3 = (i+1) / 4;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5840 struct_st1[i].uCardId = -1;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5841 struct_st1[i].field_4 = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5842 struct_st1[i].field_8.x = 100 * v2 + 120;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5843 struct_st1[i].field_8.y = 138 * v3 + 18;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5844 struct_st1[i].field_10_xplus = -100 * v2 / 5;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5845 struct_st1[i].field_14_y_plus = -138 * v3 / 5;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5846 struct_st1[i].field_18_point.x = struct_st1[i].field_8.x;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5847 struct_st1[i].field_18_point.y = struct_st1[i].field_8.y;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5848 }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5849
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5850 pXY.x = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5851 pXY.y = 0;
0
Ritor1
parents:
diff changeset
5852 ArcomageGame::LoadBackground();
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5853 pXYZW.left = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5854 pXYZW.right = 640;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5855 pXYZW.top = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5856 pXYZW.bottom = 480;
0
Ritor1
parents:
diff changeset
5857 am_BeginScene(pArcomageGame->pBackgroundPixels, -1, 1);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5858 Blt_Copy(&pXYZW, &pXY, 2);
0
Ritor1
parents:
diff changeset
5859 am_EndScene();
Ritor1
parents:
diff changeset
5860 pRenderer->Present();
Ritor1
parents:
diff changeset
5861 ArcomageGame::LoadSprites();
Ritor1
parents:
diff changeset
5862 CallRenderPresent();
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5863
0
Ritor1
parents:
diff changeset
5864 v4 = 120;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5865 for (int i=0; i<12; ++i)
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5866 am_sounds[i] = pSoundList->LoadSound(v4++, 0);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5867
1184
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
5868
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
5869 for (int i=0; i<10; ++i)
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
5870 array_4FABD0[i].field_40->_40DFD1(array_4FABD0[i].field_40);
a90dc4aee8f4 arcomage refactoring continued
Gloval
parents: 1183
diff changeset
5871
0
Ritor1
parents:
diff changeset
5872 dword_4FABBC = -1;
Ritor1
parents:
diff changeset
5873 amuint_4FAA4C = -1;
Ritor1
parents:
diff changeset
5874 byte_4FAA74 = 0;
Ritor1
parents:
diff changeset
5875 pArcomageGame->field_F4 = 0;
Ritor1
parents:
diff changeset
5876 byte_4FAA2C = 0;
Ritor1
parents:
diff changeset
5877 byte_505880 = 0;
Ritor1
parents:
diff changeset
5878 dword_4FAA70 = 0;
Ritor1
parents:
diff changeset
5879 am_byte_4FAA77 = 0;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5880 // am_409FE9();
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5881 am_40A255();
0
Ritor1
parents:
diff changeset
5882 //nullsub_1();
Ritor1
parents:
diff changeset
5883 pArcomageGame->field_F5 = 0;
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5884 pArcomageGame->pfntComic = pFontComic;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5885 pArcomageGame->pfntArrus = pFontArrus;
0
Ritor1
parents:
diff changeset
5886 }
Ritor1
parents:
diff changeset
5887
Ritor1
parents:
diff changeset
5888
Ritor1
parents:
diff changeset
5889 //----- (0040D711) --------------------------------------------------------
Ritor1
parents:
diff changeset
5890 ArcomageGame::ArcomageGame()
Ritor1
parents:
diff changeset
5891 {
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5892 field_4 = 0;
0
Ritor1
parents:
diff changeset
5893 //RGBTexture::RGBTexture(&this->pGameBackground);
Ritor1
parents:
diff changeset
5894 //RGBTexture::RGBTexture(&v1->pSprites);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5895 bGameInProgress = 0;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5896 field_F9 = 0;
0
Ritor1
parents:
diff changeset
5897 }
938
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
5898
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
5899
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
5900
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
5901
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
5902
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
5903
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
5904 //----- (00409BE8) --------------------------------------------------------
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5905 void sub_409BE8()
938
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
5906 {
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
5907 stru348 *v1; // eax@1
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5908
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5909 v1 = &stru_4E1890[window_SpeakInHouse->par1C - 108];
938
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
5910 amuint_4E1860 = v1->field_4;
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
5911 amuint_4E1864 = v1->field_6;
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
5912 amuint_4E1868 = v1->field_8 - 1;
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
5913 amuint_4E186C = v1->field_A - 1;
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
5914 amuint_4E1870 = v1->field_C - 1;
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5915 dword_4E1874 = 5;
938
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
5916 dword_4E1878 = 1;
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
5917 dword_4E187C = 1;
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
5918 dword_4E1880 = 1;
016e3577865c stru289 removed, some data movements
Nomad
parents: 935
diff changeset
5919 dword_4E1884 = v1->field_0;
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5920 dword_4E1888 = v1->field_2;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5921
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5922 dword_4DF3A4 = v1->field_14;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5923
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5924 amuint_505884 = v1->field_E;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5925 amuint_505888 = v1->field_10;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5926 amuint_50588C = v1->field_12;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5927
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5928 }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5929
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5930
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5931 //----- (0040D75D) --------------------------------------------------------
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5932 void pPrimaryWindow_draws_text( int a1, const char *pText, POINT *pXY )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5933 {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5934 int v4; // qax@1
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5935 v4 = pFontComic->uFontHeight - 3;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5936 pPrimaryWindow->DrawText( pFontComic, pXY->x, pXY->y - (v4 >> 1) + 3, 0, pText, 0, 0, 0);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5937 }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5938
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5939
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5940 //----- (0040DB27) --------------------------------------------------------
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5941 void __fastcall DrawRect(RECT *pXYZW, unsigned __int16 uColor, char bSolidFill)
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5942 {
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5943 RECT *v3; // esi@1
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5944
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5945 v3 = pXYZW;
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5946 pRenderer->BeginScene();
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5947 pRenderer->SetRasterClipRect(0, 0, 639u, 479u);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5948 if ( bSolidFill )
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5949 {
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5950 for ( int i = v3->top; i <= v3->bottom; ++i )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5951 pRenderer->RasterLine2D(v3->left, i, v3->right, i, uColor);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5952 }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5953 else
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5954 {
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5955 pRenderer->RasterLine2D(v3->left, v3->top, v3->right, v3->top, uColor);
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5956 pRenderer->RasterLine2D(v3->right, v3->top, v3->right, v3->bottom, uColor);
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5957 pRenderer->RasterLine2D(v3->right, v3->bottom, v3->left, v3->bottom, uColor);
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5958 pRenderer->RasterLine2D(v3->left, v3->bottom, v3->left, v3->top, uColor);
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5959 }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5960 pRenderer->EndScene();
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5961 }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5962
1185
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5963
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5964 //----- (0040DBD3) --------------------------------------------------------
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5965 void SetPixel( POINT *pTargetXY, unsigned __int16 uColor )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5966 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5967 pRenderer->BeginScene();
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5968 if ( pRenderer->uNumSceneBegins )
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5969 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5970 int xVal = pTargetXY->x;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5971 int yVal = pTargetXY->y;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5972 if ( xVal >= 0 && xVal <= 639 && yVal >= 0 && yVal <= 479)
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5973 {
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5974 pRenderer->pTargetSurface[xVal + pRenderer->uTargetSurfacePitch * yVal] = uColor;
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5975 }
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5976 pRenderer->EndScene();
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5977 }
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5978 }
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5979
24454b5c9268 more on acromage
Gloval
parents: 1184
diff changeset
5980
1183
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5981 //----- (0040DDB1) --------------------------------------------------------
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5982 int __fastcall rand_interval(int a, int b)
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5983 {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5984 return a + rand() % (b - a + 1);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5985 }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5986
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5987 //----- (0040DEB4) --------------------------------------------------------
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5988 char *__fastcall inv_strcat(const char *Source, char *Dest)
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5989 {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5990 return strcat(Dest, Source);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5991 }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5992
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5993 //----- (0040DEBE) --------------------------------------------------------
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5994 char *__fastcall inv_strcpy(const char *Source, char *Dest)
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5995 {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5996 return strcpy(Dest, Source);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5997 }
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5998
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
5999 //----- (0040DEC8) --------------------------------------------------------
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
6000 void __fastcall intToString(int val, char *pOut)
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
6001 {
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
6002 sprintf(pOut, "%d", val);
fa30ea497e94 arcomage refactoring started
Gloval
parents: 1165
diff changeset
6003 }