hedgewars/tunsetborder.inc
changeset 101 f568cc72ea8c
parent 53 0e27949850e3
child 184 f97a7a3dc8f6
equal deleted inserted replaced
100:f324a18698fe 101:f568cc72ea8c
     2         X:= X + dX;
     2         X:= X + dX;
     3         Y:= Y + dY;
     3         Y:= Y + dY;
     4         tx:= round(X);
     4         tx:= round(X);
     5         ty:= round(Y);
     5         ty:= round(Y);
     6         if ((ty and $FFFFFC00) = 0) and ((tx and $FFFFF800) = 0)and (Land[ty, tx] = $FFFFFF) then
     6         if ((ty and $FFFFFC00) = 0) and ((tx and $FFFFF800) = 0)and (Land[ty, tx] = $FFFFFF) then
     7         case LandSurface.format.BytesPerPixel of
     7            SetLandPixel(ty, tx)
     8              1: ;
       
     9              2: PWord(p + LandSurface.pitch * ty + tx * 2)^:= cExplosionBorderColor;
       
    10              3: begin
       
    11                 PByte(p + LandSurface.pitch * ty + tx * 3 + 0)^:= cExplosionBorderColor and $FF;
       
    12                 PByte(p + LandSurface.pitch * ty + tx * 3 + 1)^:= (cExplosionBorderColor shr 8) and $FF;
       
    13                 PByte(p + LandSurface.pitch * ty + tx * 3 + 2)^:= (cExplosionBorderColor shr 16);
       
    14                 end;
       
    15              4: PLongword(p + LandSurface.pitch * ty + tx * 4)^:= cExplosionBorderColor;
       
    16              end
       
    17 	end;
     8 	end;