Mercurial > mm7
diff Engine/Graphics/DecalBuilder.cpp @ 2562:b8a56afc6ba1
new var no_actors, lights_flag, debug_lights, StationaryLights and MobileLights
author | Ritor1 |
---|---|
date | Sun, 17 May 2015 22:42:13 +0600 |
parents | b6140dfeac27 |
children | f2f2595fe308 |
line wrap: on
line diff
--- a/Engine/Graphics/DecalBuilder.cpp Thu May 14 19:29:28 2015 +0600 +++ b/Engine/Graphics/DecalBuilder.cpp Sun May 17 22:42:13 2015 +0600 @@ -151,12 +151,12 @@ //v19 = v16->face_plane.vNormal.y; //v20 = v16->face_plane.vNormal.x; //v37 = (int)&static_AE4F60.field_1C; - static_AE4F60.field_4.y = v16->face_plane.vNormal.y; - static_AE4F60.field_4.x = v16->face_plane.vNormal.x; + static_AE4F60.Normal.y = v16->face_plane.vNormal.y; + static_AE4F60.Normal.x = v16->face_plane.vNormal.x; //LODWORD(v36) = (DWORD)&static_AE4F60.field_10; - static_AE4F60.field_4.z = v16->face_plane.vNormal.z; + static_AE4F60.Normal.z = v16->face_plane.vNormal.z; static_AE4F60.dist = v16->face_plane.dist; - if ( !pIndoorCameraD3D->GetFacetOrientation(v16->polygonType, &static_AE4F60.field_4, + if ( !pIndoorCameraD3D->GetFacetOrientation(v16->polygonType, &static_AE4F60.Normal, &static_AE4F60.field_10, &static_AE4F60.field_1C) ) MessageBoxW(nullptr, L"Error: Failed to get the facet orientation", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\PolyProjector.cpp:101", 0); @@ -229,9 +229,9 @@ this->field_30C02C = sqrt((a6 + a6 - this->field_30C028) * this->field_30C028); this->flt_30C030 = 1.0 - (a6 - this->field_30C02C) / a6; - decal->field_C08 = (signed __int64)(blood->x - a8 * a9->field_4.x); - decal->field_C0A = (signed __int64)(blood->y - a8 * a9->field_4.y); - decal->field_C0C = (signed __int64)(blood->z - a8 * a9->field_4.z); + decal->field_C08 = (signed __int64)(blood->x - a8 * a9->Normal.x); + decal->field_C0A = (signed __int64)(blood->y - a8 * a9->Normal.y); + decal->field_C0C = (signed __int64)(blood->z - a8 * a9->Normal.z); this->field_30C034 = a6 * this->flt_30C030; this->field_30C010 = this->field_30C034 * a9->field_10.x; @@ -268,18 +268,18 @@ for ( uint i = 0; i < 4; ++i ) { - v28 = a9->field_4.x * decal->pVertices[i].vWorldPosition.x - + a9->field_4.y * decal->pVertices[i].vWorldPosition.y - + a9->field_4.z * decal->pVertices[i].vWorldPosition.z + v28 = a9->Normal.x * decal->pVertices[i].vWorldPosition.x + + a9->Normal.y * decal->pVertices[i].vWorldPosition.y + + a9->Normal.z * decal->pVertices[i].vWorldPosition.z + a9->dist; - decal->pVertices[i].vWorldPosition.x = decal->pVertices[i].vWorldPosition.x - v28 * a9->field_4.x; - decal->pVertices[i].vWorldPosition.y = decal->pVertices[i].vWorldPosition.y - v28 * a9->field_4.y; - decal->pVertices[i].vWorldPosition.z = decal->pVertices[i].vWorldPosition.z - v28 * a9->field_4.z; + decal->pVertices[i].vWorldPosition.x = decal->pVertices[i].vWorldPosition.x - v28 * a9->Normal.x; + decal->pVertices[i].vWorldPosition.y = decal->pVertices[i].vWorldPosition.y - v28 * a9->Normal.y; + decal->pVertices[i].vWorldPosition.z = decal->pVertices[i].vWorldPosition.z - v28 * a9->Normal.z; } decal->uColorMultiplier = uColorMultiplier; decal->uNumVertices = 4; decal->field_C14 = a2; - result = pEngine->pStru9Instance->_4980B9(a11, a10, a9->field_4.x, a9->field_4.y, a9->field_4.z, decal->pVertices, (signed int*)&decal->uNumVertices); + result = pEngine->pStru9Instance->_4980B9(a11, a10, a9->Normal.x, a9->Normal.y, a9->Normal.z, decal->pVertices, (signed int*)&decal->uNumVertices); if ( result ) { if ( !decal->uNumVertices ) @@ -302,12 +302,12 @@ { if ( uClipFlags & 2 ) { - pIndoorCameraD3D->_436CDC_mess_with_lightmap__clipflag_2(decal->pVertices, decal->uNumVertices, this->pVertices, &a8b); + pIndoorCameraD3D->LightmapNeerClip(decal->pVertices, decal->uNumVertices, this->pVertices, &a8b); pIndoorCameraD3D->_437143(a8b, decal->pVertices, this->pVertices, (signed int *)&decal->uNumVertices); } else if ( uClipFlags & 4 ) { - pIndoorCameraD3D->_436F09_mess_with_lightmap__clipflag_4(decal->pVertices, decal->uNumVertices, this->pVertices, &a8b); + pIndoorCameraD3D->LightmapFarClip(decal->pVertices, decal->uNumVertices, this->pVertices, &a8b); pIndoorCameraD3D->_437143(a8b, decal->pVertices, this->pVertices, (signed int *)&decal->uNumVertices); } else