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