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