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
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);
53
0e27949850e3 - Fixed bubble theme object
unc0rr
parents: 38
diff changeset
     6
        if ((ty and $FFFFFC00) = 0) and ((tx and $FFFFF800) = 0)and (Land[ty, tx] = $FFFFFF) then
38
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;