0
|
1 #include "DecalBuilder.h"
|
|
2 #include "Game.h"
|
|
3 #include "Time.h"
|
|
4 #include "stru314.h"
|
|
5 #include "Outdoor.h"
|
|
6
|
|
7 #include "mm7_data.h"
|
|
8 //#include "MM7.h"
|
|
9
|
|
10
|
|
11
|
|
12
|
|
13
|
27
|
14 struct DecalBuilder *pDecalBuilder = new DecalBuilder;
|
|
15 struct BloodsplatContainer *pBloodsplatContainer = new BloodsplatContainer;
|
0
|
16
|
|
17
|
|
18 //----- (0043B570) --------------------------------------------------------
|
|
19 double DecalBuilder_stru0::_43B570()
|
|
20 {
|
|
21 DecalBuilder_stru0 *v1; // esi@1
|
|
22 double result; // st7@3
|
|
23
|
|
24 v1 = this;
|
|
25 if ( this->field_1C_flags & 1 )
|
|
26 {
|
|
27 if ( (double)(signed __int64)(this->field_20_time - pEventTimer->Time() + 384) * 0.0026041667 >= 0.0 )
|
|
28 result = (double)(signed __int64)(v1->field_20_time - pEventTimer->Time() + 384) * 0.0026041667;
|
|
29 else
|
|
30 result = 0.0;
|
|
31 }
|
|
32 else
|
|
33 {
|
|
34 result = 1.0;
|
|
35 }
|
|
36 return result;
|
|
37 }
|
|
38
|
|
39
|
|
40
|
|
41
|
|
42
|
|
43 //----- (0043B6EF) --------------------------------------------------------
|
|
44 bool BloodsplatContainer::AddBloodsplat(float x, float y, float z, float radius, char r, char g, char b)
|
|
45 {
|
|
46 int *v8; // esi@1
|
|
47 int v9; // eax@3
|
|
48 Bloodsplat *v10; // eax@3
|
|
49 int *result; // eax@3
|
|
50 int v12; // ecx@3
|
|
51
|
|
52 v8 = &this->uNumBloodsplats;
|
|
53 if ( this->uNumBloodsplats == 64 )
|
|
54 *v8 = 0;
|
|
55 v9 = 5 * (*v8)++;
|
|
56 v10 = &this->std__vector_pBloodsplats[8 * v9 / 0x28u];
|
|
57 v10->x = x;
|
|
58 v10->y = y;
|
|
59 v10->z = z;
|
|
60 v10->radius = radius;
|
|
61 v10->r = r;
|
|
62 v10->g = g;
|
|
63 v10->b = b;
|
|
64 result = (int *)&this->std__vector_pBloodsplats_size;
|
|
65 v12 = this->std__vector_pBloodsplats_size + 1;
|
|
66 if ( v12 > 64 )
|
|
67 v12 = 64;
|
|
68 *result = v12;
|
|
69 LOBYTE(result) = 1;
|
|
70 return (bool)result;
|
|
71 }
|
|
72
|
|
73 //----- (0049B490) --------------------------------------------------------
|
|
74 bool DecalBuilder::AddBloodsplat(float x, float y, float z, float r, float g, float b, float radius, int a8, int a9)
|
|
75 {
|
2
|
76 //double v10; // ST1C_8@1
|
0
|
77 char v11; // ST24_1@1
|
2
|
78 //double v12; // ST1C_8@1
|
|
79 //double v13; // ST1C_8@1
|
0
|
80 int a7a; // [sp+40h] [bp+18h]@1
|
2
|
81 //float arg14a; // [sp+44h] [bp+1Ch]@1
|
|
82 //float arg14b; // [sp+44h] [bp+1Ch]@1
|
|
83 //float arg14c; // [sp+44h] [bp+1Ch]@1
|
0
|
84
|
2
|
85 /*arg14a = b * 255.0;
|
0
|
86 v10 = arg14a + 6.7553994e15;
|
|
87 v11 = LOBYTE(v10);
|
|
88 arg14b = g * 255.0;
|
|
89 v12 = arg14b + 6.7553994e15;
|
|
90 a7a = LODWORD(v12);
|
|
91 arg14c = r * 255.0;
|
2
|
92 v13 = arg14c + 6.7553994e15;*/
|
|
93 return pBloodsplatContainer->AddBloodsplat(x, y, z, radius,
|
|
94 //SLOBYTE(v13), a7a, v11);
|
|
95 r * 255.0f,
|
|
96 g * 255.0f,
|
|
97 b * 255.0f);
|
0
|
98 }
|
|
99
|
|
100 //----- (0049B525) --------------------------------------------------------
|
|
101 void DecalBuilder::Reset(unsigned int bPreserveBloodsplats)
|
|
102 {
|
|
103 if ( !bPreserveBloodsplats )
|
|
104 {
|
|
105 pBloodsplatContainer->std__vector_pBloodsplats_size = 0;
|
|
106 pBloodsplatContainer->uNumBloodsplats = 0;
|
|
107 }
|
27
|
108 std__vector_pDecals_size = 0;
|
0
|
109 }
|
|
110
|
|
111 //----- (0049B540) --------------------------------------------------------
|
|
112 char DecalBuilder::ApplyDecals(int a2, char a3, stru154 *a4, int a5, RenderVertexSoft *a6, int a7, char a8, int a9)
|
|
113 {
|
|
114 char *v9; // eax@3
|
|
115 signed int v10; // ecx@3
|
|
116 RenderVertexSoft *v11; // eax@10
|
|
117 unsigned int v12; // edx@10
|
|
118 RenderVertexSoft *v13; // esi@11
|
|
119 RenderVertexSoft *v14; // edi@11
|
|
120 char v15; // zf@11
|
|
121 stru154 *v16; // esi@12
|
|
122 double v18; // st7@17
|
|
123 double v19; // st6@17
|
|
124 float v20; // eax@17
|
|
125 Bloodsplat *v21; // esi@21
|
|
126 int v22; // eax@21
|
|
127 int v23; // ecx@21
|
|
128 double v24; // st7@21
|
|
129 int v25; // ebx@21
|
|
130 double v26; // st7@21
|
|
131 int v27; // edi@21
|
|
132 double v28; // st7@21
|
|
133 int v29; // ST10_4@21
|
|
134 int v30; // ST08_4@21
|
|
135 DecalBuilder *v31; // esi@21
|
|
136 int v32; // [sp+4h] [bp-44h]@18
|
|
137 RenderVertexSoft *v33; // [sp+8h] [bp-40h]@21
|
|
138 stru314 *v34; // [sp+Ch] [bp-3Ch]@21
|
|
139 float v35; // [sp+10h] [bp-38h]@21
|
|
140 float v36; // [sp+14h] [bp-34h]@17
|
|
141 int v37; // [sp+18h] [bp-30h]@17
|
|
142 int a5a; // [sp+28h] [bp-20h]@21
|
|
143 int v39; // [sp+2Ch] [bp-1Ch]@21
|
|
144 int v40; // [sp+30h] [bp-18h]@21
|
|
145 int v41; // [sp+34h] [bp-14h]@22
|
|
146 int v42; // [sp+38h] [bp-10h]@21
|
|
147 int v43; // [sp+3Ch] [bp-Ch]@21
|
|
148 DecalBuilder *thisa; // [sp+40h] [bp-8h]@1
|
|
149 RenderVertexSoft *a11; // [sp+44h] [bp-4h]@8
|
|
150
|
|
151 thisa = this;
|
|
152 if ( !a5 )
|
|
153 return 0;
|
|
154
|
|
155 static RenderVertexSoft static_AE4F90[64];
|
|
156 static bool __init_flag1 = false;
|
|
157 if (!__init_flag1)
|
|
158 {
|
|
159 __init_flag1 = true;
|
|
160
|
|
161 for (uint i = 0; i < 64; ++i)
|
|
162 static_AE4F90[i].flt_2C = 0.0f;
|
|
163 }
|
|
164
|
|
165 static stru314 static_AE4F60; // idb
|
|
166 /*static bool __init_flag2 = false;
|
|
167 if (!__init_flag2)
|
|
168 {
|
|
169 __init_flag2 = true;
|
|
170
|
|
171 stru314::stru314(&static_AE4F60);
|
|
172 }*/
|
|
173
|
|
174 a11 = a6;
|
|
175 if ( a7 )
|
|
176 {
|
|
177 if ( a5 > 0 )
|
|
178 {
|
|
179 v11 = static_AE4F90;
|
|
180 v12 = (char *)a6 - (char *)static_AE4F90;
|
|
181 a6 = (RenderVertexSoft *)a5;
|
|
182 do
|
|
183 {
|
|
184 v13 = (RenderVertexSoft *)((char *)v11 + v12);
|
|
185 v14 = v11;
|
|
186 ++v11;
|
|
187 v15 = a6 == (RenderVertexSoft *)1;
|
|
188 a6 = (RenderVertexSoft *)((char *)a6 - 1);
|
|
189 memcpy(v14, v13, 0x30u);
|
|
190 }
|
|
191 while ( !v15 );
|
|
192 }
|
|
193 v16 = a4;
|
|
194 if ( pGame->pIndoorCameraD3D->_437376(a4, static_AE4F90, (unsigned int *)&a5) == 1 )
|
|
195 {
|
|
196 if ( !a5 )
|
|
197 return 0;
|
|
198 a11 = static_AE4F90;
|
|
199 }
|
|
200 }
|
|
201 else
|
|
202 {
|
|
203 v16 = a4;
|
|
204 }
|
|
205 v18 = v16->vNormal.z;
|
|
206 v19 = v16->vNormal.y;
|
|
207 v20 = v16->vNormal.x;
|
|
208 v37 = (int)&stru_AE4F7C;
|
|
209 stru_AE4F64.y = v19;
|
|
210 stru_AE4F64.x = v20;
|
|
211 LODWORD(v36) = (DWORD)&stru_AE4F70;
|
|
212 stru_AE4F64.z = v18;
|
|
213 dword_AE4F88 = LODWORD(v16->field_10);
|
|
214 if ( !pGame->pIndoorCameraD3D->GetFacetOrientation(
|
|
215 v16->field_14,
|
|
216 &stru_AE4F64,
|
|
217 &stru_AE4F70,
|
|
218 &stru_AE4F7C) )
|
|
219 {
|
|
220 MessageBoxW(nullptr, L"Error: Failed to get the facet orientation", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\PolyProjector.cpp:101", 0);
|
|
221 }
|
|
222 a7 = 0;
|
|
223 if ( thisa->uNumDecals > 0 )
|
|
224 {
|
|
225 a6 = (RenderVertexSoft *)thisa->std__vector_30B00C;
|
|
226 do
|
|
227 {
|
|
228 v21 = &pBloodsplatContainer->std__vector_pBloodsplats[LODWORD(a6->vWorldPosition.x)];
|
|
229 *(float *)&v37 = v21->z;
|
|
230 v36 = v21->y;
|
|
231 v35 = v21->x;
|
|
232 v22 = sub_43F5C8(a2, a9, v35, v36, *(float *)&v37);
|
|
233 v23 = v21->b;
|
|
234 v24 = v21->x;
|
|
235 v42 = v22;
|
|
236 BYTE3(v22) = 0;
|
|
237 *(short *)((char *)&v22 + 1) = v21->r;
|
|
238 LOBYTE(v22) = v21->g;
|
|
239 v43 = v23 | (v22 << 8);
|
|
240 v25 = (signed __int64)v24;
|
|
241 v26 = v21->z;
|
|
242 v27 = (signed __int64)v21->y;
|
|
243 v37 = a8;
|
|
244 v40 = (signed __int64)v26;
|
|
245 v28 = *(float *)&v21->field_14;
|
|
246 LODWORD(v36) = (uint32)a11;
|
|
247 a5a = v25;
|
|
248 v39 = v27;
|
|
249 LODWORD(v35) = a5;
|
|
250 v34 = &static_AE4F60;
|
|
251 *(float *)&v33 = v28;
|
|
252 v32 = v23 | (v22 << 8);
|
|
253 *(float *)&v29 = v21->radius;
|
|
254 v30 = (int)v21;
|
|
255 v31 = thisa;
|
|
256 if ( !thisa->_49B790_build_decal_geometry(
|
|
257 v42,
|
|
258 a3,
|
|
259 v30,
|
|
260 (int)&a5a,
|
|
261 v29,
|
|
262 v43,
|
|
263 v33,
|
|
264 &static_AE4F60,
|
|
265 a5,
|
|
266 a11,
|
|
267 a8) )
|
|
268 {
|
|
269 MessageBoxW(nullptr, L"Error: Failed to build decal geometry", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\PolyProjector.cpp:114", 0);
|
|
270 }
|
|
271 ++a7;
|
|
272 a6 = (RenderVertexSoft *)((char *)a6 + 4);
|
|
273 }
|
|
274 while ( a7 < v31->uNumDecals );
|
|
275 }
|
|
276 return 1;
|
|
277 }
|
|
278 // AE4F88: using guessed type int dword_AE4F88;
|
|
279 // AE5B90: using guessed type char static_init_flag__AE4F90_bit1__AE4F60_bit2;
|
|
280
|
|
281 //----- (0049B790) --------------------------------------------------------
|
|
282 char DecalBuilder::_49B790_build_decal_geometry(int a2, char a3, int a4, int a5, int a6, int a7, RenderVertexSoft *a8, stru314 *a9, signed int a10, RenderVertexSoft *a11, char uClipFlags)
|
|
283 {
|
|
284 DecalBuilder *v12; // esi@1
|
|
285 Decal *v13; // edi@2
|
|
286 char *v14; // eax@2
|
|
287 double v15; // st7@4
|
|
288 double v16; // st7@4
|
|
289 int v17; // eax@4
|
|
290 stru314 *v18; // ebx@4
|
|
291 double v19; // st7@4
|
|
292 double v20; // st7@4
|
|
293 double v21; // st7@4
|
|
294 double v22; // st6@4
|
|
295 double v23; // st6@4
|
|
296 double v24; // st5@4
|
|
297 char *v25; // eax@4
|
|
298 signed int v26; // ecx@4
|
|
299 double v27; // st5@4
|
|
300 double v28; // st7@5
|
|
301 double v29; // st7@6
|
|
302 char result; // al@6
|
|
303 unsigned int *v31; // edi@7
|
|
304 RenderVertexSoft *v32; // ebx@8
|
|
305 std::string *v33; // ecx@15
|
|
306 int v34; // eax@19
|
|
307 const char *v35; // [sp-Ch] [bp-2Ch]@15
|
|
308 int v36; // [sp-8h] [bp-28h]@15
|
|
309 std::string v37; // [sp-4h] [bp-24h]@15
|
|
310 float v38; // [sp+8h] [bp-18h]@6
|
|
311 RenderVertexSoft *v39; // [sp+Ch] [bp-14h]@6
|
|
312 unsigned int *v40; // [sp+10h] [bp-10h]@6
|
|
313
|
|
314 v12 = this;
|
|
315 if ( *(float *)&a6 == 0.0 )
|
|
316 goto LABEL_24;
|
|
317 v13 = &this->std__vector_pDecals[this->field_308008];
|
|
318 v14 = (char *)&this->std__vector_pDecals[this->field_308008].field_C1C;
|
|
319 this->std__vector_pDecals[this->field_308008].field_C18 = (DecalBuilder_stru0 *)a4;
|
|
320 *(int *)v14 = 0;
|
|
321 if ( a3 & 2 )
|
|
322 *(int *)v14 = 1;
|
|
323 v15 = *(float *)&a6 - *(float *)&a8;
|
|
324 *(float *)&this->field_30C028 = v15;
|
|
325 v16 = sqrt((*(float *)&a6 + *(float *)&a6 - v15) * v15);
|
|
326 *(float *)&v12->field_30C02C = v16;
|
|
327 v17 = a5;
|
|
328 v18 = a9;
|
|
329 v12->flt_30C030 = 1.0 - (*(float *)&a6 - v16) / *(float *)&a6;
|
|
330 v13->field_C08 = (signed __int64)((double)*(signed int *)v17 - *(float *)&a8 * v18->field_4.x);
|
|
331 v13->field_C0A = (signed __int64)((double)*(signed int *)(a5 + 4) - *(float *)&a8 * v18->field_4.y);
|
|
332 v19 = *(float *)&a6;
|
|
333 v13->field_C0C = (signed __int64)((double)*(signed int *)(a5 + 8) - *(float *)&a8 * v18->field_4.z);
|
|
334 v20 = v19 * v12->flt_30C030;
|
|
335 a8 = v13->pVertices;
|
|
336 v12->field_30C034 = v20;
|
|
337 v12->field_30C010 = v20 * v18->field_10.x;
|
|
338 v12->field_30C014 = v20 * v18->field_10.y;
|
|
339 v12->field_30C018 = v20 * v18->field_10.z;
|
|
340 v12->field_30C01C = v20 * v18->field_1C.x;
|
|
341 v12->field_30C020 = v20 * v18->field_1C.y;
|
|
342 v12->field_30C024 = v20 * v18->field_1C.z;
|
|
343 a6 = v13->field_C08;
|
|
344 v21 = (double)a6;
|
|
345 v22 = v21 - v12->field_30C01C;
|
|
346 a6 = v13->field_C0A;
|
|
347 v13->pVertices[0].vWorldPosition.x = v22 + v12->field_30C010;
|
|
348 v23 = (double)a6;
|
|
349 v24 = v23 - v12->field_30C020 + v12->field_30C014;
|
|
350 v25 = (char *)&v13->pVertices[0].vWorldPosition.y;
|
|
351 a6 = v13->field_C0C;
|
|
352 v26 = 4;
|
|
353 v13->pVertices[0].vWorldPosition.y = v24;
|
|
354 v27 = (double)a6;
|
|
355 *(float *)&a6 = v27;
|
|
356 v13->pVertices[0].vWorldPosition.z = v27 - v12->field_30C024 + v12->field_30C018;
|
|
357 v13->pVertices[0].u = 0.0;
|
|
358 v13->pVertices[0].v = 0.0;
|
|
359 v13->pVertices[1].vWorldPosition.x = v21 - v12->field_30C01C - v12->field_30C010;
|
|
360 v13->pVertices[1].vWorldPosition.y = v23 - v12->field_30C020 - v12->field_30C014;
|
|
361 v13->pVertices[1].vWorldPosition.z = v27 - v12->field_30C024 - v12->field_30C018;
|
|
362 v13->pVertices[1].u = 0.0;
|
|
363 v13->pVertices[1].v = 1.0;
|
|
364 v13->pVertices[2].vWorldPosition.x = v21 + v12->field_30C01C - v12->field_30C010;
|
|
365 v13->pVertices[2].vWorldPosition.y = v23 + v12->field_30C020 - v12->field_30C014;
|
|
366 v13->pVertices[2].vWorldPosition.z = v27 + v12->field_30C024 - v12->field_30C018;
|
|
367 v13->pVertices[2].u = 1.0;
|
|
368 v13->pVertices[2].v = 1.0;
|
|
369 v13->pVertices[3].vWorldPosition.x = v21 + v12->field_30C01C + v12->field_30C010;
|
|
370 v13->pVertices[3].vWorldPosition.y = v23 + v12->field_30C020 + v12->field_30C014;
|
|
371 v13->pVertices[3].vWorldPosition.z = *(float *)&a6 + v12->field_30C024 + v12->field_30C018;
|
|
372 v13->pVertices[3].u = 1.0;
|
|
373 v13->pVertices[3].v = 0.0;
|
|
374 do
|
|
375 {
|
|
376 v28 = v18->field_4.y * *(float *)v25
|
|
377 + *((float *)v25 - 1) * v18->field_4.x
|
|
378 + *((float *)v25 + 1) * v18->field_4.z
|
|
379 + *(float *)&v18->field_28;
|
|
380 *((float *)v25 - 1) = *((float *)v25 - 1) - v28 * v18->field_4.x;
|
|
381 *(float *)v25 = *(float *)v25 - v28 * v18->field_4.y;
|
|
382 v25 += 48;
|
|
383 --v26;
|
|
384 *((float *)v25 - 11) = *((float *)v25 - 11) - v28 * v18->field_4.z;
|
|
385 }
|
|
386 while ( v26 );
|
|
387 v13->field_C10 = a7;
|
|
388 v40 = (unsigned int *)&v13->uNumVertices;
|
|
389 v39 = v13->pVertices;
|
|
390 v13->uNumVertices = 4;
|
|
391 v13->field_C14 = a2;
|
|
392 v29 = v18->field_4.z;
|
|
393 a6 = (int)&v13->uNumVertices;
|
|
394 v38 = v29;
|
|
395 result = pGame->pStru9Instance->_4980B9(a11, a10, v18->field_4.x, v18->field_4.y, v38, v39, v40);
|
|
396 if ( result )
|
|
397 {
|
|
398 v31 = (unsigned int *)a6;
|
|
399 if ( !*(int *)a6 )
|
|
400 goto LABEL_24;
|
|
401 v32 = a8;
|
|
402 v40 = *(unsigned int **)a6;
|
|
403 v39 = a8;
|
|
404 pGame->pIndoorCameraD3D->ViewTransform(a8, (unsigned int)v40);
|
|
405 v40 = 0;
|
|
406 pGame->pIndoorCameraD3D->_436BB7_project_and_stuff(v32, *v31, 0);
|
|
407 if ( !(uClipFlags & 1) )
|
|
408 {
|
|
409 LABEL_19:
|
|
410 ++v12->field_308008;
|
|
411 v34 = 1024;
|
|
412 if ( v12->field_308008 == 1024 )
|
|
413 v12->field_308008 = 0;
|
|
414 if ( (signed int)(v12->std__vector_pDecals_size + 1) <= 1024 )
|
|
415 v34 = v12->std__vector_pDecals_size + 1;
|
|
416 v12->std__vector_pDecals_size = v34;
|
|
417 goto LABEL_24;
|
|
418 }
|
|
419 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor )
|
|
420 {
|
|
421 if ( uClipFlags & 2 )
|
|
422 {
|
|
423 v40 = (unsigned int *)&a8;
|
|
424 v39 = v12->pVertices;
|
|
425 pGame->pIndoorCameraD3D->_436CDC(v32, *v31, v12->pVertices, (unsigned int *)&a8);
|
|
426 LABEL_14:
|
|
427 v40 = v31;
|
|
428 v39 = v12->pVertices;
|
|
429 pGame->pIndoorCameraD3D->_437143((unsigned int)a8, v32, v12->pVertices, v31);
|
|
430 goto LABEL_18;
|
|
431 }
|
|
432 if ( uClipFlags & 4 )
|
|
433 {
|
|
434 v40 = (unsigned int *)&a8;
|
|
435 v39 = v12->pVertices;
|
|
436 pGame->pIndoorCameraD3D->_436F09(v32, *v31, v12->pVertices, (unsigned int *)&a8);
|
|
437 goto LABEL_14;
|
|
438 }
|
|
439 v39 = (RenderVertexSoft *)"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\PolyProjector.cpp:258";
|
|
440 v35 = "Undefined clip flag specified";
|
|
441 }
|
|
442 else
|
|
443 {
|
|
444 v39 = (RenderVertexSoft *)"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\PolyProjector.cpp:263";
|
|
445 v35 = "Lightpoly builder native indoor clipping not implemented";
|
|
446 }
|
|
447 MessageBoxA(nullptr, v35, (const char *)v39, 0);
|
|
448 LABEL_18:
|
|
449 if ( *(float *)&a8 != 0.0 )
|
|
450 goto LABEL_19;
|
|
451 LABEL_24:
|
|
452 result = 1;
|
|
453 }
|
|
454 return result;
|
|
455 }
|
|
456
|
|
457 //----- (0049BBBD) --------------------------------------------------------
|
|
458 char DecalBuilder::ApplyBloodsplatDecals_IndoorFace(unsigned int uFaceID)
|
|
459 {
|
|
460 int v2; // edi@1
|
|
461 unsigned int v3; // ebx@1
|
|
462 BLVFace *v4; // esi@2
|
|
463 unsigned int v5; // eax@2
|
|
464 char *v6; // edx@5
|
|
465 double v7; // st7@12
|
|
466
|
|
467 v2 = 0;
|
|
468 this->uNumDecals = 0;
|
|
469 v3 = pBloodsplatContainer->std__vector_pBloodsplats_size;
|
|
470 if ( pBloodsplatContainer->std__vector_pBloodsplats_size )
|
|
471 {
|
|
472 v4 = &pIndoor->pFaces[uFaceID];
|
|
473 v5 = v4->uAttributes;
|
|
474 if ( !(v5 & 0x400000) )
|
|
475 {
|
|
476 if ( !(v5 & 0x10) && (signed int)pBloodsplatContainer->std__vector_pBloodsplats_size > 0 )
|
|
477 {
|
|
478 v6 = (char *)&pBloodsplatContainer->std__vector_pBloodsplats[0].y;
|
|
479 do
|
|
480 {
|
|
481 if ( (double)v4->pBounding.x1 - *((float *)v6 + 2) < *((float *)v6 - 1) )
|
|
482 {
|
|
483 if ( (double)v4->pBounding.x2 + *((float *)v6 + 2) > *((float *)v6 - 1) )
|
|
484 {
|
|
485 if ( (double)v4->pBounding.y1 - *((float *)v6 + 2) < *(float *)v6 )
|
|
486 {
|
|
487 if ( (double)v4->pBounding.y2 + *((float *)v6 + 2) > *(float *)v6 )
|
|
488 {
|
|
489 if ( (double)v4->pBounding.z1 - *((float *)v6 + 2) < *((float *)v6 + 1) )
|
|
490 {
|
|
491 if ( (double)v4->pBounding.z2 + *((float *)v6 + 2) > *((float *)v6 + 1) )
|
|
492 {
|
|
493 v7 = v4->pFacePlane.vNormal.z * *((float *)v6 + 1)
|
|
494 + v4->pFacePlane.vNormal.y * *(float *)v6
|
|
495 + v4->pFacePlane.vNormal.x * *((float *)v6 - 1)
|
|
496 + v4->pFacePlane.dist;
|
|
497 if ( v7 <= *((float *)v6 + 2) )
|
|
498 {
|
|
499 *((float *)v6 + 3) = v7;
|
|
500 this->std__vector_30B00C[this->uNumDecals++] = v2;
|
|
501 }
|
|
502 }
|
|
503 }
|
|
504 }
|
|
505 }
|
|
506 }
|
|
507 }
|
|
508 ++v2;
|
|
509 v6 += 40;
|
|
510 }
|
|
511 while ( v2 < (signed int)v3 );
|
|
512 }
|
|
513 }
|
|
514 }
|
|
515 return 1;
|
|
516 }
|
|
517
|
|
518 //----- (0049BCEB) --------------------------------------------------------
|
|
519 char DecalBuilder::ApplyDecals_OutdoorFace(ODMFace *pFace)
|
|
520 {
|
|
521 int v2; // edi@1
|
|
522 unsigned int v3; // eax@2
|
|
523 char *v4; // edx@5
|
|
524 double v5; // ST1C_8@12
|
|
525 double v6; // ST14_8@12
|
|
526 double v7; // ST0C_8@12
|
|
527 double v8; // st7@12
|
|
528 unsigned int v10; // [sp+20h] [bp-1Ch]@1
|
|
529
|
|
530 v2 = 0;
|
|
531 this->uNumDecals = 0;
|
|
532 v10 = pBloodsplatContainer->std__vector_pBloodsplats_size;
|
|
533 if ( pBloodsplatContainer->std__vector_pBloodsplats_size )
|
|
534 {
|
|
535 v3 = pFace->uFaceAttributes;
|
|
536 if ( !(v3 & 0x400000) )
|
|
537 {
|
|
538 if ( !(v3 & 0x10) && (signed int)pBloodsplatContainer->std__vector_pBloodsplats_size > 0 )
|
|
539 {
|
|
540 v4 = (char *)&pBloodsplatContainer->std__vector_pBloodsplats[0].y;
|
|
541 do
|
|
542 {
|
|
543 if ( (double)pFace->pBoundingBox.x1 - *((float *)v4 + 2) < *((float *)v4 - 1) )
|
|
544 {
|
|
545 if ( (double)pFace->pBoundingBox.x2 + *((float *)v4 + 2) > *((float *)v4 - 1) )
|
|
546 {
|
|
547 if ( (double)pFace->pBoundingBox.y1 - *((float *)v4 + 2) < *(float *)v4 )
|
|
548 {
|
|
549 if ( (double)pFace->pBoundingBox.y2 + *((float *)v4 + 2) > *(float *)v4 )
|
|
550 {
|
|
551 if ( (double)pFace->pBoundingBox.z1 - *((float *)v4 + 2) < *((float *)v4 + 1) )
|
|
552 {
|
|
553 if ( (double)pFace->pBoundingBox.z2 + *((float *)v4 + 2) > *((float *)v4 + 1) )
|
|
554 {
|
|
555 v5 = *((float *)v4 - 1) + 6.7553994e15;
|
|
556 v6 = *(float *)v4 + 6.7553994e15;
|
|
557 v7 = *((float *)v4 + 1) + 6.7553994e15;
|
|
558 v8 = (double)((pFace->pFacePlane.dist
|
|
559 + LODWORD(v5) * pFace->pFacePlane.vNormal.x
|
|
560 + LODWORD(v6) * pFace->pFacePlane.vNormal.y
|
|
561 + LODWORD(v7) * pFace->pFacePlane.vNormal.z) >> 16);
|
|
562 if ( v8 <= *((float *)v4 + 2) )
|
|
563 {
|
|
564 *((float *)v4 + 3) = v8;
|
|
565 this->std__vector_30B00C[this->uNumDecals++] = v2;
|
|
566 }
|
|
567 }
|
|
568 }
|
|
569 }
|
|
570 }
|
|
571 }
|
|
572 }
|
|
573 ++v2;
|
|
574 v4 += 40;
|
|
575 }
|
|
576 while ( v2 < (signed int)v10 );
|
|
577 }
|
|
578 }
|
|
579 }
|
|
580 return 1;
|
|
581 }
|
|
582
|
|
583 //----- (0049BE8A) --------------------------------------------------------
|
|
584 bool DecalBuilder::_49BE8A(struct stru148 *a2, float a3, int a4, RenderVertexSoft *a5, unsigned int uStripType, char a7)
|
|
585 {
|
|
586 bool result; // eax@1
|
|
587 RenderVertexSoft *v8; // edi@3
|
|
588 float v9; // ebx@3
|
|
589 char *v10; // esi@3
|
|
590 float v11; // eax@5
|
|
591 float v12; // eax@6
|
|
592 double v13; // st7@13
|
|
593 double v14; // st7@19
|
|
594 int v15; // eax@20
|
|
595 int v16; // eax@22
|
|
596 int v17; // edx@24
|
|
597 DecalBuilder *v18; // eax@24
|
|
598 std::string v19; // [sp-18h] [bp-54h]@12
|
|
599 const char *v20; // [sp-8h] [bp-44h]@12
|
|
600 int v21; // [sp-4h] [bp-40h]@12
|
|
601 double v22; // [sp+Ch] [bp-30h]@19
|
|
602 unsigned int v23; // [sp+14h] [bp-28h]@1
|
|
603 DecalBuilder *v24; // [sp+18h] [bp-24h]@1
|
|
604 int v25; // [sp+1Ch] [bp-20h]@19
|
|
605 float v26; // [sp+20h] [bp-1Ch]@12
|
|
606 int v27; // [sp+24h] [bp-18h]@12
|
|
607 float v28; // [sp+28h] [bp-14h]@13
|
|
608 float v29; // [sp+2Ch] [bp-10h]@7
|
|
609 float v30; // [sp+30h] [bp-Ch]@6
|
|
610 float v31; // [sp+34h] [bp-8h]@6
|
|
611 bool v32; // [sp+38h] [bp-4h]@2
|
|
612
|
|
613 this->uNumDecals = 0;
|
|
614 result = pBloodsplatContainer->std__vector_pBloodsplats_size;
|
|
615 v24 = this;
|
|
616 v23 = pBloodsplatContainer->std__vector_pBloodsplats_size;
|
|
617 if ( pBloodsplatContainer->std__vector_pBloodsplats_size )
|
|
618 {
|
|
619 v32 = 0;
|
|
620 if ( (signed int)pBloodsplatContainer->std__vector_pBloodsplats_size > 0 )
|
|
621 {
|
|
622 v8 = a5;
|
|
623 v9 = a3;
|
|
624 v10 = (char *)&pBloodsplatContainer->std__vector_pBloodsplats[0].y;
|
|
625 while ( uStripType != 4 )
|
|
626 {
|
|
627 if ( uStripType == 3 )
|
|
628 {
|
|
629 if ( a7 )
|
|
630 {
|
|
631 a3 = v8->vWorldPosition.x;
|
|
632 v31 = v8[2].vWorldPosition.x;
|
|
633 v30 = v8[1].vWorldPosition.y;
|
|
634 v12 = v8[2].vWorldPosition.y;
|
|
635 goto LABEL_7;
|
|
636 }
|
|
637 a3 = v8[1].vWorldPosition.x;
|
|
638 v11 = v8[2].vWorldPosition.x;
|
|
639 LABEL_6:
|
|
640 v31 = v11;
|
|
641 v30 = v8[1].vWorldPosition.y;
|
|
642 v12 = v8->vWorldPosition.y;
|
|
643 LABEL_7:
|
|
644 v29 = v12;
|
|
645 goto LABEL_13;
|
|
646 }
|
|
647 MessageBoxW(nullptr, L"Uknown strip type detected!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\PolyProjector.cpp:434", 0);
|
|
648 LABEL_13:
|
|
649 v21 = uStripType;
|
|
650 v13 = pGame->pIndoorCameraD3D->GetPolygonMinZ(v8, uStripType);
|
|
651 v21 = uStripType;
|
|
652 v28 = v13;
|
|
653 v26 = pGame->pIndoorCameraD3D->GetPolygonMaxZ(v8, uStripType);
|
|
654 if ( a3 - *((float *)v10 + 2) < *((float *)v10 - 1) )
|
|
655 {
|
|
656 if ( v31 + *((float *)v10 + 2) > *((float *)v10 - 1) )
|
|
657 {
|
|
658 if ( v30 - *((float *)v10 + 2) < *(float *)v10 )
|
|
659 {
|
|
660 if ( v29 + *((float *)v10 + 2) > *(float *)v10 )
|
|
661 {
|
|
662 if ( v28 - *((float *)v10 + 2) < *((float *)v10 + 1) )
|
|
663 {
|
|
664 if ( v26 + *((float *)v10 + 2) > *((float *)v10 + 1) )
|
|
665 {
|
|
666 Vec3_float_::NegDot(&v8->vWorldPosition, (Vec3_float_ *)LODWORD(v9), (float *)a4);
|
|
667 v26 = *(float *)(LODWORD(v9) + 4) * *(float *)v10
|
|
668 + *(float *)(LODWORD(v9) + 8) * *((float *)v10 + 1)
|
|
669 + *(unsigned int *)LODWORD(v9) * *((float *)v10 - 1)
|
|
670 + *(float *)a4;
|
|
671 v22 = v26 + 6.7553994e15;
|
|
672 v25 = LODWORD(v22);
|
|
673 v14 = (double)SLODWORD(v22);
|
|
674 v28 = v14;
|
|
675 if ( v14 <= *((float *)v10 + 2) )
|
|
676 {
|
|
677 v15 = *(int *)&a2->flags;
|
|
678 if ( v15 & 2 || BYTE1(v15) & 1 )
|
|
679 {
|
|
680 v16 = *((int *)v10 + 5);
|
|
681 if ( !(v16 & 1) )
|
|
682 {
|
|
683 LOBYTE(v16) = v16 | 1;
|
|
684 *((int *)v10 + 5) = v16;
|
|
685 *((_QWORD *)v10 + 3) = pEventTimer->Time();
|
|
686 }
|
|
687 }
|
|
688 v17 = v32;
|
|
689 *((int *)v10 + 3) = LODWORD(v28);
|
|
690 v18 = v24;
|
|
691 v24->std__vector_30B00C[v24->uNumDecals] = v17;
|
|
692 ++v18->uNumDecals;
|
|
693 }
|
|
694 }
|
|
695 }
|
|
696 }
|
|
697 }
|
|
698 }
|
|
699 }
|
|
700 ++v32;
|
|
701 v10 += 40;
|
|
702 result = v32;
|
|
703 if ( v32 >= (signed int)v23 )
|
|
704 goto LABEL_26;
|
|
705 }
|
|
706 a3 = v8->vWorldPosition.x;
|
|
707 v11 = v8[3].vWorldPosition.x;
|
|
708 goto LABEL_6;
|
|
709 }
|
|
710 }
|
|
711 LABEL_26:
|
|
712 LOBYTE(result) = 1;
|
|
713 return result;
|
|
714 }
|
|
715
|
|
716 //----- (0049C095) --------------------------------------------------------
|
|
717 void DecalBuilder::DrawDecal(Decal *pDecal, float a2)
|
|
718 {
|
|
719 Decal *v3; // edi@1
|
|
720 double v4; // st7@3
|
|
721 double v5; // st7@5
|
|
722 int v6; // eax@5
|
|
723 unsigned __int8 v7; // zf@5
|
|
724 unsigned __int8 v8; // sf@5
|
|
725 char *v9; // esi@6
|
|
726 int v10; // ebx@6
|
|
727 int v11; // eax@8
|
|
728 int v12; // edx@8
|
|
729 int v13; // eax@8
|
|
730 int v14; // ecx@8
|
|
731 double v15; // st7@9
|
|
732 int v16; // eax@12
|
|
733 double v17; // st7@12
|
|
734 int v18; // eax@12
|
|
735 unsigned __int8 v19; // of@12
|
|
736 HRESULT v20; // eax@17
|
|
737 signed int v21; // [sp+Ch] [bp-864h]@15
|
|
738 const char *v22; // [sp+10h] [bp-860h]@15
|
|
739 int v23; // [sp+14h] [bp-85Ch]@15
|
|
740 unsigned int v24; // [sp+18h] [bp-858h]@14
|
|
741 RenderVertexD3D3 hr[64]; // [sp+20h] [bp-850h]@6
|
|
742 double v26; // [sp+820h] [bp-50h]@8
|
|
743 double v27; // [sp+828h] [bp-48h]@8
|
|
744 double v28; // [sp+830h] [bp-40h]@8
|
|
745 int v29; // [sp+838h] [bp-38h]@8
|
|
746 int v30; // [sp+83Ch] [bp-34h]@8
|
|
747 __int64 v31; // [sp+840h] [bp-30h]@8
|
|
748 __int64 v32; // [sp+848h] [bp-28h]@8
|
|
749 __int64 v33; // [sp+850h] [bp-20h]@8
|
|
750 int v34; // [sp+858h] [bp-18h]@8
|
|
751 unsigned __int64 v35; // [sp+85Ch] [bp-14h]@8
|
|
752 float v36; // [sp+864h] [bp-Ch]@6
|
|
753 int v37; // [sp+868h] [bp-8h]@5
|
|
754 float v38; // [sp+86Ch] [bp-4h]@8
|
|
755 float thisa; // [sp+878h] [bp+8h]@5
|
|
756
|
|
757 v3 = pDecal;
|
|
758 if ( pDecal->uNumVertices >= 3 )
|
|
759 {
|
|
760 if ( pDecal->field_C1C & 1 )
|
|
761 v4 = 1.0;
|
|
762 else
|
|
763 v4 = pDecal->field_C18->_43B570();
|
|
764 thisa = v4;
|
|
765 v5 = get_shading_dist_mist();
|
|
766 v6 = 0;
|
|
767 v7 = v3->uNumVertices == 0;
|
|
768 v8 = v3->uNumVertices < 0;
|
|
769 v37 = 0;
|
|
770 if ( !(v8 | v7) )
|
|
771 {
|
|
772 v9 = (char *)&hr[0].pos.y;
|
|
773 v10 = (int)&v3->pVertices[0].vWorldViewPosition;
|
|
774 v36 = 1.0 / v5;
|
|
775 while ( 1 )
|
|
776 {
|
|
777 v11 = pRenderer->GetActorTintColor(*(float *)v10, v3->field_C14, v6, v6, (RenderBillboard *)v6);
|
|
778 LOBYTE(v12) = v11;
|
|
779 v33 = ((unsigned int)v11 >> 16) & 0xFFi64;
|
|
780 LOBYTE(v38) = BYTE2(v3->field_C10);
|
|
781 v38 = (double)v33 * 0.0039215689 * thisa * (double)LOBYTE(v38);
|
|
782 v28 = v38 + 6.7553994e15;
|
|
783 v31 = (unsigned __int16)v11 >> 8;
|
|
784 LODWORD(v38) = BYTE1(v3->field_C10);
|
|
785 v38 = (double)v31 * 0.0039215689 * thisa * (double)SLODWORD(v38);
|
|
786 v26 = v38 + 6.7553994e15;
|
|
787 v35 = __PAIR__(LODWORD(v28), LODWORD(v26));
|
|
788 v13 = v3->field_C10;
|
|
789 v32 = v12 & 0xFFi64;
|
|
790 v29 = (unsigned __int8)v13;
|
|
791 v30 = 0;
|
|
792 v38 = (double)v32 * 0.0039215689 * thisa * (double)(unsigned __int8)v13;
|
|
793 v27 = v38 + 6.7553994e15;
|
|
794 v34 = LODWORD(v27);
|
|
795 v14 = LODWORD(v27) | ((LODWORD(v26) | (LODWORD(v28) << 8)) << 8);
|
|
796 if ( a2 == 0.0 )
|
|
797 {
|
|
798 v15 = 1.0 - 1.0 / (v36 * *(float *)v10 * 1000.0);
|
|
799 }
|
|
800 else
|
|
801 {
|
|
802 v15 = 1.0 - 1.0 / (v36 * *(float *)v10 * 1000.0) - a2;
|
|
803 if ( v15 < 0.000099999997 )
|
|
804 v15 = 0.000099999997;
|
|
805 }
|
|
806 *((float *)v9 + 1) = v15;
|
|
807 v16 = *(int *)(v10 + 12);
|
|
808 ++v37;
|
|
809 v17 = 1.0 / *(float *)v10;
|
|
810 *((int *)v9 - 1) = v16;
|
|
811 *(int *)v9 = *(int *)(v10 + 16);
|
|
812 *((int *)v9 + 5) = *(int *)(v10 + 24);
|
|
813 *((int *)v9 + 6) = *(int *)(v10 + 28);
|
|
814 v18 = v37;
|
|
815 *((int *)v9 + 3) = v14;
|
|
816 *((int *)v9 + 4) = 0;
|
|
817 v10 += 48;
|
|
818 v9 += 32;
|
|
819 v19 = __OFSUB__(v18, v3->uNumVertices);
|
|
820 v8 = v18 - v3->uNumVertices < 0;
|
|
821 *((float *)v9 - 6) = v17;
|
|
822 if ( !(v8 ^ v19) )
|
|
823 break;
|
|
824 v6 = 0;
|
|
825 }
|
|
826 v6 = 0;
|
|
827 }
|
|
828 v24 = v6;
|
|
829 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor )
|
|
830 {
|
|
831 v21 = 28;
|
|
832 }
|
|
833 else
|
|
834 {
|
|
835 v21 = 16;
|
|
836 }
|
|
837 ErrD3D(pRenderer->pRenderD3D->pDevice->DrawPrimitive(
|
|
838 D3DPT_TRIANGLEFAN,
|
|
839 452,
|
|
840 hr,
|
|
841 v3->uNumVertices,
|
|
842 v21));
|
|
843 }
|
|
844 }
|
|
845
|
|
846 //----- (0049C2CD) --------------------------------------------------------
|
|
847 void DecalBuilder::DrawDecals(float a2)
|
|
848 {
|
|
849 DecalBuilder *v2; // esi@1
|
|
850 signed int v3; // edi@1
|
|
851 Decal *v4; // ebx@2
|
|
852
|
|
853 v2 = this;
|
|
854 v3 = 0;
|
|
855 if ( (signed int)this->std__vector_pDecals_size > 0 )
|
|
856 {
|
|
857 v4 = this->std__vector_pDecals;
|
|
858 do
|
|
859 {
|
|
860 DrawDecal(v4, a2);
|
|
861 ++v3;
|
|
862 ++v4;
|
|
863 }
|
|
864 while ( v3 < (signed int)v2->std__vector_pDecals_size );
|
|
865 }
|
|
866 }
|
|
867
|
|
868 //----- (0049C304) --------------------------------------------------------
|
|
869 void DecalBuilder::DrawBloodsplats()
|
|
870 {
|
|
871 unsigned int v1; // ebx@0
|
|
872 int v2; // esi@0
|
|
873 char v3; // zf@1
|
|
874 HRESULT v4; // eax@4
|
|
875 HRESULT v5; // eax@4
|
|
876 HRESULT v6; // eax@4
|
|
877 HRESULT v7; // eax@4
|
|
878 HRESULT v8; // eax@4
|
|
879 HRESULT v9; // eax@4
|
|
880 HRESULT v10; // eax@4
|
|
881 char *v11; // eax@4
|
|
882 //IDirect3DDevice3Vtbl *v12; // ebx@6
|
|
883 int v13; // ST6C_4@6
|
|
884 HRESULT v14; // eax@6
|
|
885 HRESULT v15; // eax@6
|
|
886 HRESULT v16; // eax@6
|
|
887 HRESULT v17; // eax@6
|
|
888 HRESULT v18; // eax@6
|
|
889 HRESULT v19; // eax@6
|
|
890 char thisa; // [sp+80h] [bp-8h]@4
|
|
891 DecalBuilder *v21; // [sp+84h] [bp-4h]@1
|
|
892
|
|
893 v3 = this->std__vector_pDecals_size == 0;
|
|
894 v21 = this;
|
|
895 if ( !v3 )
|
|
896 {
|
|
897 if ( pRenderer->bUsingSpecular )
|
|
898 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGENABLE, 0));
|
|
899 ErrD3D(pRenderer->pRenderD3D->pDevice->SetTextureStageState(0, D3DTSS_ADDRESS, 3));
|
|
900
|
|
901 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, 1));
|
|
902 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ZWRITEENABLE, 0));
|
|
903 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, 1u));
|
|
904 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_SRCBLEND, 2u));
|
|
905 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DESTBLEND, 2u));
|
|
906 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, 0));
|
|
907
|
|
908 v11 = (char *)std__string_AE5B94.c_str();
|
|
909 if ( !std__string_AE5B94.size() )
|
|
910 v11 = (char *)&dword_4D86F0;
|
|
911 //v12 = pRenderer->pRenderD3D->pDevice->lpVtbl;
|
|
912 v13 = (int)pGame->pIndoorCameraD3D->LoadTextureAndGetHardwarePtr(v11);
|
|
913 ErrD3D(pRenderer->pRenderD3D->pDevice->SetTexture(0, (IDirect3DTexture2 *)v13));
|
|
914
|
|
915 v21->DrawDecals(0.00039999999);
|
|
916 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, 2u));
|
|
917 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ZWRITEENABLE, 1u));
|
|
918 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, 0));
|
|
919 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_SRCBLEND, 2u));
|
|
920 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DESTBLEND, 1u));
|
|
921
|
|
922 if ( pRenderer->bUsingSpecular )
|
|
923 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGENABLE, 1u));
|
|
924 }
|
|
925 }
|
|
926
|
|
927 //----- (0049C550) --------------------------------------------------------
|
|
928 void DecalBuilder::DrawDecalDebugOutlines()
|
|
929 {
|
|
930 DecalBuilder *v1; // esi@1
|
|
931 signed int v2; // ebx@1
|
|
932 RenderVertexSoft *v3; // edi@2
|
|
933
|
|
934 v1 = this;
|
|
935 v2 = 0;
|
|
936 if ( (signed int)this->std__vector_pDecals_size > 0 )
|
|
937 {
|
|
938 v3 = this->std__vector_pDecals[0].pVertices;
|
|
939 do
|
|
940 {
|
|
941 pGame->pIndoorCameraD3D->debug_outline_sw(v3, *((int *)v3 - 1), 0xC86400u, 0.0);
|
|
942 ++v2;
|
|
943 v3 = (RenderVertexSoft *)((char *)v3 + 3104);
|
|
944 }
|
|
945 while ( v2 < (signed int)v1->std__vector_pDecals_size );
|
|
946 }
|
|
947 }
|
|
948
|
|
949 //----- (0040E4C2) --------------------------------------------------------
|
|
950 void Decal::Decal_base_ctor()
|
|
951 {
|
|
952 uNumVertices = -1;
|
|
953 for (uint i = 0; i < 64; ++i)
|
|
954 pVertices[i].flt_2C = 0.0f;
|
|
955 }
|