Mercurial > mm7
comparison DecalBuilder.cpp @ 1076:9b6e252658e8
more DecalBuilder
author | zipi |
---|---|
date | Sat, 25 May 2013 14:43:27 +0100 |
parents | 1e38e5c049f3 |
children | 2210109f280d |
comparison
equal
deleted
inserted
replaced
1075:1e38e5c049f3 | 1076:9b6e252658e8 |
---|---|
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 int a6a; | |
149 int *a6b; | |
150 | |
148 | 151 |
149 // __debugbreak(); | 152 // __debugbreak(); |
150 | 153 |
151 //auto a2 = light_level; | 154 //auto a2 = light_level; |
152 //auto a9 = uSectorID; | 155 //auto a9 = uSectorID; |
175 }*/ | 178 }*/ |
176 | 179 |
177 //a11 = a6; | 180 //a11 = a6; |
178 if ( a7 ) | 181 if ( a7 ) |
179 { | 182 { |
180 if ( a5 > 0 ) | 183 for(int i=0; i < a5;i++) |
181 { | |
182 v11 = static_AE4F90; | |
183 v12 = (char *)a6 - (char *)static_AE4F90; | |
184 a6 = (RenderVertexSoft *)a5; | |
185 do | |
186 { | 184 { |
187 v13 = (RenderVertexSoft *)((char *)v11 + v12); | 185 memcpy(&static_AE4F90[i], a6, 0x30u); |
188 v14 = v11; | 186 ++a6; |
189 ++v11; | |
190 v15 = a6 == (RenderVertexSoft *)1; | |
191 a6 = (RenderVertexSoft *)((char *)a6 - 1); | |
192 memcpy(v14, v13, 0x30u); | |
193 } | 187 } |
194 while ( !v15 ); | 188 while ( !v15 ); |
195 } | |
196 v16 = a4; | 189 v16 = a4; |
197 if ( pGame->pIndoorCameraD3D->_437376(a4, static_AE4F90, (unsigned int *)&a5) == 1 ) | 190 if ( pGame->pIndoorCameraD3D->_437376(a4, static_AE4F90, (unsigned int *)&a5) == 1 ) |
198 { | 191 { |
199 if ( !a5 ) | 192 if ( !a5 ) |
200 return 0; | 193 return 0; |
219 MessageBoxW(nullptr, L"Error: Failed to get the facet orientation", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\PolyProjector.cpp:101", 0); | 212 MessageBoxW(nullptr, L"Error: Failed to get the facet orientation", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\PolyProjector.cpp:101", 0); |
220 } | 213 } |
221 int _a7 = 0; | 214 int _a7 = 0; |
222 if ( this->uNumDecals > 0 ) | 215 if ( this->uNumDecals > 0 ) |
223 { | 216 { |
224 a6 = (RenderVertexSoft *)this->std__vector_30B00C; | 217 a6b = this->std__vector_30B00C; |
225 do | 218 do |
226 { | 219 { |
227 v21 = &pBloodsplatContainer->std__vector_pBloodsplats[LODWORD(a6->vWorldPosition.x)]; | 220 v21 = &pBloodsplatContainer->std__vector_pBloodsplats[*a6b]; |
228 *(float *)&v37 = v21->z; | 221 v22 = _43F5C8_get_point_light_level_with_respect_to_lights(light_level, uSectorID, v21->x, v21->y, v21->z); |
229 v36 = v21->y; | |
230 v35 = v21->x; | |
231 v22 = _43F5C8_get_point_light_level_with_respect_to_lights(light_level, uSectorID, v35, v36, *(float *)&v37); | |
232 v23 = v21->b; | 222 v23 = v21->b; |
233 v24 = v21->x; | 223 v24 = v21->x; |
234 v42 = v22; | 224 v42 = v22; |
235 BYTE3(v22) = 0; | 225 BYTE3(v22) = 0; |
236 *(short *)((char *)&v22 + 1) = v21->r; | 226 *(short *)((char *)&v22 + 1) = v21->r; |
240 v26 = v21->z; | 230 v26 = v21->z; |
241 v27 = (signed __int64)v21->y; | 231 v27 = (signed __int64)v21->y; |
242 v37 = a8; | 232 v37 = a8; |
243 v40 = (signed __int64)v26; | 233 v40 = (signed __int64)v26; |
244 v28 = v21->dot_dist; | 234 v28 = v21->dot_dist; |
245 LODWORD(v36) = (uint32)a6; | 235 //LODWORD(v36) = (uint32)a6; |
246 a5a = v25; | 236 a5a = v25; |
247 v39 = v27; | 237 v39 = v27; |
248 LODWORD(v35) = a5; | 238 LODWORD(v35) = a5; |
249 v34 = &static_AE4F60; | 239 v34 = &static_AE4F60; |
250 *(float *)&v33 = v28; | 240 *(float *)&v33 = v28; |
255 if ( !this->_49B790_build_decal_geometry(v42, a3, v30, (int)&a5a, v29, v43, v33, &static_AE4F60, a5, a6, a8) ) | 245 if ( !this->_49B790_build_decal_geometry(v42, a3, v30, (int)&a5a, v29, v43, v33, &static_AE4F60, a5, a6, a8) ) |
256 { | 246 { |
257 MessageBoxW(nullptr, L"Error: Failed to build decal geometry", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\PolyProjector.cpp:114", 0); | 247 MessageBoxW(nullptr, L"Error: Failed to build decal geometry", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\PolyProjector.cpp:114", 0); |
258 } | 248 } |
259 ++_a7; | 249 ++_a7; |
260 a6 = (RenderVertexSoft *)((char *)a6 + 4); | 250 ++a6b; |
261 } | 251 } |
262 while ( _a7 < this->uNumDecals ); | 252 while ( _a7 < this->uNumDecals ); |
263 } | 253 } |
264 return 1; | 254 return 1; |
265 } | 255 } |