diff IndoorCameraD3D.cpp @ 2154:9bd7522cdbbb

Render decoupling. Unsorted variables cleaning.
author Nomad
date Thu, 09 Jan 2014 14:36:48 +0200
parents d44b7775fc06
children 0a1438c16c2b
line wrap: on
line diff
--- a/IndoorCameraD3D.cpp	Thu Jan 09 02:34:20 2014 +0200
+++ b/IndoorCameraD3D.cpp	Thu Jan 09 14:36:48 2014 +0200
@@ -233,7 +233,7 @@
     for (uint i = 0; i < uNumVertices; ++i)
     {
           float st0, st1, st2;
-          if ( pRenderer->pRenderD3D )
+          //if ( pRenderer->pRenderD3D )
           {
             /*__asm
             {
@@ -277,7 +277,7 @@
             st1 = cos_y * (a1a[i].vWorldPosition.x - pGame->pIndoorCameraD3D->vPartyPos.x) + sin_y * (a1a[i].vWorldPosition.y - pGame->pIndoorCameraD3D->vPartyPos.y);
             st2 = (a1a[i].vWorldPosition.z - pGame->pIndoorCameraD3D->vPartyPos.z);
           }
-          else
+          if (false)//else
           {
             /*__asm
             {
@@ -355,7 +355,7 @@
     {
       for (uint i = 0; i < uNumVertices; ++i)
       {
-          if ( pRenderer->pRenderD3D )
+          //if ( pRenderer->pRenderD3D )
           {
             /*__asm
             {
@@ -411,7 +411,7 @@
             a1a[i].vWorldViewPosition.y = sin_y * (a1a[i].vWorldPosition.x - pGame->pIndoorCameraD3D->vPartyPos.x) - cos_y * (a1a[i].vWorldPosition.y - pGame->pIndoorCameraD3D->vPartyPos.y);
             a1a[i].vWorldViewPosition.z = (a1a[i].vWorldPosition.z - pGame->pIndoorCameraD3D->vPartyPos.z);
           }
-          else
+          if (false)//else
           {
             __debugbreak();
             /*__asm
@@ -563,7 +563,7 @@
 void IndoorCameraD3D::do_draw_debug_line_d3d(const RenderVertexD3D3 *pLineBegin, signed int sDiffuseBegin, const RenderVertexD3D3 *pLineEnd, signed int sDiffuseEnd, float z_stuff)
 {
   double v6; // st7@2
-  IDirect3DDevice3 *v7; // eax@2
+  //IDirect3DDevice3 *v7; // eax@2
   HRESULT v8; // eax@2
   std::string v9; // [sp-18h] [bp-60h]@3
   const char *v10; // [sp-Ch] [bp-54h]@2
@@ -571,7 +571,7 @@
   int v12; // [sp-4h] [bp-4Ch]@2
   RenderVertexD3D3 v13[2]; // [sp+8h] [bp-40h]@2
 
-  if ( pRenderer->pRenderD3D )
+  //if ( pRenderer->pRenderD3D )
   {
     v6 = 0.001 - z_stuff;
     memcpy(v13, pLineBegin, 0x20u);
@@ -581,7 +581,7 @@
     v12 = 0;
     v13[0].diffuse = sDiffuseBegin;
     v13[1].diffuse = sDiffuseEnd;
-    v7 = pRenderer->pRenderD3D->pDevice;
+    //v7 = pRenderer->pRenderD3D->pDevice;
     v11 = 0;
     //v10 = (const char *)v7;
     ErrD3D(pRenderer->pRenderD3D->pDevice->SetTexture(0, nullptr));
@@ -592,10 +592,6 @@
            2,
            16));
   }
-  else
-  {
-    MessageBoxW(nullptr, L"draw_debug_line() not implemented for SW rendering", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Core3D.cpp:1415", 0);
-  }
 }
 
 //----- (00437AB5) --------------------------------------------------------
@@ -622,7 +618,7 @@
   IndoorCameraD3D *v25; // [sp+7C8h] [bp-4h]@1
 
   v25 = this;
-  if ( pRenderer->pRenderD3D )
+  //if ( pRenderer->pRenderD3D )
   {
     v7 = (char *)&pVertices[0].flt_2C;
     v8 = 20;
@@ -708,8 +704,6 @@
       goto LABEL_11;
     }
   }
-  else
-    MessageBoxW(nullptr, L"draw_debug_line() not implemented for SW rendering", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Core3D.cpp:1383", 0);
 }
 
 //----- (00437A55) --------------------------------------------------------
@@ -1544,7 +1538,7 @@
   float a2a; // [sp+18h] [bp+8h]@2
   float a2b; // [sp+18h] [bp+8h]@2
 
-  if ( pRenderer->pRenderD3D )
+  //if ( pRenderer->pRenderD3D )
   {
     v6 = 1.0 / (double)x;
     a2a = (double)y * fov * v6 + screenCenterX;