hedgewars/tunsetborder.inc
author unc0rr
Tue, 10 Jan 2006 19:53:18 +0000
changeset 43 e297fea1a2f3
parent 38 c1ec4b15d70e
child 53 0e27949850e3
permissions -rw-r--r--
- Removed dark pixels on the corners of health case - Cleaned up dynamite code - Dynamite sprite - Frontend shows error messages from engine (except IPC-related :) ) - changed IPC-related stuff in frontend
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;