hedgewars/tunsetborder.inc
changeset 38 c1ec4b15d70e
child 53 0e27949850e3
equal deleted inserted replaced
37:2b7f2a43b999 38:c1ec4b15d70e
       
     1         begin
       
     2         X:= X + dX;
       
     3         Y:= Y + dY;
       
     4         tx:= round(X);
       
     5         ty:= round(Y);
       
     6         if ((ty and $FFFFFC00) = 0) and ((tx and $FFFFF800) = 0)and (Land[ty, tx] <> 0) then
       
     7         case LandSurface.format.BytesPerPixel of
       
     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;