annotate stru10.cpp @ 170:f089d88b6739

PopupWindow(work)
author Ritor1
date Thu, 13 Dec 2012 17:22:39 +0600
parents 41cbaabde2cb
children
rev   line source
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1 #include "stru10.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2 #include "Render.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3 #include "Indoor.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4 #include "Game.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5 #include "Party.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7 #include "mm7_data.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12 //----- (0049CE9E) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13 void stru10::_49CE9E(BLVFace *pFace, RenderVertexSoft *a2, signed int a3, RenderVertexSoft *a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15 char *v5; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16 signed int v6; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17 unsigned int v7; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
18 signed int v8; // ecx@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
19 signed int v9; // esi@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
20 RenderVertexSoft *v10; // edx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
21 double v11; // st6@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
22 RenderVertexSoft *v12; // edx@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
23 signed int v13; // ecx@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
24 signed int v14; // esi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
25 RenderVertexSoft *v15; // edi@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
26 double v16; // st6@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
27 signed int v17; // ecx@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
28 signed int v18; // edi@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
29 char *v19; // esi@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
30 double v20; // st6@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
31 signed int v21; // ecx@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
32 signed int v22; // edi@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
33 char *v23; // esi@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
34 double v24; // st7@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
35 signed int v25; // ecx@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
36 signed int v26; // esi@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
37 RenderVertexSoft *v27; // edx@46
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
38 double v28; // st6@48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
39 signed int v29; // ecx@53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
40 signed int v30; // esi@53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
41 RenderVertexSoft *v31; // edi@54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
42 double v32; // st6@56
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
43 signed int v33; // ecx@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
44 signed int v34; // edi@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
45 char *v35; // esi@62
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
46 double v36; // st6@64
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
47 signed int v37; // edi@69
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
48 char *v38; // esi@70
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
49 double v39; // st7@72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
50 RenderVertexSoft *v40; // esi@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
51 signed int v41; // ecx@79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
52 signed int v42; // esi@79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
53 char *v43; // edx@80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
54 double v44; // st6@82
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
55 RenderVertexSoft *v45; // eax@87
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
56 signed int v46; // ecx@87
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
57 signed int v47; // edi@87
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
58 char *v48; // esi@88
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
59 double v49; // st6@90
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
60 signed int v50; // ecx@96
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
61 signed int v51; // edi@96
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
62 char *v52; // esi@97
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
63 double v53; // st6@99
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
64 signed int v54; // ecx@105
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
65 signed int v55; // edi@105
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
66 char *v56; // esi@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
67 double v57; // st7@108
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
68 RenderVertexSoft a2a[64]; // [sp+0h] [bp-C18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
69 float v59; // [sp+C00h] [bp-18h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
70 float v60; // [sp+C04h] [bp-14h]@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
71 float v61; // [sp+C08h] [bp-10h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
72 float v62; // [sp+C0Ch] [bp-Ch]@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
73 float v63; // [sp+C10h] [bp-8h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
74 float v64; // [sp+C14h] [bp-4h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
75 float a1a; // [sp+C20h] [bp+8h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
76 float a1b; // [sp+C20h] [bp+8h]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
77 float a1c; // [sp+C20h] [bp+8h]@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
78 float a1d; // [sp+C20h] [bp+8h]@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
79 float a1e; // [sp+C20h] [bp+8h]@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
80 float a1f; // [sp+C20h] [bp+8h]@53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
81 float a1g; // [sp+C20h] [bp+8h]@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
82 float a1h; // [sp+C20h] [bp+8h]@69
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
83 float a1i; // [sp+C20h] [bp+8h]@79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
84 float a1j; // [sp+C20h] [bp+8h]@87
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
85 float a1k; // [sp+C20h] [bp+8h]@96
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
86 float a1l; // [sp+C20h] [bp+8h]@105
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
87
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
88 v5 = (char *)&a2a[0].flt_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
89 v6 = 64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
90 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
91 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
92 *(float *)v5 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
93 v5 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
94 --v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
95 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
96 while ( v6 );
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
97 stru10::CalcPolygonBoundingBox(pFace, a2a);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
98 v7 = pFace->uAttributes;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
99 if ( v7 & 0x100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
100 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
101 v63 = a2a[0].vWorldPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
102 v59 = a2a[2].vWorldPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
103 v61 = a2a[1].vWorldPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
104 v64 = a2a[3].vWorldPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
105 goto LABEL_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
106 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
107 if ( v7 & 0x200 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
108 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
109 v63 = a2a[0].vWorldPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
110 v59 = a2a[2].vWorldPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
111 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
112 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
113 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
114 if ( !(v7 & 0x400) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
115 goto LABEL_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
116 v61 = a2a[0].vWorldPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
117 v64 = a2a[2].vWorldPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
118 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
119 v62 = a2a[1].vWorldPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
120 v60 = a2a[3].vWorldPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
121 LABEL_10:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
122 if ( v7 & 0x100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
123 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
124 v8 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
125 a1a = 3.4028235e38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
126 v9 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
127 if ( a3 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
128 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
129 v10 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
130 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
131 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
132 if ( v10->vWorldPosition.x <= (double)v63 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
133 v11 = v63 - v10->vWorldPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
134 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
135 v11 = v10->vWorldPosition.x - v63;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
136 if ( v11 < a1a )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
137 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
138 a1a = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
139 v8 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
140 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
141 ++v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
142 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
143 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
144 while ( v9 < a3 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
145 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
146 v12 = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
147 a1b = 3.4028235e38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
148 memcpy(a4, &a2[v8], 0x30u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
149 v13 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
150 v14 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
151 if ( a3 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
152 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
153 v15 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
154 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
155 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
156 if ( v15->vWorldPosition.x <= (double)v59 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
157 v16 = v59 - v15->vWorldPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
158 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
159 v16 = v15->vWorldPosition.x - v59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
160 if ( v16 < a1b )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
161 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
162 a1b = v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
163 v13 = v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
164 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
165 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
166 ++v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
167 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
168 while ( v14 < a3 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
169 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
170 a1c = 3.4028235e38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
171 memcpy(&a4[2], &a2[v13], sizeof(a4[2]));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
172 v17 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
173 v18 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
174 if ( a3 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
175 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
176 v19 = (char *)&a2->vWorldPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
177 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
178 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
179 if ( *(float *)v19 <= (double)v61 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
180 v20 = v61 - *(float *)v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
181 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
182 v20 = *(float *)v19 - v61;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
183 if ( v20 < a1c )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
184 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
185 a1c = v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
186 v17 = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
187 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
188 ++v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
189 v19 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
190 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
191 while ( v18 < a3 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
192 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
193 a1d = 3.4028235e38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
194 memcpy(&a4[1], &a2[v17], sizeof(a4[1]));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
195 v21 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
196 v22 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
197 if ( a3 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
198 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
199 v23 = (char *)&a2->vWorldPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
200 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
201 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
202 if ( *(float *)v23 <= (double)v64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
203 v24 = v64 - *(float *)v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
204 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
205 v24 = *(float *)v23 - v64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
206 if ( v24 < a1d )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
207 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
208 a1d = v24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
209 v21 = v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
210 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
211 ++v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
212 v23 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
213 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
214 while ( v22 < a3 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
215 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
216 LABEL_77:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
217 v40 = &a2[v21];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
218 goto LABEL_115;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
219 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
220 if ( v7 & 0x200 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
221 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
222 v25 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
223 a1e = 3.4028235e38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
224 v26 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
225 if ( a3 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
226 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
227 v27 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
228 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
229 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
230 if ( v27->vWorldPosition.x <= (double)v63 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
231 v28 = v63 - v27->vWorldPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
232 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
233 v28 = v27->vWorldPosition.x - v63;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
234 if ( v28 < a1e )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
235 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
236 a1e = v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
237 v25 = v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
238 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
239 ++v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
240 ++v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
241 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
242 while ( v26 < a3 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
243 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
244 v12 = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
245 a1f = 3.4028235e38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
246 memcpy(a4, &a2[v25], 0x30u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
247 v29 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
248 v30 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
249 if ( a3 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
250 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
251 v31 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
252 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
253 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
254 if ( v31->vWorldPosition.x <= (double)v59 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
255 v32 = v59 - v31->vWorldPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
256 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
257 v32 = v31->vWorldPosition.x - v59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
258 if ( v32 < a1f )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
259 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
260 a1f = v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
261 v29 = v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
262 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
263 ++v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
264 ++v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
265 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
266 while ( v30 < a3 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
267 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
268 a1g = 3.4028235e38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
269 memcpy(&a4[2], &a2[v29], sizeof(a4[2]));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
270 v33 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
271 v34 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
272 if ( a3 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
273 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
274 v35 = (char *)&a2->vWorldPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
275 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
276 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
277 if ( *(float *)v35 <= (double)v62 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
278 v36 = v62 - *(float *)v35;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
279 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
280 v36 = *(float *)v35 - v62;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
281 if ( v36 < a1g )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
282 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
283 a1g = v36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
284 v33 = v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
285 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
286 ++v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
287 v35 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
288 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
289 while ( v34 < a3 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
290 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
291 a1h = 3.4028235e38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
292 memcpy(&a4[1], &a2[v33], sizeof(a4[1]));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
293 v21 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
294 v37 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
295 if ( a3 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
296 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
297 v38 = (char *)&a2->vWorldPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
298 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
299 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
300 if ( *(float *)v38 <= (double)v60 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
301 v39 = v60 - *(float *)v38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
302 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
303 v39 = *(float *)v38 - v60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
304 if ( v39 < a1h )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
305 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
306 a1h = v39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
307 v21 = v37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
308 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
309 ++v37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
310 v38 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
311 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
312 while ( v37 < a3 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
313 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
314 goto LABEL_77;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
315 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
316 if ( !(v7 & 0x400) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
317 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
318 v41 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
319 a1i = 3.4028235e38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
320 v42 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
321 if ( a3 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
322 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
323 v43 = (char *)&a2->vWorldPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
324 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
325 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
326 if ( *(float *)v43 <= (double)v61 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
327 v44 = v61 - *(float *)v43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
328 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
329 v44 = *(float *)v43 - v61;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
330 if ( v44 < a1i )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
331 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
332 a1i = v44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
333 v41 = v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
334 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
335 ++v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
336 v43 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
337 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
338 while ( v42 < a3 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
339 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
340 v45 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
341 v12 = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
342 a1j = 3.4028235e38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
343 memcpy(a4, &a2[v41], 0x30u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
344 v46 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
345 v47 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
346 if ( a3 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
347 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
348 v48 = (char *)&a2->vWorldPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
349 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
350 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
351 if ( *(float *)v48 <= (double)v64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
352 v49 = v64 - *(float *)v48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
353 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
354 v49 = *(float *)v48 - v64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
355 if ( v49 < a1j )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
356 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
357 a1j = v49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
358 v46 = v47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
359 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
360 ++v47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
361 v48 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
362 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
363 while ( v47 < a3 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
364 v45 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
365 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
366 a1k = 3.4028235e38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
367 memcpy(&a4[2], &v45[v46], sizeof(a4[2]));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
368 v50 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
369 v51 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
370 if ( a3 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
371 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
372 v52 = (char *)&v45->vWorldPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
373 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
374 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
375 if ( *(float *)v52 <= (double)v62 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
376 v53 = v62 - *(float *)v52;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
377 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
378 v53 = *(float *)v52 - v62;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
379 if ( v53 < a1k )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
380 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
381 a1k = v53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
382 v50 = v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
383 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
384 ++v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
385 v52 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
386 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
387 while ( v51 < a3 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
388 v45 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
389 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
390 a1l = 3.4028235e38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
391 memcpy(&a4[1], &v45[v50], sizeof(a4[1]));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
392 v54 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
393 v55 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
394 if ( a3 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
395 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
396 v56 = (char *)&v45->vWorldPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
397 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
398 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
399 if ( *(float *)v56 <= (double)v60 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
400 v57 = v60 - *(float *)v56;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
401 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
402 v57 = *(float *)v56 - v60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
403 if ( v57 < a1l )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
404 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
405 a1l = v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
406 v54 = v55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
407 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
408 ++v55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
409 v56 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
410 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
411 while ( v55 < a3 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
412 v45 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
413 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
414 v40 = &v45[v54];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
415 LABEL_115:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
416 memcpy(&v12[3], v40, sizeof(v12[3]));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
417 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
418
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
419 //----- (0049D379) --------------------------------------------------------
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
420 void stru10::CalcPolygonBoundingBox(BLVFace *pFace, RenderVertexSoft *pOutVertices)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
421 {
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
422 struct
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
423 {
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
424 float x;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
425 float y;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
426 int c;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
427 } v46[40]; //[sp+0C];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
428
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
429 if (pFace->uAttributes & 0x0100)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
430 {
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
431 for (uint i = 0; i < pFace->uNumVertices; ++i)
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
432 {
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
433 v46[i].x = pIndoor->pVertices[pFace->pVertexIDs[i]].x + pFace->pXInterceptDisplacements[i];
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
434 v46[i].y = pIndoor->pVertices[pFace->pVertexIDs[i]].y + pFace->pYInterceptDisplacements[i];
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
435 v46[i].c = i;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
436 }
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
437 }
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
438 if (pFace->uAttributes & 0x0200)
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
439 {
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
440 for (uint i = 0; i < pFace->uNumVertices; ++i)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
441 {
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
442 v46[i].x = pIndoor->pVertices[pFace->pVertexIDs[i]].x + pFace->pXInterceptDisplacements[i];
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
443 v46[i].y = pIndoor->pVertices[pFace->pVertexIDs[i]].y + pFace->pZInterceptDisplacements[i];
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
444 v46[i].c = i;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
445 }
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
446 }
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
447 if (pFace->uAttributes & 0x0400)
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
448 {
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
449 for (uint i = 0; i < pFace->uNumVertices; ++i)
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
450 {
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
451 v46[i].x = pIndoor->pVertices[pFace->pVertexIDs[i]].x + pFace->pYInterceptDisplacements[i];
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
452 v46[i].y = pIndoor->pVertices[pFace->pVertexIDs[i]].y + pFace->pZInterceptDisplacements[i];
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
453 v46[i].c = i;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
454 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
455 }
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
456
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
457 float x_min = FLT_MAX;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
458 uint x_min_idx = 0;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
459
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
460 float x_max = FLT_MIN;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
461 uint x_max_idx = 0;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
462
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
463 float y_min = FLT_MAX;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
464 uint y_min_idx = 0;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
465
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
466 float y_max = FLT_MIN;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
467 uint y_max_idx = 0;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
468
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
469 for (uint i = 0; i < pFace->uNumVertices; ++i)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
470 {
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
471 if (v46[i].x < x_min)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
472 {
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
473 x_min = v46[i].x;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
474 x_min_idx = v46[i].c;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
475 }
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
476 if (v46[i].x > x_max)
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
477 {
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
478 x_max = v46[i].x;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
479 x_max_idx = v46[i].c;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
480 }
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
481
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
482 if (v46[i].y < y_min)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
483 {
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
484 y_min = v46[i].y;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
485 y_min_idx = v46[i].c;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
486 }
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
487 if (v46[i].y > y_max)
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
488 {
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
489 y_max = v46[i].y;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
490 y_max_idx = v46[i].c;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
491 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
492 }
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
493
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
494
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
495
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
496 auto p1 = &pIndoor->pVertices[pFace->pVertexIDs[x_min_idx]];
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
497 RenderVertexSoft v1; // [sp+30Ch] [bp-54h]@24
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
498 v1.vWorldPosition.x = (float)p1->x;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
499 v1.vWorldPosition.y = (float)p1->y;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
500 v1.vWorldPosition.z = (float)p1->z;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
501 memcpy(pOutVertices + 0, &v1, sizeof(RenderVertexSoft));
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
502
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
503 auto p2 = &pIndoor->pVertices[pFace->pVertexIDs[y_min_idx]];
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
504 RenderVertexSoft v2; // [sp+30Ch] [bp-54h]@24
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
505 v2.vWorldPosition.x = (float)p2->x;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
506 v2.vWorldPosition.y = (float)p2->y;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
507 v2.vWorldPosition.z = (float)p2->z;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
508 memcpy(pOutVertices + 1, &v2, sizeof(RenderVertexSoft));
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
509
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
510 auto p3 = &pIndoor->pVertices[pFace->pVertexIDs[x_max_idx]];
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
511 RenderVertexSoft v3; // [sp+30Ch] [bp-54h]@24
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
512 v3.vWorldPosition.x = (float)p3->x;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
513 v3.vWorldPosition.y = (float)p3->y;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
514 v3.vWorldPosition.z = (float)p3->z;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
515 memcpy(pOutVertices + 2, &v3, sizeof(RenderVertexSoft));
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
516
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
517 auto p4 = &pIndoor->pVertices[pFace->pVertexIDs[y_max_idx]];
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
518 RenderVertexSoft v4; // [sp+30Ch] [bp-54h]@24
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
519 v4.vWorldPosition.x = (double)p4->x;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
520 v4.vWorldPosition.y = (double)p4->y;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
521 v4.vWorldPosition.z = (double)p4->z;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
522 memcpy(pOutVertices + 3, &v4, sizeof(RenderVertexSoft));
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
523 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
524
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
525
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
526 //----- (0049C9E3) --------------------------------------------------------
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
527 bool stru10::_49C9E3(BLVFace *pFace, RenderVertexSoft *pFaceBounding, unsigned int uNumVertices, RenderVertexSoft *arg0)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
528 {
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
529 //IndoorCameraD3D *v6; // edi@1
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
530 //PolygonType v7; // al@1
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
531 //unsigned int v8; // edx@7
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
532 //char v10; // zf@10
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
533 //float v13; // ST14_4@20
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
534 //stru10 *v15; // ecx@21
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
535 //RenderVertexSoft *v16; // ST0C_4@21
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
536 //bool result; // eax@21
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
537 //float v18; // ST14_4@24
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
538 //stru10 *v19; // edi@29
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
539 //float v20; // ST14_4@30
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
540 //float v21; // ST14_4@30
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
541 //float v22; // ST14_4@30
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
542 //float v23; // ST14_4@30
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
543 //float v24; // ST14_4@31
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
544 //RenderVertexSoft v25; // [sp+10h] [bp-90h]@24
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
545 //RenderVertexSoft v26; // [sp+40h] [bp-60h]@20
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
546 //IndoorCameraD3D *thisa; // [sp+70h] [bp-30h]@1
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
547 //stru10 *v31; // [sp+84h] [bp-1Ch]@1
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
548 float v32; // [sp+88h] [bp-18h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
549 Vec3_float_ a1; // [sp+8Ch] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
550 float v35; // [sp+9Ch] [bp-4h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
551
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
552 //auto a3 = pFace;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
553 //auto arg4 = pFaceBounding;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
554
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
555 //_ESI = a3;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
556 //v31 = this;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
557 //v6 = pGame->pIndoorCameraD3D;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
558 //v7 = a3->uPolygonType;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
559
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
560 a1.x = 0.0f;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
561 a1.y = 0.0f;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
562 a1.z = 0.0f;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
563
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
564 float var_28;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
565 float var_24;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
566 if (pFace->uPolygonType == POLYGON_VerticalWall)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
567 {
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
568 a1.x = -pFace->pFacePlane.vNormal.y;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
569 a1.y = pFace->pFacePlane.vNormal.x;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
570 a1.z = 0.0f;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
571 a1.Normalize();
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
572
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
573 var_28 = 0;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
574 var_24 = 1;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
575 }
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
576 else if (pFace->uPolygonType == POLYGON_Floor ||
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
577 pFace->uPolygonType == POLYGON_Ceiling)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
578 {
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
579 a1.x = 1;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
580 a1.y = 0;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
581 a1.z = 0.0f;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
582
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
583 var_28 = 1;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
584 var_24 = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
585 }
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
586
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
587
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
588 float arg_4;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
589 float var_18;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
590 float var_4;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
591 float a3;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
592 float var_8;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
593 //v8 = _ESI->uAttributes;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
594 //_ECX = pFaceBounding;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
595 //__asm { fld 0.5 }
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
596 if (pFace->uAttributes & 0x0100)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
597 {
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
598 arg_4 = (pFaceBounding[0].vWorldPosition.x + pFaceBounding[2].vWorldPosition.x) / 2;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
599 var_18 = (pFaceBounding[3].vWorldPosition.y + pFaceBounding[1].vWorldPosition.y) / 2;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
600 var_4 = (pFaceBounding[0].vWorldPosition.z + pFaceBounding[2].vWorldPosition.z) / 2;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
601
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
602 a3 = arg_4 - pFaceBounding[0].vWorldPosition.x;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
603 var_8 = var_18 - pFaceBounding[1].vWorldPosition.y;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
604 }
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
605 if (pFace->uAttributes & 0x0200)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
606 {
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
607 arg_4 = (pFaceBounding[0].vWorldPosition.x + pFaceBounding[2].vWorldPosition.x) / 2;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
608 var_18 = (pFaceBounding[0].vWorldPosition.y + pFaceBounding[2].vWorldPosition.y) / 2;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
609 var_4 = (pFaceBounding[1].vWorldPosition.z + pFaceBounding[3].vWorldPosition.z) / 2;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
610
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
611 a3 = arg_4 - pFaceBounding[0].vWorldPosition.x;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
612 var_8 = var_4 - pFaceBounding[1].vWorldPosition.z;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
613
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
614 if (pFace->uPolygonType == POLYGON_VerticalWall)
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
615 a3 /= a1.x;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
616 }
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
617 if (pFace->uAttributes & 0x0400)
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
618 {
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
619 arg_4 = (pFaceBounding[0].vWorldPosition.x + pFaceBounding[2].vWorldPosition.x) / 2;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
620 var_18 = (pFaceBounding[0].vWorldPosition.y + pFaceBounding[2].vWorldPosition.y) / 2;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
621 var_4 = (pFaceBounding[1].vWorldPosition.z + pFaceBounding[3].vWorldPosition.z) / 2;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
622
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
623 a3 = var_18 - pFaceBounding[0].vWorldPosition.y;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
624 var_8 = var_4 - pFaceBounding[1].vWorldPosition.z;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
625 // [0.5]
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
626 if (pFace->uPolygonType == POLYGON_VerticalWall)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
627 {
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
628 if (a1.x != 1.0f)
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
629 a3 /= a1.y;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
630 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
631 }
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
632
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
633
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
634 if ( byte_4D864C && pGame->uFlags & 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
635 {
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
636 RenderVertexSoft v26; // [sp+40h] [bp-60h]@20
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
637 v26.vWorldPosition.x = arg_4;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
638 v26.vWorldPosition.y = v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
639 v26.vWorldPosition.z = v35;
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
640
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
641 pGame->pIndoorCameraD3D->do_draw_debug_line_sw(pFaceBounding, 0xFF00u, &v26, 0xFF0000u, 0, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
642 }
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
643
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
644 //_EBX = arg0;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
645 //v15 = v31;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
646 //v16 = arg0;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
647 float var_20 = var_8 * var_24;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
648 var_8 = a3 * a1.z;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
649 float arg_0 = var_8 + var_4;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
650
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
651 arg0[0].vWorldPosition.x = arg_4 - a3 * a1.x + var_8 * flt_4D84E8;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
652 arg0[0].vWorldPosition.y = var_18 - a3 * a1.y + var_8 * var_28;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
653 arg0[0].vWorldPosition.z = var_4 - var_8 + var_8 * var_24;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
654 arg0[1].vWorldPosition.x = arg_4 - a3 * a1.x - var_8 * flt_4D84E8;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
655 arg0[1].vWorldPosition.y = var_18 - a3 * a1.y - var_8 * var_28;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
656 arg0[1].vWorldPosition.z = (var_4 - var_8) - var_8 * var_24;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
657 arg0[2].vWorldPosition.x = a3 * a1.x + arg_4 - var_8 * flt_4D84E8;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
658 arg0[2].vWorldPosition.y = a3 * a1.y + var_18 - var_8 * var_28;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
659 arg0[2].vWorldPosition.z = var_8 + var_4 - var_20;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
660 arg0[3].vWorldPosition.x = (a3 * a1.x + arg_4) + var_8 * flt_4D84E8;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
661 arg0[3].vWorldPosition.y = a3 * a1.y + var_18 + var_8 * var_28;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
662 arg0[3].vWorldPosition.z = arg_0 + var_20;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
663
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
664 a3 = (var_4 - var_8);
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
665 a3 = (a3 * a1.x + arg_4);
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
666
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
667 a1.x = 0.0f;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
668 a1.y = 0.0f;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
669 a1.z = 0.0f;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
670
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
671 if (!_49C8DC(arg0, &a1, &a3))
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
672 return false;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
673
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
674
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
675 if ( byte_4D864C )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
676 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
677 if ( pGame->uFlags & 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
678 {
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
679 RenderVertexSoft v25; // [sp+10h] [bp-90h]@20
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
680 RenderVertexSoft v26; // [sp+40h] [bp-60h]@20
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
681
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
682 v25.vWorldPosition.x = arg_4;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
683 v25.vWorldPosition.y = v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
684 v25.vWorldPosition.z = v35;
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
685
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
686 v26.vWorldPosition.x = a1.x * 30.0f;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
687 v26.vWorldPosition.y = a1.y * 30.0f;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
688 v26.vWorldPosition.z = a1.z * 30.0f;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
689
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
690 pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v25, 0xFFFFFFFFu, &v26, 0xFFFF00u, 0, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
691 }
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
692 }
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
693
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
694
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
695 RenderVertexSoft v25; // [sp+10h] [bp-90h]@20
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
696 memcpy(&v25, arg0, sizeof(RenderVertexSoft));
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
697
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
698 float _dp = (v25.vWorldPosition.x - pBLVRenderParams->vPartyPos.x) * a1.x +
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
699 (v25.vWorldPosition.y - pBLVRenderParams->vPartyPos.y) * a1.y +
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
700 (v25.vWorldPosition.z - pBLVRenderParams->vPartyPos.z) * a1.z;
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
701 if (fabs(_dp) < 1e-6f)
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
702 {
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
703 memcpy(&v25, arg0 + 1, sizeof(RenderVertexSoft));
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
704 memcpy(arg0 + 1, arg0 + 3, sizeof(RenderVertexSoft));
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
705 memcpy(arg0 + 3, &v25, sizeof(RenderVertexSoft));
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
706 }
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
707
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
708 if ( byte_4D864C && pGame->uFlags & 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
709 {
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
710 RenderVertexSoft v26; // [sp+40h] [bp-60h]@20
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
711 if ( !LOBYTE(field_4) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
712 {
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
713 v26.vWorldPosition.x = pParty->vPosition.x;
58
41cbaabde2cb BLV render
Nomad
parents: 50
diff changeset
714 v26.vWorldPosition.y = pParty->vPosition.y;
41cbaabde2cb BLV render
Nomad
parents: 50
diff changeset
715 v26.vWorldPosition.z = pParty->vPosition.z + pParty->sEyelevel;
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
716
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
717 pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFF0000u, arg0, 0xFF0000u, 0, 0);
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
718 pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFF00u, arg0 + 1, 0xFF00u, 0, 0);
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
719 pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFFu, arg0 + 2, 0xFFu, 0, 0);
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
720 pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFFFFFFu, arg0 + 3, 0xFFFFFFu, 0, 0);
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
721 LOBYTE(field_4) = 1;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
722 }
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
723 pGame->pIndoorCameraD3D->debug_outline_sw(arg0, uNumVertices, 0x1EFF1Eu, 0.00019999999);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
724 }
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
725 return true;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
726 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
727
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
728
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
729
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
730 //----- (0049C5B0) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
731 stru10::stru10()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
732 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
733 LOBYTE(this->field_4) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
734 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
735
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
736 //----- (0049C5BD) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
737 stru10::~stru10()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
738 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
739 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
740
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
741 //----- (0049C5DA) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
742 char stru10::_49C5DA(BLVFace *a2, RenderVertexSoft *a3, int *a4, IndoorCameraD3D_Vec4 *a5, RenderVertexSoft *a6)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
743 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
744 stru10 *v6; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
745 char *v7; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
746 signed int v8; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
747 IndoorCameraD3D *v9; // esi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
748 char result; // al@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
749 RenderVertexSoft a4a[4]; // [sp+Ch] [bp-C0h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
750
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
751 v6 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
752 v7 = (char *)&a4a[0].flt_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
753 v8 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
754 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
755 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
756 *(float *)v7 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
757 v7 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
758 --v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
759 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
760 while ( v8 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
761 v9 = pGame->pIndoorCameraD3D;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
762 _49CE9E(a2, a3, *a4, a4a);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
763 if ( byte_4D864C && pGame->uFlags & 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
764 pGame->pIndoorCameraD3D->debug_outline_sw(a4a, 4u, 0xFF1E1Eu, 0.000099999997);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
765 result = _49C9E3(a2, a4a, 4u, a6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
766 if ( result )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
767 result = _49C720(a6, a5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
768 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
769 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
770 // 4D864C: using guessed type char byte_4D864C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
771
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
772 //----- (0049C681) --------------------------------------------------------
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
773 char stru10::_49C681_DrawDebugStuff(BLVFace *pFace, IndoorCameraD3D_Vec4 *a3, RenderVertexSoft *pArrayOf4)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
774 {
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
775 RenderVertexSoft pBounding[4]; // [sp+Ch] [bp-C0h]@1
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
776
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
777 CalcPolygonBoundingBox(pFace, pBounding);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
778 if ( byte_4D864C && pGame->uFlags & 8 )
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
779 pGame->pIndoorCameraD3D->debug_outline_sw(pBounding, 4, 0xFF1E1E, 0.000099999997);
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
780 if (_49C9E3(pFace, pBounding, 4, pArrayOf4))
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
781 return _49C720(pArrayOf4, a3);
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
782 return false;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
783 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
784 // 4D864C: using guessed type char byte_4D864C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
785
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
786 //----- (0049C720) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
787 char stru10::_49C720(RenderVertexSoft *a2, IndoorCameraD3D_Vec4 *a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
788 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
789 char result; // al@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
790 Vec3_float_ a3; // [sp+4h] [bp-34h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
791 float v5; // [sp+30h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
792 stru10 *thisa; // [sp+34h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
793
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
794 v5 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
795 a3.x = (double)pBLVRenderParams->vPartyPos.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
796 a3.y = (double)pBLVRenderParams->vPartyPos.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
797 thisa = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
798 a3.z = (double)pBLVRenderParams->vPartyPos.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
799 if ( _49C7C5(a2, a2 + 1, &a3, a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
800 && _49C7C5(a2 + 1, a2 + 2, &a3, a4 + 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
801 && _49C7C5(a2 + 2, a2 + 3, &a3, a4 + 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
802 result = _49C7C5(a2 + 3, a2, &a3, a4 + 3) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
803 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
804 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
805 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
806 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
807
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
808 //----- (0049C7C5) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
809 bool stru10::_49C7C5(RenderVertexSoft *a1, RenderVertexSoft *a2, Vec3_float_ *a3, IndoorCameraD3D_Vec4 *a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
810 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
811 double v5; // st7@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
812 double v6; // st6@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
813 double v7; // st5@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
814 Vec3_float_ *result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
815 __int16 v9; // fps@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
816 char v10; // c0@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
817 char v11; // c2@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
818 char v12; // c3@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
819 float v13; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
820 double v14; // st7@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
821 double v15; // st6@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
822 Vec3_float_ v1; // [sp+4h] [bp-48h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
823 Vec3_float_ v2; // [sp+10h] [bp-3Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
824 float v18; // [sp+20h] [bp-2Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
825 float v19; // [sp+24h] [bp-28h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
826 Vec3_float_ v20; // [sp+28h] [bp-24h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
827 Vec3_float_ v21; // [sp+34h] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
828 Vec3_float_ a1a; // [sp+40h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
829
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
830 a1a.x = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
831 a1a.y = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
832 a1a.z = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
833 v21.x = a3->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
834 v21.y = a3->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
835 v21.z = a3->z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
836 v5 = a1->vWorldPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
837 v6 = a1->vWorldPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
838 v2.z = a1->vWorldPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
839 v7 = a2->vWorldPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
840 v18 = a2->vWorldPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
841 v19 = a2->vWorldPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
842 v20.x = v5 - v21.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
843 v20.y = v6 - v21.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
844 v20.z = v2.z - v21.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
845 LODWORD(v1.x) = (int)v20.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
846 v1.y = v20.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
847 v1.z = v20.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
848 v20.x = v7 - v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
849 v20.y = v18 - v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
850 v20.z = v19 - v2.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
851 result = Vec3_float_::Cross(&v1, &v2, v20.x, v20.y, v20.z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
852 a1a.x = result->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
853 a1a.y = result->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
854 a1a.z = result->z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
855 if ( a1a.x != 0.0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
856 || a1a.y != 0.0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
857 || (/*UNDEF(v9),*/ v10 = a1a.z < 0.0, v11 = 0, v12 = a1a.z == 0.0, BYTE1(result) = HIBYTE(v9), a1a.z != 0.0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
858 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
859 a1a.Normalize();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
860 result = (Vec3_float_ *)a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
861 v13 = a1a.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
862 a4->x = a1a.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
863 v14 = v21.z * a1a.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
864 v15 = v21.y * a1a.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
865 a4->y = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
866 a4->z = a1a.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
867 a4->dot = v14 + v15 + v21.x * a1a.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
868 LOBYTE(result) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
869 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
870 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
871 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
872 LOBYTE(result) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
873 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
874 return (bool)result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
875 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
876
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
877 //----- (0049C8DC) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
878 bool stru10::_49C8DC(RenderVertexSoft *arg0, Vec3_float_ *a2, float *a3)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
879 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
880 double v4; // st7@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
881 double v5; // st6@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
882 double v6; // st5@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
883 Vec3_float_ *result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
884 __int16 v8; // fps@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
885 char v9; // c0@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
886 char v10; // c2@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
887 char v11; // c3@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
888 float v12; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
889 double v13; // st7@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
890 double v14; // st6@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
891 Vec3_float_ v1; // [sp+8h] [bp-3Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
892 Vec3_float_ v2; // [sp+14h] [bp-30h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
893 float v17; // [sp+24h] [bp-20h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
894 float v18; // [sp+28h] [bp-1Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
895 float v19; // [sp+2Ch] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
896 float v20; // [sp+30h] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
897 float v21; // [sp+34h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
898 Vec3_float_ a1; // [sp+38h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
899
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
900 v19 = arg0->vWorldPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
901 v20 = arg0->vWorldPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
902 v21 = arg0->vWorldPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
903 v4 = arg0[1].vWorldPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
904 v5 = arg0[1].vWorldPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
905 v2.z = arg0[1].vWorldPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
906 v6 = arg0[2].vWorldPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
907 v17 = arg0[2].vWorldPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
908 v18 = arg0[2].vWorldPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
909 a1.x = v4 - v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
910 a1.y = v5 - v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
911 a1.z = v2.z - v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
912 LODWORD(v1.x) = (int)a1.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
913 v1.y = a1.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
914 v1.z = a1.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
915 a1.x = v6 - v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
916 a1.y = v17 - v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
917 a1.z = v18 - v2.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
918 result = Vec3_float_::Cross(&v1, &v2, a1.x, a1.y, a1.z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
919 a1.x = result->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
920 a1.y = result->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
921 a1.z = result->z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
922 if ( a1.x != 0.0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
923 || a1.y != 0.0
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
924 || (/*UNDEF(v8),*/ v9 = a1.z < 0.0, v10 = 0, v11 = a1.z == 0.0, /*BYTE1(result) = HIBYTE(v8),*/ a1.z != 0.0) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
925 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
926 a1.Normalize();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
927 v12 = a1.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
928 a2->x = a1.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
929 v13 = v21 * a1.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
930 v14 = v20 * a1.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
931 a2->y = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
932 a2->z = a1.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
933 result = (Vec3_float_ *)a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
934 *a3 = -(v13 + v14 + v19 * a1.x);
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
935 return true;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
936 }
50
fde5c5acb66e BLV render
Nomad
parents: 0
diff changeset
937 return false;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
938 }