Mercurial > mm7
annotate stru10.cpp @ 744:4b06e19fcdbc
Слияние
author | Ritor1 |
---|---|
date | Fri, 22 Mar 2013 23:42:21 +0600 |
parents | 0f25d026acfa |
children | 4a00901e063c |
rev | line source |
---|---|
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1 #include <assert.h> |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
2 |
0 | 3 #include "stru10.h" |
4 #include "Render.h" | |
5 #include "Indoor.h" | |
6 #include "Game.h" | |
7 #include "Party.h" | |
8 | |
9 #include "mm7_data.h" | |
10 | |
11 | |
12 | |
13 | |
14 //----- (0049CE9E) -------------------------------------------------------- | |
15 void stru10::_49CE9E(BLVFace *pFace, RenderVertexSoft *a2, signed int a3, RenderVertexSoft *a4) | |
16 { | |
17 char *v5; // eax@1 | |
18 signed int v6; // edx@1 | |
19 unsigned int v7; // eax@3 | |
20 signed int v8; // ecx@11 | |
21 signed int v9; // esi@11 | |
22 RenderVertexSoft *v10; // edx@12 | |
23 double v11; // st6@14 | |
24 RenderVertexSoft *v12; // edx@19 | |
25 signed int v13; // ecx@19 | |
26 signed int v14; // esi@19 | |
27 RenderVertexSoft *v15; // edi@20 | |
28 double v16; // st6@22 | |
29 signed int v17; // ecx@27 | |
30 signed int v18; // edi@27 | |
31 char *v19; // esi@28 | |
32 double v20; // st6@30 | |
33 signed int v21; // ecx@35 | |
34 signed int v22; // edi@35 | |
35 char *v23; // esi@36 | |
36 double v24; // st7@38 | |
37 signed int v25; // ecx@45 | |
38 signed int v26; // esi@45 | |
39 RenderVertexSoft *v27; // edx@46 | |
40 double v28; // st6@48 | |
41 signed int v29; // ecx@53 | |
42 signed int v30; // esi@53 | |
43 RenderVertexSoft *v31; // edi@54 | |
44 double v32; // st6@56 | |
45 signed int v33; // ecx@61 | |
46 signed int v34; // edi@61 | |
47 char *v35; // esi@62 | |
48 double v36; // st6@64 | |
49 signed int v37; // edi@69 | |
50 char *v38; // esi@70 | |
51 double v39; // st7@72 | |
52 RenderVertexSoft *v40; // esi@77 | |
53 signed int v41; // ecx@79 | |
54 signed int v42; // esi@79 | |
55 char *v43; // edx@80 | |
56 double v44; // st6@82 | |
57 RenderVertexSoft *v45; // eax@87 | |
58 signed int v46; // ecx@87 | |
59 signed int v47; // edi@87 | |
60 char *v48; // esi@88 | |
61 double v49; // st6@90 | |
62 signed int v50; // ecx@96 | |
63 signed int v51; // edi@96 | |
64 char *v52; // esi@97 | |
65 double v53; // st6@99 | |
66 signed int v54; // ecx@105 | |
67 signed int v55; // edi@105 | |
68 char *v56; // esi@106 | |
69 double v57; // st7@108 | |
70 RenderVertexSoft a2a[64]; // [sp+0h] [bp-C18h]@1 | |
71 float v59; // [sp+C00h] [bp-18h]@4 | |
72 float v60; // [sp+C04h] [bp-14h]@9 | |
73 float v61; // [sp+C08h] [bp-10h]@4 | |
74 float v62; // [sp+C0Ch] [bp-Ch]@9 | |
75 float v63; // [sp+C10h] [bp-8h]@4 | |
76 float v64; // [sp+C14h] [bp-4h]@4 | |
77 float a1a; // [sp+C20h] [bp+8h]@11 | |
78 float a1b; // [sp+C20h] [bp+8h]@19 | |
79 float a1c; // [sp+C20h] [bp+8h]@27 | |
80 float a1d; // [sp+C20h] [bp+8h]@35 | |
81 float a1e; // [sp+C20h] [bp+8h]@45 | |
82 float a1f; // [sp+C20h] [bp+8h]@53 | |
83 float a1g; // [sp+C20h] [bp+8h]@61 | |
84 float a1h; // [sp+C20h] [bp+8h]@69 | |
85 float a1i; // [sp+C20h] [bp+8h]@79 | |
86 float a1j; // [sp+C20h] [bp+8h]@87 | |
87 float a1k; // [sp+C20h] [bp+8h]@96 | |
88 float a1l; // [sp+C20h] [bp+8h]@105 | |
89 | |
90 v5 = (char *)&a2a[0].flt_2C; | |
91 v6 = 64; | |
92 do | |
93 { | |
94 *(float *)v5 = 0.0; | |
95 v5 += 48; | |
96 --v6; | |
97 } | |
98 while ( v6 ); | |
99 stru10::CalcPolygonBoundingBox(pFace, a2a); | |
100 v7 = pFace->uAttributes; | |
101 if ( v7 & 0x100 ) | |
102 { | |
103 v63 = a2a[0].vWorldPosition.x; | |
104 v59 = a2a[2].vWorldPosition.x; | |
105 v61 = a2a[1].vWorldPosition.y; | |
106 v64 = a2a[3].vWorldPosition.y; | |
107 goto LABEL_10; | |
108 } | |
109 if ( v7 & 0x200 ) | |
110 { | |
111 v63 = a2a[0].vWorldPosition.x; | |
112 v59 = a2a[2].vWorldPosition.x; | |
113 } | |
114 else | |
115 { | |
116 if ( !(v7 & 0x400) ) | |
117 goto LABEL_10; | |
118 v61 = a2a[0].vWorldPosition.y; | |
119 v64 = a2a[2].vWorldPosition.y; | |
120 } | |
121 v62 = a2a[1].vWorldPosition.z; | |
122 v60 = a2a[3].vWorldPosition.z; | |
123 LABEL_10: | |
124 if ( v7 & 0x100 ) | |
125 { | |
126 v8 = -1; | |
127 a1a = 3.4028235e38; | |
128 v9 = 0; | |
129 if ( a3 > 0 ) | |
130 { | |
131 v10 = a2; | |
132 do | |
133 { | |
134 if ( v10->vWorldPosition.x <= (double)v63 ) | |
135 v11 = v63 - v10->vWorldPosition.x; | |
136 else | |
137 v11 = v10->vWorldPosition.x - v63; | |
138 if ( v11 < a1a ) | |
139 { | |
140 a1a = v11; | |
141 v8 = v9; | |
142 } | |
143 ++v9; | |
144 ++v10; | |
145 } | |
146 while ( v9 < a3 ); | |
147 } | |
148 v12 = a4; | |
149 a1b = 3.4028235e38; | |
150 memcpy(a4, &a2[v8], 0x30u); | |
151 v13 = -1; | |
152 v14 = 0; | |
153 if ( a3 > 0 ) | |
154 { | |
155 v15 = a2; | |
156 do | |
157 { | |
158 if ( v15->vWorldPosition.x <= (double)v59 ) | |
159 v16 = v59 - v15->vWorldPosition.x; | |
160 else | |
161 v16 = v15->vWorldPosition.x - v59; | |
162 if ( v16 < a1b ) | |
163 { | |
164 a1b = v16; | |
165 v13 = v14; | |
166 } | |
167 ++v14; | |
168 ++v15; | |
169 } | |
170 while ( v14 < a3 ); | |
171 } | |
172 a1c = 3.4028235e38; | |
173 memcpy(&a4[2], &a2[v13], sizeof(a4[2])); | |
174 v17 = -1; | |
175 v18 = 0; | |
176 if ( a3 > 0 ) | |
177 { | |
178 v19 = (char *)&a2->vWorldPosition.y; | |
179 do | |
180 { | |
181 if ( *(float *)v19 <= (double)v61 ) | |
182 v20 = v61 - *(float *)v19; | |
183 else | |
184 v20 = *(float *)v19 - v61; | |
185 if ( v20 < a1c ) | |
186 { | |
187 a1c = v20; | |
188 v17 = v18; | |
189 } | |
190 ++v18; | |
191 v19 += 48; | |
192 } | |
193 while ( v18 < a3 ); | |
194 } | |
195 a1d = 3.4028235e38; | |
196 memcpy(&a4[1], &a2[v17], sizeof(a4[1])); | |
197 v21 = -1; | |
198 v22 = 0; | |
199 if ( a3 > 0 ) | |
200 { | |
201 v23 = (char *)&a2->vWorldPosition.y; | |
202 do | |
203 { | |
204 if ( *(float *)v23 <= (double)v64 ) | |
205 v24 = v64 - *(float *)v23; | |
206 else | |
207 v24 = *(float *)v23 - v64; | |
208 if ( v24 < a1d ) | |
209 { | |
210 a1d = v24; | |
211 v21 = v22; | |
212 } | |
213 ++v22; | |
214 v23 += 48; | |
215 } | |
216 while ( v22 < a3 ); | |
217 } | |
218 LABEL_77: | |
219 v40 = &a2[v21]; | |
220 goto LABEL_115; | |
221 } | |
222 if ( v7 & 0x200 ) | |
223 { | |
224 v25 = -1; | |
225 a1e = 3.4028235e38; | |
226 v26 = 0; | |
227 if ( a3 > 0 ) | |
228 { | |
229 v27 = a2; | |
230 do | |
231 { | |
232 if ( v27->vWorldPosition.x <= (double)v63 ) | |
233 v28 = v63 - v27->vWorldPosition.x; | |
234 else | |
235 v28 = v27->vWorldPosition.x - v63; | |
236 if ( v28 < a1e ) | |
237 { | |
238 a1e = v28; | |
239 v25 = v26; | |
240 } | |
241 ++v26; | |
242 ++v27; | |
243 } | |
244 while ( v26 < a3 ); | |
245 } | |
246 v12 = a4; | |
247 a1f = 3.4028235e38; | |
248 memcpy(a4, &a2[v25], 0x30u); | |
249 v29 = -1; | |
250 v30 = 0; | |
251 if ( a3 > 0 ) | |
252 { | |
253 v31 = a2; | |
254 do | |
255 { | |
256 if ( v31->vWorldPosition.x <= (double)v59 ) | |
257 v32 = v59 - v31->vWorldPosition.x; | |
258 else | |
259 v32 = v31->vWorldPosition.x - v59; | |
260 if ( v32 < a1f ) | |
261 { | |
262 a1f = v32; | |
263 v29 = v30; | |
264 } | |
265 ++v30; | |
266 ++v31; | |
267 } | |
268 while ( v30 < a3 ); | |
269 } | |
270 a1g = 3.4028235e38; | |
271 memcpy(&a4[2], &a2[v29], sizeof(a4[2])); | |
272 v33 = -1; | |
273 v34 = 0; | |
274 if ( a3 > 0 ) | |
275 { | |
276 v35 = (char *)&a2->vWorldPosition.z; | |
277 do | |
278 { | |
279 if ( *(float *)v35 <= (double)v62 ) | |
280 v36 = v62 - *(float *)v35; | |
281 else | |
282 v36 = *(float *)v35 - v62; | |
283 if ( v36 < a1g ) | |
284 { | |
285 a1g = v36; | |
286 v33 = v34; | |
287 } | |
288 ++v34; | |
289 v35 += 48; | |
290 } | |
291 while ( v34 < a3 ); | |
292 } | |
293 a1h = 3.4028235e38; | |
294 memcpy(&a4[1], &a2[v33], sizeof(a4[1])); | |
295 v21 = -1; | |
296 v37 = 0; | |
297 if ( a3 > 0 ) | |
298 { | |
299 v38 = (char *)&a2->vWorldPosition.z; | |
300 do | |
301 { | |
302 if ( *(float *)v38 <= (double)v60 ) | |
303 v39 = v60 - *(float *)v38; | |
304 else | |
305 v39 = *(float *)v38 - v60; | |
306 if ( v39 < a1h ) | |
307 { | |
308 a1h = v39; | |
309 v21 = v37; | |
310 } | |
311 ++v37; | |
312 v38 += 48; | |
313 } | |
314 while ( v37 < a3 ); | |
315 } | |
316 goto LABEL_77; | |
317 } | |
318 if ( !(v7 & 0x400) ) | |
319 return; | |
320 v41 = -1; | |
321 a1i = 3.4028235e38; | |
322 v42 = 0; | |
323 if ( a3 > 0 ) | |
324 { | |
325 v43 = (char *)&a2->vWorldPosition.y; | |
326 do | |
327 { | |
328 if ( *(float *)v43 <= (double)v61 ) | |
329 v44 = v61 - *(float *)v43; | |
330 else | |
331 v44 = *(float *)v43 - v61; | |
332 if ( v44 < a1i ) | |
333 { | |
334 a1i = v44; | |
335 v41 = v42; | |
336 } | |
337 ++v42; | |
338 v43 += 48; | |
339 } | |
340 while ( v42 < a3 ); | |
341 } | |
342 v45 = a2; | |
343 v12 = a4; | |
344 a1j = 3.4028235e38; | |
345 memcpy(a4, &a2[v41], 0x30u); | |
346 v46 = -1; | |
347 v47 = 0; | |
348 if ( a3 > 0 ) | |
349 { | |
350 v48 = (char *)&a2->vWorldPosition.y; | |
351 do | |
352 { | |
353 if ( *(float *)v48 <= (double)v64 ) | |
354 v49 = v64 - *(float *)v48; | |
355 else | |
356 v49 = *(float *)v48 - v64; | |
357 if ( v49 < a1j ) | |
358 { | |
359 a1j = v49; | |
360 v46 = v47; | |
361 } | |
362 ++v47; | |
363 v48 += 48; | |
364 } | |
365 while ( v47 < a3 ); | |
366 v45 = a2; | |
367 } | |
368 a1k = 3.4028235e38; | |
369 memcpy(&a4[2], &v45[v46], sizeof(a4[2])); | |
370 v50 = -1; | |
371 v51 = 0; | |
372 if ( a3 > 0 ) | |
373 { | |
374 v52 = (char *)&v45->vWorldPosition.z; | |
375 do | |
376 { | |
377 if ( *(float *)v52 <= (double)v62 ) | |
378 v53 = v62 - *(float *)v52; | |
379 else | |
380 v53 = *(float *)v52 - v62; | |
381 if ( v53 < a1k ) | |
382 { | |
383 a1k = v53; | |
384 v50 = v51; | |
385 } | |
386 ++v51; | |
387 v52 += 48; | |
388 } | |
389 while ( v51 < a3 ); | |
390 v45 = a2; | |
391 } | |
392 a1l = 3.4028235e38; | |
393 memcpy(&a4[1], &v45[v50], sizeof(a4[1])); | |
394 v54 = -1; | |
395 v55 = 0; | |
396 if ( a3 > 0 ) | |
397 { | |
398 v56 = (char *)&v45->vWorldPosition.z; | |
399 do | |
400 { | |
401 if ( *(float *)v56 <= (double)v60 ) | |
402 v57 = v60 - *(float *)v56; | |
403 else | |
404 v57 = *(float *)v56 - v60; | |
405 if ( v57 < a1l ) | |
406 { | |
407 a1l = v57; | |
408 v54 = v55; | |
409 } | |
410 ++v55; | |
411 v56 += 48; | |
412 } | |
413 while ( v55 < a3 ); | |
414 v45 = a2; | |
415 } | |
416 v40 = &v45[v54]; | |
417 LABEL_115: | |
418 memcpy(&v12[3], v40, sizeof(v12[3])); | |
419 } | |
420 | |
421 //----- (0049D379) -------------------------------------------------------- | |
422 void stru10::CalcPolygonBoundingBox(BLVFace *pFace, RenderVertexSoft *pOutVertices) | |
423 { | |
424 struct | |
425 { | |
426 float x; | |
427 float y; | |
428 int c; | |
429 } v46[40]; //[sp+0C]; | |
430 | |
431 if (pFace->uAttributes & 0x0100) | |
432 { | |
433 for (uint i = 0; i < pFace->uNumVertices; ++i) | |
434 { | |
435 v46[i].x = pIndoor->pVertices[pFace->pVertexIDs[i]].x + pFace->pXInterceptDisplacements[i]; | |
436 v46[i].y = pIndoor->pVertices[pFace->pVertexIDs[i]].y + pFace->pYInterceptDisplacements[i]; | |
437 v46[i].c = i; | |
438 } | |
439 } | |
440 if (pFace->uAttributes & 0x0200) | |
441 { | |
442 for (uint i = 0; i < pFace->uNumVertices; ++i) | |
443 { | |
444 v46[i].x = pIndoor->pVertices[pFace->pVertexIDs[i]].x + pFace->pXInterceptDisplacements[i]; | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
445 v46[i].y = pIndoor->pVertices[pFace->pVertexIDs[i]].z + pFace->pZInterceptDisplacements[i]; |
0 | 446 v46[i].c = i; |
447 } | |
448 } | |
449 if (pFace->uAttributes & 0x0400) | |
450 { | |
451 for (uint i = 0; i < pFace->uNumVertices; ++i) | |
452 { | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
453 v46[i].x = pIndoor->pVertices[pFace->pVertexIDs[i]].y + pFace->pYInterceptDisplacements[i]; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
454 v46[i].y = pIndoor->pVertices[pFace->pVertexIDs[i]].z + pFace->pZInterceptDisplacements[i]; |
0 | 455 v46[i].c = i; |
456 } | |
457 } | |
458 | |
459 float x_min = FLT_MAX; | |
460 uint x_min_idx = 0; | |
461 | |
462 float x_max = FLT_MIN; | |
463 uint x_max_idx = 0; | |
464 | |
465 float y_min = FLT_MAX; | |
466 uint y_min_idx = 0; | |
467 | |
468 float y_max = FLT_MIN; | |
469 uint y_max_idx = 0; | |
470 | |
471 for (uint i = 0; i < pFace->uNumVertices; ++i) | |
472 { | |
473 if (v46[i].x < x_min) | |
474 { | |
475 x_min = v46[i].x; | |
476 x_min_idx = v46[i].c; | |
477 } | |
478 if (v46[i].x > x_max) | |
479 { | |
480 x_max = v46[i].x; | |
481 x_max_idx = v46[i].c; | |
482 } | |
483 | |
484 if (v46[i].y < y_min) | |
485 { | |
486 y_min = v46[i].y; | |
487 y_min_idx = v46[i].c; | |
488 } | |
489 if (v46[i].y > y_max) | |
490 { | |
491 y_max = v46[i].y; | |
492 y_max_idx = v46[i].c; | |
493 } | |
494 } | |
495 | |
496 | |
497 | |
498 auto p1 = &pIndoor->pVertices[pFace->pVertexIDs[x_min_idx]]; | |
499 RenderVertexSoft v1; // [sp+30Ch] [bp-54h]@24 | |
500 v1.vWorldPosition.x = (float)p1->x; | |
501 v1.vWorldPosition.y = (float)p1->y; | |
502 v1.vWorldPosition.z = (float)p1->z; | |
503 memcpy(pOutVertices + 0, &v1, sizeof(RenderVertexSoft)); | |
504 | |
505 auto p2 = &pIndoor->pVertices[pFace->pVertexIDs[y_min_idx]]; | |
506 RenderVertexSoft v2; // [sp+30Ch] [bp-54h]@24 | |
507 v2.vWorldPosition.x = (float)p2->x; | |
508 v2.vWorldPosition.y = (float)p2->y; | |
509 v2.vWorldPosition.z = (float)p2->z; | |
510 memcpy(pOutVertices + 1, &v2, sizeof(RenderVertexSoft)); | |
511 | |
512 auto p3 = &pIndoor->pVertices[pFace->pVertexIDs[x_max_idx]]; | |
513 RenderVertexSoft v3; // [sp+30Ch] [bp-54h]@24 | |
514 v3.vWorldPosition.x = (float)p3->x; | |
515 v3.vWorldPosition.y = (float)p3->y; | |
516 v3.vWorldPosition.z = (float)p3->z; | |
517 memcpy(pOutVertices + 2, &v3, sizeof(RenderVertexSoft)); | |
518 | |
519 auto p4 = &pIndoor->pVertices[pFace->pVertexIDs[y_max_idx]]; | |
520 RenderVertexSoft v4; // [sp+30Ch] [bp-54h]@24 | |
521 v4.vWorldPosition.x = (double)p4->x; | |
522 v4.vWorldPosition.y = (double)p4->y; | |
523 v4.vWorldPosition.z = (double)p4->z; | |
524 memcpy(pOutVertices + 3, &v4, sizeof(RenderVertexSoft)); | |
525 } | |
526 | |
527 | |
528 //----- (0049C9E3) -------------------------------------------------------- | |
529 bool stru10::_49C9E3(BLVFace *pFace, RenderVertexSoft *pFaceBounding, unsigned int uNumVertices, RenderVertexSoft *arg0) | |
530 { | |
531 //IndoorCameraD3D *v6; // edi@1 | |
532 //PolygonType v7; // al@1 | |
533 //unsigned int v8; // edx@7 | |
534 //char v10; // zf@10 | |
535 //float v13; // ST14_4@20 | |
536 //stru10 *v15; // ecx@21 | |
537 //RenderVertexSoft *v16; // ST0C_4@21 | |
538 //bool result; // eax@21 | |
539 //float v18; // ST14_4@24 | |
540 //stru10 *v19; // edi@29 | |
541 //float v20; // ST14_4@30 | |
542 //float v21; // ST14_4@30 | |
543 //float v22; // ST14_4@30 | |
544 //float v23; // ST14_4@30 | |
545 //float v24; // ST14_4@31 | |
546 //RenderVertexSoft v25; // [sp+10h] [bp-90h]@24 | |
547 //RenderVertexSoft v26; // [sp+40h] [bp-60h]@20 | |
548 //IndoorCameraD3D *thisa; // [sp+70h] [bp-30h]@1 | |
549 //stru10 *v31; // [sp+84h] [bp-1Ch]@1 | |
550 float v32; // [sp+88h] [bp-18h]@8 | |
551 Vec3_float_ a1; // [sp+8Ch] [bp-14h]@1 | |
552 float v35; // [sp+9Ch] [bp-4h]@8 | |
553 | |
554 //auto a3 = pFace; | |
555 //auto arg4 = pFaceBounding; | |
556 | |
557 //_ESI = a3; | |
558 //v31 = this; | |
559 //v6 = pGame->pIndoorCameraD3D; | |
560 //v7 = a3->uPolygonType; | |
561 | |
562 a1.x = 0.0f; | |
563 a1.y = 0.0f; | |
564 a1.z = 0.0f; | |
565 | |
566 float var_28; | |
567 float var_24; | |
568 if (pFace->uPolygonType == POLYGON_VerticalWall) | |
569 { | |
570 a1.x = -pFace->pFacePlane.vNormal.y; | |
571 a1.y = pFace->pFacePlane.vNormal.x; | |
572 a1.z = 0.0f; | |
573 a1.Normalize(); | |
574 | |
575 var_28 = 0; | |
576 var_24 = 1; | |
577 } | |
578 else if (pFace->uPolygonType == POLYGON_Floor || | |
579 pFace->uPolygonType == POLYGON_Ceiling) | |
580 { | |
581 a1.x = 1; | |
582 a1.y = 0; | |
583 a1.z = 0.0f; | |
584 | |
585 var_28 = 1; | |
586 var_24 = 0; | |
587 } | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
588 else assert(false); |
0 | 589 |
590 | |
591 float arg_4; | |
592 float var_18; | |
593 float var_4; | |
594 float a3; | |
595 float var_8; | |
596 //v8 = _ESI->uAttributes; | |
597 //_ECX = pFaceBounding; | |
598 //__asm { fld 0.5 } | |
599 if (pFace->uAttributes & 0x0100) | |
600 { | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
601 /*arg_4 = ([2].x + [0].x) * flt_4D84F0 |
678
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
602 var_18 = ([3].y + [1].y) * flt_4D84F0 |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
603 |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
604 fld dword ptr [ecx+94h] |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
605 fadd dword ptr [ecx+34h] |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
606 fmul st, st(1) |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
607 fstp [ebp+var_18] |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
608 fld dword ptr [ecx+68h] |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
609 fadd dword ptr [ecx+8] |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
610 fmul st, st(1) |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
611 fstp [ebp+var_4] |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
612 fld [ebp+arg4] |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
613 fsub dword ptr [ecx] |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
614 fstp [ebp+a3] |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
615 fld [ebp+var_18] |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
616 fsub dword ptr [ecx+34h] |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
617 fstp [ebp+var_8]*/ |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
618 |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
619 |
0 | 620 arg_4 = (pFaceBounding[0].vWorldPosition.x + pFaceBounding[2].vWorldPosition.x) / 2; |
621 var_18 = (pFaceBounding[3].vWorldPosition.y + pFaceBounding[1].vWorldPosition.y) / 2; | |
622 var_4 = (pFaceBounding[0].vWorldPosition.z + pFaceBounding[2].vWorldPosition.z) / 2; | |
623 | |
624 a3 = arg_4 - pFaceBounding[0].vWorldPosition.x; | |
625 var_8 = var_18 - pFaceBounding[1].vWorldPosition.y; | |
626 } | |
627 if (pFace->uAttributes & 0x0200) | |
628 { | |
629 arg_4 = (pFaceBounding[0].vWorldPosition.x + pFaceBounding[2].vWorldPosition.x) / 2; | |
630 var_18 = (pFaceBounding[0].vWorldPosition.y + pFaceBounding[2].vWorldPosition.y) / 2; | |
631 var_4 = (pFaceBounding[1].vWorldPosition.z + pFaceBounding[3].vWorldPosition.z) / 2; | |
632 | |
633 a3 = arg_4 - pFaceBounding[0].vWorldPosition.x; | |
634 var_8 = var_4 - pFaceBounding[1].vWorldPosition.z; | |
635 | |
636 if (pFace->uPolygonType == POLYGON_VerticalWall) | |
637 a3 /= a1.x; | |
638 } | |
639 if (pFace->uAttributes & 0x0400) | |
640 { | |
641 arg_4 = (pFaceBounding[0].vWorldPosition.x + pFaceBounding[2].vWorldPosition.x) / 2; | |
642 var_18 = (pFaceBounding[0].vWorldPosition.y + pFaceBounding[2].vWorldPosition.y) / 2; | |
643 var_4 = (pFaceBounding[1].vWorldPosition.z + pFaceBounding[3].vWorldPosition.z) / 2; | |
644 | |
645 a3 = var_18 - pFaceBounding[0].vWorldPosition.y; | |
646 var_8 = var_4 - pFaceBounding[1].vWorldPosition.z; | |
647 // [0.5] | |
648 if (pFace->uPolygonType == POLYGON_VerticalWall) | |
649 { | |
650 if (a1.x != 1.0f) | |
651 a3 /= a1.y; | |
652 } | |
653 } | |
654 | |
655 | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
656 if ( byte_4D864C && pGame->uFlags & GAME_FLAGS_1_DRAW_BLV_DEBUGS) |
0 | 657 { |
658 RenderVertexSoft v26; // [sp+40h] [bp-60h]@20 | |
659 v26.vWorldPosition.x = arg_4; | |
660 v26.vWorldPosition.y = v32; | |
661 v26.vWorldPosition.z = v35; | |
662 | |
663 pGame->pIndoorCameraD3D->do_draw_debug_line_sw(pFaceBounding, 0xFF00u, &v26, 0xFF0000u, 0, 0); | |
664 } | |
665 | |
666 //_EBX = arg0; | |
667 //v15 = v31; | |
668 //v16 = arg0; | |
678
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
669 //float var_20 = var_8 * var_24; |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
670 //var_8 = a3 * a1.z; |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
671 //float arg_0 = var_8 + var_4; |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
672 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
673 /* |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
674 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
675 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
676 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
677 .text:0049CBB3 fld [ebp+var_8] 0 var8 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
678 .text:0049CBB6 1 fmul ds:flt_4D84E8 0 var8 * flt_4D84E8 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
679 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
680 .text:0049CBBC 1 fld [ebp+var_8] 0 var8 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
681 1 var8 * flt_4D84E8 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
682 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
683 .text:0049CBBF 2 fmul [ebp+var_28] 0 var8 * var28 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
684 1 var8 * flt_4D84E8 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
685 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
686 .text:0049CBC2 2 fld [ebp+var_8] 0 var8 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
687 1 var8 * var28 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
688 2 var8 * flt_4D84E8 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
689 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
690 .text:0049CBC5 3 fmul [ebp+var_24] 0 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
691 1 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
692 2 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
693 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
694 .text:0049CBD5 3 fst [ebp+var_20] 0 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
695 1 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
696 2 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
697 [var20] var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
698 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
699 .text:0049CBD8 3 fld [ebp+a3] 0 a3 -1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
700 1 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
701 2 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
702 3 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
703 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
704 .text:0049CBDB 4 fmul [ebp+a1.x] 0 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
705 1 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
706 2 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
707 3 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
708 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
709 .text:0049CBDE 4 fld [ebp+a3] 0 a3 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
710 1 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
711 2 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
712 3 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
713 4 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
714 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
715 .text:0049CBE1 5 fmul [ebp+a1.y] 0 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
716 1 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
717 2 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
718 3 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
719 4 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
720 .text:0049CBE4 5 fld [ebp+a3] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
721 .text:0049CBE7 6 fmul [ebp+a1.z] 0 a3 * a1.z 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
722 1 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
723 2 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
724 3 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
725 4 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
726 5 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
727 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
728 .text:0049CBEC 6 fstp [ebp+var_8] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
729 var8 <- a3 * a1.z 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
730 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
731 .text:0049CBEF 5 fld [ebp+arg4] 0 arg4 -1700 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
732 1 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
733 2 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
734 3 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
735 4 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
736 5 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
737 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
738 .text:0049CBF2 6 fsub st, st(2) 0 arg4 - a3 * a1.x -3684 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
739 1 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
740 2 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
741 3 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
742 4 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
743 5 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
744 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
745 .text:0049CBF4 6 fld st 0 arg4 - a3 * a1.x -3684 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
746 1 arg4 - a3 * a1.x -3684 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
747 2 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
748 3 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
749 4 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
750 5 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
751 6 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
752 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
753 .text:0049CBF6 7 fadd st, st(6) 0 arg4 - a3 * a1.x + var8 * flt_4D84E8 -3684 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
754 1 arg4 - a3 * a1.x -3684 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
755 2 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
756 3 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
757 4 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
758 5 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
759 6 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
760 .text:0049CBF8 7 fstp dword ptr [ebx] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
761 [0].x <- arg4 - a3 * a1.x + var8 * flt_4D84E8 -3684 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
762 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
763 .text:0049CBFA 6 fld [ebp+var_18] 0 var18 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
764 1 arg4 - a3 * a1.x -3684 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
765 2 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
766 3 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
767 4 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
768 5 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
769 6 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
770 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
771 .text:0049CBFD 7 fsub st, st(2) 0 var18 - a3 * a1.y 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
772 1 arg4 - a3 * a1.x -3684 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
773 2 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
774 3 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
775 4 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
776 5 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
777 6 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
778 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
779 .text:0049CBFF 7 fld st 0 var18 - a3 * a1.y 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
780 1 var18 - a3 * a1.y 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
781 2 arg4 - a3 * a1.x -3684 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
782 3 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
783 4 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
784 5 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
785 6 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
786 7 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
787 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
788 .text:0049CC01 8 fadd st, st(6) 0 var18 - a3 * a1.y + var8 * var28 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
789 1 var18 - a3 * a1.y 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
790 2 arg4 - a3 * a1.x -3684 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
791 3 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
792 4 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
793 5 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
794 6 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
795 7 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
796 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
797 .text:0049CC03 8 fstp dword ptr [ebx+4] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
798 [0].y <- var18 - a3 * a1.y + var8 * var28 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
799 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
800 .text:0049CC06 7 fld [ebp+var_4] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
801 .text:0049CC09 8 fsub [ebp+var_8] 0 var4 - a3 * a1.z 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
802 1 var18 - a3 * a1.y 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
803 2 arg4 - a3 * a1.x -3684 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
804 3 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
805 4 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
806 5 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
807 6 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
808 7 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
809 .text:0049CC0C 8 fst [ebp+a3] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
810 a3 <- var4 - a3 * a1.z 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
811 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
812 .text:0049CC0F 8 fadd st, st(5) |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
813 .text:0049CC11 8 fstp dword ptr [ebx+8] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
814 [0].z <- var4 - a3 * a1.z + var8 * var24 1536 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
815 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
816 0 var18 - a3 * a1.y 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
817 1 arg4 - a3 * a1.x -3684 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
818 2 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
819 3 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
820 4 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
821 5 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
822 6 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
823 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
824 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
825 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
826 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
827 [var20] var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
828 [var8] a3 * a1.z |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
829 [a3] var4 - a3 * a1.z 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
830 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
831 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
832 .text:0049CC14 7 fld st(1) |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
833 .text:0049CC16 8 fsub st, st(7) 0 arg4 - a3 * a1.x - var8 * flt_4D84E8 -3684 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
834 1 var18 - a3 * a1.y 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
835 2 arg4 - a3 * a1.x -3684 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
836 3 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
837 4 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
838 5 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
839 6 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
840 7 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
841 .text:0049CC18 8 fstp dword ptr [ebx+30h] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
842 [1].x <- arg4 - a3 * a1.x - var8 * flt_4D84E8 -3684 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
843 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
844 0 var18 - a3 * a1.y 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
845 1 arg4 - a3 * a1.x -3684 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
846 2 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
847 3 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
848 4 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
849 5 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
850 6 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
851 .text:0049CC1B 7 fsub st, st(5) |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
852 .text:0049CC1D 7 fstp dword ptr [ebx+34h] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
853 [1].y <- var18 - a3 * a1.y - var8 * var28 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
854 .text:0049CC20 6 fstp st |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
855 0 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
856 1 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
857 2 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
858 3 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
859 4 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
860 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
861 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
862 [var20] var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
863 [var8] a3 * a1.z |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
864 [a3] var4 - a3 * a1.z 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
865 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
866 .text:0049CC22 5 fld [ebp+a3] 0 var4 - a3 * a1.z 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
867 1 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
868 2 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
869 3 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
870 4 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
871 5 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
872 .text:0049CC25 6 fsub st, st(3) |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
873 .text:0049CC27 6 fstp dword ptr [ebx+38h] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
874 [1].z <- var4 - a3 * a1.z - var8 * var24 768 - 768 = 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
875 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
876 0 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
877 1 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
878 2 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
879 3 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
880 4 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
881 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
882 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
883 .text:0049CC2A fld st(1) |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
884 .text:0049CC2C 6 fadd [ebp+arg4] 0 arg4 + a3 * a1.x 284 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
885 1 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
886 2 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
887 3 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
888 4 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
889 5 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
890 .text:0049CC2F 6 fst [ebp+a3] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
891 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
892 [var20] var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
893 [var8] a3 * a1.z |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
894 [a3] arg4 + a3 * a1.x 284 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
895 .text:0049CC32 6 fsub st, st(5) |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
896 .text:0049CC34 6 fstp dword ptr [ebx+60h] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
897 [2].x <- arg4 + a3 * a1.x - var8 * flt_4D84E8 284 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
898 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
899 0 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
900 1 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
901 2 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
902 3 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
903 4 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
904 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
905 .text:0049CC37 5 fadd [ebp+var_18] 0 var18 + a3 * a1.y 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
906 1 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
907 2 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
908 3 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
909 4 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
910 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
911 .text:0049CC3A 5 fstp st(2) 0 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
912 1 var18 + a3 * a1.y 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
913 2 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
914 3 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
915 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
916 .text:0049CC3C 4 fstp st 0 var18 + a3 * a1.y 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
917 1 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
918 2 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
919 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
920 .text:0049CC3E 3 fld st 0 var18 + a3 * a1.y 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
921 1 var18 + a3 * a1.y 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
922 2 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
923 3 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
924 .text:0049CC40 4 fsub st, st(2) |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
925 .text:0049CC42 4 fstp dword ptr [ebx+64h] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
926 [2].y <- var18 + a3 * a1.y - var8 * var28 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
927 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
928 0 var18 + a3 * a1.y 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
929 1 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
930 2 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
931 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
932 [var20] var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
933 [var8] a3 * a1.z |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
934 [a3] arg4 + a3 * a1.x 284 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
935 .text:0049CC45 3 fld [ebp+var_8] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
936 .text:0049CC48 4 fadd [ebp+var_4] 0 var4 + a3 * a1.z 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
937 1 var18 + a3 * a1.y 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
938 2 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
939 3 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
940 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
941 .text:0049CC4B 4 fst [ebp+arg0] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
942 [var20] var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
943 [arg0] var4 + a3 * a1.z 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
944 [var8] a3 * a1.z 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
945 [a3] arg4 + a3 * a1.x 284 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
946 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
947 .text:0049CC4E 4 fsub [ebp+var_20] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
948 .text:0049CC51 4 fstp dword ptr [ebx+68h] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
949 [2].z <- var4 + a3 * a1.z - var8 * var24 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
950 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
951 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
952 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
953 [var20] var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
954 [arg0] var4 + a3 * a1.z 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
955 [var8] a3 * a1.z 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
956 [a3] arg4 + a3 * a1.x 284 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
957 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
958 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
959 0 var18 + a3 * a1.y 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
960 1 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
961 2 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
962 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
963 .text:0049CC54 3 fld [ebp+a3] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
964 .text:0049CC57 4 fadd st, st(3) |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
965 .text:0049CC59 4 fstp dword ptr [ebx+90h] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
966 [3].x <- arg4 + a3 * a1.x + var8 * flt_4D84E8 284 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
967 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
968 .text:0049CC5F 3 fadd st, st(1) |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
969 .text:0049CC61 3 fstp dword ptr [ebx+94h] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
970 [3].y <- var18 + a3 * a1.y + var8 * var28 1480 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
971 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
972 .text:0049CC67 2 fstp st |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
973 .text:0049CC69 1 fstp st |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
974 0 empty |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
975 .text:0049CC6B 0 fld [ebp+arg0] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
976 .text:0049CC6E 1 fadd [ebp+var_20] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
977 .text:0049CC71 1 fstp dword ptr [ebx+98h] |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
978 [3].z <- var4 + a3 * a1.z + var8 * var24 1536 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
979 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
980 0 empty |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
981 */ |
0 | 982 |
983 arg0[0].vWorldPosition.x = arg_4 - a3 * a1.x + var_8 * flt_4D84E8; | |
984 arg0[0].vWorldPosition.y = var_18 - a3 * a1.y + var_8 * var_28; | |
678
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
985 arg0[0].vWorldPosition.z = var_4 - a3 * a1.z + var_8 * var_24; |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
986 |
0 | 987 arg0[1].vWorldPosition.x = arg_4 - a3 * a1.x - var_8 * flt_4D84E8; |
988 arg0[1].vWorldPosition.y = var_18 - a3 * a1.y - var_8 * var_28; | |
678
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
989 arg0[1].vWorldPosition.z = var_4 - a3 * a1.z - var_8 * var_24; |
0 | 990 |
678
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
991 arg0[2].vWorldPosition.x = arg_4 + a3 * a1.x - var_8 * flt_4D84E8; |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
992 arg0[2].vWorldPosition.y = var_18 + a3 * a1.y - var_8 * var_28; |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
993 arg0[2].vWorldPosition.z = var_4 + a3 * a1.z - var_8 * var_24; |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
994 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
995 arg0[3].vWorldPosition.x = arg_4 + a3 * a1.x + var_8 * flt_4D84E8; |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
996 arg0[3].vWorldPosition.y = var_18 + a3 * a1.y + var_8 * var_28; |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
997 arg0[3].vWorldPosition.z = var_4 + a3 * a1.z + var_8 * var_24; |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
998 |
0 | 999 |
1000 a1.x = 0.0f; | |
1001 a1.y = 0.0f; | |
1002 a1.z = 0.0f; | |
678
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
1003 a3 = arg_4 + a3 * a1.x; |
0 | 1004 |
1005 if (!_49C8DC(arg0, &a1, &a3)) | |
1006 return false; | |
1007 | |
1008 | |
1009 if ( byte_4D864C ) | |
1010 { | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1011 if ( pGame->uFlags & GAME_FLAGS_1_DRAW_BLV_DEBUGS) |
0 | 1012 { |
1013 RenderVertexSoft v25; // [sp+10h] [bp-90h]@20 | |
1014 RenderVertexSoft v26; // [sp+40h] [bp-60h]@20 | |
1015 | |
1016 v25.vWorldPosition.x = arg_4; | |
1017 v25.vWorldPosition.y = v32; | |
1018 v25.vWorldPosition.z = v35; | |
1019 | |
1020 v26.vWorldPosition.x = a1.x * 30.0f; | |
1021 v26.vWorldPosition.y = a1.y * 30.0f; | |
1022 v26.vWorldPosition.z = a1.z * 30.0f; | |
1023 | |
1024 pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v25, 0xFFFFFFFFu, &v26, 0xFFFF00u, 0, 0); | |
1025 } | |
1026 } | |
1027 | |
1028 | |
1029 RenderVertexSoft v25; // [sp+10h] [bp-90h]@20 | |
1030 memcpy(&v25, arg0, sizeof(RenderVertexSoft)); | |
1031 | |
1032 float _dp = (v25.vWorldPosition.x - pBLVRenderParams->vPartyPos.x) * a1.x + | |
1033 (v25.vWorldPosition.y - pBLVRenderParams->vPartyPos.y) * a1.y + | |
1034 (v25.vWorldPosition.z - pBLVRenderParams->vPartyPos.z) * a1.z; | |
1035 if (fabs(_dp) < 1e-6f) | |
1036 { | |
1037 memcpy(&v25, arg0 + 1, sizeof(RenderVertexSoft)); | |
1038 memcpy(arg0 + 1, arg0 + 3, sizeof(RenderVertexSoft)); | |
1039 memcpy(arg0 + 3, &v25, sizeof(RenderVertexSoft)); | |
1040 } | |
1041 | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1042 if ( byte_4D864C && pGame->uFlags & GAME_FLAGS_1_DRAW_BLV_DEBUGS) |
0 | 1043 { |
1044 RenderVertexSoft v26; // [sp+40h] [bp-60h]@20 | |
1045 if ( !LOBYTE(field_4) ) | |
1046 { | |
1047 v26.vWorldPosition.x = pParty->vPosition.x; | |
1048 v26.vWorldPosition.y = pParty->vPosition.y; | |
1049 v26.vWorldPosition.z = pParty->vPosition.z + pParty->sEyelevel; | |
1050 | |
1051 pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFF0000u, arg0, 0xFF0000u, 0, 0); | |
1052 pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFF00u, arg0 + 1, 0xFF00u, 0, 0); | |
1053 pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFFu, arg0 + 2, 0xFFu, 0, 0); | |
1054 pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFFFFFFu, arg0 + 3, 0xFFFFFFu, 0, 0); | |
1055 LOBYTE(field_4) = 1; | |
1056 } | |
1057 pGame->pIndoorCameraD3D->debug_outline_sw(arg0, uNumVertices, 0x1EFF1Eu, 0.00019999999); | |
1058 } | |
1059 return true; | |
1060 } | |
1061 | |
1062 | |
1063 | |
1064 //----- (0049C5B0) -------------------------------------------------------- | |
1065 stru10::stru10() | |
1066 { | |
1067 LOBYTE(this->field_4) = 0; | |
1068 } | |
1069 | |
1070 //----- (0049C5BD) -------------------------------------------------------- | |
1071 stru10::~stru10() | |
1072 { | |
1073 } | |
1074 | |
1075 //----- (0049C5DA) -------------------------------------------------------- | |
1076 char stru10::_49C5DA(BLVFace *a2, RenderVertexSoft *a3, int *a4, IndoorCameraD3D_Vec4 *a5, RenderVertexSoft *a6) | |
1077 { | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1078 //stru10 *v6; // edi@1 |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1079 //char *v7; // eax@1 |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1080 //signed int v8; // ecx@1 |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1081 //IndoorCameraD3D *v9; // esi@3 |
0 | 1082 char result; // al@6 |
1083 RenderVertexSoft a4a[4]; // [sp+Ch] [bp-C0h]@1 | |
1084 | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1085 /*v6 = this; |
0 | 1086 v7 = (char *)&a4a[0].flt_2C; |
1087 v8 = 4; | |
1088 do | |
1089 { | |
1090 *(float *)v7 = 0.0; | |
1091 v7 += 48; | |
1092 --v8; | |
1093 } | |
1094 while ( v8 ); | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1095 v9 = pGame->pIndoorCameraD3D;*/ |
0 | 1096 _49CE9E(a2, a3, *a4, a4a); |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1097 if ( byte_4D864C && pGame->uFlags & GAME_FLAGS_1_DRAW_BLV_DEBUGS) |
0 | 1098 pGame->pIndoorCameraD3D->debug_outline_sw(a4a, 4u, 0xFF1E1Eu, 0.000099999997); |
1099 result = _49C9E3(a2, a4a, 4u, a6); | |
1100 if ( result ) | |
1101 result = _49C720(a6, a5); | |
1102 return result; | |
1103 } | |
1104 // 4D864C: using guessed type char byte_4D864C; | |
1105 | |
1106 //----- (0049C681) -------------------------------------------------------- | |
1107 char stru10::_49C681_DrawDebugStuff(BLVFace *pFace, IndoorCameraD3D_Vec4 *a3, RenderVertexSoft *pArrayOf4) | |
1108 { | |
1109 RenderVertexSoft pBounding[4]; // [sp+Ch] [bp-C0h]@1 | |
1110 | |
1111 CalcPolygonBoundingBox(pFace, pBounding); | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1112 if ( byte_4D864C && pGame->uFlags & GAME_FLAGS_1_DRAW_BLV_DEBUGS) |
0 | 1113 pGame->pIndoorCameraD3D->debug_outline_sw(pBounding, 4, 0xFF1E1E, 0.000099999997); |
1114 if (_49C9E3(pFace, pBounding, 4, pArrayOf4)) | |
1115 return _49C720(pArrayOf4, a3); | |
1116 return false; | |
1117 } | |
1118 // 4D864C: using guessed type char byte_4D864C; | |
1119 | |
1120 //----- (0049C720) -------------------------------------------------------- | |
1121 char stru10::_49C720(RenderVertexSoft *a2, IndoorCameraD3D_Vec4 *a4) | |
1122 { | |
1123 char result; // al@2 | |
1124 Vec3_float_ a3; // [sp+4h] [bp-34h]@1 | |
1125 float v5; // [sp+30h] [bp-8h]@1 | |
1126 stru10 *thisa; // [sp+34h] [bp-4h]@1 | |
1127 | |
1128 v5 = 0.0; | |
1129 a3.x = (double)pBLVRenderParams->vPartyPos.x; | |
1130 a3.y = (double)pBLVRenderParams->vPartyPos.y; | |
1131 thisa = this; | |
1132 a3.z = (double)pBLVRenderParams->vPartyPos.z; | |
1133 if ( _49C7C5(a2, a2 + 1, &a3, a4) | |
1134 && _49C7C5(a2 + 1, a2 + 2, &a3, a4 + 1) | |
1135 && _49C7C5(a2 + 2, a2 + 3, &a3, a4 + 2) ) | |
1136 result = _49C7C5(a2 + 3, a2, &a3, a4 + 3) != 0; | |
1137 else | |
1138 result = 0; | |
1139 return result; | |
1140 } | |
1141 | |
1142 //----- (0049C7C5) -------------------------------------------------------- | |
1143 bool stru10::_49C7C5(RenderVertexSoft *a1, RenderVertexSoft *a2, Vec3_float_ *a3, IndoorCameraD3D_Vec4 *a4) | |
1144 { | |
1145 double v5; // st7@1 | |
1146 double v6; // st6@1 | |
1147 double v7; // st5@1 | |
1148 Vec3_float_ *result; // eax@1 | |
1149 __int16 v9; // fps@3 | |
1150 char v10; // c0@3 | |
1151 char v11; // c2@3 | |
1152 char v12; // c3@3 | |
1153 float v13; // ecx@5 | |
1154 double v14; // st7@5 | |
1155 double v15; // st6@5 | |
1156 Vec3_float_ v1; // [sp+4h] [bp-48h]@1 | |
1157 Vec3_float_ v2; // [sp+10h] [bp-3Ch]@1 | |
1158 float v18; // [sp+20h] [bp-2Ch]@1 | |
1159 float v19; // [sp+24h] [bp-28h]@1 | |
1160 Vec3_float_ v20; // [sp+28h] [bp-24h]@1 | |
1161 Vec3_float_ v21; // [sp+34h] [bp-18h]@1 | |
1162 Vec3_float_ a1a; // [sp+40h] [bp-Ch]@1 | |
1163 | |
1164 a1a.x = 0.0; | |
1165 a1a.y = 0.0; | |
1166 a1a.z = 0.0; | |
1167 v21.x = a3->x; | |
1168 v21.y = a3->y; | |
1169 v21.z = a3->z; | |
1170 v5 = a1->vWorldPosition.x; | |
1171 v6 = a1->vWorldPosition.y; | |
1172 v2.z = a1->vWorldPosition.z; | |
1173 v7 = a2->vWorldPosition.x; | |
1174 v18 = a2->vWorldPosition.y; | |
1175 v19 = a2->vWorldPosition.z; | |
1176 v20.x = v5 - v21.x; | |
1177 v20.y = v6 - v21.y; | |
1178 v20.z = v2.z - v21.z; | |
1179 LODWORD(v1.x) = (int)v20.x; | |
1180 v1.y = v20.y; | |
1181 v1.z = v20.z; | |
1182 v20.x = v7 - v5; | |
1183 v20.y = v18 - v6; | |
1184 v20.z = v19 - v2.z; | |
1185 result = Vec3_float_::Cross(&v1, &v2, v20.x, v20.y, v20.z); | |
1186 a1a.x = result->x; | |
1187 a1a.y = result->y; | |
1188 a1a.z = result->z; | |
1189 if ( a1a.x != 0.0 | |
1190 || a1a.y != 0.0 | |
1191 || (/*UNDEF(v9),*/ v10 = a1a.z < 0.0, v11 = 0, v12 = a1a.z == 0.0, BYTE1(result) = HIBYTE(v9), a1a.z != 0.0) ) | |
1192 { | |
1193 a1a.Normalize(); | |
1194 result = (Vec3_float_ *)a4; | |
1195 v13 = a1a.y; | |
1196 a4->x = a1a.x; | |
1197 v14 = v21.z * a1a.z; | |
1198 v15 = v21.y * a1a.y; | |
1199 a4->y = v13; | |
1200 a4->z = a1a.z; | |
1201 a4->dot = v14 + v15 + v21.x * a1a.x; | |
1202 LOBYTE(result) = 1; | |
1203 } | |
1204 else | |
1205 { | |
1206 LOBYTE(result) = 0; | |
1207 } | |
1208 return (bool)result; | |
1209 } | |
1210 | |
1211 //----- (0049C8DC) -------------------------------------------------------- | |
1212 bool stru10::_49C8DC(RenderVertexSoft *arg0, Vec3_float_ *a2, float *a3) | |
1213 { | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1214 //double v4; // st7@1 |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1215 //double v5; // st6@1 |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1216 //double v6; // st5@1 |
0 | 1217 Vec3_float_ *result; // eax@1 |
1218 __int16 v8; // fps@3 | |
1219 char v9; // c0@3 | |
1220 char v10; // c2@3 | |
1221 char v11; // c3@3 | |
1222 float v12; // ecx@5 | |
1223 double v13; // st7@5 | |
1224 double v14; // st6@5 | |
1225 Vec3_float_ v1; // [sp+8h] [bp-3Ch]@1 | |
1226 Vec3_float_ v2; // [sp+14h] [bp-30h]@1 | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1227 //float v17; // [sp+24h] [bp-20h]@1 |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1228 //float v18; // [sp+28h] [bp-1Ch]@1 |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1229 //float v19; // [sp+2Ch] [bp-18h]@1 |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1230 //float v20; // [sp+30h] [bp-14h]@1 |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1231 //float v21; // [sp+34h] [bp-10h]@1 |
0 | 1232 Vec3_float_ a1; // [sp+38h] [bp-Ch]@1 |
1233 | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1234 //v19 = arg0->vWorldPosition.x; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1235 //v20 = arg0->vWorldPosition.y; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1236 //v21 = arg0->vWorldPosition.z; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1237 //v4 = arg0[1].vWorldPosition.x; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1238 //v5 = arg0[1].vWorldPosition.y; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1239 //v2.z = arg0[1].vWorldPosition.z; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1240 //v6 = arg0[2].vWorldPosition.x; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1241 //v17 = arg0[2].vWorldPosition.y; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1242 //v18 = arg0[2].vWorldPosition.z; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1243 //a1.x = v4 - v19; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1244 //a1.y = v5 - v20; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1245 //a1.z = v2.z - v21; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1246 v1.x = arg0[1].vWorldPosition.x - arg0[0].vWorldPosition.x; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1247 v1.y = arg0[1].vWorldPosition.y - arg0[0].vWorldPosition.y; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1248 v1.z = arg0[1].vWorldPosition.z - arg0[0].vWorldPosition.z; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1249 |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1250 a1.x = arg0[2].vWorldPosition.x - arg0[1].vWorldPosition.x; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1251 a1.y = arg0[2].vWorldPosition.y - arg0[1].vWorldPosition.y; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1252 a1.z = arg0[2].vWorldPosition.z - arg0[1].vWorldPosition.z; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1253 |
0 | 1254 result = Vec3_float_::Cross(&v1, &v2, a1.x, a1.y, a1.z); |
1255 a1.x = result->x; | |
1256 a1.y = result->y; | |
1257 a1.z = result->z; | |
1258 if ( a1.x != 0.0 | |
1259 || a1.y != 0.0 | |
1260 || (/*UNDEF(v8),*/ v9 = a1.z < 0.0, v10 = 0, v11 = a1.z == 0.0, /*BYTE1(result) = HIBYTE(v8),*/ a1.z != 0.0) ) | |
1261 { | |
1262 a1.Normalize(); | |
1263 v12 = a1.y; | |
1264 a2->x = a1.x; | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1265 v13 = arg0[0].vWorldPosition.z * a1.z; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1266 v14 = arg0[0].vWorldPosition.y * a1.y; |
0 | 1267 a2->y = v12; |
1268 a2->z = a1.z; | |
1269 result = (Vec3_float_ *)a3; | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
1270 *a3 = -(v13 + v14 + arg0[0].vWorldPosition.x * a1.x); |
0 | 1271 return true; |
1272 } | |
1273 return false; | |
1274 } |