hedgewars/tunsetborder.inc
author unc0rr
Thu, 19 Jan 2006 21:12:20 +0000
changeset 53 0e27949850e3
parent 38 c1ec4b15d70e
child 101 f568cc72ea8c
permissions -rw-r--r--
- Fixed bubble theme object - Hedgehogs are round now when checking collisions and hedgehog isn't going, increased perfomance - Gears are square when checking collisions - Ability to load map from png file - Show more clear information when fail to load file

        begin
        X:= X + dX;
        Y:= Y + dY;
        tx:= round(X);
        ty:= round(Y);
        if ((ty and $FFFFFC00) = 0) and ((tx and $FFFFF800) = 0)and (Land[ty, tx] = $FFFFFF) then
        case LandSurface.format.BytesPerPixel of
             1: ;
             2: PWord(p + LandSurface.pitch * ty + tx * 2)^:= cExplosionBorderColor;
             3: begin
                PByte(p + LandSurface.pitch * ty + tx * 3 + 0)^:= cExplosionBorderColor and $FF;
                PByte(p + LandSurface.pitch * ty + tx * 3 + 1)^:= (cExplosionBorderColor shr 8) and $FF;
                PByte(p + LandSurface.pitch * ty + tx * 3 + 2)^:= (cExplosionBorderColor shr 16);
                end;
             4: PLongword(p + LandSurface.pitch * ty + tx * 4)^:= cExplosionBorderColor;
             end
	end;