hedgewars/uWorld.pas
changeset 2269 00f5704f5f39
parent 2268 053eb81e60ee
child 2272 c59656d7b1de
--- a/hedgewars/uWorld.pas	Wed Jul 22 01:50:46 2009 +0000
+++ b/hedgewars/uWorld.pas	Thu Jul 23 18:48:41 2009 +0000
@@ -179,11 +179,16 @@
 
 procedure MoveCamera; forward;
 
-procedure DrawWater;
+procedure DrawWater(Alpha: byte);
 var VertexBuffer: array [0..3] of TVertex2f;
     r: TSDL_Rect;
     lw, lh: GLfloat;
 begin
+WaterColorArray[0].a := Alpha;
+WaterColorArray[1].a := Alpha;
+WaterColorArray[2].a := Alpha;
+WaterColorArray[3].a := Alpha;
+
 lw:= cScreenWidth / cScaleFactor;
 lh:= cScreenHeight * 2 / cScaleFactor;
 // Water
@@ -268,7 +273,7 @@
 
 DrawLand(WorldDx, WorldDy);
 
-DrawWater;
+DrawWater(255);
 
 // Attack bar
 if CurrentTeam <> nil then
@@ -296,6 +301,8 @@
 
 DrawVisualGears(1);
 
+if not cReducedQuality then DrawWater(128);
+
 // Waves
 {$WARNINGS OFF}
 //for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * cWaveWidth  + ((WorldDx + (RealTicks shr 6) +  25) mod cWaveWidth), cWaterLine + WorldDy - cWaveHeight, 0);