cleanup and lol
authorsheepluva
Thu, 19 Jun 2014 00:09:03 +0200
changeset 10331 cb6c33839d2a
parent 10330 3ec09243cb55
child 10332 194f003b41a4
cleanup and lol
hedgewars/uRender.pas
hedgewars/uWorld.pas
--- a/hedgewars/uRender.pas	Wed Jun 18 23:57:51 2014 +0200
+++ b/hedgewars/uRender.pas	Thu Jun 19 00:09:03 2014 +0200
@@ -1321,7 +1321,7 @@
     InTopY, OutTopY, InLeftX, OutLeftX, InRightX, OutRightX, BottomY: LongInt;
     out first, count: LongInt);
 
-var firsti, afteri: LongInt;
+var firsti, afteri, lol: LongInt;
 begin
 
     // We will draw both bottom water and the water walls with a single call,
@@ -1360,6 +1360,11 @@
 firsti:= -1;
 afteri:=  0;
 
+if GameTicks < 2000 then
+    lol:= 2000 - GameTicks
+else
+    lol:= 0;
+
 if InTopY < 0 then
     InTopY:= 0;
 
@@ -1373,9 +1378,9 @@
     begin
     if InLeftX > OutLeftX then
         begin
-        VertexBuffer[0].X:= OutLeftX;
+        VertexBuffer[0].X:= OutLeftX - lol;
         VertexBuffer[0].Y:= OutTopY;
-        VertexBuffer[1].X:= InLeftX;
+        VertexBuffer[1].X:= InLeftX - lol;
         VertexBuffer[1].Y:= OutTopY;
         // shares vertices 2 and 3 with bottom water
         firsti:= 0;
@@ -1384,9 +1389,9 @@
 
     if InRightX < OutRightX then
         begin
-        VertexBuffer[6].X:= OutRightX;
+        VertexBuffer[6].X:= OutRightX + lol;
         VertexBuffer[6].Y:= OutTopY;
-        VertexBuffer[7].X:= InRightX;
+        VertexBuffer[7].X:= InRightX + lol;
         VertexBuffer[7].Y:= OutTopY;
         // shares vertices 4 and 5 with bottom water
         if firsti < 0 then
--- a/hedgewars/uWorld.pas	Wed Jun 18 23:57:51 2014 +0200
+++ b/hedgewars/uWorld.pas	Thu Jun 19 00:09:03 2014 +0200
@@ -66,8 +66,7 @@
 {$ENDIF}
     ;
 
-var cWaveWidth: LongInt;
-    AMShiftTargetX, AMShiftTargetY, AMShiftX, AMShiftY, SlotsNum: LongInt;
+var AMShiftTargetX, AMShiftTargetY, AMShiftX, AMShiftY, SlotsNum: LongInt;
     AMAnimStartTime, AMState : LongInt;
     AMAnimState: Single;
     tmpSurface: PSDL_Surface;
@@ -219,7 +218,7 @@
 if length(g) > 0 then
     ShowMission(trgoal[gidCaption], trgoal[gidSubCaption], g, 1, 0);
 
-cWaveWidth:= SpritesData[sprWater].Width;
+//cWaveWidth:= SpritesData[sprWater].Width;
 //cWaveHeight:= SpritesData[sprWater].Height;
 cWaveHeight:= 32;