--- a/hedgewars/uWorld.pas Wed Jun 18 01:37:28 2014 +0200
+++ b/hedgewars/uWorld.pas Wed Jun 18 15:42:01 2014 +0200
@@ -790,102 +790,6 @@
{$ENDIF}
end;
-procedure DrawWater(Alpha: byte; OffsetY, OffsetX: LongInt);
-var VertexBuffer : array [0..3] of TVertex2f;
- topy, lx, rx: LongInt;
-begin
-
- // Water
-topy:= OffsetY + WorldDy + cWaterLine;
-
-if SuddenDeathDmg then
- begin
- SDWaterColorArray[0].a := Alpha;
- SDWaterColorArray[1].a := Alpha;
- SDWaterColorArray[2].a := Alpha;
- SDWaterColorArray[3].a := Alpha
- end
-else
- begin
- WaterColorArray[0].a := Alpha;
- WaterColorArray[1].a := Alpha;
- WaterColorArray[2].a := Alpha;
- WaterColorArray[3].a := Alpha
- end;
-
-if topy < 0 then
- topy:= 0;
-
-// glDisable(GL_TEXTURE_2D);
-
-if (topy < ViewBottomY) and (WorldEdge <> weSea) then
- begin
- VertexBuffer[0].X:= ViewLeftX;
- VertexBuffer[0].Y:= topy;
- VertexBuffer[1].X:= ViewRightX;
- VertexBuffer[1].Y:= topy;
- VertexBuffer[2].X:= ViewRightX;
- VertexBuffer[2].Y:= ViewBottomY;
- VertexBuffer[3].X:= ViewLeftX;
- VertexBuffer[3].Y:= ViewBottomY;
- DrawWaterBody(@VertexBuffer[0]);
- end;
-
-// water world edges? draw water body on the sides too
-if WorldEdge = weSea then
- begin
-
- lx:= LeftX + WorldDx - OffsetX;
- rx:= RightX + WorldDx + OffsetX;
-
- if topy < ViewBottomY then
- begin
- VertexBuffer[0].X:= lx;
- VertexBuffer[0].Y:= topy;
- VertexBuffer[1].X:= rx;
- VertexBuffer[1].Y:= topy;
- VertexBuffer[2].X:= ViewRightX;
- VertexBuffer[2].Y:= ViewBottomY;
- VertexBuffer[3].X:= ViewLeftX;
- VertexBuffer[3].Y:= ViewBottomY;
- DrawWaterBody(@VertexBuffer[0]);
- end;
-
- if lx > ViewLeftX then
- begin
- VertexBuffer[0].X:= lx;
- VertexBuffer[0].Y:= ViewTopY;
- VertexBuffer[1].X:= lx;
- VertexBuffer[1].Y:= topy;
- VertexBuffer[2].X:= ViewLeftX;
- VertexBuffer[2].Y:= ViewBottomY;
- VertexBuffer[3].X:= ViewLeftX;
- VertexBuffer[3].Y:= ViewTopY;
- DrawWaterBody(@VertexBuffer[0]);
- end;
-
-
- if rx < ViewRightX then
- begin
- VertexBuffer[0].X:= rx;
- VertexBuffer[0].Y:= topy;
- VertexBuffer[1].X:= rx;
- VertexBuffer[1].Y:= ViewTopY;
- VertexBuffer[2].X:= ViewRightX;
- VertexBuffer[2].Y:= ViewTopY;
- VertexBuffer[3].X:= ViewRightX;
- VertexBuffer[3].Y:= ViewBottomY;
- DrawWaterBody(@VertexBuffer[0]);
- end;
- end;
-
-{$IFNDEF GL2}
-// must not be Tint() as color array seems to stay active and color reset is required
-glColor4ub($FF, $FF, $FF, $FF);
-{$ENDIF}
-//glEnable(GL_TEXTURE_2D);}
-end;
-
procedure DrawWaves(Dir, dX, dY, oX: LongInt; tnt: Byte);
var VertexBuffer, TextureBuffer: array [0..7] of TVertex2f;
lw, waves, shift: GLfloat;