annotate Weather.cpp @ 123:05b2d9653abc

15.11.12
author Ritor1
date Thu, 15 Nov 2012 16:36:30 +0600
parents a84fb3752681
children
rev   line source
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1 #include <stdlib.h>
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3 #include "Weather.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4 #include "Viewport.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5 #include "Render.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7 #include "mm7_data.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11
80
a84fb3752681 28.10.12
Ritor1
parents: 0
diff changeset
12 struct Weather *pWeather = new Weather;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16 //----- (004C2AA6) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17 int Weather::DrawSnow()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
18 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
19 unsigned __int16 *v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
20 __int16 *v2; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
21 int v3; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
22 signed int v4; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
23 int v5; // edx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
24 __int16 *v6; // esi@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
25 __int16 *v7; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
26 int v8; // ecx@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
27 int v9; // eax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
28 int v10; // ecx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
29 int v11; // edx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
30 Weather *v12; // eax@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
31 __int16 *v13; // esi@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
32 int v14; // eax@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
33 int v15; // eax@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
34 int v16; // edx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
35 int v17; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
36 int v18; // edx@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
37 int v19; // ecx@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
38 int v20; // eax@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
39 char v21; // zf@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
40 unsigned int v23; // [sp+Ch] [bp-20h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
41 unsigned int v24; // [sp+10h] [bp-1Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
42 unsigned int v25; // [sp+14h] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
43 Weather *v26; // [sp+18h] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
44 signed int v27; // [sp+18h] [bp-14h]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
45 unsigned int v28; // [sp+1Ch] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
46 unsigned int v29; // [sp+20h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
47 __int16 *v30; // [sp+24h] [bp-8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
48 signed int v31; // [sp+28h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
49 signed int v32; // [sp+28h] [bp-4h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
51 v26 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
52 v25 = viewparams->uScreenZ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
53 v28 = viewparams->uScreenY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
54 v31 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
55 v1 = pRenderer->pTargetSurface;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
56 v29 = viewparams->uScreenX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
57 v23 = viewparams->uScreenW;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
58 v24 = viewparams->uScreenZ - viewparams->uScreenX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
59 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
60 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
61 v2 = &v26->field_0[2 * v31];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
62 v30 = &v26->field_0[2 * v31 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
63 *v2 += rand() % 3 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
64 *v30 += rand() % 2 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
65 v3 = *v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
66 if ( v3 < (signed int)(v25 - 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
67 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
68 if ( v3 < (signed int)v29 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
69 *v2 = v25 - rand() % 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
70 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
71 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
72 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
73 *v2 = v29 + rand() % 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
74 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
75 v4 = *v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
76 if ( v4 < (signed int)v28 || v4 >= (signed int)v23 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
77 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
78 v5 = rand() % (signed int)(v24 - 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
79 *v30 = v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
80 *v2 = v29 + v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
81 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
82 ++v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
83 v1[*v2 + 640 * *v30] = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
84 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
85 while ( v31 < 700 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
86 v32 = 700;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
87 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
88 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
89 v6 = &v26->field_0[2 * v32];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
90 *v6 += rand() % 5 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
91 v7 = &v26->field_0[2 * v32 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
92 v8 = *v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
93 *v7 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
94 if ( v8 < (signed int)v29 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
95 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
96 LOWORD(v9) = v25 - rand() % 4 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
97 LABEL_15:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
98 *v6 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
99 v7 = &v26->field_0[2 * v32 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
100 goto LABEL_16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
101 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
102 if ( v8 >= (signed int)(v25 - 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
103 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
104 v9 = rand() % 4 + v29 + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
105 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
106 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
107 LABEL_16:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
108 v10 = *v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
109 if ( v10 < (signed int)v28 || v10 >= (signed int)(v23 - 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
110 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
111 v11 = rand() % (signed int)(v24 - 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
112 v26->field_0[2 * v32 + 1] = v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
113 v7 = &v26->field_0[2 * v32 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
114 *v6 = v29 + v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
115 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
116 *(&v1[640 * *v7 + 1] + *v6) = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
117 *(&v1[640 * *v7 + 641] + *v6) = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
118 v1[*v6 + 640 * (*v7 + 1)] = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
119 ++v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
120 v1[*v6 + 640 * *v7] = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
121 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
122 while ( v32 < 950 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
123 v12 = v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
124 v27 = 50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
125 v13 = &v12->field_0[1901];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
126 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
127 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
128 v14 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
129 *v13 += 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
130 *(v13 - 1) += v14 % 11 - 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
131 v15 = *(v13 - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
132 if ( v15 < (signed int)v29 || v15 >= (signed int)(v25 - 5) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
133 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
134 v16 = rand() % (signed int)(v24 - 5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
135 *v13 = v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
136 *(v13 - 1) = v29 + v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
137 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
138 v17 = *v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
139 if ( v17 < (signed int)v28 || v17 >= (signed int)(v23 - 5) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
140 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
141 v18 = rand() % (signed int)(v24 - 5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
142 *v13 = v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
143 *(v13 - 1) = v29 + v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
144 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
145 *(&v1[640 * *v13 + 1] + *(v13 - 1)) = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
146 *(&v1[640 * *v13 + 641] + *(v13 - 1)) = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
147 v1[*(v13 - 1) + 640 * (*v13 + 1)] = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
148 v1[*(v13 - 1) + 640 * *v13] = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
149 *(&v1[640 * *v13 + 1281] + *(v13 - 1)) = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
150 *(&v1[640 * *v13 + 1921] + *(v13 - 1)) = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
151 v1[*(v13 - 1) + 640 * (*v13 + 3)] = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
152 v1[*(v13 - 1) + 640 * (*v13 + 2)] = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
153 *(&v1[640 * *v13 + 3] + *(v13 - 1)) = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
154 *(&v1[640 * *v13 + 643] + *(v13 - 1)) = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
155 *(&v1[640 * *v13 + 642] + *(v13 - 1)) = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
156 *(&v1[640 * *v13 + 2] + *(v13 - 1)) = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
157 *(&v1[640 * *v13 + 1283] + *(v13 - 1)) = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
158 *(&v1[640 * *v13 + 1923] + *(v13 - 1)) = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
159 *(&v1[640 * *v13 + 1922] + *(v13 - 1)) = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
160 v19 = *(v13 - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
161 v20 = 5 * *v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
162 v13 += 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
163 v21 = v27-- == 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
164 *(&v1[128 * v20 + 1282] + v19) = 0xFFFFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
165 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
166 while ( !v21 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
167 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
168 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
169
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
170 //----- (004C2EA0) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
171 int Weather::Initialize()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
172 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
173 Weather *v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
174 signed int v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
175 signed int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
176 signed int v4; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
177
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
178 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
179 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
180 v3 = pViewport->uScreenZ - pViewport->uScreenX - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
181 v4 = pViewport->uScreenW - pViewport->uScreenY - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
182 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
183 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
184 v1->field_0[2 * v2++] = LOWORD(pViewport->uViewportX) + rand() % v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
185 *((short *)v1 + 2 * v2 - 1) = LOWORD(pViewport->uViewportY) + rand() % v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
186 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
187 while ( v2 < 1000 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
188 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
189 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
190
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
191 //----- (004C2EFA) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
192 int Weather::Draw()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
193 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
194 if (bRenderSnow)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
195 DrawSnow();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
196 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
197 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
198
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
199 //----- (004C2F0B) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
200 bool Weather::_4C2F0B(__int16 a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
201 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
202 int v3; // edx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
203 signed int v4; // ebx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
204 unsigned int screen_width; // esi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
205 __int16 *v6; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
206 signed int v7; // edi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
207 unsigned int screen_x; // [sp+0h] [bp-Ch]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
208 unsigned int screen_z_minus_4; // [sp+4h] [bp-8h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
209 Weather *v10; // [sp+8h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
210
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
211 v10 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
212 if ( this->bRenderSnow != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
213 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
214 HIWORD(v3) = HIWORD(viewparams->uScreenX);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
215 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
216 screen_width = viewparams->uScreenZ - viewparams->uScreenX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
217 screen_x = viewparams->uScreenX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
218 screen_z_minus_4 = viewparams->uScreenZ - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
219
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
220 auto _this = this->field_0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
221 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
222 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
223 v6 = &_this[2 * v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
224 *v6 += a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
225 LOWORD(v3) = *v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
226 v7 = *v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
227 if ( v7 < (signed int)screen_z_minus_4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
228 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
229 if ( v7 >= (signed int)screen_x )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
230 goto LABEL_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
231 v3 += screen_width;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
232 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
233 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
234 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
235 v3 = v3 - screen_width + 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
236 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
237 *v6 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
238 LABEL_10:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
239 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
240 if ( v4 >= 1000 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
241 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
242 //_this = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
243 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
244 }