author | Tobias Neumann <mail@tobias-neumann.eu> |
Sat, 30 Oct 2010 21:57:54 +0200 | |
changeset 4024 | 1ffb84b3823d |
parent 4023 | 8de77872ef21 |
child 4036 | 69e535a0e43a |
permissions | -rw-r--r-- |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
1 |
procedure DrawHH(Gear: PGear); |
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; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
4 |
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; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
15 |
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
|
16 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
17 |
DrawSprite(sprHHDeath, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 26 + WorldDy, Gear^.Pos); |
3863 | 18 |
Tint(HH^.Team^.Clan^.Color); |
19 |
DrawSprite(sprHHDeath, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 26 + WorldDy, Gear^.Pos + 8); |
|
20 |
Tint($FF, $FF, $FF, $FF); |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
21 |
exit |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
22 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
23 |
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
|
24 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
25 |
DrawRotatedF(sprTeleport, hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy, Gear^.Pos, hwSign(Gear^.dX), 0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
26 |
exit |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
27 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
28 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
29 |
defaultPos:= true; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
30 |
HatVisible:= false; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
31 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
32 |
sx:= hwRound(Gear^.X) + 1 + WorldDx; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
33 |
sy:= hwRound(Gear^.Y) - 3 + WorldDy; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
34 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
35 |
if HH^.Effects[hePoisoned] then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
36 |
begin |
3392 | 37 |
Tint($00, $FF, $40, $40); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
38 |
DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 2, 0, 0, sx, sy, 0, 1, 22, 22, (RealTicks shr 36) mod 360); |
3390 | 39 |
Tint($FF, $FF, $FF, $FF) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
40 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
41 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
42 |
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
|
43 |
((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
|
44 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
45 |
DrawHedgehog(sx, sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
46 |
hwSign(Gear^.dX), |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
47 |
2, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
48 |
0, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
49 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
50 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
51 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
52 |
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
|
53 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
54 |
DrawHedgehog(sx, sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
55 |
hwSign(Gear^.dX), |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
56 |
1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
57 |
7, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
58 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
59 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
60 |
end else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
61 |
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
|
62 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
63 |
DrawHedgehog(sx, sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
64 |
hwSign(Gear^.dX), |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
65 |
2, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
66 |
3, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
67 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
68 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
69 |
end else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
70 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
71 |
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
|
72 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
73 |
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
|
74 |
(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
|
75 |
((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
|
76 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
77 |
(* 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
|
78 |
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
|
79 |
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
|
80 |
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
|
81 |
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
|
82 |
*) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
83 |
dx:= hwSign(Gear^.dX) * m * Sin(Gear^.Angle * pi / cMaxAngle); |
3483 | 84 |
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
|
85 |
if cLaserSighting then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
86 |
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
|
87 |
lx:= GetLaunchX(HH^.CurAmmoType, hwSign(Gear^.dX) * m, Gear^.Angle); |
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
|
88 |
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
|
89 |
|
3496 | 90 |
// ensure we start outside the hedgehog (he's solid after all) |
91 |
while abs(lx * lx + ly * ly) < (Gear^.radius * Gear^.radius) do |
|
92 |
begin |
|
93 |
lx:= lx + dx; |
|
94 |
ly:= ly + dy |
|
95 |
end; |
|
96 |
||
97 |
// add hog's position |
|
98 |
lx:= lx + hwRound(Gear^.X); |
|
99 |
ly:= ly + hwRound(Gear^.Y); |
|
100 |
||
101 |
// decrease number of iterations required |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
102 |
ax:= dx * 4; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
103 |
ay:= dy * 4; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
104 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
105 |
tx:= round(lx); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
106 |
ty:= round(ly); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
107 |
hx:= tx; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
108 |
hy:= ty; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
109 |
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
|
110 |
((tx and LAND_WIDTH_MASK) = 0) and |
3496 | 111 |
(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
|
112 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
113 |
lx:= lx + ax; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
114 |
ly:= ly + ay; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
115 |
tx:= round(lx); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
116 |
ty:= round(ly) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
117 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
118 |
// 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
|
119 |
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
|
120 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
121 |
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
|
122 |
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
|
123 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
124 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
125 |
//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
|
126 |
begin |
3393 | 127 |
glDisable(GL_TEXTURE_2D); |
3390 | 128 |
glEnable(GL_LINE_SMOOTH); |
3393 | 129 |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
130 |
glLineWidth(1.0); |
3393 | 131 |
|
3390 | 132 |
Tint($FF, $00, $00, $C0); |
3393 | 133 |
VertexBuffer[0].X:= hx + WorldDx; |
134 |
VertexBuffer[0].Y:= hy + WorldDy; |
|
135 |
VertexBuffer[1].X:= tx + WorldDx; |
|
136 |
VertexBuffer[1].Y:= ty + WorldDy; |
|
137 |
||
138 |
glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]); |
|
139 |
glDrawArrays(GL_LINES, 0, Length(VertexBuffer)); |
|
3390 | 140 |
Tint($FF, $FF, $FF, $FF); |
3393 | 141 |
glEnable(GL_TEXTURE_2D); |
3390 | 142 |
glDisable(GL_LINE_SMOOTH); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
143 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
144 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
145 |
// draw crosshair |
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
|
146 |
cx:= Round(hwRound(Gear^.X) + dx * 80 + GetLaunchX(HH^.CurAmmoType, hwSign(Gear^.dX) * m, Gear^.Angle)); |
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
|
147 |
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
|
148 |
DrawRotatedTex(HH^.Team^.CrosshairTex, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
149 |
12, 12, cx + WorldDx, cy + WorldDy, 0, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
150 |
hwSign(Gear^.dX) * (Gear^.Angle * 180.0) / cMaxAngle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
151 |
end; |
3483 | 152 |
hx:= hwRound(Gear^.X) + 8 * hwSign(Gear^.dX) + WorldDx; |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
153 |
hy:= hwRound(Gear^.Y) - 2 + WorldDy; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
154 |
aangle:= Gear^.Angle * 180 / cMaxAngle - 90; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
155 |
if CurAmmoGear <> nil then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
156 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
157 |
case CurAmmoGear^.Kind of |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
158 |
gtShotgunShot: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
159 |
if (CurAmmoGear^.State and gstAnimation <> 0) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
160 |
DrawRotated(sprShotgun, hx, hy, hwSign(Gear^.dX), aangle) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
161 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
162 |
DrawRotated(sprHandShotgun, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
163 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
164 |
gtDEagleShot: DrawRotated(sprDEagle, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
165 |
gtSniperRifleShot: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
166 |
if (CurAmmoGear^.State and gstAnimation <> 0) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
167 |
DrawRotatedF(sprSniperRifle, hx, hy, 1, hwSign(Gear^.dX), aangle) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
168 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
169 |
DrawRotatedF(sprSniperRifle, hx, hy, 0, hwSign(Gear^.dX), aangle) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
170 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
171 |
gtBallgun: DrawRotated(sprHandBallgun, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
172 |
gtRCPlane: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
173 |
DrawRotated(sprHandPlane, hx, hy, hwSign(Gear^.dX), 0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
174 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
175 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
176 |
gtRope: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
177 |
if Gear^.X < CurAmmoGear^.X then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
178 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
179 |
dAngle:= 0; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
180 |
hAngle:= 180; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
181 |
i:= 1 |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
182 |
end else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
183 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
184 |
dAngle:= 180; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
185 |
hAngle:= 0; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
186 |
i:= -1 |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
187 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
188 |
sx:= hwRound(Gear^.X) + WorldDx; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
189 |
sy:= hwRound(Gear^.Y) + WorldDy; |
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 |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
192 |
DrawHedgehog(sx, sy, |
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 |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
200 |
DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, sx, sy, 0, i, 32, 32, |
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); |
|
205 |
DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, sx, sy, 32, i, 32, 32, |
|
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; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
211 |
DrawAltWeapon(Gear, sx, sy); |
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 |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
215 |
DrawRotated(sprBlowTorch, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
216 |
DrawHedgehog(sx, sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
217 |
hwSign(Gear^.dX), |
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, |
|
227 |
hwRound(Gear^.Y) - 8 + WorldDy, |
|
228 |
0, |
|
229 |
hwSign(Gear^.dX), |
|
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, |
|
238 |
hwRound(Gear^.Y) - 8 + WorldDy, |
|
239 |
32, |
|
240 |
hwSign(Gear^.dX), |
|
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; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
248 |
gtShover: DrawRotated(sprHandBaseball, hx, hy, hwSign(Gear^.dX), aangle + 180); |
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, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
251 |
hwSign(Gear^.dX), |
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, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
267 |
hwSign(Gear^.dX), |
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, |
|
276 |
hwSign(Gear^.dX), |
|
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 |
3991
82e4a5ef18f7
Resurrector Weapon: Add ammo icon, sound, hedgehog picture (from Tiy).
Tobias Neumann <mail@tobias-neumann.eu>
parents:
3963
diff
changeset
|
281 |
DrawRotated(sprHandResurrector, hwRound(Gear^.X) + WorldDx, |
82e4a5ef18f7
Resurrector Weapon: Add ammo icon, sound, hedgehog picture (from Tiy).
Tobias Neumann <mail@tobias-neumann.eu>
parents:
3963
diff
changeset
|
282 |
hwRound(Gear^.Y) + WorldDy, 0, 0); |
4023
8de77872ef21
Resurrector: Levitate hog + show cross
Tobias Neumann <mail@tobias-neumann.eu>
parents:
4018
diff
changeset
|
283 |
DrawRotated(sprCross, hwRound(CurAmmoGear^.X) + WorldDx, |
8de77872ef21
Resurrector: Levitate hog + show cross
Tobias Neumann <mail@tobias-neumann.eu>
parents:
4018
diff
changeset
|
284 |
hwRound(CurAmmoGear^.Y) + WorldDy + (CurAmmoGear^.Power), 0, 0); |
3991
82e4a5ef18f7
Resurrector Weapon: Add ammo icon, sound, hedgehog picture (from Tiy).
Tobias Neumann <mail@tobias-neumann.eu>
parents:
3963
diff
changeset
|
285 |
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
|
286 |
Tint($33, $33, $FF, max($00, floor($C0 * abs(1 - (GameTicks mod 6000) / 3000)))); |
4024
1ffb84b3823d
Resurrector: respect modified Gear position for resurrection range circle
Tobias Neumann <mail@tobias-neumann.eu>
parents:
4023
diff
changeset
|
287 |
DrawTexture(sx - 108, sy - 108 + (CurAmmoGear^.Power), |
1ffb84b3823d
Resurrector: respect modified Gear position for resurrection range circle
Tobias Neumann <mail@tobias-neumann.eu>
parents:
4023
diff
changeset
|
288 |
SpritesData[sprVampiric].Texture, 4.5); |
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
|
289 |
Tint($FF, $FF, $FF, $FF); |
7f2c71638466
burp can always remove this if he doesn't like it. just making it a bit more interesting.
nemo
parents:
4016
diff
changeset
|
290 |
end; |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
291 |
gtKamikaze: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
292 |
if CurAmmoGear^.Pos = 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
293 |
DrawHedgehog(sx, sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
294 |
hwSign(Gear^.dX), |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
295 |
1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
296 |
6, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
297 |
0) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
298 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
299 |
DrawRotatedF(sprKamikaze, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
300 |
hwRound(Gear^.X) + WorldDx, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
301 |
hwRound(Gear^.Y) + WorldDy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
302 |
CurAmmoGear^.Pos - 1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
303 |
hwSign(Gear^.dX), |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
304 |
aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
305 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
306 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
307 |
gtSeduction: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
308 |
if CurAmmoGear^.Pos >= 6 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
309 |
DrawHedgehog(sx, sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
310 |
hwSign(Gear^.dX), |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
311 |
2, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
312 |
2, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
313 |
0) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
314 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
315 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
316 |
DrawRotatedF(sprDress, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
317 |
hwRound(Gear^.X) + WorldDx, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
318 |
hwRound(Gear^.Y) + WorldDy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
319 |
CurAmmoGear^.Pos, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
320 |
hwSign(Gear^.dX), |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
321 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
322 |
DrawSprite(sprCensored, hwRound(Gear^.X) - 32 + WorldDx, hwRound(Gear^.Y) - 20 + WorldDy, 0) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
323 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
324 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
325 |
end; |
3485 | 326 |
gtFlamethrower: begin |
327 |
DrawRotatedF(sprHandFlamethrower, hx, hy, (RealTicks div 125) mod 4, hwSign(Gear^.dX), aangle); |
|
328 |
if CurAmmoGear^.Tex <> nil then DrawCentered(sx, sy - 40, CurAmmoGear^.Tex) |
|
329 |
end; |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
330 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
331 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
332 |
case CurAmmoGear^.Kind of |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
333 |
gtShotgunShot, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
334 |
gtDEagleShot, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
335 |
gtSniperRifleShot, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
336 |
gtShover: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
337 |
DrawHedgehog(sx, sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
338 |
hwSign(Gear^.dX), |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
339 |
0, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
340 |
4, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
341 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
342 |
defaultPos:= false; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
343 |
HatVisible:= true |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
344 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
345 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
346 |
end else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
347 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
348 |
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
|
349 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
350 |
DrawHedgehog(sx, sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
351 |
hwSign(Gear^.dX)*m, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
352 |
1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
353 |
1, |
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 |
HatVisible:= true; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
356 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
357 |
end else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
358 |
|
3894 | 359 |
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
|
360 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
361 |
DrawHedgehog(sx, sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
362 |
hwSign(Gear^.dX), |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
363 |
0, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
364 |
HH^.visStepPos div 2, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
365 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
366 |
defaultPos:= false; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
367 |
HatVisible:= true |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
368 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
369 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
370 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
371 |
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
|
372 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
373 |
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
|
374 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
375 |
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
|
376 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
377 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
378 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
379 |
DrawRotatedF(Wavez[TWave(Gear^.Tag)].Sprite, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
380 |
sx, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
381 |
sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
382 |
Gear^.Pos, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
383 |
hwSign(Gear^.dX), |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
384 |
0.0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
385 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
386 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
387 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
388 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
389 |
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
|
390 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
391 |
if HH^.Timer > 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
392 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
393 |
// 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
|
394 |
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
|
395 |
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
|
396 |
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
|
397 |
dec(HH^.Timer) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
398 |
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
|
399 |
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
|
400 |
CurWeapon:= GetAmmoEntry(HH^); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
401 |
case amt of |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
402 |
amBazooka: DrawRotated(sprHandBazooka, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
403 |
amMortar: DrawRotated(sprHandMortar, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
404 |
amMolotov: DrawRotated(sprHandMolotov, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
405 |
amBallgun: DrawRotated(sprHandBallgun, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
406 |
amDrill: DrawRotated(sprHandDrill, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
407 |
amRope: DrawRotated(sprHandRope, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
408 |
amShotgun: DrawRotated(sprHandShotgun, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
409 |
amDEagle: DrawRotated(sprHandDEagle, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
410 |
amSineGun: DrawRotated(sprHandShotgun, hx, hy, hwSign(Gear^.dX), 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
|
411 |
amPortalGun: if (CurWeapon^.Timer and 2) <> 0 then // Add a new Hedgehog value instead of abusing timer? |
3396
e5b3e5f2818e
More portal changes. Allows for a multishoot utility. Hopefully not breaking anything.
nemo
parents:
3393
diff
changeset
|
412 |
DrawRotatedF(sprPortalGun, hx, hy, 0, hwSign(Gear^.dX), aangle) |
e5b3e5f2818e
More portal changes. Allows for a multishoot utility. Hopefully not breaking anything.
nemo
parents:
3393
diff
changeset
|
413 |
else |
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
|
414 |
DrawRotatedF(sprPortalGun, hx, hy, 1+(CurWeapon^.Timer and 1), hwSign(Gear^.dX), aangle); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
415 |
amSniperRifle: DrawRotatedF(sprSniperRifle, hx, hy, 0, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
416 |
amBlowTorch: DrawRotated(sprHandBlowTorch, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
417 |
amCake: DrawRotated(sprHandCake, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
418 |
amGrenade: DrawRotated(sprHandGrenade, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
419 |
amWatermelon: DrawRotated(sprHandMelon, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
420 |
amSkip: DrawRotated(sprHandSkip, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
421 |
amClusterBomb: DrawRotated(sprHandCluster, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
422 |
amDynamite: DrawRotated(sprHandDynamite, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
423 |
amHellishBomb: DrawRotated(sprHandHellish, hx, hy, hwSign(Gear^.dX), aangle); |
3475 | 424 |
amGasBomb: DrawRotated(sprHandCheese, hx, hy, hwSign(Gear^.dX), aangle); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
425 |
amMine: DrawRotated(sprHandMine, hx, hy, hwSign(Gear^.dX), aangle); |
3710 | 426 |
amSMine: DrawRotated(sprHandSMine, hx, hy, hwSign(Gear^.dX), aangle); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
427 |
amSeduction: DrawRotated(sprHandSeduction, hx, hy, hwSign(Gear^.dX), aangle); |
3482 | 428 |
amVampiric: DrawRotatedF(sprHandVamp, hx, hy, (RealTicks div 125) mod 4, hwSign(Gear^.dX), aangle); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
429 |
amRCPlane: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
430 |
DrawRotated(sprHandPlane, hx, hy, hwSign(Gear^.dX), 0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
431 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
432 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
433 |
amGirder: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
434 |
DrawRotated(sprHandConstruction, hx, hy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
435 |
DrawSpriteClipped(sprGirder, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
436 |
sx-256, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
437 |
sy-256, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
438 |
LongInt(topY)+WorldDy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
439 |
LongInt(rightX)+WorldDx, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
440 |
cWaterLine+WorldDy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
441 |
LongInt(leftX)+WorldDx) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
442 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
443 |
amBee: DrawRotatedF(sprHandBee, hx, hy, (RealTicks div 125) mod 4, hwSign(Gear^.dX), aangle); |
3481 | 444 |
amFlamethrower: DrawRotatedF(sprHandFlamethrower, hx, hy, (RealTicks div 125) mod 4, hwSign(Gear^.dX), aangle); |
3963
6090d2a2472e
New Weapon: Resurrector (TODO: ammo icon + sprites)
Tobias Neumann <mail@tobias-neumann.eu>
parents:
3909
diff
changeset
|
445 |
amResurrector: begin |
6090d2a2472e
New Weapon: Resurrector (TODO: ammo icon + sprites)
Tobias Neumann <mail@tobias-neumann.eu>
parents:
3909
diff
changeset
|
446 |
DrawCircle(hwRound(Gear^.X), hwRound(Gear^.y), 100, 1.5, 0, 0, |
6090d2a2472e
New Weapon: Resurrector (TODO: ammo icon + sprites)
Tobias Neumann <mail@tobias-neumann.eu>
parents:
3909
diff
changeset
|
447 |
$FF, $FF); // I'd rather not like to hardcore 100 here |
6090d2a2472e
New Weapon: Resurrector (TODO: ammo icon + sprites)
Tobias Neumann <mail@tobias-neumann.eu>
parents:
3909
diff
changeset
|
448 |
end; |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
449 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
450 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
451 |
case amt of |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
452 |
amAirAttack, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
453 |
amMineStrike: DrawRotated(sprHandAirAttack, sx, hwRound(Gear^.Y) + WorldDy, hwSign(Gear^.dX), 0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
454 |
amPickHammer: DrawHedgehog(sx, sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
455 |
hwSign(Gear^.dX), |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
456 |
1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
457 |
2, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
458 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
459 |
amTeleport: DrawRotatedF(sprTeleport, sx, sy, 0, hwSign(Gear^.dX), 0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
460 |
amKamikaze: DrawHedgehog(sx, sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
461 |
hwSign(Gear^.dX), |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
462 |
1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
463 |
5, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
464 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
465 |
amWhip: DrawRotatedF(sprWhip, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
466 |
sx, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
467 |
sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
468 |
0, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
469 |
hwSign(Gear^.dX), |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
470 |
0); |
3717 | 471 |
amHammer: DrawRotatedF(sprHammer, |
472 |
sx, |
|
473 |
sy, |
|
474 |
0, |
|
475 |
hwSign(Gear^.dX), |
|
476 |
0); |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
477 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
478 |
DrawHedgehog(sx, sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
479 |
hwSign(Gear^.dX), |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
480 |
0, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
481 |
4, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
482 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
483 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
484 |
HatVisible:= true; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
485 |
(* with HH^ do |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
486 |
if (HatTex <> nil) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
487 |
and (HatVisibility > 0) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
488 |
DrawTextureF(HatTex, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
489 |
HatVisibility, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
490 |
sx, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
491 |
hwRound(Gear^.Y) - 8 + WorldDy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
492 |
0, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
493 |
hwSign(Gear^.dX), |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
494 |
32, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
495 |
32); *) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
496 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
497 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
498 |
case amt of |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
499 |
amBaseballBat: DrawRotated(sprHandBaseball, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
500 |
hwRound(Gear^.X) + 1 - 4 * hwSign(Gear^.dX) + WorldDx, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
501 |
hwRound(Gear^.Y) + 6 + WorldDy, hwSign(Gear^.dX), aangle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
502 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
503 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
504 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
505 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
506 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
507 |
end else // not gstHHDriven |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
508 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
509 |
if (Gear^.Damage > 0) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
510 |
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
|
511 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
512 |
DrawHedgehog(sx, sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
513 |
hwSign(Gear^.dX), |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
514 |
2, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
515 |
1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
516 |
Gear^.DirAngle); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
517 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
518 |
end else |
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 |
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
|
521 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
522 |
DrawHedgehog(sx, sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
523 |
hwSign(Gear^.dX)*m, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
524 |
1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
525 |
1, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
526 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
527 |
defaultPos:= false |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
528 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
529 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
530 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
531 |
with HH^ do |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
532 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
533 |
if defaultPos then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
534 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
535 |
DrawRotatedF(sprHHIdle, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
536 |
sx, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
537 |
sy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
538 |
(RealTicks div 128 + Gear^.Pos) mod 19, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
539 |
hwSign(Gear^.dX), |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
540 |
0); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
541 |
HatVisible:= true; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
542 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
543 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
544 |
if HatVisible then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
545 |
if HatVisibility < 1.0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
546 |
HatVisibility:= HatVisibility + 0.2 |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
547 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
548 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
549 |
if HatVisibility > 0.0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
550 |
HatVisibility:= HatVisibility - 0.2; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
551 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
552 |
if (HatTex <> nil) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
553 |
and (HatVisibility > 0) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
554 |
if DefaultPos then |
3445 | 555 |
begin |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
556 |
DrawTextureF(HatTex, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
557 |
HatVisibility, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
558 |
sx, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
559 |
hwRound(Gear^.Y) - 8 + WorldDy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
560 |
(RealTicks div 128 + Gear^.Pos) mod 19, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
561 |
hwSign(Gear^.dX), |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
562 |
32, |
3445 | 563 |
32); |
3854 | 564 |
if HatTex^.w > 64 then |
3445 | 565 |
begin |
566 |
Tint(HH^.Team^.Clan^.Color); |
|
567 |
DrawTextureF(HatTex, |
|
568 |
HatVisibility, |
|
569 |
sx, |
|
570 |
hwRound(Gear^.Y) - 8 + WorldDy, |
|
571 |
(RealTicks div 128 + Gear^.Pos) mod 19 + 32, |
|
572 |
hwSign(Gear^.dX), |
|
573 |
32, |
|
574 |
32); |
|
575 |
Tint($FF, $FF, $FF, $FF) |
|
576 |
end |
|
577 |
end |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
578 |
else |
3445 | 579 |
begin |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
580 |
DrawTextureF(HatTex, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
581 |
HatVisibility, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
582 |
sx, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
583 |
hwRound(Gear^.Y) - 8 + WorldDy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
584 |
0, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
585 |
hwSign(Gear^.dX)*m, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
586 |
32, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
587 |
32); |
3854 | 588 |
if HatTex^.w > 64 then |
3445 | 589 |
begin |
590 |
Tint(HH^.Team^.Clan^.Color); |
|
591 |
DrawTextureF(HatTex, |
|
592 |
HatVisibility, |
|
593 |
sx, |
|
594 |
hwRound(Gear^.Y) - 8 + WorldDy, |
|
595 |
32, |
|
596 |
hwSign(Gear^.dX)*m, |
|
597 |
32, |
|
598 |
32); |
|
599 |
Tint($FF, $FF, $FF, $FF) |
|
600 |
end |
|
601 |
end |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
602 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
603 |
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
|
604 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
605 |
(* if (CurAmmoGear = nil) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
606 |
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
|
607 |
amt:= CurrentHedgehog^.CurAmmoType; |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
608 |
case amt of |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
609 |
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
|
610 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
611 |
end; *) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
612 |
if CurAmmoGear <> nil then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
613 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
614 |
case CurAmmoGear^.Kind of |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
615 |
gtJetpack: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
616 |
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
|
617 |
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
|
618 |
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
|
619 |
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
|
620 |
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
|
621 |
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
|
622 |
end; |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
623 |
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
|
624 |
DrawAltWeapon(Gear, sx, sy) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
625 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
626 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
627 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
628 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
629 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
630 |
with HH^ do |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
631 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
632 |
if ((Gear^.State and not gstWinner) = 0) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
633 |
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
|
634 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
635 |
t:= hwRound(Gear^.Y) - cHHRadius - 12 + WorldDy; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
636 |
if (cTagsMask and htTransparent) <> 0 then |
3390 | 637 |
Tint($FF, $FF, $FF, $80); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
638 |
if ((cTagsMask and htHealth) <> 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, HealthTagTex^.h + 2); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
641 |
DrawCentered(hwRound(Gear^.X) + WorldDx, t, HealthTagTex) |
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 htName) <> 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
644 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
645 |
dec(t, NameTagTex^.h + 2); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
646 |
DrawCentered(hwRound(Gear^.X) + WorldDx, t, NameTagTex) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
647 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
648 |
if (cTagsMask and htTeamName) <> 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
649 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
650 |
dec(t, Team^.NameTagTex^.h + 2); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
651 |
DrawCentered(hwRound(Gear^.X) + WorldDx, t, Team^.NameTagTex) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
652 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
653 |
if (cTagsMask and htTransparent) <> 0 then |
3390 | 654 |
Tint($FF, $FF, $FF, $FF) |
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 |
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
|
657 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
658 |
if 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
|
659 |
DrawSprite(sprFinger, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 64 + WorldDy, |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
660 |
GameTicks div 32 mod 16); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
661 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
662 |
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
|
663 |
if (Gear^.State and gstHHThinking) <> 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
664 |
DrawSprite(sprQuestion, hwRound(Gear^.X) - 10 + WorldDx, hwRound(Gear^.Y) - cHHRadius - 34 + WorldDy, (RealTicks shr 9) mod 8) |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
665 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
666 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
667 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
668 |
if HH^.Effects[hePoisoned] then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
669 |
begin |
3392 | 670 |
Tint($00, $FF, $40, $80); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
671 |
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
|
672 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
673 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
674 |
if Gear^.Invulnerable then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
675 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
676 |
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
|
677 |
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
|
678 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
679 |
if cVampiric and |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
680 |
(CurrentHedgehog^.Gear <> nil) and |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
681 |
(CurrentHedgehog^.Gear = Gear) then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
682 |
begin |
4016 | 683 |
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
|
684 |
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
|
685 |
end; |
3390 | 686 |
Tint($FF, $FF, $FF, $FF) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
687 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
688 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
689 |
procedure DrawGears; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
690 |
var Gear, HHGear: PGear; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
691 |
i: Longword; |
4016 | 692 |
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
|
693 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
694 |
Gear:= GearsList; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
695 |
while Gear<>nil do |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
696 |
begin |
4016 | 697 |
x:= hwRound(Gear^.X) + WorldDx; |
698 |
y:= hwRound(Gear^.Y) + WorldDy; |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
699 |
case Gear^.Kind of |
4016 | 700 |
gtAmmo_Bomb: DrawRotated(sprBomb, x, y, 0, Gear^.DirAngle); |
701 |
gtGasBomb: DrawRotated(sprCheese, x, y, 0, Gear^.DirAngle); |
|
702 |
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
|
703 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
704 |
gtRCPlane: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
705 |
if (Gear^.Tag = -1) then |
4016 | 706 |
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
|
707 |
else |
4016 | 708 |
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
|
709 |
if ((TrainingFlags and tfRCPlane) <> 0) and (TrainingTargetGear <> nil) and ((Gear^.State and gstDrowning) = 0) then |
4016 | 710 |
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
|
711 |
end; |
4016 | 712 |
gtBall: DrawRotatedf(sprBalls, x, y, Gear^.Tag,0, Gear^.DirAngle); |
3428 | 713 |
|
714 |
gtPortal: if ((Gear^.Tag and 1) = 0) // still moving? |
|
715 |
or (Gear^.IntersectGear = nil) or (Gear^.IntersectGear^.IntersectGear <> Gear) // not linked&backlinked? |
|
716 |
or ((Gear^.IntersectGear^.Tag and 1) = 0) then // linked portal still moving? |
|
4016 | 717 |
DrawRotatedf(sprPortal, x, y, Gear^.Tag, hwSign(Gear^.dX), Gear^.DirAngle) |
718 |
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
|
719 |
|
4016 | 720 |
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
|
721 |
|
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
722 |
gtHedgehog: DrawHH(Gear); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
723 |
|
4016 | 724 |
gtAmmo_Grenade: DrawRotated(sprGrenade, 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
|
725 |
|
4016 | 726 |
gtGrave: begin |
727 |
DrawTextureF(PHedgehog(Gear^.Hedgehog)^.Team^.GraveTex, 1, x, y, (GameTicks shr 7+Gear^.uid) and 7, 1, 32, 32); |
|
728 |
if Gear^.Health > 0 then |
|
729 |
begin |
|
730 |
//Tint($33, $33, $FF, max($40, floor($FF * abs(1 - (GameTicks mod (6000 div Gear^.Health)) / 750)))); |
|
731 |
Tint($33, $33, $FF, max($40, floor($FF * abs(1 - (GameTicks mod 1500) / (750 + Gear^.Health))))); |
|
732 |
//Tint($FF, $FF, $FF, max($40, floor($FF * abs(1 - (RealTicks mod 1500) / 750)))); |
|
733 |
DrawSprite(sprVampiric, x - 24, y - 24, 0); |
|
734 |
Tint($FF, $FF, $FF, $FF) |
|
735 |
end |
|
736 |
end; |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
737 |
|
4016 | 738 |
gtBee: DrawRotatedF(sprBee, x, y, (GameTicks shr 5) mod 2, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
739 |
||
740 |
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
|
741 |
gtRope: DrawRope(Gear); |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
742 |
gtMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then |
4016 | 743 |
DrawRotated(sprMineOff, x, y, 0, Gear^.DirAngle) |
744 |
else if Gear^.Health <> 0 then DrawRotated(sprMineOn, x, y, 0, Gear^.DirAngle) |
|
745 |
else DrawRotated(sprMineDead, x, y, 0, Gear^.DirAngle); |
|
3710 | 746 |
gtSMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then |
4016 | 747 |
DrawRotated(sprSMineOff, x, y, 0, Gear^.DirAngle) |
748 |
else if Gear^.Health <> 0 then DrawRotated(sprSMineOn, x, y, 0, Gear^.DirAngle) |
|
749 |
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
|
750 |
gtCase: case Gear^.Pos of |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
751 |
posCaseAmmo : begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
752 |
i:= (GameTicks shr 6) mod 64; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
753 |
if i > 18 then i:= 0; |
4016 | 754 |
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
|
755 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
756 |
posCaseHealth: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
757 |
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
|
758 |
if i > 13 then i:= 0; |
4016 | 759 |
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
|
760 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
761 |
posCaseUtility: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
762 |
i:= (GameTicks shr 6) mod 70; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
763 |
if i > 23 then i:= 0; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
764 |
i:= i mod 12; |
4016 | 765 |
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
|
766 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
767 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
768 |
gtExplosives: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
769 |
if ((Gear^.State and gstDrowning) <> 0) then |
4016 | 770 |
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
|
771 |
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
|
772 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
773 |
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
|
774 |
if i > 18 then i:= 0; |
4016 | 775 |
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
|
776 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
777 |
else if Gear^.State and gsttmpFlag = 0 then |
4016 | 778 |
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
|
779 |
else |
4016 | 780 |
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
|
781 |
end; |
4016 | 782 |
gtDynamite: DrawSprite2(sprDynamite, x - 16, y - 25, Gear^.Tag and 1, Gear^.Tag shr 1); |
783 |
gtClusterBomb: DrawRotated(sprClusterBomb, x, y, 0, Gear^.DirAngle); |
|
784 |
gtCluster: DrawSprite(sprClusterParticle, x - 8, y - 8, 0); |
|
785 |
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
|
786 |
gtParachute: begin |
4016 | 787 |
DrawSprite(sprParachute, x - 24, y - 48, 0); |
788 |
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
|
789 |
end; |
4016 | 790 |
gtAirAttack: if Gear^.Tag > 0 then DrawSprite(sprAirplane, x - SpritesData[sprAirplane].Width div 2, y - SpritesData[sprAirplane].Height div 2, 0) |
791 |
else DrawSprite(sprAirplane, x - SpritesData[sprAirplane].Width div 2, y - SpritesData[sprAirplane].Height div 2, 1); |
|
792 |
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
|
793 |
gtTeleport: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
794 |
HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear; |
4016 | 795 |
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
|
796 |
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
|
797 |
end; |
4016 | 798 |
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
|
799 |
gtTarget: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
800 |
Tint($FF, $FF, $FF, floor($FF * Gear^.Timer / 1000)); |
4016 | 801 |
DrawSprite(sprTarget, x - 16, y - 16, 0); |
3390 | 802 |
Tint($FF, $FF, $FF, $FF); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
803 |
end; |
4016 | 804 |
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
|
805 |
gtCake: if Gear^.Pos = 6 then |
4016 | 806 |
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
|
807 |
else |
4016 | 808 |
DrawRotatedf(sprCakeDown, x, y, 5 - Gear^.Pos, hwSign(Gear^.dX), Gear^.DirAngle * hwSign(Gear^.dX) + 90); |
809 |
gtSeduction: if Gear^.Pos >= 14 then DrawSprite(sprSeduction, x - 16, y - 16, 0); |
|
810 |
gtWatermelon: DrawRotatedf(sprWatermelon, x, y, 0, 0, Gear^.DirAngle); |
|
811 |
gtMelonPiece: DrawRotatedf(sprWatermelon, x, y, 1, 0, Gear^.DirAngle); |
|
812 |
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
|
813 |
gtBirdy: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
814 |
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
|
815 |
begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
816 |
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
|
817 |
begin |
4016 | 818 |
endX:= x - WorldDx; |
819 |
endY:= y - WorldDy; |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
820 |
if Gear^.Tag < 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
821 |
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
|
822 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
823 |
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
|
824 |
startY:= endY - 256; |
3407 | 825 |
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
|
826 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
827 |
else // Disappearing |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
828 |
begin |
4016 | 829 |
startX:= x - WorldDx; |
830 |
startY:= y - WorldDy; |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
831 |
if Gear^.Tag > 0 then |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
832 |
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
|
833 |
else |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
834 |
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
|
835 |
endY:= startY + 256; |
3407 | 836 |
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
|
837 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
838 |
end |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
839 |
else |
4016 | 840 |
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
|
841 |
end; |
4016 | 842 |
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
|
843 |
gtPiano: begin |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
844 |
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
|
845 |
begin |
3390 | 846 |
Tint($FF, $FF, $FF, $10); |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
847 |
for i:= 8 downto 1 do |
4016 | 848 |
DrawRotatedTextureF(SpritesData[sprPiano].Texture, 1, 0, 0, x, y - hwRound(Gear^.dY * 4 * i), 0, 1, 128, 128, 0); |
3390 | 849 |
Tint($FF, $FF, $FF, $FF) |
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
850 |
end; |
4016 | 851 |
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
|
852 |
end; |
3712 | 853 |
gtPoisonCloud: begin |
3713 | 854 |
if Gear^.Timer < 1020 then |
855 |
Tint($C0, $C0, $00, Gear^.Timer div 8) |
|
856 |
else if Gear^.Timer > 3980 then |
|
857 |
Tint($C0, $C0, $00, (5000 - Gear^.Timer) div 8) |
|
3712 | 858 |
else |
3713 | 859 |
Tint($C0, $C0, $00, $C0); |
4016 | 860 |
DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 3, 0, 0, x, y, 0, 1, 22, 22, (RealTicks shr 36 + Gear^.UID * 100) mod 360); |
3712 | 861 |
Tint($FF, $FF, $FF, $FF) |
862 |
end; |
|
3387
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
863 |
end; |
4016 | 864 |
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
|
865 |
Gear:= Gear^.NextGear |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
866 |
end; |
733f4001b8b9
Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff
changeset
|
867 |
end; |