hedgewars/uLandGraphics.pas
changeset 2599 c7153d2348f3
parent 2376 ece7b87f1334
child 2602 3deb9ff104da
equal deleted inserted replaced
2598:e118329666ff 2599:c7153d2348f3
    17  *)
    17  *)
    18 
    18 
    19 unit uLandGraphics;
    19 unit uLandGraphics;
    20 interface
    20 interface
    21 uses uFloat, uConsts;
    21 uses uFloat, uConsts;
    22 {$INCLUDE options.inc}
    22 {$INCLUDE "options.inc"}
    23 
    23 
    24 type PRangeArray = ^TRangeArray;
    24 type PRangeArray = ^TRangeArray;
    25      TRangeArray = array[0..31] of record
    25      TRangeArray = array[0..31] of record
    26                                    Left, Right: LongInt;
    26                                    Left, Right: LongInt;
    27                                    end;
    27                                    end;
   290 for i:= 0 to 7 do
   290 for i:= 0 to 7 do
   291     begin
   291     begin
   292     X:= nx - dX8;
   292     X:= nx - dX8;
   293     Y:= ny - dY8;
   293     Y:= ny - dY8;
   294     for t:= -8 to ticks + 8 do
   294     for t:= -8 to ticks + 8 do
   295         {$include tunsetborder.inc}
   295         {$INCLUDE "tunsetborder.inc"}
   296     nx:= nx - dY;
   296     nx:= nx - dY;
   297     ny:= ny + dX;
   297     ny:= ny + dX;
   298     end;
   298     end;
   299 
   299 
   300 for i:= -HalfWidth to HalfWidth do
   300 for i:= -HalfWidth to HalfWidth do
   301     begin
   301     begin
   302     X:= nx - dX8;
   302     X:= nx - dX8;
   303     Y:= ny - dY8;
   303     Y:= ny - dY8;
   304     for t:= 0 to 7 do
   304     for t:= 0 to 7 do
   305         {$include tunsetborder.inc}
   305         {$INCLUDE "tunsetborder.inc"}
   306     X:= nx;
   306     X:= nx;
   307     Y:= ny;
   307     Y:= ny;
   308     for t:= 0 to ticks do
   308     for t:= 0 to ticks do
   309         begin
   309         begin
   310         X:= X + dX;
   310         X:= X + dX;
   317            Land[ty, tx]:= 0;
   317            Land[ty, tx]:= 0;
   318            LandPixels[ty, tx]:= 0;
   318            LandPixels[ty, tx]:= 0;
   319            end
   319            end
   320         end;
   320         end;
   321     for t:= 0 to 7 do
   321     for t:= 0 to 7 do
   322         {$include tunsetborder.inc}
   322         {$INCLUDE "tunsetborder.inc"}
   323     nx:= nx - dY;
   323     nx:= nx - dY;
   324     ny:= ny + dX;
   324     ny:= ny + dX;
   325     end;
   325     end;
   326 
   326 
   327 for i:= 0 to 7 do
   327 for i:= 0 to 7 do
   328     begin
   328     begin
   329     X:= nx - dX8;
   329     X:= nx - dX8;
   330     Y:= ny - dY8;
   330     Y:= ny - dY8;
   331     for t:= -8 to ticks + 8 do
   331     for t:= -8 to ticks + 8 do
   332         {$include tunsetborder.inc}
   332         {$INCLUDE "tunsetborder.inc"}
   333     nx:= nx - dY;
   333     nx:= nx - dY;
   334     ny:= ny + dX;
   334     ny:= ny + dX;
   335     end;
   335     end;
   336 
   336 
   337 tx:= max(stX - HalfWidth * 2 - 4 - abs(hwRound(dX * ticks)), 0);
   337 tx:= max(stX - HalfWidth * 2 - 4 - abs(hwRound(dX * ticks)), 0);