hedgewars/tunsetborder.inc
author unc0rr
Thu, 05 Jan 2006 22:55:45 +0000
changeset 38 c1ec4b15d70e
child 53 0e27949850e3
permissions -rw-r--r--
Better Desert Eagle and Shotgun
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
38
c1ec4b15d70e Better Desert Eagle and Shotgun
unc0rr
parents:
diff changeset
     1
        begin
c1ec4b15d70e Better Desert Eagle and Shotgun
unc0rr
parents:
diff changeset
     2
        X:= X + dX;
c1ec4b15d70e Better Desert Eagle and Shotgun
unc0rr
parents:
diff changeset
     3
        Y:= Y + dY;
c1ec4b15d70e Better Desert Eagle and Shotgun
unc0rr
parents:
diff changeset
     4
        tx:= round(X);
c1ec4b15d70e Better Desert Eagle and Shotgun
unc0rr
parents:
diff changeset
     5
        ty:= round(Y);
c1ec4b15d70e Better Desert Eagle and Shotgun
unc0rr
parents:
diff changeset
     6
        if ((ty and $FFFFFC00) = 0) and ((tx and $FFFFF800) = 0)and (Land[ty, tx] <> 0) then
c1ec4b15d70e Better Desert Eagle and Shotgun
unc0rr
parents:
diff changeset
     7
        case LandSurface.format.BytesPerPixel of
c1ec4b15d70e Better Desert Eagle and Shotgun
unc0rr
parents:
diff changeset
     8
             1: ;
c1ec4b15d70e Better Desert Eagle and Shotgun
unc0rr
parents:
diff changeset
     9
             2: PWord(p + LandSurface.pitch * ty + tx * 2)^:= cExplosionBorderColor;
c1ec4b15d70e Better Desert Eagle and Shotgun
unc0rr
parents:
diff changeset
    10
             3: begin
c1ec4b15d70e Better Desert Eagle and Shotgun
unc0rr
parents:
diff changeset
    11
                PByte(p + LandSurface.pitch * ty + tx * 3 + 0)^:= cExplosionBorderColor and $FF;
c1ec4b15d70e Better Desert Eagle and Shotgun
unc0rr
parents:
diff changeset
    12
                PByte(p + LandSurface.pitch * ty + tx * 3 + 1)^:= (cExplosionBorderColor shr 8) and $FF;
c1ec4b15d70e Better Desert Eagle and Shotgun
unc0rr
parents:
diff changeset
    13
                PByte(p + LandSurface.pitch * ty + tx * 3 + 2)^:= (cExplosionBorderColor shr 16);
c1ec4b15d70e Better Desert Eagle and Shotgun
unc0rr
parents:
diff changeset
    14
                end;
c1ec4b15d70e Better Desert Eagle and Shotgun
unc0rr
parents:
diff changeset
    15
             4: PLongword(p + LandSurface.pitch * ty + tx * 4)^:= cExplosionBorderColor;
c1ec4b15d70e Better Desert Eagle and Shotgun
unc0rr
parents:
diff changeset
    16
             end
c1ec4b15d70e Better Desert Eagle and Shotgun
unc0rr
parents:
diff changeset
    17
	end;