Invert S3D_DISABLED to more consistent USE_S3D_RENDERING
authorChris Wong <lambda.fairy@gmail.com>
Thu, 29 Nov 2012 14:02:28 +1300
changeset 8138 cfb228baa598
parent 8136 c2196b1dccb4
child 8140 a098374b847b
Invert S3D_DISABLED to more consistent USE_S3D_RENDERING
hedgewars/options.inc
hedgewars/uStore.pas
hedgewars/uWorld.pas
tools/PascalPreprocessor.hs
--- a/hedgewars/options.inc	Thu Nov 29 04:57:35 2012 +0100
+++ b/hedgewars/options.inc	Thu Nov 29 14:02:28 2012 +1300
@@ -43,12 +43,12 @@
 
 {$IFDEF MOBILE}
     {$DEFINE HWLIBRARY}
-    {$DEFINE S3D_DISABLED}
     {$DEFINE GLunit:=gles11}
     {$DEFINE USE_LANDSCAPE_AMMOMENU}
     {$DEFINE USE_TOUCH_INTERFACE}
 {$ELSE}
     {$DEFINE USE_AM_NUMCOLUMN}
+    {$DEFINE USE_S3D_RENDERING}
 {$ENDIF}
 
 
--- a/hedgewars/uStore.pas	Thu Nov 29 04:57:35 2012 +0100
+++ b/hedgewars/uStore.pas	Thu Nov 29 14:02:28 2012 +1300
@@ -437,7 +437,7 @@
 IMG_Quit();
 end;
 
-{$IF NOT DEFINED(S3D_DISABLED) OR DEFINED(USE_VIDEO_RECORDING)}
+{$IF DEFINED(USE_S3D_RENDERING) OR DEFINED(USE_VIDEO_RECORDING)}
 procedure CreateFramebuffer(var frame, depth, tex: GLuint);
 begin
     glGenFramebuffersEXT(1, @frame);
@@ -539,7 +539,7 @@
     if defaultFrame <> 0 then
         DeleteFramebuffer(defaultFrame, depthv, texv);
 {$ENDIF}
-{$IFNDEF S3D_DISABLED}
+{$IFDEF USE_S3D_RENDERING}
     if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) or (cStereoMode = smAFR) then
         begin
         DeleteFramebuffer(framel, depthl, texl);
@@ -805,7 +805,7 @@
     end;
 {$ENDIF}
 
-{$IFNDEF S3D_DISABLED}
+{$IFDEF USE_S3D_RENDERING}
     if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) or (cStereoMode = smAFR) then
     begin
         // prepare left and right frame buffers and associated textures
--- a/hedgewars/uWorld.pas	Thu Nov 29 04:57:35 2012 +0100
+++ b/hedgewars/uWorld.pas	Thu Nov 29 14:02:28 2012 +1300
@@ -961,7 +961,7 @@
         glClear(GL_COLOR_BUFFER_BIT);
         DrawWorldStereo(Lag, rmDefault)
         end
-{$IFNDEF S3D_DISABLED}
+{$IFDEF USE_S3D_RENDERING}
     else if (cStereoMode = smAFR) then
         begin
         AFRToggle:= not AFRToggle;
@@ -1074,7 +1074,7 @@
 
 procedure ChangeDepth(rm: TRenderMode; d: GLfloat);
 begin
-{$IFDEF S3D_DISABLED}
+{$IFNDEF USE_S3D_RENDERING}
     rm:= rm; d:= d; // avoid hint
     exit;
 {$ELSE}
@@ -1092,7 +1092,7 @@
  
 procedure ResetDepth(rm: TRenderMode);
 begin
-{$IFDEF S3D_DISABLED}
+{$IFNDEF USE_S3D_RENDERING}
     rm:= rm; // avoid hint
     exit;
 {$ELSE}
--- a/tools/PascalPreprocessor.hs	Thu Nov 29 04:57:35 2012 +0100
+++ b/tools/PascalPreprocessor.hs	Thu Nov 29 14:02:28 2012 +1300
@@ -19,7 +19,6 @@
     ("FPC", "")
     , ("PAS2C", "")
     , ("ENDIAN_LITTLE", "")
-    , ("S3D_DISABLED", "")
     ]
 
 preprocess :: String -> IO String