hedgewars/uWorld.pas
changeset 2378 66fcb4d62a53
parent 2376 ece7b87f1334
child 2379 d62b1f224982
equal deleted inserted replaced
2377:f3fab2b09e0c 2378:66fcb4d62a53
   193 WaterColorArray[1].a := Alpha;
   193 WaterColorArray[1].a := Alpha;
   194 WaterColorArray[2].a := Alpha;
   194 WaterColorArray[2].a := Alpha;
   195 WaterColorArray[3].a := Alpha;
   195 WaterColorArray[3].a := Alpha;
   196 
   196 
   197 lw:= cScreenWidth / cScaleFactor;
   197 lw:= cScreenWidth / cScaleFactor;
   198 lh:= cScreenHeight * 2 / cScaleFactor;
   198 lh:= trunc(cScreenHeight / cScaleFactor) + cScreenHeight div 2 + 16;
   199 // Water
   199 // Water
   200 r.y:= WorldDy + cWaterLine + 16;
   200 r.y:= WorldDy + cWaterLine;
   201 if r.y < cScreenHeight * 2 / cScaleFactor then
   201 if WorldDy < trunc(cScreenHeight / cScaleFactor) + cScreenHeight div 2 - cWaterLine then
   202 	begin
   202 	begin
   203 	if r.y < 0 then r.y:= 0;
   203 	if r.y < 0 then r.y:= 0;
   204 
   204 
   205 	glDisable(GL_TEXTURE_2D);
   205 	glDisable(GL_TEXTURE_2D);
   206 	VertexBuffer[0].X:= -lw;
   206 	VertexBuffer[0].X:= -lw;