hedgewars/uWorld.pas
changeset 780 f45b0e513dfd
parent 777 86177328b094
child 783 4f59db6f147d
--- a/hedgewars/uWorld.pas	Thu Jan 31 20:01:07 2008 +0000
+++ b/hedgewars/uWorld.pas	Fri Feb 01 16:39:37 2008 +0000
@@ -195,10 +195,19 @@
 if r.y < cScreenHeight then
    begin
    if r.y < 0 then r.y:= 0;
-   r.h:= cScreenHeight - r.y;
-   r.x:= 0;
-   r.w:= cScreenWidth;
-//   SDL_FillRect(Surface, @r, cWaterColor)
+
+   glDisable(GL_TEXTURE_2D);
+   glBegin(GL_QUADS);
+    glColor3ub(0, $5A, $CE); // water color
+    glVertex2i(0, r.y);
+    glVertex2i(cScreenWidth, r.y);
+    glColor3ub(0, $40, $B3); // deep water color
+    glVertex2i(cScreenWidth, cScreenHeight);
+    glVertex2i(0, cScreenHeight);
+   glEnd();
+
+   glColor4f(1, 1, 1, 1); // disable coloring
+   glEnable(GL_TEXTURE_2D)
    end;
 
 DrawGears(Surface);