hedgewars/uWorld.pas
changeset 3611 ed00aa2b339e
parent 3594 aeca3d8f1b29
child 3629 86212d2b116a
--- a/hedgewars/uWorld.pas	Fri Jul 02 17:46:53 2010 +0200
+++ b/hedgewars/uWorld.pas	Sat Jul 03 00:11:23 2010 +0200
@@ -553,21 +553,20 @@
             zoom:= zoom + 0.002 * Lag;
             if ZoomValue < zoom then
                 zoom:= ZoomValue
+            end
         end
-    end
-else
-    ZoomValue:= zoom;
+    else
+        ZoomValue:= zoom;
 
-// Sky
-glClear(GL_COLOR_BUFFER_BIT);
-//glPushMatrix;
-//glScalef(1.0, 1.0, 1.0);
+    // Sky
+    glClear(GL_COLOR_BUFFER_BIT);
+    //glPushMatrix;
+    //glScalef(1.0, 1.0, 1.0);
 
     if not isPaused then
         MoveCamera;
 
-{if not cReducedQuality then}
-    if (cReducedQuality and (rqNoBackground or rqKillFlakes or rq2DWater)) = 0 then
+    if (cReducedQuality and rqNoBackground) = 0 then
     begin
         // Offsets relative to camera - spare them to wimpier cpus, no bg or flakes for them anyway
         ScreenBottom:= (WorldDy - trunc(cScreenHeight/cScaleFactor) - (cScreenHeight div 2) + cWaterLine);
@@ -580,9 +579,12 @@
         // background
         DrawRepeated(sprSky, sprSkyL, sprSkyR, (WorldDx + LAND_WIDTH div 2) * 3 div 8, SkyOffset);
         DrawRepeated(sprHorizont, sprHorizontL, sprHorizontR, (WorldDx + LAND_WIDTH div 2) * 3 div 5, HorizontOffset);
+    end;
 
-        DrawVisualGears(0);
-        
+    DrawVisualGears(0);
+    
+    if (cReducedQuality and rq2DWater) = 0 then
+    begin
         // Waves
         DrawWater(255, SkyOffset); 
         DrawWaves( 1,  0 - WorldDx div 32, - cWaveHeight + offsetY div 35, 64);
@@ -593,13 +595,13 @@
     else
         DrawWaves(-1, 100, - (cWaveHeight + (cWaveHeight shr 1)), 0);
 
-DrawLand(WorldDx, WorldDy);
+    DrawLand(WorldDx, WorldDy);
 
-DrawWater(255, 0);
+    DrawWater(255, 0);
 
 // Attack bar
-if CurrentTeam <> nil then
-    case AttackBar of
+    if CurrentTeam <> nil then
+        case AttackBar of
 (*        1: begin
         r:= StuffPoz[sPowerBar];
         {$WARNINGS OFF}
@@ -619,16 +621,16 @@
                 end
         end;
 
-DrawVisualGears(1);
+    DrawVisualGears(1);
 
-DrawGears;
+    DrawGears;
 
-DrawVisualGears(2);
+    DrawVisualGears(2);
 
-DrawWater(cWaterOpacity, 0);
+    DrawWater(cWaterOpacity, 0);
 
-// Waves
-DrawWaves( 1, 25 - WorldDx div 9, - cWaveHeight, 12);
+    // Waves
+    DrawWaves( 1, 25 - WorldDx div 9, - cWaveHeight, 12);
 
     if (cReducedQuality and rq2DWater) = 0 then
     begin
@@ -639,8 +641,8 @@
         DrawWater(cWaterOpacity, - offsetY div 10);
         DrawWaves( -1, 25 + WorldDx div 3, - cWaveHeight - offsetY div 10, 0);
     end
-else
-    DrawWaves(-1, 50, - (cWaveHeight shr 1), 0);
+    else
+        DrawWaves(-1, 50, - (cWaveHeight shr 1), 0);
 
 
 {$WARNINGS OFF}