Mercurial > mm7
annotate stru10.cpp @ 2464:104fdbea0386
cleaning project part 2
author | zipi |
---|---|
date | Sun, 17 Aug 2014 17:49:34 +0100 |
parents | f4af3b203f65 |
children | b054ea5daf45 |
rev | line source |
---|---|
2415 | 1 #define _CRTDBG_MAP_ALLOC |
2 #include <stdlib.h> | |
3 #include <crtdbg.h> | |
4 | |
2253
aff7a7b072b7
adding _CRT_SECURE_NO_WARNINGS to get rid of a few hundrer annoying warnings + adding count parameter to swprintf
Grumpy7
parents:
2092
diff
changeset
|
5 #define _CRT_SECURE_NO_WARNINGS |
0 | 6 #include "stru10.h" |
7 #include "Render.h" | |
8 #include "Indoor.h" | |
9 #include "Game.h" | |
10 #include "Party.h" | |
1545 | 11 #include "ErrorHandling.h" |
0 | 12 |
13 #include "mm7_data.h" | |
14 | |
15 | |
16 | |
795 | 17 int _49CE9E_sub0_x(RenderVertexSoft *pVertices, unsigned int uNumVertices, float test_val) |
18 { | |
19 float max_val = FLT_MAX; | |
20 int idx = -1; | |
21 | |
22 float temp_val; | |
23 for (uint i = 0; i < uNumVertices; ++i) | |
24 { | |
25 if (pVertices[i].vWorldPosition.x <= test_val) | |
26 temp_val = test_val - pVertices[i].vWorldPosition.x; | |
27 else | |
28 temp_val = pVertices[i].vWorldPosition.x - test_val; | |
29 | |
30 if (temp_val < max_val) | |
31 { | |
32 max_val = temp_val; | |
33 idx = i; | |
34 } | |
35 } | |
36 return idx; | |
37 } | |
38 | |
39 | |
40 int _49CE9E_sub0_y(RenderVertexSoft *pVertices, unsigned int uNumVertices, float test_val) | |
41 { | |
42 float max_val = FLT_MAX; | |
43 int idx = -1; | |
44 | |
45 float temp_val; | |
46 for (uint i = 0; i < uNumVertices; ++i) | |
47 { | |
48 if (pVertices[i].vWorldPosition.y <= test_val) | |
49 temp_val = test_val - pVertices[i].vWorldPosition.y; | |
50 else | |
51 temp_val = pVertices[i].vWorldPosition.y - test_val; | |
52 | |
53 if (temp_val < max_val) | |
54 { | |
55 max_val = temp_val; | |
56 idx = i; | |
57 } | |
58 } | |
59 return idx; | |
60 } | |
61 | |
62 | |
63 int _49CE9E_sub0_z(RenderVertexSoft *pVertices, unsigned int uNumVertices, float test_val) | |
64 { | |
65 float max_val = FLT_MAX; | |
66 int idx = -1; | |
67 | |
68 float temp_val; | |
69 for (uint i = 0; i < uNumVertices; ++i) | |
70 { | |
71 if (pVertices[i].vWorldPosition.z <= test_val) | |
72 temp_val = test_val - pVertices[i].vWorldPosition.z; | |
73 else | |
74 temp_val = pVertices[i].vWorldPosition.z - test_val; | |
75 | |
76 if (temp_val < max_val) | |
77 { | |
78 max_val = temp_val; | |
79 idx = i; | |
80 } | |
81 } | |
82 return idx; | |
83 } | |
0 | 84 |
85 //----- (0049CE9E) -------------------------------------------------------- | |
795 | 86 void stru10::_49CE9E(BLVFace *pFace, RenderVertexSoft *pVertices, unsigned int uNumVertices, RenderVertexSoft *pOutLimits) |
0 | 87 { |
1545 | 88 Assert(sizeof(RenderVertexSoft) == 0x30); |
795 | 89 |
90 RenderVertexSoft pLimits[64]; | |
91 stru10::CalcPolygonLimits(pFace, pLimits); | |
0 | 92 |
795 | 93 if (pFace->uAttributes & FACE_XY_PLANE) |
0 | 94 { |
795 | 95 memcpy(&pOutLimits[0], &pVertices[_49CE9E_sub0_x(pVertices, uNumVertices, pLimits[0].vWorldPosition.x)], 0x30); |
96 memcpy(&pOutLimits[2], &pVertices[_49CE9E_sub0_x(pVertices, uNumVertices, pLimits[2].vWorldPosition.x)], 0x30); | |
97 memcpy(&pOutLimits[1], &pVertices[_49CE9E_sub0_y(pVertices, uNumVertices, pLimits[1].vWorldPosition.y)], 0x30); | |
98 memcpy(&pOutLimits[3], &pVertices[_49CE9E_sub0_y(pVertices, uNumVertices, pLimits[3].vWorldPosition.y)], 0x30); | |
0 | 99 } |
795 | 100 else if (pFace->uAttributes & FACE_XZ_PLANE) |
101 { | |
102 memcpy(&pOutLimits[0], &pVertices[_49CE9E_sub0_x(pVertices, uNumVertices, pLimits[0].vWorldPosition.x)], 0x30); | |
103 memcpy(&pOutLimits[2], &pVertices[_49CE9E_sub0_x(pVertices, uNumVertices, pLimits[2].vWorldPosition.x)], 0x30); | |
104 memcpy(&pOutLimits[1], &pVertices[_49CE9E_sub0_z(pVertices, uNumVertices, pLimits[1].vWorldPosition.z)], 0x30); | |
105 memcpy(&pOutLimits[3], &pVertices[_49CE9E_sub0_z(pVertices, uNumVertices, pLimits[3].vWorldPosition.z)], 0x30); | |
106 } | |
107 else if (pFace->uAttributes & FACE_YZ_PLANE) | |
0 | 108 { |
795 | 109 memcpy(&pOutLimits[0], &pVertices[_49CE9E_sub0_y(pVertices, uNumVertices, pLimits[0].vWorldPosition.y)], 0x30); |
110 memcpy(&pOutLimits[2], &pVertices[_49CE9E_sub0_y(pVertices, uNumVertices, pLimits[2].vWorldPosition.y)], 0x30); | |
111 memcpy(&pOutLimits[1], &pVertices[_49CE9E_sub0_z(pVertices, uNumVertices, pLimits[1].vWorldPosition.z)], 0x30); | |
112 memcpy(&pOutLimits[3], &pVertices[_49CE9E_sub0_z(pVertices, uNumVertices, pLimits[3].vWorldPosition.z)], 0x30); | |
0 | 113 } |
114 } | |
115 | |
116 //----- (0049D379) -------------------------------------------------------- | |
794 | 117 void stru10::CalcPolygonLimits(BLVFace *pFace, RenderVertexSoft *pOutVertices) |
0 | 118 { |
119 struct | |
120 { | |
121 float x; | |
122 float y; | |
123 int c; | |
124 } v46[40]; //[sp+0C]; | |
125 | |
2092 | 126 if (pFace->uAttributes & FACE_XY_PLANE) |
0 | 127 { |
128 for (uint i = 0; i < pFace->uNumVertices; ++i) | |
129 { | |
130 v46[i].x = pIndoor->pVertices[pFace->pVertexIDs[i]].x + pFace->pXInterceptDisplacements[i]; | |
131 v46[i].y = pIndoor->pVertices[pFace->pVertexIDs[i]].y + pFace->pYInterceptDisplacements[i]; | |
132 v46[i].c = i; | |
133 } | |
134 } | |
2092 | 135 if (pFace->uAttributes & FACE_XZ_PLANE) |
0 | 136 { |
137 for (uint i = 0; i < pFace->uNumVertices; ++i) | |
138 { | |
139 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
|
140 v46[i].y = pIndoor->pVertices[pFace->pVertexIDs[i]].z + pFace->pZInterceptDisplacements[i]; |
0 | 141 v46[i].c = i; |
142 } | |
143 } | |
2092 | 144 if (pFace->uAttributes & FACE_YZ_PLANE) |
0 | 145 { |
146 for (uint i = 0; i < pFace->uNumVertices; ++i) | |
147 { | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
148 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
|
149 v46[i].y = pIndoor->pVertices[pFace->pVertexIDs[i]].z + pFace->pZInterceptDisplacements[i]; |
0 | 150 v46[i].c = i; |
151 } | |
152 } | |
153 | |
1302 | 154 float x_min = v46[0].x; |
0 | 155 uint x_min_idx = 0; |
156 | |
1302 | 157 float x_max = v46[0].x; |
0 | 158 uint x_max_idx = 0; |
159 | |
1302 | 160 float y_min = v46[0].y; |
0 | 161 uint y_min_idx = 0; |
162 | |
1302 | 163 float y_max = v46[0].y; |
0 | 164 uint y_max_idx = 0; |
165 | |
166 for (uint i = 0; i < pFace->uNumVertices; ++i) | |
167 { | |
168 if (v46[i].x < x_min) | |
169 { | |
170 x_min = v46[i].x; | |
171 x_min_idx = v46[i].c; | |
172 } | |
173 if (v46[i].x > x_max) | |
174 { | |
175 x_max = v46[i].x; | |
176 x_max_idx = v46[i].c; | |
177 } | |
178 | |
179 if (v46[i].y < y_min) | |
180 { | |
181 y_min = v46[i].y; | |
182 y_min_idx = v46[i].c; | |
183 } | |
184 if (v46[i].y > y_max) | |
185 { | |
186 y_max = v46[i].y; | |
187 y_max_idx = v46[i].c; | |
188 } | |
189 } | |
190 | |
1319 | 191 RenderVertexSoft v1; // [sp+30Ch] [bp-54h]@24 |
192 v1.vWorldPosition.x = (float)pIndoor->pVertices[pFace->pVertexIDs[x_min_idx]].x; | |
193 v1.vWorldPosition.y = (float)pIndoor->pVertices[pFace->pVertexIDs[x_min_idx]].y; | |
194 v1.vWorldPosition.z = (float)pIndoor->pVertices[pFace->pVertexIDs[x_min_idx]].z; | |
195 memcpy(&pOutVertices[0], &v1, sizeof(RenderVertexSoft)); | |
0 | 196 |
197 RenderVertexSoft v2; // [sp+30Ch] [bp-54h]@24 | |
1319 | 198 v2.vWorldPosition.x = (float)pIndoor->pVertices[pFace->pVertexIDs[y_min_idx]].x; |
199 v2.vWorldPosition.y = (float)pIndoor->pVertices[pFace->pVertexIDs[y_min_idx]].y; | |
200 v2.vWorldPosition.z = (float)pIndoor->pVertices[pFace->pVertexIDs[y_min_idx]].z; | |
201 memcpy(&pOutVertices[1], &v2, sizeof(RenderVertexSoft)); | |
0 | 202 |
203 RenderVertexSoft v3; // [sp+30Ch] [bp-54h]@24 | |
1319 | 204 v3.vWorldPosition.x = (float)pIndoor->pVertices[pFace->pVertexIDs[x_max_idx]].x; |
205 v3.vWorldPosition.y = (float)pIndoor->pVertices[pFace->pVertexIDs[x_max_idx]].y; | |
206 v3.vWorldPosition.z = (float)pIndoor->pVertices[pFace->pVertexIDs[x_max_idx]].z; | |
207 memcpy(&pOutVertices[2], &v3, sizeof(RenderVertexSoft)); | |
0 | 208 |
209 RenderVertexSoft v4; // [sp+30Ch] [bp-54h]@24 | |
1319 | 210 v4.vWorldPosition.x = (double)pIndoor->pVertices[pFace->pVertexIDs[y_max_idx]].x; |
211 v4.vWorldPosition.y = (double)pIndoor->pVertices[pFace->pVertexIDs[y_max_idx]].y; | |
212 v4.vWorldPosition.z = (double)pIndoor->pVertices[pFace->pVertexIDs[y_max_idx]].z; | |
213 memcpy(&pOutVertices[3], &v4, sizeof(RenderVertexSoft)); | |
0 | 214 } |
215 | |
216 | |
217 //----- (0049C9E3) -------------------------------------------------------- | |
794 | 218 bool stru10::CalcFaceBounding(BLVFace *pFace, RenderVertexSoft *pFaceLimits, unsigned int uNumVertices, RenderVertexSoft *pOutBounding) |
0 | 219 { |
220 //IndoorCameraD3D *v6; // edi@1 | |
221 //PolygonType v7; // al@1 | |
222 //unsigned int v8; // edx@7 | |
223 //char v10; // zf@10 | |
224 //float v13; // ST14_4@20 | |
225 //stru10 *v15; // ecx@21 | |
226 //RenderVertexSoft *v16; // ST0C_4@21 | |
227 //bool result; // eax@21 | |
228 //float v18; // ST14_4@24 | |
229 //stru10 *v19; // edi@29 | |
230 //float v20; // ST14_4@30 | |
231 //float v21; // ST14_4@30 | |
232 //float v22; // ST14_4@30 | |
233 //float v23; // ST14_4@30 | |
234 //float v24; // ST14_4@31 | |
235 //RenderVertexSoft v25; // [sp+10h] [bp-90h]@24 | |
236 //RenderVertexSoft v26; // [sp+40h] [bp-60h]@20 | |
237 //IndoorCameraD3D *thisa; // [sp+70h] [bp-30h]@1 | |
238 //stru10 *v31; // [sp+84h] [bp-1Ch]@1 | |
794 | 239 //float v32; // [sp+88h] [bp-18h]@8 |
0 | 240 Vec3_float_ a1; // [sp+8Ch] [bp-14h]@1 |
794 | 241 //float v35; // [sp+9Ch] [bp-4h]@8 |
0 | 242 |
243 //auto a3 = pFace; | |
244 //auto arg4 = pFaceBounding; | |
245 | |
246 //_ESI = a3; | |
247 //v31 = this; | |
248 //v6 = pGame->pIndoorCameraD3D; | |
249 //v7 = a3->uPolygonType; | |
250 | |
251 a1.x = 0.0f; | |
252 a1.y = 0.0f; | |
253 a1.z = 0.0f; | |
254 | |
255 float var_28; | |
256 float var_24; | |
794 | 257 switch (pFace->uPolygonType) |
0 | 258 { |
794 | 259 case POLYGON_VerticalWall: |
1319 | 260 a1.x = -pFace->pFacePlane.vNormal.y;// направление полигона |
794 | 261 a1.y = pFace->pFacePlane.vNormal.x; |
262 a1.z = 0.0f; | |
263 a1.Normalize(); | |
264 | |
265 var_28 = 0; | |
266 var_24 = 1; | |
267 break; | |
0 | 268 |
794 | 269 case POLYGON_Floor: |
270 case POLYGON_Ceiling: | |
271 a1.x = 1; | |
272 a1.y = 0; | |
273 a1.z = 0.0f; | |
274 | |
275 var_28 = 1; | |
276 var_24 = 0; | |
277 break; | |
278 | |
279 default: | |
1545 | 280 Error("Invalid polygon type (%u)", pFace->uPolygonType); |
0 | 281 } |
282 | |
283 | |
794 | 284 float face_center_x; |
285 float face_center_y; | |
286 float face_center_z; | |
0 | 287 float a3; |
288 float var_8; | |
794 | 289 |
2092 | 290 if (pFace->uAttributes & FACE_XY_PLANE) |
0 | 291 { |
794 | 292 face_center_x = (pFaceLimits[0].vWorldPosition.x + pFaceLimits[2].vWorldPosition.x) / 2; |
293 face_center_y = (pFaceLimits[3].vWorldPosition.y + pFaceLimits[1].vWorldPosition.y) / 2; | |
294 face_center_z = (pFaceLimits[0].vWorldPosition.z + pFaceLimits[2].vWorldPosition.z) / 2; | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
295 |
794 | 296 a3 = face_center_x - pFaceLimits[0].vWorldPosition.x; |
297 var_8 = face_center_y - pFaceLimits[1].vWorldPosition.y; | |
0 | 298 } |
2092 | 299 if (pFace->uAttributes & FACE_XZ_PLANE) |
0 | 300 { |
1319 | 301 face_center_x = (pFaceLimits[0].vWorldPosition.x + pFaceLimits[2].vWorldPosition.x) / 2;// центр полигона |
794 | 302 face_center_y = (pFaceLimits[0].vWorldPosition.y + pFaceLimits[2].vWorldPosition.y) / 2; |
303 face_center_z = (pFaceLimits[1].vWorldPosition.z + pFaceLimits[3].vWorldPosition.z) / 2; | |
0 | 304 |
1319 | 305 a3 = face_center_x - pFaceLimits[0].vWorldPosition.x;//от центра до верхнего края |
306 var_8 = face_center_z - pFaceLimits[1].vWorldPosition.z;// высота от центра | |
0 | 307 |
308 if (pFace->uPolygonType == POLYGON_VerticalWall) | |
309 a3 /= a1.x; | |
310 } | |
2092 | 311 if (pFace->uAttributes & FACE_YZ_PLANE) |
0 | 312 { |
794 | 313 face_center_x = (pFaceLimits[0].vWorldPosition.x + pFaceLimits[2].vWorldPosition.x) / 2; |
314 face_center_y = (pFaceLimits[0].vWorldPosition.y + pFaceLimits[2].vWorldPosition.y) / 2; | |
315 face_center_z = (pFaceLimits[1].vWorldPosition.z + pFaceLimits[3].vWorldPosition.z) / 2; | |
0 | 316 |
794 | 317 a3 = face_center_y - pFaceLimits[0].vWorldPosition.y; |
318 var_8 = face_center_z - pFaceLimits[1].vWorldPosition.z; | |
0 | 319 // [0.5] |
320 if (pFace->uPolygonType == POLYGON_VerticalWall) | |
321 { | |
322 if (a1.x != 1.0f) | |
323 a3 /= a1.y; | |
324 } | |
325 } | |
326 | |
327 | |
328 | |
329 | |
330 //_EBX = arg0; | |
331 //v15 = v31; | |
332 //v16 = arg0; | |
678
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
333 //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
|
334 //var_8 = a3 * a1.z; |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
335 //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
|
336 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
337 /* |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
338 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
339 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
340 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
341 .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
|
342 .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
|
343 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
344 .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
|
345 1 var8 * flt_4D84E8 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
346 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
347 .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
|
348 1 var8 * flt_4D84E8 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
349 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
350 .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
|
351 1 var8 * var28 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
352 2 var8 * flt_4D84E8 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
353 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
354 .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
|
355 1 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
356 2 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
357 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
358 .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
|
359 1 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
360 2 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
361 [var20] var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
362 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
363 .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
|
364 1 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
365 2 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
366 3 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
367 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
368 .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
|
369 1 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
370 2 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
371 3 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
372 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
373 .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
|
374 1 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
375 2 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
376 3 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
377 4 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
378 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
379 .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
|
380 1 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
381 2 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
382 3 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
383 4 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
384 .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
|
385 .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
|
386 1 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
387 2 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
388 3 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
389 4 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
390 5 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
391 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
392 .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
|
393 var8 <- a3 * a1.z 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
394 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
395 .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
|
396 1 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
397 2 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
398 3 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
399 4 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
400 5 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
401 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
402 .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
|
403 1 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
404 2 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
405 3 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
406 4 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
407 5 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
408 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
409 .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
|
410 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
|
411 2 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
412 3 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
413 4 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
414 5 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
415 6 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
416 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
417 .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
|
418 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
|
419 2 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
420 3 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
421 4 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
422 5 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
423 6 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
424 .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
|
425 [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
|
426 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
427 .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
|
428 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
|
429 2 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
430 3 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
431 4 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
432 5 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
433 6 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
434 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
435 .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
|
436 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
|
437 2 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
438 3 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
439 4 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
440 5 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
441 6 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
442 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
443 .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
|
444 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
|
445 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
|
446 3 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
447 4 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
448 5 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
449 6 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
450 7 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
451 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
452 .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
|
453 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
|
454 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
|
455 3 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
456 4 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
457 5 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
458 6 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
459 7 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
460 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
461 .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
|
462 [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
|
463 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
464 .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
|
465 .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
|
466 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
|
467 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
|
468 3 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
469 4 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
470 5 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
471 6 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
472 7 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
473 .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
|
474 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
|
475 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
476 .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
|
477 .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
|
478 [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
|
479 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
480 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
|
481 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
|
482 2 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
483 3 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
484 4 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
485 5 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
486 6 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
487 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
488 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
489 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
490 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
491 [var20] var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
492 [var8] a3 * a1.z |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
493 [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
|
494 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
495 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
496 .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
|
497 .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
|
498 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
|
499 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
|
500 3 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
501 4 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
502 5 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
503 6 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
504 7 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
505 .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
|
506 [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
|
507 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
508 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
|
509 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
|
510 2 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
511 3 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
512 4 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
513 5 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
514 6 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
515 .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
|
516 .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
|
517 [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
|
518 .text:0049CC20 6 fstp st |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
519 0 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
520 1 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
521 2 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
522 3 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
523 4 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
524 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
525 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
526 [var20] var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
527 [var8] a3 * a1.z |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
528 [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
|
529 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
530 .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
|
531 1 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
532 2 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
533 3 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
534 4 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
535 5 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
536 .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
|
537 .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
|
538 [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
|
539 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
540 0 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
541 1 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
542 2 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
543 3 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
544 4 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
545 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
546 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
547 .text:0049CC2A fld st(1) |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
548 .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
|
549 1 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
550 2 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
551 3 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
552 4 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
553 5 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
554 .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
|
555 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
556 [var20] var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
557 [var8] a3 * a1.z |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
558 [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
|
559 .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
|
560 .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
|
561 [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
|
562 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
563 0 a3 * a1.y 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
564 1 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
565 2 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
566 3 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
567 4 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
568 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
569 .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
|
570 1 a3 * a1.x 1984 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
571 2 var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
572 3 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
573 4 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
574 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
575 .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
|
576 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
|
577 2 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
578 3 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
579 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
580 .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
|
581 1 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
582 2 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
583 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
584 .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
|
585 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
|
586 2 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
587 3 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
588 .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
|
589 .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
|
590 [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
|
591 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
592 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
|
593 1 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
594 2 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
595 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
596 [var20] var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
597 [var8] a3 * a1.z |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
598 [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
|
599 .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
|
600 .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
|
601 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
|
602 2 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
603 3 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
604 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
605 .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
|
606 [var20] var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
607 [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
|
608 [var8] a3 * a1.z 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
609 [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
|
610 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
611 .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
|
612 .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
|
613 [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
|
614 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
615 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
616 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
617 [var20] var8 * var24 768 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
618 [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
|
619 [var8] a3 * a1.z 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
620 [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
|
621 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
622 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
623 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
|
624 1 var8 * var28 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
625 2 var8 * flt_4D84E8 0 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
626 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
627 .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
|
628 .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
|
629 .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
|
630 [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
|
631 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
632 .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
|
633 .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
|
634 [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
|
635 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
636 .text:0049CC67 2 fstp st |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
637 .text:0049CC69 1 fstp st |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
638 0 empty |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
639 .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
|
640 .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
|
641 .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
|
642 [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
|
643 |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
644 0 empty |
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
645 */ |
0 | 646 |
794 | 647 pOutBounding[0].vWorldPosition.x = face_center_x - a3 * a1.x + var_8 * flt_4D84E8; |
648 pOutBounding[0].vWorldPosition.y = face_center_y - a3 * a1.y + var_8 * var_28; | |
649 pOutBounding[0].vWorldPosition.z = face_center_z - a3 * a1.z + var_8 * var_24; | |
678
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
650 |
794 | 651 pOutBounding[1].vWorldPosition.x = face_center_x - a3 * a1.x - var_8 * flt_4D84E8; |
652 pOutBounding[1].vWorldPosition.y = face_center_y - a3 * a1.y - var_8 * var_28; | |
653 pOutBounding[1].vWorldPosition.z = face_center_z - a3 * a1.z - var_8 * var_24; | |
0 | 654 |
794 | 655 pOutBounding[2].vWorldPosition.x = face_center_x + a3 * a1.x - var_8 * flt_4D84E8; |
656 pOutBounding[2].vWorldPosition.y = face_center_y + a3 * a1.y - var_8 * var_28; | |
657 pOutBounding[2].vWorldPosition.z = face_center_z + a3 * a1.z - var_8 * var_24; | |
678
35a97ce58790
fixed stru10::49C9E3 (cause for attempting to get cross product on zero vectors)
Nomad
parents:
676
diff
changeset
|
658 |
794 | 659 pOutBounding[3].vWorldPosition.x = face_center_x + a3 * a1.x + var_8 * flt_4D84E8; |
660 pOutBounding[3].vWorldPosition.y = face_center_y + a3 * a1.y + var_8 * var_28; | |
661 pOutBounding[3].vWorldPosition.z = face_center_z + a3 * a1.z + var_8 * var_24; | |
0 | 662 |
663 a1.x = 0.0f; | |
664 a1.y = 0.0f; | |
665 a1.z = 0.0f; | |
794 | 666 a3 = face_center_x + a3 * a1.x; |
0 | 667 |
794 | 668 if (!FindFacePlane(pOutBounding, &a1, &a3)) |
0 | 669 return false; |
670 | |
671 | |
672 | |
673 RenderVertexSoft v25; // [sp+10h] [bp-90h]@20 | |
794 | 674 memcpy(&v25, pOutBounding, sizeof(RenderVertexSoft)); |
0 | 675 |
1640
afc1c3514dd5
Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents:
1545
diff
changeset
|
676 float _dp = (v25.vWorldPosition.x - pGame->pIndoorCameraD3D->vPartyPos.x) * a1.x + |
afc1c3514dd5
Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents:
1545
diff
changeset
|
677 (v25.vWorldPosition.y - pGame->pIndoorCameraD3D->vPartyPos.y) * a1.y + |
afc1c3514dd5
Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents:
1545
diff
changeset
|
678 (v25.vWorldPosition.z - pGame->pIndoorCameraD3D->vPartyPos.z) * a1.z; |
0 | 679 if (fabs(_dp) < 1e-6f) |
680 { | |
1317 | 681 memcpy(&v25, &pOutBounding[1], sizeof(RenderVertexSoft)); |
682 memcpy(&pOutBounding[1], &pOutBounding[3], sizeof(RenderVertexSoft)); | |
683 memcpy(&pOutBounding[3], &v25, sizeof(RenderVertexSoft)); | |
0 | 684 } |
685 | |
794 | 686 //if ( byte_4D864C && pGame->uFlags & GAME_FLAGS_1_DRAW_BLV_DEBUGS) |
687 //{ | |
0 | 688 RenderVertexSoft v26; // [sp+40h] [bp-60h]@20 |
2277 | 689 if ( draw_portals_loops ) |
0 | 690 { |
1507 | 691 if (!bDoNotDrawPortalFrustum) |
692 { | |
693 v26.vWorldPosition.x = pParty->vPosition.x; | |
694 v26.vWorldPosition.y = pParty->vPosition.y; | |
695 v26.vWorldPosition.z = pParty->vPosition.z + pParty->sEyelevel; // frustum | |
794 | 696 |
1507 | 697 pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFF0000u, &pOutBounding[0], 0xFF0000u, 0, 0); |
698 pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFF00u, &pOutBounding[1], 0xFF00u, 0, 0); | |
699 pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFFu, &pOutBounding[2], 0xFFu, 0, 0); | |
700 pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFFFFFFu, &pOutBounding[3], 0xFFFFFFu, 0, 0); | |
701 bDoNotDrawPortalFrustum = true; | |
702 } | |
703 pGame->pIndoorCameraD3D->debug_outline_sw(pOutBounding, uNumVertices, 0x1EFF1Eu, 0.00019999999); // bounding | |
794 | 704 } |
705 //} | |
706 | |
707 //pGame->pIndoorCameraD3D->debug_outline_sw(pFaceLimits, 4, 0xFFF14040, 0.000099999997); // limits | |
708 | |
709 /*if ( byte_4D864C && pGame->uFlags & GAME_FLAGS_1_DRAW_BLV_DEBUGS) | |
710 { | |
711 RenderVertexSoft v26; // [sp+40h] [bp-60h]@20 | |
712 v26.vWorldPosition.x = face_center_x; // corner to center | |
713 v26.vWorldPosition.y = face_center_y; | |
714 v26.vWorldPosition.z = face_center_z; | |
0 | 715 |
794 | 716 pGame->pIndoorCameraD3D->do_draw_debug_line_sw(pFaceLimits, 0xFF00u, &v26, 0xFF0000u, 0, 0); |
717 }*/ | |
718 | |
719 | |
720 /*if ( byte_4D864C ) | |
721 { | |
722 if ( pGame->uFlags & GAME_FLAGS_1_DRAW_BLV_DEBUGS)*/ | |
723 { | |
724 RenderVertexSoft v25; // [sp+10h] [bp-90h]@20 | |
725 RenderVertexSoft v26; // [sp+40h] [bp-60h]@20 | |
726 | |
727 v25.vWorldPosition.x = face_center_x; // portal normal | |
728 v25.vWorldPosition.y = face_center_y; | |
729 v25.vWorldPosition.z = face_center_z; | |
730 | |
731 v26.vWorldPosition.x = face_center_x + a1.x * 400.0f; | |
732 v26.vWorldPosition.y = face_center_y + a1.y * 400.0f; | |
733 v26.vWorldPosition.z = face_center_z + a1.z * 400.0f; | |
734 | |
2277 | 735 if ( draw_portals_loops ) |
2006 | 736 pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v25, -1, &v26, 0xFFFF00u, 0, 0); |
0 | 737 } |
794 | 738 //} |
739 | |
0 | 740 return true; |
741 } | |
742 | |
743 | |
744 | |
745 //----- (0049C5B0) -------------------------------------------------------- | |
746 stru10::stru10() | |
747 { | |
794 | 748 this->bDoNotDrawPortalFrustum = false; |
0 | 749 } |
750 | |
751 //----- (0049C5BD) -------------------------------------------------------- | |
752 stru10::~stru10() | |
753 { | |
754 } | |
755 | |
756 //----- (0049C5DA) -------------------------------------------------------- | |
795 | 757 char stru10::_49C5DA(BLVFace *pFace, RenderVertexSoft *pVertices, unsigned int *pNumVertices, IndoorCameraD3D_Vec4 *a5, RenderVertexSoft *pOutBounding) |
0 | 758 { |
795 | 759 RenderVertexSoft pLimits[4]; // [sp+Ch] [bp-C0h]@1 |
760 | |
761 _49CE9E(pFace, pVertices, *pNumVertices, pLimits); | |
0 | 762 |
795 | 763 //if ( byte_4D864C && pGame->uFlags & GAME_FLAGS_1_DRAW_BLV_DEBUGS) |
764 // pGame->pIndoorCameraD3D->debug_outline_sw(a4a, 4u, 0xFF1E1Eu, 0.000099999997); | |
765 if (CalcFaceBounding(pFace, pLimits, 4, pOutBounding)) | |
766 return _49C720(pOutBounding, a5); | |
767 return false; | |
0 | 768 } |
769 // 4D864C: using guessed type char byte_4D864C; | |
770 | |
771 //----- (0049C681) -------------------------------------------------------- | |
1317 | 772 bool stru10::CalcPortalShape(BLVFace *pFace, IndoorCameraD3D_Vec4 *pPortalDataFrustum, RenderVertexSoft *pOutBounding) |
0 | 773 { |
794 | 774 RenderVertexSoft pLimits[4]; // [sp+Ch] [bp-C0h]@1 |
0 | 775 |
1319 | 776 CalcPolygonLimits(pFace, pLimits);//определение границ портала |
794 | 777 //if ( byte_4D864C && pGame->uFlags & GAME_FLAGS_1_DRAW_BLV_DEBUGS) |
778 // pGame->pIndoorCameraD3D->debug_outline_sw(pLimits, 4, 0xFF1E1E, 0.000099999997); | |
779 if (CalcFaceBounding(pFace, pLimits, 4, pOutBounding)) | |
1317 | 780 return _49C720(pOutBounding, pPortalDataFrustum) != 0; |
0 | 781 return false; |
782 } | |
1314 | 783 |
0 | 784 // 4D864C: using guessed type char byte_4D864C; |
785 | |
786 //----- (0049C720) -------------------------------------------------------- | |
1317 | 787 char stru10::_49C720(RenderVertexSoft *pFaceBounding, IndoorCameraD3D_Vec4 *pPortalDataFrustum) |
0 | 788 { |
1317 | 789 Vec3_float_ pRayStart; // [sp+4h] [bp-34h]@1 |
1640
afc1c3514dd5
Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents:
1545
diff
changeset
|
790 pRayStart.x = (double)pGame->pIndoorCameraD3D->vPartyPos.x; |
afc1c3514dd5
Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents:
1545
diff
changeset
|
791 pRayStart.y = (double)pGame->pIndoorCameraD3D->vPartyPos.y; |
afc1c3514dd5
Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents:
1545
diff
changeset
|
792 pRayStart.z = (double)pGame->pIndoorCameraD3D->vPartyPos.z; |
795 | 793 |
1317 | 794 if (FindFaceNormal(&pFaceBounding[0], &pFaceBounding[1], &pRayStart, &pPortalDataFrustum[0]) && |
795 FindFaceNormal(&pFaceBounding[1], &pFaceBounding[2], &pRayStart, &pPortalDataFrustum[1]) && | |
796 FindFaceNormal(&pFaceBounding[2], &pFaceBounding[3], &pRayStart, &pPortalDataFrustum[2]) && | |
797 FindFaceNormal(&pFaceBounding[3], &pFaceBounding[0], &pRayStart, &pPortalDataFrustum[3])) | |
795 | 798 return true; |
799 return false; | |
0 | 800 } |
801 | |
802 //----- (0049C7C5) -------------------------------------------------------- | |
1317 | 803 bool stru10::FindFaceNormal(RenderVertexSoft *pFaceBounding1, RenderVertexSoft *pFaceBounding2, Vec3_float_ *pRayStart, IndoorCameraD3D_Vec4 *pPortalDataFrustum) |
0 | 804 { |
1317 | 805 Vec3_float_ ray_dir; // [sp+4h] [bp-48h]@1 |
806 Vec3_float_ pRay2; // [sp+10h] [bp-3Ch]@1 | |
794 | 807 |
1317 | 808 ray_dir.x = pFaceBounding1->vWorldPosition.x - pRayStart->x;//get ray for cmera to bounding1 |
809 ray_dir.y = pFaceBounding1->vWorldPosition.y - pRayStart->y; | |
810 ray_dir.z = pFaceBounding1->vWorldPosition.z - pRayStart->z; | |
811 Vec3_float_::Cross(&ray_dir, &pRay2, pFaceBounding2->vWorldPosition.x - pFaceBounding1->vWorldPosition.x, | |
812 pFaceBounding2->vWorldPosition.y - pFaceBounding1->vWorldPosition.y, | |
813 pFaceBounding2->vWorldPosition.z - pFaceBounding1->vWorldPosition.z); | |
0 | 814 |
1317 | 815 float sqr_mag = pRay2.x * pRay2.x + pRay2.y * pRay2.y + pRay2.z * pRay2.z; |
794 | 816 if (fabsf(sqr_mag) > 1e-6f) |
0 | 817 { |
794 | 818 float inv_mag = 1.0f / sqrtf(sqr_mag); |
1317 | 819 pRay2.x *= inv_mag; |
820 pRay2.y *= inv_mag; | |
821 pRay2.z *= inv_mag; | |
822 pRay2.Normalize(); | |
794 | 823 |
1317 | 824 pPortalDataFrustum->x = pRay2.x; |
825 pPortalDataFrustum->y = pRay2.y; | |
826 pPortalDataFrustum->z = pRay2.z; | |
827 pPortalDataFrustum->dot = pRayStart->z * pRay2.z + pRayStart->y * pRay2.y + pRayStart->x * pRay2.x; | |
794 | 828 return true; |
0 | 829 } |
794 | 830 return false; |
0 | 831 } |
832 | |
833 //----- (0049C8DC) -------------------------------------------------------- | |
794 | 834 bool stru10::FindFacePlane(RenderVertexSoft *arg0, Vec3_float_ *a2, float *a3) |
0 | 835 { |
836 Vec3_float_ v1; // [sp+8h] [bp-3Ch]@1 | |
837 Vec3_float_ v2; // [sp+14h] [bp-30h]@1 | |
838 | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
839 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
|
840 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
|
841 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
|
842 |
794 | 843 Vec3_float_::Cross(&v1, &v2, arg0[2].vWorldPosition.x - arg0[1].vWorldPosition.x, |
844 arg0[2].vWorldPosition.y - arg0[1].vWorldPosition.y, | |
845 arg0[2].vWorldPosition.z - arg0[1].vWorldPosition.z); | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
0
diff
changeset
|
846 |
794 | 847 float sqr_mag = v2.x * v2.x + v2.y * v2.y + v2.z * v2.z; |
848 if (fabsf(sqr_mag) > 1e-6f) | |
0 | 849 { |
794 | 850 //v2.Normalize(); |
851 float inv_mag = 1.0f / sqrtf(sqr_mag); | |
852 v2.x *= inv_mag; | |
853 v2.y *= inv_mag; | |
854 v2.z *= inv_mag; | |
855 | |
856 a2->x = v2.x; | |
857 a2->y = v2.y; | |
858 a2->z = v2.z; | |
859 *a3 = -(arg0[0].vWorldPosition.z * v2.z + arg0[0].vWorldPosition.y * v2.y + arg0[0].vWorldPosition.x * v2.x); | |
0 | 860 return true; |
861 } | |
862 return false; | |
863 } |