hedgewars/uLand.pas
changeset 10165 e84f9b928ad3
parent 10163 b994afa40326
child 10181 4708343d5963
equal deleted inserted replaced
10164:0570d4b22187 10165:e84f9b928ad3
   900     for y:= 0 to 127 do
   900     for y:= 0 to 127 do
   901         for x:= 0 to 255 do
   901         for x:= 0 to 255 do
   902             begin
   902             begin
   903             t:= 0;
   903             t:= 0;
   904 
   904 
   905             for yy:= y * lh - oy to y * lh + 7 - oy do
   905             for yy:= y * lh - oy to y * lh + lh - 1 - oy do
   906                 for xx:= x * lw - ox to x * lw + 7 - ox do
   906                 for xx:= x * lw - ox to x * lw + lw - 1 - ox do
   907                     if (yy and LAND_HEIGHT_MASK = 0) and (xx and LAND_WIDTH_MASK = 0)
   907                     if (yy and LAND_HEIGHT_MASK = 0) and (xx and LAND_WIDTH_MASK = 0)
   908                         and (Land[yy, xx] <> 0) then
   908                         and (Land[yy, xx] <> 0) then
   909                         inc(t);
   909                         inc(t);
   910 
   910 
   911             Preview[y, x]:= t * 1023 div 256;
   911             Preview[y, x]:= t * 255 div (lh * lw);
   912             end;
   912             end;
   913 end;
   913 end;
   914 
   914 
   915 procedure chLandCheck(var s: shortstring);
   915 procedure chLandCheck(var s: shortstring);
   916 begin
   916 begin