hedgewars/uLandGraphics.pas
changeset 2331 e4941a7986d6
parent 2236 af8fc3311748
child 2376 ece7b87f1334
equal deleted inserted replaced
2330:ba46dcda3676 2331:e4941a7986d6
    26                                    Left, Right: LongInt;
    26                                    Left, Right: LongInt;
    27                                    end;
    27                                    end;
    28 
    28 
    29 function SweepDirty: boolean;
    29 function SweepDirty: boolean;
    30 function Despeckle(X, Y: LongInt): boolean;
    30 function Despeckle(X, Y: LongInt): boolean;
       
    31 function CheckLandValue(X, Y: LongInt; Color: Word): boolean;
    31 procedure DrawExplosion(X, Y, Radius: LongInt);
    32 procedure DrawExplosion(X, Y, Radius: LongInt);
    32 procedure DrawHLinesExplosions(ar: PRangeArray; Radius: LongInt; y, dY: LongInt; Count: Byte);
    33 procedure DrawHLinesExplosions(ar: PRangeArray; Radius: LongInt; y, dY: LongInt; Count: Byte);
    33 procedure DrawTunnel(X, Y, dX, dY: hwFloat; ticks, HalfWidth: LongInt);
    34 procedure DrawTunnel(X, Y, dX, dY: hwFloat; ticks, HalfWidth: LongInt);
    34 procedure FillRoundInLand(X, Y, Radius: LongInt; Value: Longword);
    35 procedure FillRoundInLand(X, Y, Radius: LongInt; Value: Longword);
    35 procedure ChangeRoundInLand(X, Y, Radius: LongInt; doSet: boolean);
    36 procedure ChangeRoundInLand(X, Y, Radius: LongInt; doSet: boolean);
   475 	end;
   476 	end;
   476 
   477 
   477 SweepDirty:= Result
   478 SweepDirty:= Result
   478 end;
   479 end;
   479 
   480 
       
   481 // Return true if outside of land or not the value tested, used right now for some X/Y movement that does not use normal hedgehog movement in GSHandlers.inc
       
   482 function CheckLandValue(X, Y: LongInt; Color: Word): boolean;
       
   483 begin
       
   484      CheckLandValue:= ((X and LAND_WIDTH_MASK <> 0) or (Y and LAND_HEIGHT_MASK <> 0)) or (Land[Y, X] <> Color)
       
   485 end;
   480 end.
   486 end.