hedgewars/uLandGraphics.pas
changeset 10246 8da91cd7a32a
parent 10244 f7b5b4b88171
child 10251 a3b42e81803c
equal deleted inserted replaced
10245:3ccc054c3c3e 10246:8da91cd7a32a
    42 function FillRoundInLand(X, Y, Radius: LongInt; Value: Longword): Longword;
    42 function FillRoundInLand(X, Y, Radius: LongInt; Value: Longword): Longword;
    43 function FillRoundInLandFT(X, Y, Radius: LongInt; fill: fillType): Longword;
    43 function FillRoundInLandFT(X, Y, Radius: LongInt; fill: fillType): Longword;
    44 procedure ChangeRoundInLand(X, Y, Radius: LongInt; doSet, isCurrent: boolean);
    44 procedure ChangeRoundInLand(X, Y, Radius: LongInt; doSet, isCurrent: boolean);
    45 function  LandBackPixel(x, y: LongInt): LongWord;
    45 function  LandBackPixel(x, y: LongInt): LongWord;
    46 procedure DrawLine(X1, Y1, X2, Y2: LongInt; Color: Longword);
    46 procedure DrawLine(X1, Y1, X2, Y2: LongInt; Color: Longword);
    47 function DrawThickLine(X1, Y1, X2, Y2, radius: LongInt; color: Longword): Longword;
    47 function  DrawThickLine(X1, Y1, X2, Y2, radius: LongInt; color: Longword): Longword;
    48 procedure DumpLandToLog(x, y, r: LongInt);
    48 procedure DumpLandToLog(x, y, r: LongInt);
    49 procedure DrawIceBreak(x, y, iceRadius, iceHeight: Longint);
    49 procedure DrawIceBreak(x, y, iceRadius, iceHeight: Longint);
    50 function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace, indestructible: boolean): boolean; inline;
    50 function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace, indestructible: boolean): boolean; inline;
    51 function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace, indestructible: boolean; LandFlags: Word): boolean;
    51 function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace, indestructible: boolean; LandFlags: Word): boolean;
    52 
    52 
   999     end
   999     end
  1000 end;
  1000 end;
  1001 
  1001 
  1002 function DrawDots(x, y, xx, yy: Longint; Color: Longword): Longword; inline;
  1002 function DrawDots(x, y, xx, yy: Longint; Color: Longword): Longword; inline;
  1003 begin
  1003 begin
       
  1004     DrawDots:= 0;
       
  1005 
  1004     if (((x + xx) and LAND_WIDTH_MASK) = 0) and (((y + yy) and LAND_HEIGHT_MASK) = 0) and (Land[y + yy, x + xx] <> Color) then 
  1006     if (((x + xx) and LAND_WIDTH_MASK) = 0) and (((y + yy) and LAND_HEIGHT_MASK) = 0) and (Land[y + yy, x + xx] <> Color) then 
  1005         begin inc(DrawDots); Land[y + yy, x + xx]:= Color; end;
  1007         begin inc(DrawDots); Land[y + yy, x + xx]:= Color; end;
  1006     if (((x + xx) and LAND_WIDTH_MASK) = 0) and (((y - yy) and LAND_HEIGHT_MASK) = 0) and (Land[y - yy, x + xx] <> Color) then 
  1008     if (((x + xx) and LAND_WIDTH_MASK) = 0) and (((y - yy) and LAND_HEIGHT_MASK) = 0) and (Land[y - yy, x + xx] <> Color) then 
  1007         begin inc(DrawDots); Land[y - yy, x + xx]:= Color; end;
  1009         begin inc(DrawDots); Land[y - yy, x + xx]:= Color; end;
  1008     if (((x - xx) and LAND_WIDTH_MASK) = 0) and (((y + yy) and LAND_HEIGHT_MASK) = 0) and (Land[y + yy, x - xx] <> Color) then 
  1010     if (((x - xx) and LAND_WIDTH_MASK) = 0) and (((y + yy) and LAND_HEIGHT_MASK) = 0) and (Land[y + yy, x - xx] <> Color) then