comparison DecalBuilder.cpp @ 920:34ed2d5e7cfb

MagicShopDialog clean and other
author Ritor1
date Sun, 28 Apr 2013 19:11:36 +0600
parents 346f7069676a
children c45d51b3f4f4
comparison
equal deleted inserted replaced
919:befaac4bc0e3 920:34ed2d5e7cfb
128 double v26; // st7@21 128 double v26; // st7@21
129 int v27; // edi@21 129 int v27; // edi@21
130 double v28; // st7@21 130 double v28; // st7@21
131 int v29; // ST10_4@21 131 int v29; // ST10_4@21
132 int v30; // ST08_4@21 132 int v30; // ST08_4@21
133 DecalBuilder *v31; // esi@21 133 //DecalBuilder *v31; // esi@21
134 int v32; // [sp+4h] [bp-44h]@18 134 int v32; // [sp+4h] [bp-44h]@18
135 RenderVertexSoft *v33; // [sp+8h] [bp-40h]@21 135 RenderVertexSoft *v33; // [sp+8h] [bp-40h]@21
136 stru314 *v34; // [sp+Ch] [bp-3Ch]@21 136 stru314 *v34; // [sp+Ch] [bp-3Ch]@21
137 float v35; // [sp+10h] [bp-38h]@21 137 float v35; // [sp+10h] [bp-38h]@21
138 float v36; // [sp+14h] [bp-34h]@17 138 float v36; // [sp+14h] [bp-34h]@17
141 int v39; // [sp+2Ch] [bp-1Ch]@21 141 int v39; // [sp+2Ch] [bp-1Ch]@21
142 int v40; // [sp+30h] [bp-18h]@21 142 int v40; // [sp+30h] [bp-18h]@21
143 int v41; // [sp+34h] [bp-14h]@22 143 int v41; // [sp+34h] [bp-14h]@22
144 int v42; // [sp+38h] [bp-10h]@21 144 int v42; // [sp+38h] [bp-10h]@21
145 int v43; // [sp+3Ch] [bp-Ch]@21 145 int v43; // [sp+3Ch] [bp-Ch]@21
146 DecalBuilder *thisa; // [sp+40h] [bp-8h]@1 146 //DecalBuilder *thisa; // [sp+40h] [bp-8h]@1
147 RenderVertexSoft *a11; // [sp+44h] [bp-4h]@8 147 //RenderVertexSoft *a11; // [sp+44h] [bp-4h]@8
148 148
149 __debugbreak(); 149 // __debugbreak();
150 150
151 auto a2 = light_level; 151 //auto a2 = light_level;
152 auto a9 = uSectorID; 152 //auto a9 = uSectorID;
153 153
154 thisa = this; 154 //thisa = this;
155 if ( !a5 ) 155 if ( !a5 )
156 return 0; 156 return 0;
157 157
158 static RenderVertexSoft static_AE4F90[64]; 158 static RenderVertexSoft static_AE4F90[64];
159 static bool __init_flag1 = false; 159 static bool __init_flag1 = false;
172 __init_flag2 = true; 172 __init_flag2 = true;
173 173
174 stru314::stru314(&static_AE4F60); 174 stru314::stru314(&static_AE4F60);
175 }*/ 175 }*/
176 176
177 a11 = a6; 177 //a11 = a6;
178 if ( a7 ) 178 if ( a7 )
179 { 179 {
180 if ( a5 > 0 ) 180 if ( a5 > 0 )
181 { 181 {
182 v11 = static_AE4F90; 182 v11 = static_AE4F90;
196 v16 = a4; 196 v16 = a4;
197 if ( pGame->pIndoorCameraD3D->_437376(a4, static_AE4F90, (unsigned int *)&a5) == 1 ) 197 if ( pGame->pIndoorCameraD3D->_437376(a4, static_AE4F90, (unsigned int *)&a5) == 1 )
198 { 198 {
199 if ( !a5 ) 199 if ( !a5 )
200 return 0; 200 return 0;
201 a11 = static_AE4F90; 201 a6 = static_AE4F90;
202 } 202 }
203 } 203 }
204 else 204 else
205 { 205 {
206 v16 = a4; 206 v16 = a4;
212 static_AE4F60.field_4.y = v19; 212 static_AE4F60.field_4.y = v19;
213 static_AE4F60.field_4.x = v20; 213 static_AE4F60.field_4.x = v20;
214 LODWORD(v36) = (DWORD)&static_AE4F60.field_10; 214 LODWORD(v36) = (DWORD)&static_AE4F60.field_10;
215 static_AE4F60.field_4.z = v18; 215 static_AE4F60.field_4.z = v18;
216 static_AE4F60.dist = v16->face_plane.dist; 216 static_AE4F60.dist = v16->face_plane.dist;
217 if ( !pGame->pIndoorCameraD3D->GetFacetOrientation( 217 if ( !pGame->pIndoorCameraD3D->GetFacetOrientation(v16->polygonType, &static_AE4F60.field_4, &static_AE4F60.field_10, &static_AE4F60.field_1C) )
218 v16->polygonType,
219 &static_AE4F60.field_4,
220 &static_AE4F60.field_10,
221 &static_AE4F60.field_1C) )
222 { 218 {
223 MessageBoxW(nullptr, L"Error: Failed to get the facet orientation", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\PolyProjector.cpp:101", 0); 219 MessageBoxW(nullptr, L"Error: Failed to get the facet orientation", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\PolyProjector.cpp:101", 0);
224 } 220 }
225 int _a7 = 0; 221 int _a7 = 0;
226 if ( thisa->uNumDecals > 0 ) 222 if ( this->uNumDecals > 0 )
227 { 223 {
228 a6 = (RenderVertexSoft *)thisa->std__vector_30B00C; 224 a6 = (RenderVertexSoft *)this->std__vector_30B00C;
229 do 225 do
230 { 226 {
231 v21 = &pBloodsplatContainer->std__vector_pBloodsplats[LODWORD(a6->vWorldPosition.x)]; 227 v21 = &pBloodsplatContainer->std__vector_pBloodsplats[LODWORD(a6->vWorldPosition.x)];
232 *(float *)&v37 = v21->z; 228 *(float *)&v37 = v21->z;
233 v36 = v21->y; 229 v36 = v21->y;
234 v35 = v21->x; 230 v35 = v21->x;
235 v22 = _43F5C8_get_point_light_level_with_respect_to_lights(a2, a9, v35, v36, *(float *)&v37); 231 v22 = _43F5C8_get_point_light_level_with_respect_to_lights(light_level, uSectorID, v35, v36, *(float *)&v37);
236 v23 = v21->b; 232 v23 = v21->b;
237 v24 = v21->x; 233 v24 = v21->x;
238 v42 = v22; 234 v42 = v22;
239 BYTE3(v22) = 0; 235 BYTE3(v22) = 0;
240 *(short *)((char *)&v22 + 1) = v21->r; 236 *(short *)((char *)&v22 + 1) = v21->r;
244 v26 = v21->z; 240 v26 = v21->z;
245 v27 = (signed __int64)v21->y; 241 v27 = (signed __int64)v21->y;
246 v37 = a8; 242 v37 = a8;
247 v40 = (signed __int64)v26; 243 v40 = (signed __int64)v26;
248 v28 = v21->dot_dist; 244 v28 = v21->dot_dist;
249 LODWORD(v36) = (uint32)a11; 245 LODWORD(v36) = (uint32)a6;
250 a5a = v25; 246 a5a = v25;
251 v39 = v27; 247 v39 = v27;
252 LODWORD(v35) = a5; 248 LODWORD(v35) = a5;
253 v34 = &static_AE4F60; 249 v34 = &static_AE4F60;
254 *(float *)&v33 = v28; 250 *(float *)&v33 = v28;
255 v32 = v23 | (v22 << 8); 251 v32 = v23 | (v22 << 8);
256 *(float *)&v29 = v21->radius; 252 *(float *)&v29 = v21->radius;
257 v30 = (int)v21; 253 v30 = (int)v21;
258 v31 = thisa; 254 //v31 = thisa;
259 if ( !thisa->_49B790_build_decal_geometry( 255 if ( !this->_49B790_build_decal_geometry(v42, a3, v30, (int)&a5a, v29, v43, v33, &static_AE4F60, a5, a6, a8) )
260 v42,
261 a3,
262 v30,
263 (int)&a5a,
264 v29,
265 v43,
266 v33,
267 &static_AE4F60,
268 a5,
269 a11,
270 a8) )
271 { 256 {
272 MessageBoxW(nullptr, L"Error: Failed to build decal geometry", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\PolyProjector.cpp:114", 0); 257 MessageBoxW(nullptr, L"Error: Failed to build decal geometry", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\PolyProjector.cpp:114", 0);
273 } 258 }
274 ++_a7; 259 ++_a7;
275 a6 = (RenderVertexSoft *)((char *)a6 + 4); 260 a6 = (RenderVertexSoft *)((char *)a6 + 4);
276 } 261 }
277 while ( _a7 < v31->uNumDecals ); 262 while ( _a7 < this->uNumDecals );
278 } 263 }
279 return 1; 264 return 1;
280 } 265 }
281 266
282 //----- (0049B790) -------------------------------------------------------- 267 //----- (0049B790) --------------------------------------------------------