0
|
1 #include "stru9.h"
|
|
2 #include "IndoorCameraD3D.h"
|
|
3
|
|
4 #include "mm7_data.h"
|
|
5
|
|
6
|
|
7
|
|
8 //----- (00498377) --------------------------------------------------------
|
|
9 bool stru9::_498377(struct RenderVertexSoft *a1, unsigned int uNumVertices, struct IndoorCameraD3D_Vec4 *a3, struct RenderVertexSoft *pVertices, unsigned int *pOutNumVertices)
|
|
10 {
|
|
11 bool result; // eax@7
|
|
12 unsigned int *v7; // ebx@7
|
|
13 char *v8; // esi@8
|
|
14 RenderVertexSoft *v9; // ecx@9
|
|
15 double v10; // st7@12
|
|
16 double v11; // st6@12
|
|
17 RenderVertexSoft *v12; // esi@13
|
|
18 int v13; // ecx@25
|
|
19 VertexBuffer *v14; // edx@26
|
|
20 char *v15; // eax@26
|
|
21 unsigned int i; // ecx@26
|
|
22 bool v17; // [sp+0h] [bp-28h]@9
|
|
23 char *v18; // [sp+10h] [bp-18h]@8
|
|
24 RenderVertexSoft *v19; // [sp+14h] [bp-14h]@0
|
|
25 RenderVertexSoft *v20; // [sp+18h] [bp-10h]@0
|
|
26 signed int v21; // [sp+1Ch] [bp-Ch]@7
|
|
27 RenderVertexSoft *a2; // [sp+20h] [bp-8h]@8
|
|
28 stru9 *thisa; // [sp+24h] [bp-4h]@1
|
|
29 signed int a3a; // [sp+38h] [bp+10h]@12
|
|
30 int a3b; // [sp+38h] [bp+10h]@25
|
|
31
|
|
32 thisa = this;
|
|
33
|
|
34 static RenderVertexSoft static_AE3FB4;
|
|
35 static bool __init_flag1 = false;
|
|
36 if (!__init_flag1)
|
|
37 {
|
|
38 __init_flag1 = true;
|
|
39
|
|
40 static_AE3FB4.flt_2C = 0.0;
|
|
41 }
|
|
42
|
|
43 static stru312 static_AE3FA4; // idb
|
|
44 static bool __init_flag2 = false;
|
|
45 if (!__init_flag2)
|
|
46 {
|
|
47 __init_flag2 = true;
|
|
48
|
|
49 //stru312::stru312(&static_AE3FA4);
|
|
50 }
|
|
51
|
|
52 static VertexBuffer static_AE33A0; // idb
|
|
53 static bool __init_flag3 = false;
|
|
54 if (!__init_flag3)
|
|
55 {
|
|
56 __init_flag3 = true;
|
|
57
|
|
58 //VertexBuffer::VertexBuffer(&static_AE33A0);
|
|
59 }
|
|
60
|
|
61 result = 0;
|
|
62 v7 = pOutNumVertices;
|
|
63 v21 = 0;
|
|
64 if ( (signed int)uNumVertices <= 0 )
|
|
65 goto LABEL_32;
|
|
66 a2 = a1;
|
|
67 v8 = (char *)&a3->y;
|
|
68 v18 = (char *)&a3->y;
|
|
69 do
|
|
70 {
|
|
71 v17 = result + 1;
|
|
72 v9 = &a1[(result + 1) % (signed int)uNumVertices];
|
|
73 if ( a2->vWorldPosition.x != v9->vWorldPosition.x
|
|
74 || a2->vWorldPosition.y != v9->vWorldPosition.y
|
|
75 || a2->vWorldPosition.z != v9->vWorldPosition.z )
|
|
76 {
|
|
77 v10 = *((float *)v8 + 1);
|
|
78 v11 = *(float *)v8;
|
|
79 ++v21;
|
|
80 result = 0;
|
|
81 static_AE3FA4.flt_0 = *((float *)v8 - 1);
|
|
82 static_AE33A0.uNumVertices = 0;
|
|
83 a3a = 0;
|
|
84 static_AE3FA4.flt_4 = v11;
|
|
85 static_AE3FA4.flt_8 = v10;
|
|
86 if ( (signed int)*v7 <= 0 )
|
|
87 goto LABEL_32;
|
|
88 do
|
|
89 {
|
|
90 v12 = &pVertices[result];
|
|
91 if ( result )
|
|
92 {
|
|
93 if ( _4989E1(v20, &pVertices[result], a2, &static_AE3FA4)
|
|
94 && _498774(v20, v12, a2, &static_AE3FA4, &static_AE3FB4) )
|
|
95 AddVertex(&static_AE33A0, &static_AE3FB4);
|
|
96 }
|
|
97 else
|
|
98 {
|
|
99 v19 = &pVertices[result];
|
|
100 }
|
|
101 v20 = v12;
|
|
102 if ( _49895A(v12, a2, &static_AE3FA4) )
|
|
103 AddVertex(&static_AE33A0, v12);
|
|
104 v7 = pOutNumVertices;
|
|
105 result = a3a++ + 1;
|
|
106 }
|
|
107 while ( a3a < (signed int)*pOutNumVertices );
|
|
108 if ( !static_AE33A0.uNumVertices )
|
|
109 goto LABEL_32;
|
|
110 if ( _4989E1(v12, v19, a2, &static_AE3FA4)
|
|
111 && _498774(v12, v19, a2, &static_AE3FA4, &static_AE3FB4) )
|
|
112 AddVertex(&static_AE33A0, &static_AE3FB4);
|
|
113 v13 = static_AE33A0.uNumVertices;
|
|
114 a3b = 0;
|
|
115 if ( static_AE33A0.uNumVertices > 0 )
|
|
116 {
|
|
117 v14 = &static_AE33A0;
|
|
118 v15 = (char *)&pVertices->vWorldPosition.y;
|
|
119 for ( i = (char *)&static_AE33A0.pVertices[0].vWorldPosition.y - (char *)pVertices;
|
|
120 ;
|
|
121 i = (char *)&static_AE33A0.pVertices[0].vWorldPosition.y - (char *)pVertices )
|
|
122 {
|
|
123 ++a3b;
|
|
124 *((int *)v15 - 1) = *(unsigned int *)(&v14->pVertices[0].vWorldPosition.x);
|
|
125 v14 = (VertexBuffer *)((char *)v14 + 48);
|
|
126 *(float *)v15 = *(float *)&v15[(char *)&static_AE33A0 - (char *)pVertices];
|
|
127 *((float *)v15 + 1) = *(float *)&v15[i];
|
|
128 *((float *)v15 + 8) = *(float *)&v15[(char *)&static_AE33A0.pVertices[0].flt_20 - (char *)pVertices];
|
|
129 *((float *)v15 + 9) = *(float *)&v15[(char *)&static_AE33A0.pVertices[0].u - (char *)pVertices];
|
|
130 v13 = static_AE33A0.uNumVertices;
|
|
131 v15 += 48;
|
|
132 if ( a3b >= static_AE33A0.uNumVertices )
|
|
133 break;
|
|
134 }
|
|
135 }
|
|
136 v7 = pOutNumVertices;
|
|
137 v8 = v18;
|
|
138 *pOutNumVertices = v13;
|
|
139 }
|
|
140 result = v17;
|
|
141 ++a2;
|
|
142 v8 += 24;
|
|
143 v18 = v8;
|
|
144 }
|
|
145 while ( v17 < (signed int)uNumVertices );
|
|
146 if ( v21 < 3 )
|
|
147 LABEL_32:
|
|
148 *v7 = 0;
|
|
149 return 1;
|
|
150 }
|
|
151 // AE3FE4: using guessed type char static_init_flag__AE3FB4_bit1__AE3FA4_bit2__AE33A0_bit3;
|
|
152
|
|
153 //----- (004985FB) --------------------------------------------------------
|
|
154 bool stru9::_4985FB(struct RenderVertexSoft *a1, signed int a2, struct RenderVertexSoft *a3, unsigned int *pOutNumVertices, struct Vec3_float_ *a5, float a6, char *a7, int unused)
|
|
155 {
|
|
156 RenderVertexSoft *v9; // ecx@1
|
|
157 Vec3_float_ *v10; // esi@1
|
52
|
158 //char *v11; // ebx@1
|
0
|
159 RenderVertexSoft *v12; // edi@1
|
|
160 double v13; // st7@1
|
52
|
161 //bool result; // eax@4
|
0
|
162 signed int v15; // edx@9
|
|
163 RenderVertexSoft *v16; // ecx@9
|
|
164 double v17; // st7@9
|
|
165 double v18; // st6@12
|
|
166 signed int v19; // [sp+Ch] [bp-Ch]@7
|
|
167 float v20; // [sp+10h] [bp-8h]@1
|
|
168 bool v21; // [sp+14h] [bp-4h]@2
|
|
169
|
|
170 v9 = a1;
|
|
171 v10 = a5;
|
52
|
172 //v11 = (char *)&a1->vWorldPosition.z;
|
|
173 auto v11 = a1;
|
0
|
174 v12 = a3;
|
|
175 v13 = a1->vWorldPosition.y * a5->y + a5->x * a1->vWorldPosition.x + a1->vWorldPosition.z * a5->z;
|
|
176 v20 = v13;
|
|
177 v21 = v13 >= a6;
|
52
|
178
|
0
|
179 *pOutNumVertices = 0;
|
|
180 if ( a2 <= 0 )
|
52
|
181 return false;
|
|
182 v19 = 1;
|
0
|
183 while ( 1 )
|
|
184 {
|
|
185 if ( v21 )
|
|
186 {
|
|
187 ++a3;
|
52
|
188 memcpy(v12, v11, sizeof(RenderVertexSoft));
|
0
|
189 ++*pOutNumVertices;
|
|
190 v10 = a5;
|
|
191 v12 = a3;
|
|
192 v9 = a1;
|
|
193 }
|
|
194 v15 = 0;
|
52
|
195 v16 = &v9[v19 % a2];
|
0
|
196 v17 = v16->vWorldPosition.z * v10->z + v16->vWorldPosition.y * v10->y + v10->x * v16->vWorldPosition.x;
|
|
197 if ( v17 >= a6 )
|
|
198 v15 = 1;
|
|
199 if ( v21 != v15 )
|
|
200 {
|
|
201 v18 = (a6 - v20) / (v17 - v20);
|
52
|
202 v12->vWorldPosition.x = (v16->vWorldPosition.x - v11->vWorldPosition.x) * v18 + v11->vWorldPosition.x;
|
|
203 v12->vWorldPosition.y = (v16->vWorldPosition.y - v11->vWorldPosition.y) * v18 + v11->vWorldPosition.y;
|
|
204 v12->vWorldPosition.z = (v16->vWorldPosition.z - v11->vWorldPosition.z) * v18 + v11->vWorldPosition.z;
|
|
205 v12->u = (v16->u - v11->u) * v18 + v11->u;
|
|
206 v12->v = (v16->v - v11->v) * v18 + v11->v;
|
0
|
207 ++v12;
|
|
208 a3 = v12;
|
|
209 ++*pOutNumVertices;
|
|
210 *a7 = 1;
|
|
211 }
|
52
|
212
|
|
213 v11++;
|
0
|
214 v21 = v15;
|
|
215 v20 = v17;
|
|
216 if ( v19 >= a2 )
|
|
217 break;
|
|
218 v9 = a1;
|
52
|
219 v19++;
|
0
|
220 }
|
52
|
221
|
|
222 return *pOutNumVertices >= 3;
|
0
|
223 }
|
|
224
|
|
225 //----- (00498737) --------------------------------------------------------
|
|
226 void stru9::AddVertex(struct VertexBuffer *pVertexBuffer, struct RenderVertexSoft *pVertex)
|
|
227 {
|
|
228 RenderVertexSoft *v3; // eax@1
|
|
229
|
|
230 v3 = &pVertexBuffer->pVertices[pVertexBuffer->uNumVertices];
|
|
231 v3->vWorldPosition.x = pVertex->vWorldPosition.x;
|
|
232 v3->vWorldPosition.y = pVertex->vWorldPosition.y;
|
|
233 v3->vWorldPosition.z = pVertex->vWorldPosition.z;
|
|
234 v3->u = pVertex->u;
|
|
235 v3->v = pVertex->v;
|
|
236 ++pVertexBuffer->uNumVertices;
|
|
237 }
|
|
238
|
|
239 //----- (00498774) --------------------------------------------------------
|
|
240 bool stru9::_498774(struct RenderVertexSoft *a1, struct RenderVertexSoft *a2, struct RenderVertexSoft *a3, struct stru312 *a4, struct RenderVertexSoft *a5)
|
|
241 {
|
|
242 RenderVertexSoft *v6; // ecx@5
|
|
243 bool result; // eax@5
|
|
244 double v8; // st7@5
|
|
245 __int16 v9; // fps@5
|
|
246 double v10; // st7@6
|
|
247 double v11; // st6@8
|
|
248 double v12; // st6@18
|
|
249 char v13; // c0@24
|
|
250 char v14; // c2@24
|
|
251 char v15; // c3@24
|
|
252 float a1a; // [sp+10h] [bp+8h]@5
|
|
253
|
|
254 static stru312 static_AE3388;
|
|
255 /*if ( !(static_init_flag__AE3388_bit1__AE3378_bit2 & 1) )
|
|
256 {
|
|
257 static_init_flag__AE3388_bit1__AE3378_bit2 |= 1u;
|
|
258 stru312::stru312(&static_AE3388);
|
|
259 atexit(nullsub_16);
|
|
260 }*/
|
|
261 static stru312 static_AE3378;
|
|
262 /*if ( !(static_init_flag__AE3388_bit1__AE3378_bit2 & 2) )
|
|
263 {
|
|
264 static_init_flag__AE3388_bit1__AE3378_bit2 |= 2u;
|
|
265 stru312::stru312(&static_AE3378);
|
|
266 atexit(nullsub_15);
|
|
267 }*/
|
|
268 v6 = a1;
|
|
269 static_AE3378.flt_0 = a1->vWorldPosition.x - a3->vWorldPosition.x;
|
|
270 static_AE3378.flt_4 = a1->vWorldPosition.y - a3->vWorldPosition.y;
|
|
271 HIWORD(result) = HIWORD(a4);
|
|
272 static_AE3378.flt_8 = a1->vWorldPosition.z - a3->vWorldPosition.z;
|
|
273 static_AE3388.flt_0 = a2->vWorldPosition.x - a1->vWorldPosition.x;
|
|
274 static_AE3388.flt_4 = a2->vWorldPosition.y - a1->vWorldPosition.y;
|
|
275 static_AE3388.flt_8 = a2->vWorldPosition.z - a1->vWorldPosition.z;
|
|
276 a1a = static_AE3388.flt_0 * a4->flt_0 + static_AE3388.flt_8 * a4->flt_8 + static_AE3388.flt_4 * a4->flt_4;
|
|
277 v8 = static_AE3378.flt_0 * a4->flt_0 + static_AE3378.flt_8 * a4->flt_8 + static_AE3378.flt_4 * a4->flt_4;
|
|
278 //UNDEF(v9);
|
|
279 if ( a1a != 0.0 )
|
|
280 {
|
|
281 v10 = -(v8 / a1a);
|
|
282 if ( a1a <= 0.0 )
|
|
283 {
|
|
284 if ( v10 <= 0.0 )
|
|
285 v12 = 0.0;
|
|
286 else
|
|
287 v12 = v10;
|
|
288 if ( v12 <= 1.0 )
|
|
289 {
|
|
290 if ( v10 <= 0.0 )
|
|
291 v10 = (float)0.0;
|
|
292 }
|
|
293 else
|
|
294 {
|
|
295 v10 = 1.0;
|
|
296 }
|
|
297 }
|
|
298 else
|
|
299 {
|
|
300 if ( v10 >= 1.0 )
|
|
301 v11 = 1.0;
|
|
302 else
|
|
303 v11 = v10;
|
|
304 if ( v11 >= 0.0 )
|
|
305 {
|
|
306 if ( v10 >= 1.0 )
|
|
307 v10 = (float)1.0;
|
|
308 }
|
|
309 else
|
|
310 {
|
|
311 v10 = 0.0;
|
|
312 }
|
|
313 }
|
|
314 result = (bool)a5;
|
|
315 a5->vWorldPosition.x = (a2->vWorldPosition.x - v6->vWorldPosition.x) * v10 + v6->vWorldPosition.x;
|
|
316 a5->vWorldPosition.y = (a2->vWorldPosition.y - v6->vWorldPosition.y) * v10 + v6->vWorldPosition.y;
|
|
317 a5->vWorldPosition.z = (a2->vWorldPosition.z - v6->vWorldPosition.z) * v10 + v6->vWorldPosition.z;
|
|
318 a5->u = (a2->u - v6->u) * v10 + v6->u;
|
|
319 a5->v = (a2->v - v6->v) * v10 + v6->v;
|
|
320 goto LABEL_15;
|
|
321 }
|
|
322 v13 = v8 < 0.0;
|
|
323 v14 = 0;
|
|
324 v15 = v8 == 0.0;
|
|
325 BYTE1(result) = HIBYTE(v9);
|
|
326 if ( v8 < 0.0 )
|
|
327 {
|
|
328 LABEL_15:
|
|
329 LOBYTE(result) = 1;
|
|
330 return result;
|
|
331 }
|
|
332 LOBYTE(result) = 0;
|
|
333 return result;
|
|
334 }
|
|
335 // AE3398: using guessed type char static_init_flag__AE3388_bit1__AE3378_bit2;
|
|
336
|
|
337 //----- (0049895A) --------------------------------------------------------
|
|
338 bool stru9::_49895A(struct RenderVertexSoft *a1, struct RenderVertexSoft *a2, struct stru312 *a3)
|
|
339 {
|
|
340 double v4; // st7@3
|
|
341 double v5; // st7@3
|
|
342 __int16 v6; // fps@3
|
|
343 char v7; // c0@3
|
|
344 char v8; // c2@3
|
|
345 char v9; // c3@3
|
|
346 bool result; // eax@3
|
|
347
|
|
348 static stru312 static_F942A0;
|
|
349 /*static bool __init_flag1 = false;
|
|
350 if (!__init_flag1)
|
|
351 {
|
|
352 __init_flag1 = true;
|
|
353
|
|
354 stru312::stru312(&static_F942A0);
|
|
355 }*/
|
|
356
|
|
357 static_F942A0.flt_0 = a1->vWorldPosition.x - a2->vWorldPosition.x;
|
|
358 static_F942A0.flt_4 = a1->vWorldPosition.y - a2->vWorldPosition.y;
|
|
359 v4 = a1->vWorldPosition.z - a2->vWorldPosition.z;
|
|
360 HIWORD(result) = HIWORD(a3);
|
|
361 static_F942A0.flt_8 = v4;
|
|
362 v5 = v4 * a3->flt_8 + static_F942A0.flt_4 * a3->flt_4 + static_F942A0.flt_0 * a3->flt_0;
|
|
363 //UNDEF(v6);
|
|
364 flt_F942B0 = v5;
|
|
365 v7 = v5 < 0.0;
|
|
366 v8 = 0;
|
|
367 v9 = v5 == 0.0;
|
|
368 BYTE1(result) = HIBYTE(v6);
|
|
369 LOBYTE(result) = v5 >= 0.0;
|
|
370 return result;
|
|
371 }
|
|
372
|
|
373
|
|
374 //----- (004989E1) --------------------------------------------------------
|
|
375 bool stru9::_4989E1(struct RenderVertexSoft *a1, struct RenderVertexSoft *a2, struct RenderVertexSoft *a3, struct stru312 *a4)
|
|
376 {
|
|
377 bool r1;
|
|
378 bool r2;
|
|
379
|
|
380 r1 = _49895A(a1, a3, a4);
|
|
381 r2 = _49895A(a2, a3, a4);
|
|
382 return !r1 && r2 == 1 ||
|
|
383 r1 == 1 && !r2;
|
|
384 }
|
|
385
|
|
386 //----- (004980B9) --------------------------------------------------------
|
|
387 bool stru9::_4980B9(RenderVertexSoft *a1, signed int a2, float a3, float a4, float a5, RenderVertexSoft *a6, unsigned int *pOutNumVertices)
|
|
388 {
|
|
389 bool result; // eax@7
|
|
390 unsigned int *v9; // ebx@7
|
|
391 char *v10; // edi@8
|
|
392 RenderVertexSoft *v11; // esi@9
|
|
393 RenderVertexSoft *v12; // ecx@9
|
|
394 double v13; // st7@12
|
|
395 double v14; // st6@12
|
|
396 double v15; // st5@12
|
|
397 RenderVertexSoft *v16; // edi@13
|
|
398 int v17; // ecx@25
|
|
399 VertexBuffer *v18; // edx@26
|
|
400 char *v19; // eax@26
|
|
401 unsigned int i; // ecx@26
|
|
402 bool v21; // [sp+0h] [bp-24h]@9
|
|
403 char *v22; // [sp+Ch] [bp-18h]@8
|
|
404 RenderVertexSoft *a2a; // [sp+10h] [bp-14h]@0
|
|
405 RenderVertexSoft *a1a; // [sp+14h] [bp-10h]@0
|
|
406 signed int v25; // [sp+18h] [bp-Ch]@7
|
|
407 signed int v26; // [sp+1Ch] [bp-8h]@12
|
|
408 int v27; // [sp+1Ch] [bp-8h]@25
|
|
409 stru9 *thisa; // [sp+20h] [bp-4h]@1
|
|
410
|
59
|
411 __debugbreak();
|
0
|
412 thisa = this;
|
|
413
|
|
414 static RenderVertexSoft stru_AE4BFC;
|
|
415 static bool __init_flag1 = false;
|
|
416 if (!__init_flag1)
|
|
417 {
|
|
418 __init_flag1 = true;
|
|
419
|
|
420 stru_AE4BFC.flt_2C = 0.0;
|
|
421 }
|
|
422
|
|
423 static stru312 static_sub_4980B9_stru_AE4BEC; // idb
|
|
424 static bool __init_flag2 = false;
|
|
425 if (!__init_flag2)
|
|
426 {
|
|
427 __init_flag2 = true;
|
|
428
|
|
429 //stru312::stru312(&static_sub_4980B9_stru_AE4BEC);
|
|
430 }
|
|
431
|
|
432 static VertexBuffer static_sub_4980B9_stru_AE3FE8; // idb
|
|
433 static bool __init_flag3 = false;
|
|
434 if (!__init_flag3)
|
|
435 {
|
|
436 __init_flag3 = true;
|
|
437
|
|
438 //VertexBuffer::VertexBuffer(&static_sub_4980B9_stru_AE3FE8);
|
|
439 }
|
|
440
|
|
441 result = 0;
|
|
442 v9 = pOutNumVertices;
|
|
443 v25 = 0;
|
|
444 if ( a2 <= 0 )
|
|
445 goto LABEL_32;
|
|
446 v10 = (char *)&a1->vWorldPosition.z;
|
|
447 v22 = (char *)&a1->vWorldPosition.z;
|
|
448 do
|
|
449 {
|
|
450 v11 = (RenderVertexSoft *)(v10 - 8);
|
|
451 v21 = result + 1;
|
|
452 v12 = &a1[(result + 1) % a2];
|
|
453 if ( *((float *)v10 - 2) != v12->vWorldPosition.x
|
|
454 || *((float *)v10 - 1) != v12->vWorldPosition.y
|
|
455 || *(float *)v10 != v12->vWorldPosition.z )
|
|
456 {
|
|
457 v13 = v12->vWorldPosition.x - v11->vWorldPosition.x;
|
|
458 v14 = v12->vWorldPosition.y - *((float *)v10 - 1);
|
|
459 v15 = v12->vWorldPosition.z - *(float *)v10;
|
|
460 ++v25;
|
|
461 result = 0;
|
|
462 static_sub_4980B9_stru_AE3FE8.uNumVertices = 0;
|
|
463 v26 = 0;
|
|
464 static_sub_4980B9_stru_AE4BEC.flt_0 = a4 * v15 - v14 * a5;
|
|
465 static_sub_4980B9_stru_AE4BEC.flt_4 = v13 * a5 - v15 * a3;
|
|
466 static_sub_4980B9_stru_AE4BEC.flt_8 = v14 * a3 - v13 * a4;
|
|
467 if ( (signed int)*v9 <= 0 )
|
|
468 goto LABEL_32;
|
|
469 do
|
|
470 {
|
|
471 v16 = &a6[result];
|
|
472 if ( result )
|
|
473 {
|
|
474 if ( _4989E1(a1a, &a6[result], v11, &static_sub_4980B9_stru_AE4BEC)
|
|
475 && _498774(a1a, v16, v11, &static_sub_4980B9_stru_AE4BEC, &stru_AE4BFC) )
|
|
476 AddVertex(&static_sub_4980B9_stru_AE3FE8, &stru_AE4BFC);
|
|
477 }
|
|
478 else
|
|
479 {
|
|
480 a2a = &a6[result];
|
|
481 }
|
|
482 a1a = v16;
|
|
483 if ( _49895A(v16, v11, &static_sub_4980B9_stru_AE4BEC) )
|
|
484 AddVertex(&static_sub_4980B9_stru_AE3FE8, v16);
|
|
485 v9 = pOutNumVertices;
|
|
486 result = v26++ + 1;
|
|
487 }
|
|
488 while ( v26 < (signed int)*pOutNumVertices );
|
|
489 if ( !static_sub_4980B9_stru_AE3FE8.uNumVertices )
|
|
490 goto LABEL_32;
|
|
491 if ( _4989E1(v16, a2a, v11, &static_sub_4980B9_stru_AE4BEC)
|
|
492 && _498774(v16, a2a, v11, &static_sub_4980B9_stru_AE4BEC, &stru_AE4BFC) )
|
|
493 AddVertex(&static_sub_4980B9_stru_AE3FE8, &stru_AE4BFC);
|
|
494 v17 = static_sub_4980B9_stru_AE3FE8.uNumVertices;
|
|
495 v27 = 0;
|
|
496 if ( static_sub_4980B9_stru_AE3FE8.uNumVertices > 0 )
|
|
497 {
|
|
498 v18 = &static_sub_4980B9_stru_AE3FE8;
|
|
499 v19 = (char *)&a6->vWorldPosition.y;
|
|
500 for ( i = (char *)&static_sub_4980B9_stru_AE3FE8.pVertices[0].flt_20 - (char *)a6;
|
|
501 ;
|
|
502 i = (char *)&static_sub_4980B9_stru_AE3FE8.pVertices[0].flt_20 - (char *)a6 )
|
|
503 {
|
|
504 ++v27;
|
|
505 *((int *)v19 - 1) = LODWORD(v18->pVertices[0].vWorldPosition.x);
|
|
506 v18 = (VertexBuffer *)((char *)v18 + 48);
|
|
507 *(float *)v19 = *(float *)&v19[(char *)&static_sub_4980B9_stru_AE3FE8 - (char *)a6];
|
|
508 *((float *)v19 + 1) = *(float *)&v19[(char *)&static_sub_4980B9_stru_AE3FE8.pVertices[0].vWorldPosition.y
|
|
509 - (char *)a6];
|
|
510 *((float *)v19 + 8) = *(float *)&v19[i];
|
|
511 *((float *)v19 + 9) = *(float *)&v19[(char *)&static_sub_4980B9_stru_AE3FE8.pVertices[0].u - (char *)a6];
|
|
512 v17 = static_sub_4980B9_stru_AE3FE8.uNumVertices;
|
|
513 v19 += 48;
|
|
514 if ( v27 >= static_sub_4980B9_stru_AE3FE8.uNumVertices )
|
|
515 break;
|
|
516 }
|
|
517 }
|
|
518 v9 = pOutNumVertices;
|
|
519 v10 = v22;
|
|
520 *pOutNumVertices = v17;
|
|
521 }
|
|
522 result = v21;
|
|
523 v10 += 48;
|
|
524 v22 = v10;
|
|
525 }
|
|
526 while ( v21 < a2 );
|
|
527 if ( v25 < 3 )
|
|
528 LABEL_32:
|
|
529 *v9 = 0;
|
|
530 return 1;
|
|
531 }
|
|
532 // AE4C2C: using guessed type char static_sub_4980B9_byte_AE4C2C_init_flag; |