Enable water waves back
authorunc0rr
Sat, 26 Jan 2008 00:06:23 +0000
changeset 757 ddbff94153e8
parent 756 2b307457fd68
child 758 bebfae2063b3
Enable water waves back
hedgewars/uConsts.pas
hedgewars/uLand.pas
hedgewars/uWorld.pas
--- a/hedgewars/uConsts.pas	Fri Jan 25 23:55:03 2008 +0000
+++ b/hedgewars/uConsts.pas	Sat Jan 26 00:06:23 2008 +0000
@@ -111,7 +111,7 @@
 
       MAXNAMELEN = 32;
 
-      COLOR_LAND = $00FFFFFF;
+      COLOR_LAND = $FFFFFFF;
 
       cifRandomize = $00000001;
       cifTheme     = $00000002;
--- a/hedgewars/uLand.pas	Fri Jan 25 23:55:03 2008 +0000
+++ b/hedgewars/uLand.pas	Sat Jan 26 00:06:23 2008 +0000
@@ -313,7 +313,7 @@
       end;
 SDL_FreeSurface(tmpsurf);
 
-tmpsurf:= SDL_CreateRGBSurfaceFrom(@Land, 2048, 1024, 32, 2048*4, $FF0000, $FF00, $FF, 0);
+tmpsurf:= SDL_CreateRGBSurfaceFrom(@Land, 2048, 1024, 32, 2048*4, RMask, GMask, BMask, AMask);
 SDLTry(tmpsurf <> nil, true);
 SDL_SetColorKey(tmpsurf, SDL_SRCCOLORKEY, SDL_MapRGB(tmpsurf^.format, $FF, $FF, $FF));
 SDL_UpperBlit(tmpsurf, nil, Surface, nil);
--- a/hedgewars/uWorld.pas	Fri Jan 25 23:55:03 2008 +0000
+++ b/hedgewars/uWorld.pas	Sat Jan 26 00:06:23 2008 +0000
@@ -190,8 +190,8 @@
 
 // Waves
 {$WARNINGS OFF}
-//for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx + (RealTicks shr 6)      ) and $FF), cWaterLine + WorldDy - 64, 0, Surface);
-//for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx - (RealTicks shr 6) + 192) and $FF), cWaterLine + WorldDy - 48, 0, Surface);
+for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx + (RealTicks shr 6)      ) and $FF), cWaterLine + WorldDy - 64, 0, Surface);
+for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx - (RealTicks shr 6) + 192) and $FF), cWaterLine + WorldDy - 48, 0, Surface);
 {$WARNINGS ON}
 
 DrawLand(WorldDx, WorldDy, Surface);
@@ -210,9 +210,9 @@
 
 // Waves
 {$WARNINGS OFF}
-//for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx + (RealTicks shr 6) +  64) and $FF), cWaterLine + WorldDy - 32, 0, Surface);
-//for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx - (RealTicks shr 6) + 128) and $FF), cWaterLine + WorldDy - 16, 0, Surface);
-//for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx + (RealTicks shr 6)      ) and $FF), cWaterLine + WorldDy     , 0, Surface);
+for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx + (RealTicks shr 6) +  64) and $FF), cWaterLine + WorldDy - 32, 0, Surface);
+for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx - (RealTicks shr 6) + 128) and $FF), cWaterLine + WorldDy - 16, 0, Surface);
+for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 256  + ((WorldDx + (RealTicks shr 6)      ) and $FF), cWaterLine + WorldDy     , 0, Surface);
 {$WARNINGS ON}
 
 // Turn time