author | koda |
Fri, 12 Nov 2010 17:17:25 +0100 | |
changeset 4252 | 13ec087713dd |
parent 4246 | e5cb885492df |
child 4279 | b697a26ed538 |
permissions | -rw-r--r-- |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
1 |
procedure DrawHH(Gear: PGear; ox, oy: LongInt); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
2 |
var i, t: LongInt; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
3 |
amt: TAmmoType; |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
4 |
sign, hx, hy, cx, cy, tx, ty, sx, sy, m: LongInt; // hedgehog, crosshair, temp, sprite, direction |
3483 | 5 |
dx, dy, ax, ay, aAngle, dAngle, hAngle, lx, ly: real; // laser, change |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
6 |
defaultPos, HatVisible: boolean; |
3393 | 7 |
VertexBuffer: array [0..1] of TVertex2f; |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
8 |
HH: PHedgehog; |
3836
833c0f32e326
Change all use of curslot/idx to CurAmmoType to try and avoid some bugs with use of last weapon.
nemo
parents:
3751
diff
changeset
|
9 |
CurWeapon: PAmmo; |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
10 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
11 |
HH:= PHedgehog(Gear^.Hedgehog); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
12 |
if HH^.Unplaced then exit; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
13 |
m:= 1; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
14 |
if ((Gear^.State and gstHHHJump) <> 0) and not cArtillery then m:= -1; |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
15 |
sx:= ox + 1; // this offset is very common |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
16 |
sy:= oy - 3; |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
17 |
sign:= hwSign(Gear^.dX); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
18 |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
19 |
if (Gear^.State and gstHHDeath) <> 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
20 |
begin |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
21 |
DrawSprite(sprHHDeath, ox - 16, oy - 26, Gear^.Pos); |
3863 | 22 |
Tint(HH^.Team^.Clan^.Color); |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
23 |
DrawSprite(sprHHDeath, ox - 16, oy - 26, Gear^.Pos + 8); |
3863 | 24 |
Tint($FF, $FF, $FF, $FF); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
25 |
exit |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
26 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
27 |
else if (Gear^.State and gstHHGone) <> 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
28 |
begin |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
29 |
DrawRotatedF(sprTeleport, sx, sy, Gear^.Pos, sign, 0); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
30 |
exit |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
31 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
32 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
33 |
defaultPos:= true; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
34 |
HatVisible:= false; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
35 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
36 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
37 |
if HH^.Effects[hePoisoned] then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
38 |
begin |
3392 | 39 |
Tint($00, $FF, $40, $40); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
40 |
DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 2, 0, 0, sx, sy, 0, 1, 22, 22, (RealTicks shr 36) mod 360); |
3390 | 41 |
Tint($FF, $FF, $FF, $FF) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
42 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
43 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
44 |
if ((Gear^.State and gstWinner) <> 0) and |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
45 |
((CurAmmoGear = nil) or (CurAmmoGear^.Kind <> gtPickHammer)) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
46 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
47 |
DrawHedgehog(sx, sy, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
48 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
49 |
2, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
50 |
0, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
51 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
52 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
53 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
54 |
if (Gear^.State and gstDrowning) <> 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
55 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
56 |
DrawHedgehog(sx, sy, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
57 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
58 |
1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
59 |
7, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
60 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
61 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
62 |
end else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
63 |
if (Gear^.State and gstLoser) <> 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
64 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
65 |
DrawHedgehog(sx, sy, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
66 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
67 |
2, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
68 |
3, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
69 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
70 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
71 |
end else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
72 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
73 |
if (Gear^.State and gstHHDriven) <> 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
74 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
75 |
if ((Gear^.State and gstHHThinking) = 0) and |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
76 |
(ShowCrosshair or ((CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtRope))) and |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
77 |
((Gear^.State and (gstAttacked or gstAnimation)) = 0) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
78 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
79 |
(* These calculations are a little complex for a few reasons: |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
80 |
1: I need to draw the laser from weapon origin to nearest land |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
81 |
2: I need to start the beam outside the hedgie for attractiveness. |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
82 |
3: I need to extend the beam beyond land. |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
83 |
This routine perhaps should be pushed into uStore or somesuch instead of continuuing the increase in size of this function. |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
84 |
*) |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
85 |
dx:= sign * m * Sin(Gear^.Angle * pi / cMaxAngle); |
3483 | 86 |
dy:= -Cos(Gear^.Angle * pi / cMaxAngle); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
87 |
if cLaserSighting then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
88 |
begin |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
89 |
lx:= GetLaunchX(HH^.CurAmmoType, sign * m, Gear^.Angle); |
3836
833c0f32e326
Change all use of curslot/idx to CurAmmoType to try and avoid some bugs with use of last weapon.
nemo
parents:
3751
diff
changeset
|
90 |
ly:= GetLaunchY(HH^.CurAmmoType, Gear^.Angle); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
91 |
|
3496 | 92 |
// ensure we start outside the hedgehog (he's solid after all) |
93 |
while abs(lx * lx + ly * ly) < (Gear^.radius * Gear^.radius) do |
|
94 |
begin |
|
95 |
lx:= lx + dx; |
|
96 |
ly:= ly + dy |
|
97 |
end; |
|
98 |
||
99 |
// add hog's position |
|
4093 | 100 |
lx:= lx + ox - WorldDx; |
4094 | 101 |
ly:= ly + oy - WorldDy; |
3496 | 102 |
|
103 |
// decrease number of iterations required |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
104 |
ax:= dx * 4; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
105 |
ay:= dy * 4; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
106 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
107 |
tx:= round(lx); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
108 |
ty:= round(ly); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
109 |
hx:= tx; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
110 |
hy:= ty; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
111 |
while ((ty and LAND_HEIGHT_MASK) = 0) and |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
112 |
((tx and LAND_WIDTH_MASK) = 0) and |
3496 | 113 |
(Land[ty, tx] = 0) do // TODO: check for constant variable instead |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
114 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
115 |
lx:= lx + ax; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
116 |
ly:= ly + ay; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
117 |
tx:= round(lx); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
118 |
ty:= round(ly) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
119 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
120 |
// reached edge of land. assume infinite beam. Extend it way out past camera |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
121 |
if ((ty and LAND_HEIGHT_MASK) <> 0) or ((tx and LAND_WIDTH_MASK) <> 0) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
122 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
123 |
tx:= round(lx + ax * (LAND_WIDTH div 4)); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
124 |
ty:= round(ly + ay * (LAND_WIDTH div 4)); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
125 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
126 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
127 |
//if (abs(lx-tx)>8) or (abs(ly-ty)>8) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
128 |
begin |
3393 | 129 |
glDisable(GL_TEXTURE_2D); |
3390 | 130 |
glEnable(GL_LINE_SMOOTH); |
3393 | 131 |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
132 |
glLineWidth(1.0); |
3393 | 133 |
|
3390 | 134 |
Tint($FF, $00, $00, $C0); |
3393 | 135 |
VertexBuffer[0].X:= hx + WorldDx; |
136 |
VertexBuffer[0].Y:= hy + WorldDy; |
|
137 |
VertexBuffer[1].X:= tx + WorldDx; |
|
138 |
VertexBuffer[1].Y:= ty + WorldDy; |
|
139 |
||
140 |
glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]); |
|
141 |
glDrawArrays(GL_LINES, 0, Length(VertexBuffer)); |
|
3390 | 142 |
Tint($FF, $FF, $FF, $FF); |
3393 | 143 |
glEnable(GL_TEXTURE_2D); |
3390 | 144 |
glDisable(GL_LINE_SMOOTH); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
145 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
146 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
147 |
// draw crosshair |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
148 |
cx:= Round(hwRound(Gear^.X) + dx * 80 + GetLaunchX(HH^.CurAmmoType, sign * m, Gear^.Angle)); |
3836
833c0f32e326
Change all use of curslot/idx to CurAmmoType to try and avoid some bugs with use of last weapon.
nemo
parents:
3751
diff
changeset
|
149 |
cy:= Round(hwRound(Gear^.Y) + dy * 80 + GetLaunchY(HH^.CurAmmoType, Gear^.Angle)); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
150 |
DrawRotatedTex(HH^.Team^.CrosshairTex, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
151 |
12, 12, cx + WorldDx, cy + WorldDy, 0, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
152 |
sign * (Gear^.Angle * 180.0) / cMaxAngle); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
153 |
end; |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
154 |
hx:= ox + 8 * sign; |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
155 |
hy:= oy - 2; |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
156 |
aangle:= Gear^.Angle * 180 / cMaxAngle - 90; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
157 |
if CurAmmoGear <> nil then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
158 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
159 |
case CurAmmoGear^.Kind of |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
160 |
gtShotgunShot: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
161 |
if (CurAmmoGear^.State and gstAnimation <> 0) then |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
162 |
DrawRotated(sprShotgun, hx, hy, sign, aangle) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
163 |
else |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
164 |
DrawRotated(sprHandShotgun, hx, hy, sign, aangle); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
165 |
end; |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
166 |
gtDEagleShot: DrawRotated(sprDEagle, hx, hy, sign, aangle); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
167 |
gtSniperRifleShot: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
168 |
if (CurAmmoGear^.State and gstAnimation <> 0) then |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
169 |
DrawRotatedF(sprSniperRifle, hx, hy, 1, sign, aangle) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
170 |
else |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
171 |
DrawRotatedF(sprSniperRifle, hx, hy, 0, sign, aangle) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
172 |
end; |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
173 |
gtBallgun: DrawRotated(sprHandBallgun, hx, hy, sign, aangle); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
174 |
gtRCPlane: begin |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
175 |
DrawRotated(sprHandPlane, hx, hy, sign, 0); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
176 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
177 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
178 |
gtRope: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
179 |
if Gear^.X < CurAmmoGear^.X then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
180 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
181 |
dAngle:= 0; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
182 |
hAngle:= 180; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
183 |
i:= 1 |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
184 |
end else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
185 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
186 |
dAngle:= 180; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
187 |
hAngle:= 0; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
188 |
i:= -1 |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
189 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
190 |
if ((Gear^.State and gstWinner) = 0) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
191 |
begin |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
192 |
DrawHedgehog(ox, oy, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
193 |
i, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
194 |
1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
195 |
0, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
196 |
DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + dAngle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
197 |
with HH^ do |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
198 |
if (HatTex <> nil) then |
3445 | 199 |
begin |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
200 |
DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, ox, oy, 0, i, 32, 32, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
201 |
i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle); |
3854 | 202 |
if HatTex^.w > 64 then |
3445 | 203 |
begin |
204 |
Tint(HH^.Team^.Clan^.Color); |
|
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
205 |
DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, ox, oy, 32, i, 32, 32, |
3445 | 206 |
i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle); |
207 |
Tint($FF, $FF, $FF, $FF) |
|
208 |
end |
|
209 |
end |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
210 |
end; |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
211 |
DrawAltWeapon(Gear, ox, oy); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
212 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
213 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
214 |
gtBlowTorch: begin |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
215 |
DrawRotated(sprBlowTorch, hx, hy, sign, aangle); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
216 |
DrawHedgehog(sx, sy, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
217 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
218 |
3, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
219 |
HH^.visStepPos div 2, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
220 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
221 |
with HH^ do |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
222 |
if (HatTex <> nil) then |
3445 | 223 |
begin |
224 |
DrawTextureF(HatTex, |
|
225 |
1, |
|
226 |
sx, |
|
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
227 |
sy - 5, |
3445 | 228 |
0, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
229 |
sign, |
3445 | 230 |
32, |
231 |
32); |
|
3854 | 232 |
if HatTex^.w > 64 then |
3445 | 233 |
begin |
234 |
Tint(HH^.Team^.Clan^.Color); |
|
235 |
DrawTextureF(HatTex, |
|
236 |
1, |
|
237 |
sx, |
|
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
238 |
sy - 5, |
3445 | 239 |
32, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
240 |
sign, |
3445 | 241 |
32, |
242 |
32); |
|
243 |
Tint($FF, $FF, $FF, $FF) |
|
244 |
end |
|
245 |
end; |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
246 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
247 |
end; |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
248 |
gtShover: DrawRotated(sprHandBaseball, hx, hy, sign, aangle + 180); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
249 |
gtFirePunch: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
250 |
DrawHedgehog(sx, sy, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
251 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
252 |
1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
253 |
4, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
254 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
255 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
256 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
257 |
gtPickHammer: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
258 |
defaultPos:= false; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
259 |
dec(sy,20); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
260 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
261 |
gtTeleport: defaultPos:= false; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
262 |
gtWhip: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
263 |
DrawRotatedF(sprWhip, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
264 |
sx, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
265 |
sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
266 |
1, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
267 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
268 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
269 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
270 |
end; |
3717 | 271 |
gtHammer: begin |
272 |
DrawRotatedF(sprHammer, |
|
273 |
sx, |
|
274 |
sy, |
|
275 |
1, |
|
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
276 |
sign, |
3717 | 277 |
0); |
278 |
defaultPos:= false |
|
279 |
end; |
|
3963
6090d2a2472e
New Weapon: Resurrector (TODO: ammo icon + sprites)
Tobias Neumann <mail@tobias-neumann.eu>
parents:
3909
diff
changeset
|
280 |
gtResurrector: begin |
4044
de7170e51cc6
Check for collision with surfaces above when levitating hog, use more typical drawing syntax for the resurrector wep, restore typical indentation
nemo
parents:
4036
diff
changeset
|
281 |
DrawRotated(sprHandResurrector, sx, sy, 0, 0); |
de7170e51cc6
Check for collision with surfaces above when levitating hog, use more typical drawing syntax for the resurrector wep, restore typical indentation
nemo
parents:
4036
diff
changeset
|
282 |
defaultPos:= false |
4018
7f2c71638466
burp can always remove this if he doesn't like it. just making it a bit more interesting.
nemo
parents:
4016
diff
changeset
|
283 |
end; |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
284 |
gtKamikaze: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
285 |
if CurAmmoGear^.Pos = 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
286 |
DrawHedgehog(sx, sy, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
287 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
288 |
1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
289 |
6, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
290 |
0) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
291 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
292 |
DrawRotatedF(sprKamikaze, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
293 |
ox, oy, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
294 |
CurAmmoGear^.Pos - 1, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
295 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
296 |
aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
297 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
298 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
299 |
gtSeduction: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
300 |
if CurAmmoGear^.Pos >= 6 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
301 |
DrawHedgehog(sx, sy, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
302 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
303 |
2, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
304 |
2, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
305 |
0) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
306 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
307 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
308 |
DrawRotatedF(sprDress, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
309 |
ox, oy, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
310 |
CurAmmoGear^.Pos, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
311 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
312 |
0); |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
313 |
DrawSprite(sprCensored, ox - 32, oy - 20, 0) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
314 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
315 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
316 |
end; |
3485 | 317 |
gtFlamethrower: begin |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
318 |
DrawRotatedF(sprHandFlamethrower, hx, hy, (RealTicks div 125) mod 4, sign, aangle); |
3485 | 319 |
if CurAmmoGear^.Tex <> nil then DrawCentered(sx, sy - 40, CurAmmoGear^.Tex) |
320 |
end; |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
321 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
322 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
323 |
case CurAmmoGear^.Kind of |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
324 |
gtShotgunShot, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
325 |
gtDEagleShot, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
326 |
gtSniperRifleShot, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
327 |
gtShover: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
328 |
DrawHedgehog(sx, sy, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
329 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
330 |
0, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
331 |
4, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
332 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
333 |
defaultPos:= false; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
334 |
HatVisible:= true |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
335 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
336 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
337 |
end else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
338 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
339 |
if ((Gear^.State and gstHHJumping) <> 0) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
340 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
341 |
DrawHedgehog(sx, sy, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
342 |
sign*m, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
343 |
1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
344 |
1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
345 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
346 |
HatVisible:= true; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
347 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
348 |
end else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
349 |
|
3894 | 350 |
if (Gear^.Message and (gmLeft or gmRight) <> 0) and (not isCursorVisible) then |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
351 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
352 |
DrawHedgehog(sx, sy, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
353 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
354 |
0, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
355 |
HH^.visStepPos div 2, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
356 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
357 |
defaultPos:= false; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
358 |
HatVisible:= true |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
359 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
360 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
361 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
362 |
if ((Gear^.State and gstAnimation) <> 0) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
363 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
364 |
if (TWave(Gear^.Tag) < Low(TWave)) or (TWave(Gear^.Tag) > High(TWave)) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
365 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
366 |
Gear^.State:= Gear^.State and not gstAnimation; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
367 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
368 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
369 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
370 |
DrawRotatedF(Wavez[TWave(Gear^.Tag)].Sprite, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
371 |
sx, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
372 |
sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
373 |
Gear^.Pos, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
374 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
375 |
0.0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
376 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
377 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
378 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
379 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
380 |
if ((Gear^.State and gstAttacked) = 0) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
381 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
382 |
if HH^.Timer > 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
383 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
384 |
// There must be a tidier way to do this. Anyone? |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
385 |
if aangle <= 90 then aangle:= aangle+360; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
386 |
if Gear^.dX > _0 then aangle:= aangle-((aangle-240)*HH^.Timer/10) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
387 |
else aangle:= aangle+((240-aangle)*HH^.Timer/10); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
388 |
dec(HH^.Timer) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
389 |
end; |
3836
833c0f32e326
Change all use of curslot/idx to CurAmmoType to try and avoid some bugs with use of last weapon.
nemo
parents:
3751
diff
changeset
|
390 |
amt:= CurrentHedgehog^.CurAmmoType; |
833c0f32e326
Change all use of curslot/idx to CurAmmoType to try and avoid some bugs with use of last weapon.
nemo
parents:
3751
diff
changeset
|
391 |
CurWeapon:= GetAmmoEntry(HH^); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
392 |
case amt of |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
393 |
amBazooka: DrawRotated(sprHandBazooka, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
394 |
amMortar: DrawRotated(sprHandMortar, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
395 |
amMolotov: DrawRotated(sprHandMolotov, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
396 |
amBallgun: DrawRotated(sprHandBallgun, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
397 |
amDrill: DrawRotated(sprHandDrill, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
398 |
amRope: DrawRotated(sprHandRope, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
399 |
amShotgun: DrawRotated(sprHandShotgun, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
400 |
amDEagle: DrawRotated(sprHandDEagle, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
401 |
amSineGun: DrawRotated(sprHandShotgun, hx, hy, sign, aangle); |
3836
833c0f32e326
Change all use of curslot/idx to CurAmmoType to try and avoid some bugs with use of last weapon.
nemo
parents:
3751
diff
changeset
|
402 |
amPortalGun: if (CurWeapon^.Timer and 2) <> 0 then // Add a new Hedgehog value instead of abusing timer? |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
403 |
DrawRotatedF(sprPortalGun, hx, hy, 0, sign, aangle) |
3396
e5b3e5f2818e
More portal changes. Allows for a multishoot utility. Hopefully not breaking anything.
nemo
parents:
3393
diff
changeset
|
404 |
else |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
405 |
DrawRotatedF(sprPortalGun, hx, hy, 1+(CurWeapon^.Timer and 1), sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
406 |
amSniperRifle: DrawRotatedF(sprSniperRifle, hx, hy, 0, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
407 |
amBlowTorch: DrawRotated(sprHandBlowTorch, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
408 |
amCake: DrawRotated(sprHandCake, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
409 |
amGrenade: DrawRotated(sprHandGrenade, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
410 |
amWatermelon: DrawRotated(sprHandMelon, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
411 |
amSkip: DrawRotated(sprHandSkip, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
412 |
amClusterBomb: DrawRotated(sprHandCluster, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
413 |
amDynamite: DrawRotated(sprHandDynamite, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
414 |
amHellishBomb: DrawRotated(sprHandHellish, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
415 |
amGasBomb: DrawRotated(sprHandCheese, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
416 |
amMine: DrawRotated(sprHandMine, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
417 |
amSMine: DrawRotated(sprHandSMine, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
418 |
amSeduction: DrawRotated(sprHandSeduction, hx, hy, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
419 |
amVampiric: DrawRotatedF(sprHandVamp, hx, hy, (RealTicks div 125) mod 4, sign, aangle); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
420 |
amRCPlane: begin |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
421 |
DrawRotated(sprHandPlane, hx, hy, sign, 0); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
422 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
423 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
424 |
amGirder: begin |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
425 |
DrawRotated(sprHandConstruction, hx, hy, sign, aangle); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
426 |
DrawSpriteClipped(sprGirder, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
427 |
ox-256, |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
428 |
oy-256, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
429 |
LongInt(topY)+WorldDy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
430 |
LongInt(rightX)+WorldDx, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
431 |
cWaterLine+WorldDy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
432 |
LongInt(leftX)+WorldDx) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
433 |
end; |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
434 |
amBee: DrawRotatedF(sprHandBee, hx, hy, (RealTicks div 125) mod 4, sign, aangle); |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
435 |
amFlamethrower: DrawRotatedF(sprHandFlamethrower, hx, hy, (RealTicks div 125) mod 4, sign, aangle); |
4222 | 436 |
amResurrector: DrawCircle(ox, oy, 98, 4, $F5, $DB, $35, $AA); // I'd rather not like to hardcode 100 here |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
437 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
438 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
439 |
case amt of |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
440 |
amAirAttack, |
4246
e5cb885492df
drillstrike! might require the drill patch to improve behavior
koda
parents:
4222
diff
changeset
|
441 |
amMineStrike, |
e5cb885492df
drillstrike! might require the drill patch to improve behavior
koda
parents:
4222
diff
changeset
|
442 |
amDrillStrike: DrawRotated(sprHandAirAttack, sx, oy, sign, 0); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
443 |
amPickHammer: DrawHedgehog(sx, sy, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
444 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
445 |
1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
446 |
2, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
447 |
0); |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
448 |
amTeleport: DrawRotatedF(sprTeleport, sx, sy, 0, sign, 0); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
449 |
amKamikaze: DrawHedgehog(sx, sy, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
450 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
451 |
1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
452 |
5, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
453 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
454 |
amWhip: DrawRotatedF(sprWhip, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
455 |
sx, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
456 |
sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
457 |
0, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
458 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
459 |
0); |
3717 | 460 |
amHammer: DrawRotatedF(sprHammer, |
461 |
sx, |
|
462 |
sy, |
|
463 |
0, |
|
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
464 |
sign, |
3717 | 465 |
0); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
466 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
467 |
DrawHedgehog(sx, sy, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
468 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
469 |
0, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
470 |
4, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
471 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
472 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
473 |
HatVisible:= true; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
474 |
(* with HH^ do |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
475 |
if (HatTex <> nil) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
476 |
and (HatVisibility > 0) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
477 |
DrawTextureF(HatTex, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
478 |
HatVisibility, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
479 |
sx, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
480 |
sy - 5, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
481 |
0, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
482 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
483 |
32, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
484 |
32); *) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
485 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
486 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
487 |
case amt of |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
488 |
amBaseballBat: DrawRotated(sprHandBaseball, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
489 |
sx - 4 * sign, |
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
490 |
sy + 9, sign, aangle); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
491 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
492 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
493 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
494 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
495 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
496 |
end else // not gstHHDriven |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
497 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
498 |
if (Gear^.Damage > 0) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
499 |
and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
500 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
501 |
DrawHedgehog(sx, sy, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
502 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
503 |
2, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
504 |
1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
505 |
Gear^.DirAngle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
506 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
507 |
end else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
508 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
509 |
if ((Gear^.State and gstHHJumping) <> 0) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
510 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
511 |
DrawHedgehog(sx, sy, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
512 |
sign*m, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
513 |
1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
514 |
1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
515 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
516 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
517 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
518 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
519 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
520 |
with HH^ do |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
521 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
522 |
if defaultPos then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
523 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
524 |
DrawRotatedF(sprHHIdle, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
525 |
sx, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
526 |
sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
527 |
(RealTicks div 128 + Gear^.Pos) mod 19, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
528 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
529 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
530 |
HatVisible:= true; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
531 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
532 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
533 |
if HatVisible then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
534 |
if HatVisibility < 1.0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
535 |
HatVisibility:= HatVisibility + 0.2 |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
536 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
537 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
538 |
if HatVisibility > 0.0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
539 |
HatVisibility:= HatVisibility - 0.2; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
540 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
541 |
if (HatTex <> nil) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
542 |
and (HatVisibility > 0) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
543 |
if DefaultPos then |
3445 | 544 |
begin |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
545 |
DrawTextureF(HatTex, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
546 |
HatVisibility, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
547 |
sx, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
548 |
sy - 5, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
549 |
(RealTicks div 128 + Gear^.Pos) mod 19, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
550 |
sign, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
551 |
32, |
3445 | 552 |
32); |
3854 | 553 |
if HatTex^.w > 64 then |
3445 | 554 |
begin |
555 |
Tint(HH^.Team^.Clan^.Color); |
|
556 |
DrawTextureF(HatTex, |
|
557 |
HatVisibility, |
|
558 |
sx, |
|
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
559 |
sy - 5, |
3445 | 560 |
(RealTicks div 128 + Gear^.Pos) mod 19 + 32, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
561 |
sign, |
3445 | 562 |
32, |
563 |
32); |
|
564 |
Tint($FF, $FF, $FF, $FF) |
|
565 |
end |
|
566 |
end |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
567 |
else |
3445 | 568 |
begin |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
569 |
DrawTextureF(HatTex, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
570 |
HatVisibility, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
571 |
sx, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
572 |
sy - 5, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
573 |
0, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
574 |
sign*m, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
575 |
32, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
576 |
32); |
3854 | 577 |
if HatTex^.w > 64 then |
3445 | 578 |
begin |
579 |
Tint(HH^.Team^.Clan^.Color); |
|
580 |
DrawTextureF(HatTex, |
|
581 |
HatVisibility, |
|
582 |
sx, |
|
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
583 |
sy - 5, |
3445 | 584 |
32, |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
585 |
sign*m, |
3445 | 586 |
32, |
587 |
32); |
|
588 |
Tint($FF, $FF, $FF, $FF) |
|
589 |
end |
|
590 |
end |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
591 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
592 |
if (Gear^.State and gstHHDriven) <> 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
593 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
594 |
(* if (CurAmmoGear = nil) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
595 |
begin |
3836
833c0f32e326
Change all use of curslot/idx to CurAmmoType to try and avoid some bugs with use of last weapon.
nemo
parents:
3751
diff
changeset
|
596 |
amt:= CurrentHedgehog^.CurAmmoType; |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
597 |
case amt of |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
598 |
amJetpack: DrawSprite(sprJetpack, sx-32, sy-32, 0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
599 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
600 |
end; *) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
601 |
if CurAmmoGear <> nil then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
602 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
603 |
case CurAmmoGear^.Kind of |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
604 |
gtJetpack: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
605 |
DrawSprite(sprJetpack, sx-32, sy-32, 0); |
3909
4ba25a3d15af
remove windspeed from bubbles, remove initial dY from bubbles, apply dY/dX to bubbles, correct offsets on flying saucer flame graphics, add bubbles when flying saucer thrusts underwater, make flying saucer sink more slowly underwater
nemo
parents:
3894
diff
changeset
|
606 |
if cWaterLine > hwRound(Gear^.Y) + Gear^.Radius then |
4ba25a3d15af
remove windspeed from bubbles, remove initial dY from bubbles, apply dY/dX to bubbles, correct offsets on flying saucer flame graphics, add bubbles when flying saucer thrusts underwater, make flying saucer sink more slowly underwater
nemo
parents:
3894
diff
changeset
|
607 |
begin |
4ba25a3d15af
remove windspeed from bubbles, remove initial dY from bubbles, apply dY/dX to bubbles, correct offsets on flying saucer flame graphics, add bubbles when flying saucer thrusts underwater, make flying saucer sink more slowly underwater
nemo
parents:
3894
diff
changeset
|
608 |
if (CurAmmoGear^.MsgParam and gmUp) <> 0 then DrawSprite(sprJetpack, sx-32, sy-28, 1); |
4ba25a3d15af
remove windspeed from bubbles, remove initial dY from bubbles, apply dY/dX to bubbles, correct offsets on flying saucer flame graphics, add bubbles when flying saucer thrusts underwater, make flying saucer sink more slowly underwater
nemo
parents:
3894
diff
changeset
|
609 |
if (CurAmmoGear^.MsgParam and gmLeft) <> 0 then DrawSprite(sprJetpack, sx-28, sy-28, 2); |
4ba25a3d15af
remove windspeed from bubbles, remove initial dY from bubbles, apply dY/dX to bubbles, correct offsets on flying saucer flame graphics, add bubbles when flying saucer thrusts underwater, make flying saucer sink more slowly underwater
nemo
parents:
3894
diff
changeset
|
610 |
if (CurAmmoGear^.MsgParam and gmRight) <> 0 then DrawSprite(sprJetpack, sx-36, sy-28, 3) |
4ba25a3d15af
remove windspeed from bubbles, remove initial dY from bubbles, apply dY/dX to bubbles, correct offsets on flying saucer flame graphics, add bubbles when flying saucer thrusts underwater, make flying saucer sink more slowly underwater
nemo
parents:
3894
diff
changeset
|
611 |
end; |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
612 |
if CurAmmoGear^.Tex <> nil then DrawCentered(sx, sy - 40, CurAmmoGear^.Tex); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
613 |
DrawAltWeapon(Gear, sx, sy) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
614 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
615 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
616 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
617 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
618 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
619 |
with HH^ do |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
620 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
621 |
if ((Gear^.State and not gstWinner) = 0) |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
622 |
or ((Gear^.State = gstWait) and (Gear^.dY.QWordValue = 0)) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
623 |
or (bShowFinger and ((Gear^.State and gstHHDriven) <> 0)) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
624 |
begin |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
625 |
t:= sy - cHHRadius - 9; |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
626 |
if (cTagsMask and htTransparent) <> 0 then |
3390 | 627 |
Tint($FF, $FF, $FF, $80); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
628 |
if ((cTagsMask and htHealth) <> 0) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
629 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
630 |
dec(t, HealthTagTex^.h + 2); |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
631 |
DrawCentered(ox, t, HealthTagTex) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
632 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
633 |
if (cTagsMask and htName) <> 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
634 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
635 |
dec(t, NameTagTex^.h + 2); |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
636 |
DrawCentered(ox, t, NameTagTex) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
637 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
638 |
if (cTagsMask and htTeamName) <> 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
639 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
640 |
dec(t, Team^.NameTagTex^.h + 2); |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
641 |
DrawCentered(ox, t, Team^.NameTagTex) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
642 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
643 |
if (cTagsMask and htTransparent) <> 0 then |
3390 | 644 |
Tint($FF, $FF, $FF, $FF) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
645 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
646 |
if (Gear^.State and gstHHDriven) <> 0 then // Current hedgehog |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
647 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
648 |
if bShowFinger and ((Gear^.State and gstHHDriven) <> 0) then |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
649 |
DrawSprite(sprFinger, ox - 16, oy - 64, |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
650 |
GameTicks div 32 mod 16); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
651 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
652 |
if (Gear^.State and gstDrowning) = 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
653 |
if (Gear^.State and gstHHThinking) <> 0 then |
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
654 |
DrawSprite(sprQuestion, ox - 10, oy - cHHRadius - 34, (RealTicks shr 9) mod 8) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
655 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
656 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
657 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
658 |
if HH^.Effects[hePoisoned] then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
659 |
begin |
3392 | 660 |
Tint($00, $FF, $40, $80); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
661 |
DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 1.5, 0, 0, sx, sy, 0, 1, 22, 22, 360 - (RealTicks shr 37) mod 360); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
662 |
end; |
4036
69e535a0e43a
make aura match cross colour, add a faint aura to resurrected hogs. basically mucking about w/ burp's weapon again.
nemo
parents:
4024
diff
changeset
|
663 |
if HH^.Effects[heResurrected] then |
69e535a0e43a
make aura match cross colour, add a faint aura to resurrected hogs. basically mucking about w/ burp's weapon again.
nemo
parents:
4024
diff
changeset
|
664 |
begin |
69e535a0e43a
make aura match cross colour, add a faint aura to resurrected hogs. basically mucking about w/ burp's weapon again.
nemo
parents:
4024
diff
changeset
|
665 |
Tint($f5, $db, $35, $20); |
69e535a0e43a
make aura match cross colour, add a faint aura to resurrected hogs. basically mucking about w/ burp's weapon again.
nemo
parents:
4024
diff
changeset
|
666 |
DrawSprite(sprVampiric, sx - 24, sy - 24, 0); |
69e535a0e43a
make aura match cross colour, add a faint aura to resurrected hogs. basically mucking about w/ burp's weapon again.
nemo
parents:
4024
diff
changeset
|
667 |
end; |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
668 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
669 |
if Gear^.Invulnerable then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
670 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
671 |
Tint($FF, $FF, $FF, max($40, floor($FF * abs(1 - ((RealTicks div 2 + Gear^.uid * 491) mod 1500) / 750)))); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
672 |
DrawSprite(sprInvulnerable, sx - 24, sy - 24, 0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
673 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
674 |
if cVampiric and |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
675 |
(CurrentHedgehog^.Gear <> nil) and |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
676 |
(CurrentHedgehog^.Gear = Gear) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
677 |
begin |
4016 | 678 |
Tint($FF, 0, 0, max($40, floor($FF * abs(1 - (RealTicks mod 1500) / 750)))); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
679 |
DrawSprite(sprVampiric, sx - 24, sy - 24, 0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
680 |
end; |
3390 | 681 |
Tint($FF, $FF, $FF, $FF) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
682 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
683 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
684 |
procedure DrawGears; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
685 |
var Gear, HHGear: PGear; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
686 |
i: Longword; |
4016 | 687 |
x, y, startX, endX, startY, endY: LongInt; |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
688 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
689 |
Gear:= GearsList; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
690 |
while Gear<>nil do |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
691 |
begin |
4016 | 692 |
x:= hwRound(Gear^.X) + WorldDx; |
693 |
y:= hwRound(Gear^.Y) + WorldDy; |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
694 |
case Gear^.Kind of |
4168 | 695 |
gtBomb: DrawRotated(sprBomb, x, y, 0, Gear^.DirAngle); |
4016 | 696 |
gtGasBomb: DrawRotated(sprCheese, x, y, 0, Gear^.DirAngle); |
697 |
gtMolotov: DrawRotated(sprMolotov, x, y, 0, Gear^.DirAngle); |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
698 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
699 |
gtRCPlane: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
700 |
if (Gear^.Tag = -1) then |
4016 | 701 |
DrawRotated(sprPlane, x, y, -1, DxDy2Angle(Gear^.dX, Gear^.dY) + 90) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
702 |
else |
4016 | 703 |
DrawRotated(sprPlane, x, y,0,DxDy2Angle(Gear^.dY, Gear^.dX)); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
704 |
if ((TrainingFlags and tfRCPlane) <> 0) and (TrainingTargetGear <> nil) and ((Gear^.State and gstDrowning) = 0) then |
4016 | 705 |
DrawRotatedf(sprFinger, x, y, GameTicks div 32 mod 16, 0, DxDy2Angle(Gear^.X - TrainingTargetGear^.X, TrainingTargetGear^.Y - Gear^.Y)); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
706 |
end; |
4016 | 707 |
gtBall: DrawRotatedf(sprBalls, x, y, Gear^.Tag,0, Gear^.DirAngle); |
3428 | 708 |
|
709 |
gtPortal: if ((Gear^.Tag and 1) = 0) // still moving? |
|
710 |
or (Gear^.IntersectGear = nil) or (Gear^.IntersectGear^.IntersectGear <> Gear) // not linked&backlinked? |
|
711 |
or ((Gear^.IntersectGear^.Tag and 1) = 0) then // linked portal still moving? |
|
4016 | 712 |
DrawRotatedf(sprPortal, x, y, Gear^.Tag, hwSign(Gear^.dX), Gear^.DirAngle) |
713 |
else DrawRotatedf(sprPortal, x, y, 4 + Gear^.Tag div 2, hwSign(Gear^.dX), Gear^.DirAngle); |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
714 |
|
4016 | 715 |
gtDrill: DrawRotated(sprDrill, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
716 |
|
4077
e7d838d063a4
Avoid a flicker of tags if jiggling a hog, remove a bunch of calls to hwRound and hwSign
nemo
parents:
4044
diff
changeset
|
717 |
gtHedgehog: DrawHH(Gear, x, y); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
718 |
|
4168 | 719 |
gtShell: DrawRotated(sprBazookaShell, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
720 |
|
4016 | 721 |
gtGrave: begin |
722 |
DrawTextureF(PHedgehog(Gear^.Hedgehog)^.Team^.GraveTex, 1, x, y, (GameTicks shr 7+Gear^.uid) and 7, 1, 32, 32); |
|
723 |
if Gear^.Health > 0 then |
|
724 |
begin |
|
725 |
//Tint($33, $33, $FF, max($40, floor($FF * abs(1 - (GameTicks mod (6000 div Gear^.Health)) / 750)))); |
|
4036
69e535a0e43a
make aura match cross colour, add a faint aura to resurrected hogs. basically mucking about w/ burp's weapon again.
nemo
parents:
4024
diff
changeset
|
726 |
Tint($f5, $db, $35, max($40, floor($FF * abs(1 - (GameTicks mod 1500) / (750 + Gear^.Health))))); |
4016 | 727 |
//Tint($FF, $FF, $FF, max($40, floor($FF * abs(1 - (RealTicks mod 1500) / 750)))); |
728 |
DrawSprite(sprVampiric, x - 24, y - 24, 0); |
|
729 |
Tint($FF, $FF, $FF, $FF) |
|
730 |
end |
|
731 |
end; |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
732 |
|
4016 | 733 |
gtBee: DrawRotatedF(sprBee, x, y, (GameTicks shr 5) mod 2, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
734 |
||
735 |
gtPickHammer: DrawSprite(sprPHammer, x - 16, y - 50 + LongInt(((GameTicks shr 5) and 1) * 2), 0); |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
736 |
gtRope: DrawRope(Gear); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
737 |
gtMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then |
4016 | 738 |
DrawRotated(sprMineOff, x, y, 0, Gear^.DirAngle) |
739 |
else if Gear^.Health <> 0 then DrawRotated(sprMineOn, x, y, 0, Gear^.DirAngle) |
|
740 |
else DrawRotated(sprMineDead, x, y, 0, Gear^.DirAngle); |
|
3710 | 741 |
gtSMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then |
4016 | 742 |
DrawRotated(sprSMineOff, x, y, 0, Gear^.DirAngle) |
743 |
else if Gear^.Health <> 0 then DrawRotated(sprSMineOn, x, y, 0, Gear^.DirAngle) |
|
744 |
else DrawRotated(sprMineDead, x, y, 0, Gear^.DirAngle); |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
745 |
gtCase: case Gear^.Pos of |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
746 |
posCaseAmmo : begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
747 |
i:= (GameTicks shr 6) mod 64; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
748 |
if i > 18 then i:= 0; |
4016 | 749 |
DrawSprite(sprCase, x - 24, y - 24, i); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
750 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
751 |
posCaseHealth: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
752 |
i:= ((GameTicks shr 6) + 38) mod 64; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
753 |
if i > 13 then i:= 0; |
4016 | 754 |
DrawSprite(sprFAid, x - 24, y - 24, i); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
755 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
756 |
posCaseUtility: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
757 |
i:= (GameTicks shr 6) mod 70; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
758 |
if i > 23 then i:= 0; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
759 |
i:= i mod 12; |
4016 | 760 |
DrawSprite(sprUtility, x - 24, y - 24, i); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
761 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
762 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
763 |
gtExplosives: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
764 |
if ((Gear^.State and gstDrowning) <> 0) then |
4016 | 765 |
DrawSprite(sprExplosivesRoll, x - 24, y - 24, 0) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
766 |
else if Gear^.State and gstAnimation = 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
767 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
768 |
i:= (GameTicks shr 6 + Gear^.uid*3) mod 64; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
769 |
if i > 18 then i:= 0; |
4016 | 770 |
DrawSprite(sprExplosives, x - 24, y - 24, i) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
771 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
772 |
else if Gear^.State and gsttmpFlag = 0 then |
4016 | 773 |
DrawRotatedF(sprExplosivesRoll, x, y + 4, 0, 0, Gear^.DirAngle) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
774 |
else |
4016 | 775 |
DrawRotatedF(sprExplosivesRoll, x, y + 4, 1, 0, Gear^.DirAngle); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
776 |
end; |
4016 | 777 |
gtDynamite: DrawSprite2(sprDynamite, x - 16, y - 25, Gear^.Tag and 1, Gear^.Tag shr 1); |
778 |
gtClusterBomb: DrawRotated(sprClusterBomb, x, y, 0, Gear^.DirAngle); |
|
779 |
gtCluster: DrawSprite(sprClusterParticle, x - 8, y - 8, 0); |
|
780 |
gtFlame: DrawTextureF(SpritesData[sprFlame].Texture, 2 / (Gear^.Tag mod 3 + 2), x, y, (GameTicks shr 7 + LongWord(Gear^.Tag)) mod 8, 1, 16, 16); |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
781 |
gtParachute: begin |
4016 | 782 |
DrawSprite(sprParachute, x - 24, y - 48, 0); |
783 |
DrawAltWeapon(Gear, x + 1, y - 3) |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
784 |
end; |
4016 | 785 |
gtAirAttack: if Gear^.Tag > 0 then DrawSprite(sprAirplane, x - SpritesData[sprAirplane].Width div 2, y - SpritesData[sprAirplane].Height div 2, 0) |
786 |
else DrawSprite(sprAirplane, x - SpritesData[sprAirplane].Width div 2, y - SpritesData[sprAirplane].Height div 2, 1); |
|
787 |
gtAirBomb: DrawRotated(sprAirBomb, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
788 |
gtTeleport: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
789 |
HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear; |
4016 | 790 |
if not PHedgehog(Gear^.Hedgehog)^.Unplaced then DrawRotatedF(sprTeleport, x + 1, y - 3, Gear^.Pos, hwSign(Gear^.dX), 0); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
791 |
DrawRotatedF(sprTeleport, hwRound(HHGear^.X) + 1 + WorldDx, hwRound(HHGear^.Y) - 3 + WorldDy, 11 - Gear^.Pos, hwSign(HHGear^.dX), 0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
792 |
end; |
4016 | 793 |
gtSwitcher: DrawSprite(sprSwitch, x - 16, y - 56, (GameTicks shr 6) mod 12); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
794 |
gtTarget: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
795 |
Tint($FF, $FF, $FF, floor($FF * Gear^.Timer / 1000)); |
4016 | 796 |
DrawSprite(sprTarget, x - 16, y - 16, 0); |
3390 | 797 |
Tint($FF, $FF, $FF, $FF); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
798 |
end; |
4016 | 799 |
gtMortar: DrawRotated(sprMortar, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
800 |
gtCake: if Gear^.Pos = 6 then |
4016 | 801 |
DrawRotatedf(sprCakeWalk, x, y, (GameTicks div 40) mod 6, hwSign(Gear^.dX), Gear^.DirAngle * hwSign(Gear^.dX) + 90) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
802 |
else |
4016 | 803 |
DrawRotatedf(sprCakeDown, x, y, 5 - Gear^.Pos, hwSign(Gear^.dX), Gear^.DirAngle * hwSign(Gear^.dX) + 90); |
804 |
gtSeduction: if Gear^.Pos >= 14 then DrawSprite(sprSeduction, x - 16, y - 16, 0); |
|
805 |
gtWatermelon: DrawRotatedf(sprWatermelon, x, y, 0, 0, Gear^.DirAngle); |
|
806 |
gtMelonPiece: DrawRotatedf(sprWatermelon, x, y, 1, 0, Gear^.DirAngle); |
|
807 |
gtHellishBomb: DrawRotated(sprHellishBomb, x, y, 0, Gear^.DirAngle); |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
808 |
gtBirdy: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
809 |
if Gear^.State and gstAnimation = gstAnimation then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
810 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
811 |
if Gear^.State and gstTmpFlag = 0 then // Appearing |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
812 |
begin |
4016 | 813 |
endX:= x - WorldDx; |
814 |
endY:= y - WorldDy; |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
815 |
if Gear^.Tag < 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
816 |
startX:= max(LAND_WIDTH + 1024, endX + 2048) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
817 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
818 |
startX:= max(-LAND_WIDTH - 1024, endX - 2048); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
819 |
startY:= endY - 256; |
3407 | 820 |
DrawTextureF(SpritesData[sprBirdy].Texture, 1, startX + WorldDx + floor((endX - startX) * (-power(2, -10 * LongInt(Gear^.Timer)/2000) + 1)), startY + WorldDy + floor((endY - startY) * sqrt(1 - power((LongInt(Gear^.Timer)/2000)-1, 2))), ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
821 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
822 |
else // Disappearing |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
823 |
begin |
4016 | 824 |
startX:= x - WorldDx; |
825 |
startY:= y - WorldDy; |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
826 |
if Gear^.Tag > 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
827 |
endX:= max(LAND_WIDTH + 1024, startX + 2048) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
828 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
829 |
endX:= max(-LAND_WIDTH - 1024, startX - 2048); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
830 |
endY:= startY + 256; |
3407 | 831 |
DrawTextureF(SpritesData[sprBirdy].Texture, 1, startX + WorldDx + floor((endX - startX) * power(2, 10 * (LongInt(Gear^.Timer)/2000 - 1))) + hwRound(Gear^.dX * Gear^.Timer), startY + WorldDy + floor((endY - startY) * cos(LongInt(Gear^.Timer)/2000 * (Pi/2)) - (endY - startY)) + hwRound(Gear^.dY * Gear^.Timer), ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
832 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
833 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
834 |
else |
4016 | 835 |
DrawTextureF(SpritesData[sprBirdy].Texture, 1, x, y, ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
836 |
end; |
4016 | 837 |
gtEgg: DrawRotatedTextureF(SpritesData[sprEgg].Texture, 1, 0, 0, x, y, 0, 1, 16, 16, Gear^.DirAngle); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
838 |
gtPiano: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
839 |
if (Gear^.State and gstDrowning) = 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
840 |
begin |
3390 | 841 |
Tint($FF, $FF, $FF, $10); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
842 |
for i:= 8 downto 1 do |
4016 | 843 |
DrawRotatedTextureF(SpritesData[sprPiano].Texture, 1, 0, 0, x, y - hwRound(Gear^.dY * 4 * i), 0, 1, 128, 128, 0); |
3390 | 844 |
Tint($FF, $FF, $FF, $FF) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
845 |
end; |
4016 | 846 |
DrawRotatedTextureF(SpritesData[sprPiano].Texture, 1, 0, 0, x, y, 0, 1, 128, 128, 0); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
847 |
end; |
3712 | 848 |
gtPoisonCloud: begin |
3713 | 849 |
if Gear^.Timer < 1020 then |
850 |
Tint($C0, $C0, $00, Gear^.Timer div 8) |
|
851 |
else if Gear^.Timer > 3980 then |
|
852 |
Tint($C0, $C0, $00, (5000 - Gear^.Timer) div 8) |
|
3712 | 853 |
else |
3713 | 854 |
Tint($C0, $C0, $00, $C0); |
4016 | 855 |
DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 3, 0, 0, x, y, 0, 1, 22, 22, (RealTicks shr 36 + Gear^.UID * 100) mod 360); |
3712 | 856 |
Tint($FF, $FF, $FF, $FF) |
857 |
end; |
|
4044
de7170e51cc6
Check for collision with surfaces above when levitating hog, use more typical drawing syntax for the resurrector wep, restore typical indentation
nemo
parents:
4036
diff
changeset
|
858 |
gtResurrector: begin |
de7170e51cc6
Check for collision with surfaces above when levitating hog, use more typical drawing syntax for the resurrector wep, restore typical indentation
nemo
parents:
4036
diff
changeset
|
859 |
DrawRotated(sprCross, x, y, 0, 0); |
de7170e51cc6
Check for collision with surfaces above when levitating hog, use more typical drawing syntax for the resurrector wep, restore typical indentation
nemo
parents:
4036
diff
changeset
|
860 |
Tint($f5, $db, $35, max($00, floor($C0 * abs(1 - (GameTicks mod 6000) / 3000)))); |
de7170e51cc6
Check for collision with surfaces above when levitating hog, use more typical drawing syntax for the resurrector wep, restore typical indentation
nemo
parents:
4036
diff
changeset
|
861 |
DrawTexture(x - 108, y - 108, SpritesData[sprVampiric].Texture, 4.5); |
de7170e51cc6
Check for collision with surfaces above when levitating hog, use more typical drawing syntax for the resurrector wep, restore typical indentation
nemo
parents:
4036
diff
changeset
|
862 |
Tint($FF, $FF, $FF, $FF); |
de7170e51cc6
Check for collision with surfaces above when levitating hog, use more typical drawing syntax for the resurrector wep, restore typical indentation
nemo
parents:
4036
diff
changeset
|
863 |
end; |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
864 |
end; |
4016 | 865 |
if Gear^.RenderTimer and (Gear^.Tex <> nil) then DrawCentered(x + 8, y + 8, Gear^.Tex); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
866 |
Gear:= Gear^.NextGear |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
867 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
868 |
end; |