hedgewars/uLandGraphics.pas
changeset 13567 8f9b84d6991d
parent 13463 f1d349a52bc7
child 14282 6015b74eea55
equal deleted inserted replaced
13566:acc69f506914 13567:8f9b84d6991d
   471 procedure DrawHLinesExplosions(ar: PRangeArray; Radius: LongInt; y, dY: LongInt; Count: Byte);
   471 procedure DrawHLinesExplosions(ar: PRangeArray; Radius: LongInt; y, dY: LongInt; Count: Byte);
   472 var tx, ty, by, bx,  i: LongInt;
   472 var tx, ty, by, bx,  i: LongInt;
   473 begin
   473 begin
   474 for i:= 0 to Pred(Count) do
   474 for i:= 0 to Pred(Count) do
   475     begin
   475     begin
   476     for ty:= Max(y - Radius, 0) to Min(y + Radius, LAND_HEIGHT) do
   476     for ty:= Max(y - Radius, 0) to Min(y + Radius, TopY) do
   477         for tx:= Max(0, ar^[i].Left - Radius) to Min(LAND_WIDTH, ar^[i].Right + Radius) do
   477         for tx:= Max(LeftX, ar^[i].Left - Radius) to Min(RightX, ar^[i].Right + Radius) do
   478             begin
   478             begin
   479             if (Land[ty, tx] and lfIndestructible) = 0 then
   479             if (Land[ty, tx] and lfIndestructible) = 0 then
   480                 begin
   480                 begin
   481                 if (cReducedQuality and rqBlurryLand) = 0 then
   481                 if (cReducedQuality and rqBlurryLand) = 0 then
   482                     begin
   482                     begin
   498 inc(Radius, 4);
   498 inc(Radius, 4);
   499 dec(y, Count * dY);
   499 dec(y, Count * dY);
   500 
   500 
   501 for i:= 0 to Pred(Count) do
   501 for i:= 0 to Pred(Count) do
   502     begin
   502     begin
   503     for ty:= Max(y - Radius, 0) to Min(y + Radius, LAND_HEIGHT) do
   503     for ty:= Max(y - Radius, 0) to Min(y + Radius, TopY) do
   504         for tx:= Max(0, ar^[i].Left - Radius) to Min(LAND_WIDTH, ar^[i].Right + Radius) do
   504         for tx:= Max(LeftX, ar^[i].Left - Radius) to Min(RightX, ar^[i].Right + Radius) do
   505             if ((Land[ty, tx] and lfBasic) <> 0) or ((Land[ty, tx] and lfObject) <> 0) then
   505             if ((Land[ty, tx] and lfBasic) <> 0) or ((Land[ty, tx] and lfObject) <> 0) then
   506                 begin
   506                 begin
   507                  if (cReducedQuality and rqBlurryLand) = 0 then
   507                  if (cReducedQuality and rqBlurryLand) = 0 then
   508                     LandPixels[ty, tx]:= ExplosionBorderColor
   508                     LandPixels[ty, tx]:= ExplosionBorderColor
   509                 else
   509                 else