diff Game.cpp @ 2153:d28d3c006077

Some Render decoupling.
author Nomad
date Thu, 09 Jan 2014 02:34:20 +0200
parents d44b7775fc06
children 9bd7522cdbbb
line wrap: on
line diff
--- a/Game.cpp	Thu Jan 09 01:37:34 2014 +0200
+++ b/Game.cpp	Thu Jan 09 02:34:20 2014 +0200
@@ -1,7 +1,3 @@
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-
 #include "Vis.h"
 #include "Weather.h"
 #include "LightmapBuilder.h"
@@ -1783,7 +1779,7 @@
           not_available_tinting_texture_id = pIcons_LOD->LoadTexture("opvdG-tn", TEXTURE_16BIT_PALETTE);
           pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_VideoOptions, 0, 0);
           pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, 1, 0, UIMSG_Escape, 0, 0, "", 0);
-          if ( pRenderer->pRenderD3D )
+          //if ( pRenderer->pRenderD3D )
           {
             pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x118u, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleBloodsplats, 0, 0, "", 0);
             pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x12Eu, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleColoredLights, 0, 0, "", 0);
@@ -1842,10 +1838,10 @@
           pGame->ToggleFlags2(0x20u);
           continue;
         case UIMSG_ToggleColoredLights:
-          pRenderer->bUseColoredLights = pRenderer->bUseColoredLights == 0;
+          pRenderer->ToggleColoredLights();
           continue;
         case UIMSG_ToggleTint:
-          pRenderer->bTinting = pRenderer->bTinting == 0;
+          pRenderer->ToggleTint();
           continue;
         case UIMSG_ChangeMusicVolume:  //громкость музыки
           if ( uMessageParam == 4 )//кнопка понижения
@@ -2262,7 +2258,7 @@
                       stru_506E40.Release();
                       break;
                     case SCREEN_VIDEO_OPTIONS:
-                      if ( pRenderer->pRenderD3D )
+                      //if ( pRenderer->pRenderD3D )
                       {
                         WriteWindowsRegistryInt("Colored Lights", pRenderer->bUseColoredLights);
                         WriteWindowsRegistryInt("Tinting", pRenderer->bTinting);
@@ -2864,14 +2860,14 @@
           viewparams->bRedrawGameUI = 1;
           continue;
         case UIMSG_CastSpell_Telekinesis:
-          if ( pRenderer->pRenderD3D )
+          //if ( pRenderer->pRenderD3D )
             LOWORD(v42) = pGame->pVisInstance->get_picked_object_zbuf_val();
-          else
+          /*else
           {
             uNumSeconds = (unsigned int)pMouse->GetCursorPos(&v210);
             pPoint = pMouse->GetCursorPos(&v208);
             v42 = pRenderer->pActiveZBuffer[*(int *)uNumSeconds + pSRZBufferLineOffsets[pPoint->y]];
-          }
+          }*/
           v44 = (unsigned __int16)v42;
           v45 = PID_TYPE(v44);
           uNumSeconds = v44;