hedgewars/uLand.pas
changeset 10040 4ac87acbaed9
parent 10017 de822cd3df3a
parent 10022 eb981a03de90
child 10108 c68cf030eded
--- a/hedgewars/uLand.pas	Tue Jan 21 22:44:37 2014 +0100
+++ b/hedgewars/uLand.pas	Tue Jan 21 22:53:15 2014 +0100
@@ -31,7 +31,7 @@
 implementation
 uses uConsole, uStore, uRandom, uLandObjects, uIO, uLandTexture, SysUtils,
      uVariables, uUtils, uCommands, adler32, uDebug, uLandPainted, uTextures,
-     uLandGenMaze, uLandOutline, uPhysFSLayer;
+     uLandGenMaze, uLandOutline, uPhysFSLayer, uScript;
 
 var digest: shortstring;
 
@@ -60,6 +60,13 @@
     end;
 end;
 
+procedure PrettifyLandAlpha();
+begin
+    if (cReducedQuality and rqBlurryLand) <> 0 then
+        PrettifyAlpha2D(LandPixels, LAND_HEIGHT div 2, LAND_WIDTH div 2)
+    else
+        PrettifyAlpha2D(LandPixels, LAND_HEIGHT, LAND_WIDTH);
+end;
 
 procedure DrawBorderFromImage(Surface: PSDL_Surface);
 var tmpsurf: PSDL_Surface;
@@ -811,6 +818,8 @@
                 LandPixels[y,x]:= w or (LandPixels[y div 2, x div 2] and AMask)
                 end
     end;
+
+PrettifyLandAlpha();
 end;
 
 procedure GenPreview(out Preview: TPreview);
@@ -877,6 +886,8 @@
         adler:= Adler32Update(adler, @Land[i,0], LAND_WIDTH);
     s:= 'M' + IntToStr(adler) + cScriptName;
 
+    ScriptSetString('LandDigest', s);
+
     chLandCheck(s);
     SendIPCRaw(@s[0], Length(s) + 1)
 end;