diff Engine/Graphics/LightmapBuilder.cpp @ 2543:b6140dfeac27

GameOver h/cpp
author a.parshin
date Sun, 10 May 2015 03:21:14 +0200
parents a902abdfc7f2
children 6ab1273bc507
line wrap: on
line diff
--- a/Engine/Graphics/LightmapBuilder.cpp	Sun May 10 02:04:52 2015 +0200
+++ b/Engine/Graphics/LightmapBuilder.cpp	Sun May 10 03:21:14 2015 +0200
@@ -124,8 +124,8 @@
     }
   }
 
-  minz = pEngine->pIndoorCameraD3D->GetPolygonMinZ(a1, uStripType);
-  maxz = pEngine->pIndoorCameraD3D->GetPolygonMaxZ(a1, uStripType);
+  minz = pIndoorCameraD3D->GetPolygonMinZ(a1, uStripType);
+  maxz = pIndoorCameraD3D->GetPolygonMaxZ(a1, uStripType);
 
   float bounding_x1 = tX_0 - (float)pLight->uRadius; //13 976 - 128 = 13848.0
   float bounding_y1 = tY_0 - (float)pLight->uRadius; // 3 800 - 128 = 3672.0
@@ -564,7 +564,7 @@
     for (uint i = 0; i < uNumVertices; ++i)
       memcpy(&static_69B140[i], a5 + i, sizeof(RenderVertexSoft));
 
-    if (pEngine->pIndoorCameraD3D->_437376(a3, static_69B140, &uNumVertices) == 1)
+    if (pIndoorCameraD3D->_437376(a3, static_69B140, &uNumVertices) == 1)
     {
       if ( !uNumVertices )
         return false;
@@ -577,7 +577,7 @@
   static_69B110.field_4.y = a3->face_plane.vNormal.y;
   static_69B110.field_4.z = a3->face_plane.vNormal.z;
   static_69B110.dist = a3->face_plane.dist;
-  if (!pEngine->pIndoorCameraD3D->GetFacetOrientation(a3->polygonType, &static_69B110.field_4,
+  if (!pIndoorCameraD3D->GetFacetOrientation(a3->polygonType, &static_69B110.field_4,
           &static_69B110.field_10, &static_69B110.field_1C))
   {
     MessageBoxW(nullptr, L"Error: Failed to get the facet orientation", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Light.cpp:119", 0);
@@ -730,8 +730,8 @@
   if ( v45 != uNumVertices && v45 > 0 )
     _45C4B9(uNumVertices, a9, lightmap);
 
-  pEngine->pIndoorCameraD3D->ViewTransform(lightmap->pVertices, lightmap->NumVertices);
-  pEngine->pIndoorCameraD3D->Project(lightmap->pVertices, lightmap->NumVertices, 0);
+  pIndoorCameraD3D->ViewTransform(lightmap->pVertices, lightmap->NumVertices);
+  pIndoorCameraD3D->Project(lightmap->pVertices, lightmap->NumVertices, 0);
 
   unsigned int _a4 = 0;
   if ( !(uClipFlag & 1) )
@@ -740,13 +740,13 @@
   {
     if ( uClipFlag & 2 )
     {
-      pEngine->pIndoorCameraD3D->_436CDC_mess_with_lightmap__clipflag_2(lightmap->pVertices, lightmap->NumVertices, field_3C8C34, &_a4);
-      pEngine->pIndoorCameraD3D->_437143(_a4, lightmap->pVertices, field_3C8C34, &lightmap->NumVertices);
+      pIndoorCameraD3D->_436CDC_mess_with_lightmap__clipflag_2(lightmap->pVertices, lightmap->NumVertices, field_3C8C34, &_a4);
+      pIndoorCameraD3D->_437143(_a4, lightmap->pVertices, field_3C8C34, &lightmap->NumVertices);
     }
     else if ( uClipFlag & 4 )
     {
-      pEngine->pIndoorCameraD3D->_436F09_mess_with_lightmap__clipflag_4(lightmap->pVertices, lightmap->NumVertices, field_3C8C34, &_a4);
-      pEngine->pIndoorCameraD3D->_437143(_a4, lightmap->pVertices, field_3C8C34, &lightmap->NumVertices);
+      pIndoorCameraD3D->_436F09_mess_with_lightmap__clipflag_4(lightmap->pVertices, lightmap->NumVertices, field_3C8C34, &_a4);
+      pIndoorCameraD3D->_437143(_a4, lightmap->pVertices, field_3C8C34, &lightmap->NumVertices);
     }
     else
       MessageBoxW(nullptr, L"Undefined clip flag specified", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Light.cpp:330", 0);
@@ -906,10 +906,10 @@
   {
     float v18;
     if (fabs(z_bias) < 1e-5)
-      v18 = 1.0 - 1.0 / ((1.0f / pEngine->pIndoorCameraD3D->GetShadingDistMist()) * pLightmap->pVertices[i].vWorldViewPosition.x * 1000.0);
+      v18 = 1.0 - 1.0 / ((1.0f / pIndoorCameraD3D->GetShadingDistMist()) * pLightmap->pVertices[i].vWorldViewPosition.x * 1000.0);
 	else
     {
-      v18 = 1.0 - 1.0 / ((1.0f / pEngine->pIndoorCameraD3D->GetShadingDistMist()) * pLightmap->pVertices[i].vWorldViewPosition.x * 1000.0) - z_bias;
+      v18 = 1.0 - 1.0 / ((1.0f / pIndoorCameraD3D->GetShadingDistMist()) * pLightmap->pVertices[i].vWorldViewPosition.x * 1000.0) - z_bias;
       if (v18 < 0.000099999997)
         v18 = 0.000099999997;
     }
@@ -1218,9 +1218,9 @@
   bool a2a; // [sp+20h] [bp+8h]@6
 
   __debugbreak();//Not used?
-  result = (bool)pEngine->pIndoorCameraD3D;
+  result = (bool)pIndoorCameraD3D;
   v3 = this;
-  thisa = pEngine->pIndoorCameraD3D;
+  thisa = pIndoorCameraD3D;
   if ( bit_one_for_list1__bit_two_for_list2 & 1 )
   {
     v7 = 0;
@@ -1229,7 +1229,7 @@
       v4 = this->std__vector_000004[0].pVertices;
       do
       {
-        pEngine->pIndoorCameraD3D->debug_outline_sw(v4, *((unsigned int *)v4 - 1), 0xFF00u, 0.0);
+        pIndoorCameraD3D->debug_outline_sw(v4, *((unsigned int *)v4 - 1), 0xFF00u, 0.0);
         ++v7;
         v4 = (RenderVertexSoft *)((char *)v4 + 3100);
         result = v7;
@@ -1245,7 +1245,7 @@
       v5 = v3->std__vector_183808[0].pVertices;
       do
       {
-        pEngine->pIndoorCameraD3D->debug_outline_sw(v5, *((unsigned int *)v5 - 1), 0xC04000u, 0.00019999999);
+        pIndoorCameraD3D->debug_outline_sw(v5, *((unsigned int *)v5 - 1), 0xC04000u, 0.00019999999);
         ++a2a;
         v5 = (RenderVertexSoft *)((char *)v5 + 3100);
         result = a2a;