annotate stru10.cpp @ 23:509744251c8e

Player-related members
author Nomad
date Sun, 14 Oct 2012 00:27:38 +0200
parents 8b8875f5b359
children fde5c5acb66e
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 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
97 stru10::_49D379(pFace, a2a);
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) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
420 int stru10::_49D379(BLVFace *pFace, RenderVertexSoft *pVertices)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
421 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
422 BLVFace *v3; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
423 Vec3_short_ *v4; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
424 int v5; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
425 unsigned __int16 *v6; // esi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
426 char *v7; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
427 int v8; // ebx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
428 int v9; // edi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
429 int v10; // ebx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
430 int v11; // edi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
431 double v12; // st7@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
432 int v13; // edi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
433 unsigned __int16 *v14; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
434 char *v15; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
435 int v16; // ebx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
436 int v17; // edi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
437 int v18; // ebx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
438 int v19; // edi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
439 double v20; // st7@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
440 int v21; // edi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
441 unsigned __int16 *v22; // esi@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
442 char *v23; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
443 int v24; // ebx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
444 int v25; // edi@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
445 int v26; // ebx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
446 int v27; // edi@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
447 double v28; // st7@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
448 int v29; // edi@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
449 int v30; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
450 double v31; // st7@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
451 char *v32; // esi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
452 int v33; // edi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
453 int v34; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
454 Vec3_short_ *v35; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
455 signed int v36; // ecx@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
456 signed int v37; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
457 Vec3_short_ *v38; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
458 signed int v39; // ecx@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
459 signed int v40; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
460 Vec3_short_ *v41; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
461 signed int v42; // ecx@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
462 signed int v43; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
463 Vec3_short_ *v44; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
464 signed int v45; // ecx@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
465 signed int result; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
466 char v47; // [sp+10h] [bp-350h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
467 RenderVertexSoft v48; // [sp+30Ch] [bp-54h]@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
468 int v49; // [sp+33Ch] [bp-24h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
469 int v50; // [sp+340h] [bp-20h]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
470 int v51; // [sp+344h] [bp-1Ch]@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
471 int v52; // [sp+348h] [bp-18h]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
472 unsigned __int16 *v53; // [sp+34Ch] [bp-14h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
473 Vec3_short_ *v54; // [sp+350h] [bp-10h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
474 float v55; // [sp+354h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
475 float v56; // [sp+358h] [bp-8h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
476 Vec3_short_ *v57; // [sp+35Ch] [bp-4h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
477 int pFacea; // [sp+368h] [bp+8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
478 int pFaceb; // [sp+368h] [bp+8h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
479 int pFacec; // [sp+368h] [bp+8h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
480 float pFaced; // [sp+368h] [bp+8h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
481 signed int pFacee; // [sp+368h] [bp+8h]@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
482 signed int pFacef; // [sp+368h] [bp+8h]@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
483 signed int pFaceg; // [sp+368h] [bp+8h]@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
484 signed int pFaceh; // [sp+368h] [bp+8h]@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
485
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
486 v3 = pFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
487 v4 = pIndoor->pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
488 LODWORD(v55) = pFace->uAttributes;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
489 if ( BYTE1(v55) & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
490 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
491 v5 = pFace->uNumVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
492 pFacea = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
493 if ( v5 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
494 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
495 v6 = v3->pVertexIDs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
496 v7 = &v47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
497 v53 = (unsigned short *)((char *)v3->pXInterceptDisplacements - (char *)v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
498 v54 = (Vec3_short_ *)((char *)v3->pYInterceptDisplacements - (char *)v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
499 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
500 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
501 v8 = *(unsigned __int16 *)((char *)v53 + (int)v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
502 v57 = &v4[*v6];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
503 LODWORD(v56) = v57->x + v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
504 v9 = *(__int16 *)((char *)&v54->x + (int)v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
505 v10 = v57->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
506 *((float *)v7 - 1) = (double)SLODWORD(v56);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
507 v57 = (Vec3_short_ *)(v10 + v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
508 v11 = pFacea;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
509 v12 = (double)(signed int)v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
510 ++pFacea;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
511 *((int *)v7 + 1) = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
512 v13 = v3->uNumVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
513 *(float *)v7 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
514 v7 += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
515 ++v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
516 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
517 while ( pFacea < v13 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
518 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
519 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
520 if ( BYTE1(v55) & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
521 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
522 pFaceb = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
523 if ( (signed int)v3->uNumVertices > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
524 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
525 v14 = v3->pVertexIDs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
526 v15 = &v47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
527 v53 = (unsigned short *)((char *)v3->pXInterceptDisplacements - (char *)v14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
528 LODWORD(v56) = (char *)v3->pZInterceptDisplacements - (char *)v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
529 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
530 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
531 v16 = *(unsigned __int16 *)((char *)v53 + (int)v14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
532 v54 = &v4[*v14];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
533 v57 = (Vec3_short_ *)(v54->x + v16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
534 v17 = *(signed __int16 *)((char *)v14 + LODWORD(v56));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
535 v18 = v54->z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
536 *((float *)v15 - 1) = (double)(signed int)v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
537 v57 = (Vec3_short_ *)(v18 + v17);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
538 v19 = pFaceb;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
539 v20 = (double)(signed int)v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
540 ++pFaceb;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
541 *((int *)v15 + 1) = v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
542 v21 = v3->uNumVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
543 *(float *)v15 = v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
544 v15 += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
545 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
546 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
547 while ( pFaceb < v21 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
548 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
549 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
550 if ( BYTE1(v55) & 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
551 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
552 pFacec = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
553 if ( (signed int)v3->uNumVertices > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
554 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
555 v22 = v3->pVertexIDs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
556 v23 = &v47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
557 v54 = (Vec3_short_ *)((char *)v3->pYInterceptDisplacements - (char *)v22);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
558 LODWORD(v56) = (char *)v3->pZInterceptDisplacements - (char *)v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
559 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
560 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
561 v24 = *(__int16 *)((char *)&v54->x + (int)v22);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
562 LODWORD(v55) = (unsigned int)&v4[*v22];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
563 v57 = (Vec3_short_ *)(*(short *)(LODWORD(v55) + 2) + v24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
564 v25 = *(signed __int16 *)((char *)v22 + LODWORD(v56));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
565 v26 = *(short *)(LODWORD(v55) + 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
566 *((float *)v23 - 1) = (double)(signed int)v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
567 v57 = (Vec3_short_ *)(v26 + v25);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
568 v27 = pFacec;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
569 v28 = (double)(signed int)v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
570 ++pFacec;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
571 *((int *)v23 + 1) = v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
572 v29 = v3->uNumVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
573 *(float *)v23 = v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
574 v23 += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
575 ++v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
576 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
577 while ( pFacec < v29 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
578 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
579 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
580 v30 = v3->uNumVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
581 pFaced = 3.4028235e38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
582 v56 = 3.4028235e38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
583 v31 = -3.4028235e38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
584 v55 = -3.4028235e38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
585 if ( v30 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
586 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
587 v32 = &v47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
588 v33 = v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
589 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
590 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
591 if ( *((float *)v32 - 1) < (double)pFaced )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
592 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
593 LODWORD(pFaced) = *((int *)v32 - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
594 v49 = *((int *)v32 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
595 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
596 if ( *((float *)v32 - 1) > (double)v55 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
597 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
598 LODWORD(v55) = *((int *)v32 - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
599 v51 = *((int *)v32 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
600 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
601 if ( *(float *)v32 < (double)v56 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
602 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
603 LODWORD(v56) = *(int *)v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
604 v50 = *((int *)v32 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
605 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
606 if ( v31 < *(float *)v32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
607 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
608 v31 = *(float *)v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
609 v52 = *((int *)v32 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
610 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
611 v32 += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
612 --v33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
613 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
614 while ( v33 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
615 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
616 v34 = v3->pVertexIDs[v49];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
617 v48.flt_2C = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
618 v35 = &v4[v34];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
619 pFacee = v35->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
620 v36 = v35->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
621 v37 = v35->z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
622 v48.vWorldPosition.x = (double)pFacee;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
623 v48.vWorldPosition.y = (double)v36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
624 v48.vWorldPosition.z = (double)v37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
625 memcpy(pVertices, &v48, 0x30u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
626 v48.flt_2C = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
627 v38 = &pIndoor->pVertices[v3->pVertexIDs[v50]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
628 pFacef = v38->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
629 v39 = v38->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
630 v40 = v38->z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
631 v48.vWorldPosition.x = (double)pFacef;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
632 v48.vWorldPosition.y = (double)v39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
633 v48.vWorldPosition.z = (double)v40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
634 memcpy(&pVertices[1], &v48, sizeof(pVertices[1]));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
635 v48.flt_2C = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
636 v41 = &pIndoor->pVertices[v3->pVertexIDs[v51]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
637 pFaceg = v41->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
638 v42 = v41->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
639 v43 = v41->z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
640 v48.vWorldPosition.x = (double)pFaceg;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
641 v48.vWorldPosition.y = (double)v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
642 v48.vWorldPosition.z = (double)v43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
643 memcpy(&pVertices[2], &v48, sizeof(pVertices[2]));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
644 v48.flt_2C = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
645 v44 = &pIndoor->pVertices[v3->pVertexIDs[v52]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
646 pFaceh = v44->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
647 v45 = v44->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
648 result = v44->z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
649 v48.vWorldPosition.x = (double)pFaceh;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
650 v48.vWorldPosition.y = (double)v45;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
651 v48.vWorldPosition.z = (double)result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
652 memcpy(&pVertices[3], &v48, sizeof(pVertices[3]));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
653 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
654 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
655
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
656
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
657 //----- (0049C9E3) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
658 bool stru10::_49C9E3(BLVFace *a3, RenderVertexSoft *arg4, unsigned int uNumVertices, RenderVertexSoft *arg0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
659 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
660 __debugbreak();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
661 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
662 /*IndoorCameraD3D *v6; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
663 PolygonType v7; // al@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
664 unsigned int v8; // edx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
665 char v10; // zf@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
666 float v13; // ST14_4@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
667 stru10 *v15; // ecx@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
668 RenderVertexSoft *v16; // ST0C_4@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
669 bool result; // eax@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
670 float v18; // ST14_4@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
671 stru10 *v19; // edi@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
672 float v20; // ST14_4@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
673 float v21; // ST14_4@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
674 float v22; // ST14_4@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
675 float v23; // ST14_4@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
676 float v24; // ST14_4@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
677 RenderVertexSoft v25; // [sp+10h] [bp-90h]@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
678 RenderVertexSoft v26; // [sp+40h] [bp-60h]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
679 IndoorCameraD3D *thisa; // [sp+70h] [bp-30h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
680 stru10 *v31; // [sp+84h] [bp-1Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
681 float v32; // [sp+88h] [bp-18h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
682 Vec3_float_ a1; // [sp+8Ch] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
683 float v35; // [sp+9Ch] [bp-4h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
684
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
685 _ESI = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
686 v31 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
687 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
688 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
689 fld dword ptr [esi]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
690 fld dword ptr [esi+4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
691 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
692 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
693 v6 = pGame->pIndoorCameraD3D;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
694 v7 = a3->uPolygonType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
695 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
696 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
697 fstp [ebp+var_28]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
698 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
699 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
700 thisa = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
701 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
702 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
703 fstp [ebp+var_24]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
704 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
705 fstp [ebp+a1.x]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
706 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
707 fstp [ebp+a1.y]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
708 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
709 fstp [ebp+a1.z]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
710 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
711 if ( v7 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
712 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
713 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
714 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
715 fchs
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
716 fstp [ebp+a1.x]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
717 fstp [ebp+a1.y]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
718 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
719 fstp [ebp+a1.z]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
720 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
721 a1.Normalize();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
722 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
723 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
724 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
725 fstp [ebp+var_28]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
726 fld1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
727 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
728 LABEL_6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
729 __asm { fstp [ebp+var_24] }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
730 goto LABEL_7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
731 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
732 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
733 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
734 fstp st
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
735 fstp st
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
736 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
737 if ( v7 == 3 || v7 == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
738 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
739 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
740 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
741 fld1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
742 fstp [ebp+a1.x]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
743 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
744 fstp [ebp+a1.y]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
745 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
746 fstp [ebp+a1.z]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
747 fld1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
748 fstp [ebp+var_28]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
749 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
750 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
751 goto LABEL_6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
752 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
753 LABEL_7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
754 v8 = _ESI->uAttributes;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
755 _ECX = arg4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
756 __asm { fld ds:flt_4D84F0 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
757 if ( BYTE1(v8) & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
758 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
759 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
760 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
761 fld dword ptr [ecx+60h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
762 fadd dword ptr [ecx]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
763 fmul st, st(1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
764 fstp [ebp+arg4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
765 fld dword ptr [ecx+94h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
766 fadd dword ptr [ecx+34h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
767 fmul st, st(1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
768 fstp [ebp+var_18]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
769 fld dword ptr [ecx+68h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
770 fadd dword ptr [ecx+8]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
771 fmul st, st(1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
772 fstp [ebp+var_4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
773 fld [ebp+arg4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
774 fsub dword ptr [ecx]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
775 fstp [ebp+a3]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
776 fld [ebp+var_18]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
777 fsub dword ptr [ecx+34h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
778 fstp [ebp+var_8]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
779 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
780 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
781 if ( BYTE1(v8) & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
782 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
783 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
784 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
785 fld dword ptr [ecx+60h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
786 fadd dword ptr [ecx]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
787 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
788 v10 = _ESI->uPolygonType == 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
789 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
790 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
791 fmul st, st(1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
792 fstp [ebp+arg4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
793 fld dword ptr [ecx+64h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
794 fadd dword ptr [ecx+4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
795 fmul st, st(1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
796 fstp [ebp+var_18]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
797 fld dword ptr [ecx+98h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
798 fadd dword ptr [ecx+38h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
799 fmul st, st(1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
800 fstp [ebp+var_4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
801 fld [ebp+arg4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
802 fsub dword ptr [ecx]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
803 fstp [ebp+a3]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
804 fld [ebp+var_4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
805 fsub dword ptr [ecx+38h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
806 fstp [ebp+var_8]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
807 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
808 if ( v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
809 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
810 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
811 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
812 fld [ebp+a1.x]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
813 fcomp ds:dword_4D84A8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
814 fnstsw ax
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
815 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
816 if ( __SETP__(HIBYTE(_AX) & 0x44, 0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
817 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
818 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
819 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
820 fld [ebp+a3]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
821 fdiv [ebp+a1.x]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
822 fstp [ebp+a3]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
823 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
824 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
825 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
826 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
827 if ( BYTE1(v8) & 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
828 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
829 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
830 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
831 fld dword ptr [ecx+60h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
832 fadd dword ptr [ecx]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
833 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
834 v10 = _ESI->uPolygonType == 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
835 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
836 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
837 fmul st, st(1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
838 fstp [ebp+arg4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
839 fld dword ptr [ecx+64h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
840 fadd dword ptr [ecx+4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
841 fmul st, st(1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
842 fstp [ebp+var_18]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
843 fld dword ptr [ecx+98h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
844 fadd dword ptr [ecx+38h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
845 fmul st, st(1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
846 fstp [ebp+var_4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
847 fstp st
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
848 fld [ebp+var_18]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
849 fsub dword ptr [ecx+4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
850 fstp [ebp+a3]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
851 fld [ebp+var_4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
852 fsub dword ptr [ecx+38h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
853 fstp [ebp+var_8]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
854 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
855 if ( v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
856 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
857 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
858 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
859 fld [ebp+a1.x]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
860 fcomp ds:dword_4D84A8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
861 fnstsw ax
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
862 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
863 if ( __SETP__(HIBYTE(_AX) & 0x44, 0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
864 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
865 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
866 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
867 fld [ebp+a3]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
868 fdiv [ebp+a1.y]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
869 fstp [ebp+a3]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
870 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
871 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
872 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
873 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
874 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
875 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
876 __asm { fstp st }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
877 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
878 if ( byte_4D864C && pGame->uFlags & 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
879 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
880 __asm { fldz }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
881 LODWORD(v26.vWorldPosition.x) = arg4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
882 __asm { fstp [ebp+var_60.flt_2C] }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
883 v26.vWorldPosition.y = v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
884 __asm { fldz }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
885 v26.vWorldPosition.z = v35;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
886 __asm { fstp [esp+0A0h+var_A0] }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
887 v6->do_draw_debug_line_sw(_ECX, 0xFF00u, &v26, 0xFF0000u, 0, v13);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
888 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
889 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
890 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
891 fld [ebp+var_8]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
892 fmul ds:flt_4D84E8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
893 fld [ebp+var_8]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
894 fmul [ebp+var_28]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
895 fld [ebp+var_8]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
896 fmul [ebp+var_24]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
897 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
898 _EBX = arg0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
899 v15 = v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
900 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
901 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
902 fst [ebp+var_20]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
903 fld [ebp+a3]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
904 fmul [ebp+a1.x]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
905 fld [ebp+a3]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
906 fmul [ebp+a1.y]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
907 fld [ebp+a3]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
908 fmul [ebp+a1.z]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
909 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
910 v16 = arg0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
911 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
912 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
913 fstp [ebp+var_8]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
914 fld [ebp+arg4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
915 fsub st, st(2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
916 fld st
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
917 fadd st, st(6)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
918 fstp dword ptr [ebx]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
919 fld [ebp+var_18]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
920 fsub st, st(2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
921 fld st
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
922 fadd st, st(6)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
923 fstp dword ptr [ebx+4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
924 fld [ebp+var_4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
925 fsub [ebp+var_8]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
926 fst [ebp+a3]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
927 fadd st, st(5)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
928 fstp dword ptr [ebx+8]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
929 fld st(1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
930 fsub st, st(7)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
931 fstp dword ptr [ebx+30h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
932 fsub st, st(5)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
933 fstp dword ptr [ebx+34h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
934 fstp st
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
935 fld [ebp+a3]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
936 fsub st, st(3)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
937 fstp dword ptr [ebx+38h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
938 fld st(1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
939 fadd [ebp+arg4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
940 fst [ebp+a3]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
941 fsub st, st(5)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
942 fstp dword ptr [ebx+60h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
943 fadd [ebp+var_18]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
944 fstp st(2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
945 fstp st
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
946 fld st
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
947 fsub st, st(2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
948 fstp dword ptr [ebx+64h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
949 fld [ebp+var_8]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
950 fadd [ebp+var_4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
951 fst [ebp+arg0]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
952 fsub [ebp+var_20]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
953 fstp dword ptr [ebx+68h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
954 fld [ebp+a3]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
955 fadd st, st(3)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
956 fstp dword ptr [ebx+90h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
957 fadd st, st(1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
958 fstp dword ptr [ebx+94h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
959 fstp st
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
960 fstp st
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
961 fld [ebp+arg0]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
962 fadd [ebp+var_20]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
963 fstp dword ptr [ebx+98h]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
964 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
965 fstp [ebp+a1.x]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
966 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
967 fstp [ebp+a1.y]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
968 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
969 fstp [ebp+a1.z]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
970 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
971 result = this->_49C8DC(v16, &a1, (float *)&a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
972 if ( result )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
973 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
974 if ( byte_4D864C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
975 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
976 HIWORD(result) = HIWORD(pGame);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
977 if ( pGame->uFlags & 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
978 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
979 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
980 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
981 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
982 fstp [ebp+var_60.flt_2C]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
983 fld ds:flt_4D8770
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
984 fld [ebp+a1.x]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
985 fmul st, st(1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
986 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
987 LODWORD(v25.vWorldPosition.x) = (uint)arg4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
988 v25.vWorldPosition.y = v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
989 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
990 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
991 fstp [ebp+var_60.vWorldPosition.x]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
992 fld [ebp+a1.y]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
993 fmul st, st(1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
994 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
995 v25.vWorldPosition.z = v35;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
996 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
997 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
998 fstp [ebp+var_60.vWorldPosition.y]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
999 fld [ebp+a1.z]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1000 fmul st, st(1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1001 fstp [ebp+var_60.vWorldPosition.z]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1002 fstp st
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1003 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1004 fstp [ebp+var_90.flt_2C]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1005 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1006 fstp [esp+0A0h+var_A0]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1007 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1008 pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v25, 0xFFFFFFFFu, &v26, 0xFFFF00u, 0, v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1009 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1010 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1011 __asm { fild pBLVRenderParams->vPartyPos.z }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1012 memcpy(&v25, _EBX, sizeof(v25));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1013 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1014 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1015 fsubr [ebp+var_90.vWorldPosition.z]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1016 fmul [ebp+a1.z]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1017 fild pBLVRenderParams->vPartyPos.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1018 fsubr [ebp+var_90.vWorldPosition.y]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1019 fmul [ebp+a1.y]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1020 faddp st(1), st
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1021 fild pBLVRenderParams->vPartyPos.x
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1022 fsubr [ebp+var_90.vWorldPosition.x]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1023 fmul [ebp+a1.x]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1024 faddp st(1), st
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1025 fcomp ds:flt_4D84E8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1026 fnstsw ax
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1027 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1028 if ( !__SETP__(BYTE1(result) & 5, 0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1029 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1030 result = (bool)&_EBX[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1031 memcpy(&v25, &_EBX[1], sizeof(v25));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1032 memcpy(&_EBX[1], &_EBX[3], sizeof(_EBX[1]));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1033 memcpy(&_EBX[3], &v25, sizeof(_EBX[3]));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1034 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1035 if ( byte_4D864C && pGame->uFlags & 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1036 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1037 v19 = v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1038 if ( !LOBYTE(v31->field_4) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1039 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1040 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1041 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1042 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1043 fstp [ebp+var_60.flt_2C]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1044 fild pParty->vPosition.x
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1045 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1046 a3 = (BLVFace *)(pParty->vPosition.y + pParty->sEyelevel);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1047 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1048 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1049 fstp [ebp+var_60.vWorldPosition.x]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1050 fild pParty->vPosition.z
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1051 fstp [ebp+var_60.vWorldPosition.y]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1052 fild [ebp+a3]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1053 fstp [ebp+var_60.vWorldPosition.z]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1054 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1055 fstp [esp+0A0h+var_A0]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1056 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1057 IndoorCameraD3D::do_draw_debug_line_sw(pGame->pIndoorCameraD3D, &v26, 0xFF0000u, _EBX, 0xFF0000u, 0, v20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1058 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1059 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1060 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1061 fstp [esp+0A0h+var_A0]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1062 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1063 IndoorCameraD3D::do_draw_debug_line_sw(pGame->pIndoorCameraD3D, &v26, 0xFF00u, _EBX + 1, 0xFF00u, 0, v21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1064 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1065 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1066 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1067 fstp [esp+0A0h+var_A0]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1068 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1069 IndoorCameraD3D::do_draw_debug_line_sw(pGame->pIndoorCameraD3D, &v26, 0xFFu, _EBX + 2, 0xFFu, 0, v22);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1070 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1071 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1072 fldz
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1073 fstp [esp+0A0h+var_A0]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1074 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1075 IndoorCameraD3D::do_draw_debug_line_sw(pGame->pIndoorCameraD3D, &v26, 0xFFFFFFu, _EBX + 3, 0xFFFFFFu, 0, v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1076 LOBYTE(v19->field_4) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1077 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1078 __asm
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1079 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1080 fld ds:flt_4D86E8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1081 fstp [esp+0A0h+var_A0]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1082 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1083 IndoorCameraD3D::debug_outline_sw(thisa, _EBX, uNumVertices, 0x1EFF1Eu, v24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1084 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1085 LOBYTE(result) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1086 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1087 return result;*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1088 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1089
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1090
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1091
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1092 //----- (0049C5B0) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1093 stru10::stru10()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1094 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1095 LOBYTE(this->field_4) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1096 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1097
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1098 //----- (0049C5BD) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1099 stru10::~stru10()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1100 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1101 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1102
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1103 //----- (0049C5DA) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1104 char stru10::_49C5DA(BLVFace *a2, RenderVertexSoft *a3, int *a4, IndoorCameraD3D_Vec4 *a5, RenderVertexSoft *a6)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1105 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1106 stru10 *v6; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1107 char *v7; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1108 signed int v8; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1109 IndoorCameraD3D *v9; // esi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1110 char result; // al@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1111 RenderVertexSoft a4a[4]; // [sp+Ch] [bp-C0h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1112
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1113 v6 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1114 v7 = (char *)&a4a[0].flt_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1115 v8 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1116 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1117 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1118 *(float *)v7 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1119 v7 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1120 --v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1121 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1122 while ( v8 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1123 v9 = pGame->pIndoorCameraD3D;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1124 _49CE9E(a2, a3, *a4, a4a);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1125 if ( byte_4D864C && pGame->uFlags & 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1126 pGame->pIndoorCameraD3D->debug_outline_sw(a4a, 4u, 0xFF1E1Eu, 0.000099999997);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1127 result = _49C9E3(a2, a4a, 4u, a6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1128 if ( result )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1129 result = _49C720(a6, a5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1130 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1131 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1132 // 4D864C: using guessed type char byte_4D864C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1133
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1134 //----- (0049C681) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1135 char stru10::_49C681(BLVFace *pFace, IndoorCameraD3D_Vec4 *a3, RenderVertexSoft *pArrayOf4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1136 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1137 stru10 *v4; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1138 char *v5; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1139 signed int v6; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1140 IndoorCameraD3D *v7; // esi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1141 char result; // al@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1142 RenderVertexSoft a2a[4]; // [sp+Ch] [bp-C0h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1143
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1144 v4 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1145 v5 = (char *)&a2a[0].flt_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1146 v6 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1147 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1148 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1149 *(float *)v5 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1150 v5 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1151 --v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1152 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1153 while ( v6 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1154 v7 = pGame->pIndoorCameraD3D;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1155 _49D379(pFace, a2a);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1156 if ( byte_4D864C && pGame->uFlags & 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1157 pGame->pIndoorCameraD3D->debug_outline_sw(a2a, 4u, 0xFF1E1Eu, 0.000099999997);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1158 result = _49C9E3(pFace, a2a, 4u, pArrayOf4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1159 if ( result )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1160 result = _49C720(pArrayOf4, a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1161 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1162 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1163 // 4D864C: using guessed type char byte_4D864C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1164
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1165 //----- (0049C720) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1166 char stru10::_49C720(RenderVertexSoft *a2, IndoorCameraD3D_Vec4 *a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1167 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1168 char result; // al@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1169 Vec3_float_ a3; // [sp+4h] [bp-34h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1170 float v5; // [sp+30h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1171 stru10 *thisa; // [sp+34h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1172
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1173 v5 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1174 a3.x = (double)pBLVRenderParams->vPartyPos.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1175 a3.y = (double)pBLVRenderParams->vPartyPos.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1176 thisa = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1177 a3.z = (double)pBLVRenderParams->vPartyPos.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1178 if ( _49C7C5(a2, a2 + 1, &a3, a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1179 && _49C7C5(a2 + 1, a2 + 2, &a3, a4 + 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1180 && _49C7C5(a2 + 2, a2 + 3, &a3, a4 + 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1181 result = _49C7C5(a2 + 3, a2, &a3, a4 + 3) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1182 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1183 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1184 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1185 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1186
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1187 //----- (0049C7C5) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1188 bool stru10::_49C7C5(RenderVertexSoft *a1, RenderVertexSoft *a2, Vec3_float_ *a3, IndoorCameraD3D_Vec4 *a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1189 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1190 double v5; // st7@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1191 double v6; // st6@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1192 double v7; // st5@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1193 Vec3_float_ *result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1194 __int16 v9; // fps@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1195 char v10; // c0@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1196 char v11; // c2@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1197 char v12; // c3@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1198 float v13; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1199 double v14; // st7@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1200 double v15; // st6@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1201 Vec3_float_ v1; // [sp+4h] [bp-48h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1202 Vec3_float_ v2; // [sp+10h] [bp-3Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1203 float v18; // [sp+20h] [bp-2Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1204 float v19; // [sp+24h] [bp-28h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1205 Vec3_float_ v20; // [sp+28h] [bp-24h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1206 Vec3_float_ v21; // [sp+34h] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1207 Vec3_float_ a1a; // [sp+40h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1208
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1209 a1a.x = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1210 a1a.y = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1211 a1a.z = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1212 v21.x = a3->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1213 v21.y = a3->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1214 v21.z = a3->z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1215 v5 = a1->vWorldPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1216 v6 = a1->vWorldPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1217 v2.z = a1->vWorldPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1218 v7 = a2->vWorldPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1219 v18 = a2->vWorldPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1220 v19 = a2->vWorldPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1221 v20.x = v5 - v21.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1222 v20.y = v6 - v21.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1223 v20.z = v2.z - v21.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1224 LODWORD(v1.x) = (int)v20.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1225 v1.y = v20.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1226 v1.z = v20.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1227 v20.x = v7 - v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1228 v20.y = v18 - v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1229 v20.z = v19 - v2.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1230 result = Vec3_float_::Cross(&v1, &v2, v20.x, v20.y, v20.z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1231 a1a.x = result->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1232 a1a.y = result->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1233 a1a.z = result->z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1234 if ( a1a.x != 0.0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1235 || a1a.y != 0.0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1236 || (/*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
1237 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1238 a1a.Normalize();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1239 result = (Vec3_float_ *)a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1240 v13 = a1a.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1241 a4->x = a1a.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1242 v14 = v21.z * a1a.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1243 v15 = v21.y * a1a.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1244 a4->y = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1245 a4->z = a1a.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1246 a4->dot = v14 + v15 + v21.x * a1a.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1247 LOBYTE(result) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1248 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1249 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1250 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1251 LOBYTE(result) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1252 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1253 return (bool)result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1254 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1255
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1256 //----- (0049C8DC) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1257 bool stru10::_49C8DC(RenderVertexSoft *arg0, Vec3_float_ *a2, float *a3)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1258 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1259 double v4; // st7@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1260 double v5; // st6@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1261 double v6; // st5@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1262 Vec3_float_ *result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1263 __int16 v8; // fps@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1264 char v9; // c0@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1265 char v10; // c2@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1266 char v11; // c3@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1267 float v12; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1268 double v13; // st7@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1269 double v14; // st6@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1270 Vec3_float_ v1; // [sp+8h] [bp-3Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1271 Vec3_float_ v2; // [sp+14h] [bp-30h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1272 float v17; // [sp+24h] [bp-20h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1273 float v18; // [sp+28h] [bp-1Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1274 float v19; // [sp+2Ch] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1275 float v20; // [sp+30h] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1276 float v21; // [sp+34h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1277 Vec3_float_ a1; // [sp+38h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1278
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1279 v19 = arg0->vWorldPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1280 v20 = arg0->vWorldPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1281 v21 = arg0->vWorldPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1282 v4 = arg0[1].vWorldPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1283 v5 = arg0[1].vWorldPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1284 v2.z = arg0[1].vWorldPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1285 v6 = arg0[2].vWorldPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1286 v17 = arg0[2].vWorldPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1287 v18 = arg0[2].vWorldPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1288 a1.x = v4 - v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1289 a1.y = v5 - v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1290 a1.z = v2.z - v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1291 LODWORD(v1.x) = (int)a1.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1292 v1.y = a1.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1293 v1.z = a1.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1294 a1.x = v6 - v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1295 a1.y = v17 - v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1296 a1.z = v18 - v2.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1297 result = Vec3_float_::Cross(&v1, &v2, a1.x, a1.y, a1.z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1298 a1.x = result->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1299 a1.y = result->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1300 a1.z = result->z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1301 if ( a1.x != 0.0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1302 || a1.y != 0.0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1303 || (/*UNDEF(v8),*/ v9 = a1.z < 0.0, v10 = 0, v11 = a1.z == 0.0, BYTE1(result) = HIBYTE(v8), a1.z != 0.0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1304 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1305 a1.Normalize();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1306 v12 = a1.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1307 a2->x = a1.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1308 v13 = v21 * a1.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1309 v14 = v20 * a1.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1310 a2->y = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1311 a2->z = a1.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1312 result = (Vec3_float_ *)a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1313 *a3 = -(v13 + v14 + v19 * a1.x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1314 LOBYTE(result) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1315 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1316 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1317 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1318 LOBYTE(result) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1319 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1320 return (bool)result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1321 }