add extra semi-opaque layer of water to discolour objects in the water.
--- 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);