annotate stru10.cpp @ 747:585490c29945

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