1 procedure DrawHH(Gear: PGear); |
1 procedure DrawHH(Gear: PGear; ox, oy: LongInt); |
2 var i, t: LongInt; |
2 var i, t: LongInt; |
3 amt: TAmmoType; |
3 amt: TAmmoType; |
4 hx, hy, cx, cy, tx, ty, sx, sy, m: LongInt; // hedgehog, crosshair, temp, sprite, direction |
4 sign, hx, hy, cx, cy, tx, ty, sx, sy, m: LongInt; // hedgehog, crosshair, temp, sprite, direction |
5 dx, dy, ax, ay, aAngle, dAngle, hAngle, lx, ly: real; // laser, change |
5 dx, dy, ax, ay, aAngle, dAngle, hAngle, lx, ly: real; // laser, change |
6 defaultPos, HatVisible: boolean; |
6 defaultPos, HatVisible: boolean; |
7 VertexBuffer: array [0..1] of TVertex2f; |
7 VertexBuffer: array [0..1] of TVertex2f; |
8 HH: PHedgehog; |
8 HH: PHedgehog; |
9 CurWeapon: PAmmo; |
9 CurWeapon: PAmmo; |
10 begin |
10 begin |
11 HH:= PHedgehog(Gear^.Hedgehog); |
11 HH:= PHedgehog(Gear^.Hedgehog); |
12 if HH^.Unplaced then exit; |
12 if HH^.Unplaced then exit; |
13 m:= 1; |
13 m:= 1; |
14 if ((Gear^.State and gstHHHJump) <> 0) and not cArtillery then m:= -1; |
14 if ((Gear^.State and gstHHHJump) <> 0) and not cArtillery then m:= -1; |
|
15 sx:= ox + 1; // this offset is very common |
|
16 sy:= oy - 3; |
|
17 sign:= hwSign(Gear^.dX); |
|
18 |
15 if (Gear^.State and gstHHDeath) <> 0 then |
19 if (Gear^.State and gstHHDeath) <> 0 then |
16 begin |
20 begin |
17 DrawSprite(sprHHDeath, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 26 + WorldDy, Gear^.Pos); |
21 DrawSprite(sprHHDeath, ox - 16, oy - 26, Gear^.Pos); |
18 Tint(HH^.Team^.Clan^.Color); |
22 Tint(HH^.Team^.Clan^.Color); |
19 DrawSprite(sprHHDeath, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 26 + WorldDy, Gear^.Pos + 8); |
23 DrawSprite(sprHHDeath, ox - 16, oy - 26, Gear^.Pos + 8); |
20 Tint($FF, $FF, $FF, $FF); |
24 Tint($FF, $FF, $FF, $FF); |
21 exit |
25 exit |
22 end |
26 end |
23 else if (Gear^.State and gstHHGone) <> 0 then |
27 else if (Gear^.State and gstHHGone) <> 0 then |
24 begin |
28 begin |
25 DrawRotatedF(sprTeleport, hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy, Gear^.Pos, hwSign(Gear^.dX), 0); |
29 DrawRotatedF(sprTeleport, sx, sy, Gear^.Pos, sign, 0); |
26 exit |
30 exit |
27 end; |
31 end; |
28 |
32 |
29 defaultPos:= true; |
33 defaultPos:= true; |
30 HatVisible:= false; |
34 HatVisible:= false; |
31 |
35 |
32 sx:= hwRound(Gear^.X) + 1 + WorldDx; |
|
33 sy:= hwRound(Gear^.Y) - 3 + WorldDy; |
|
34 |
36 |
35 if HH^.Effects[hePoisoned] then |
37 if HH^.Effects[hePoisoned] then |
36 begin |
38 begin |
37 Tint($00, $FF, $40, $40); |
39 Tint($00, $FF, $40, $40); |
38 DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 2, 0, 0, sx, sy, 0, 1, 22, 22, (RealTicks shr 36) mod 360); |
40 DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 2, 0, 0, sx, sy, 0, 1, 22, 22, (RealTicks shr 36) mod 360); |
141 glEnable(GL_TEXTURE_2D); |
143 glEnable(GL_TEXTURE_2D); |
142 glDisable(GL_LINE_SMOOTH); |
144 glDisable(GL_LINE_SMOOTH); |
143 end; |
145 end; |
144 end; |
146 end; |
145 // draw crosshair |
147 // draw crosshair |
146 cx:= Round(hwRound(Gear^.X) + dx * 80 + GetLaunchX(HH^.CurAmmoType, hwSign(Gear^.dX) * m, Gear^.Angle)); |
148 cx:= Round(hwRound(Gear^.X) + dx * 80 + GetLaunchX(HH^.CurAmmoType, sign * m, Gear^.Angle)); |
147 cy:= Round(hwRound(Gear^.Y) + dy * 80 + GetLaunchY(HH^.CurAmmoType, Gear^.Angle)); |
149 cy:= Round(hwRound(Gear^.Y) + dy * 80 + GetLaunchY(HH^.CurAmmoType, Gear^.Angle)); |
148 DrawRotatedTex(HH^.Team^.CrosshairTex, |
150 DrawRotatedTex(HH^.Team^.CrosshairTex, |
149 12, 12, cx + WorldDx, cy + WorldDy, 0, |
151 12, 12, cx + WorldDx, cy + WorldDy, 0, |
150 hwSign(Gear^.dX) * (Gear^.Angle * 180.0) / cMaxAngle); |
152 sign * (Gear^.Angle * 180.0) / cMaxAngle); |
151 end; |
153 end; |
152 hx:= hwRound(Gear^.X) + 8 * hwSign(Gear^.dX) + WorldDx; |
154 hx:= ox + 8 * sign; |
153 hy:= hwRound(Gear^.Y) - 2 + WorldDy; |
155 hy:= oy - 2; |
154 aangle:= Gear^.Angle * 180 / cMaxAngle - 90; |
156 aangle:= Gear^.Angle * 180 / cMaxAngle - 90; |
155 if CurAmmoGear <> nil then |
157 if CurAmmoGear <> nil then |
156 begin |
158 begin |
157 case CurAmmoGear^.Kind of |
159 case CurAmmoGear^.Kind of |
158 gtShotgunShot: begin |
160 gtShotgunShot: begin |
159 if (CurAmmoGear^.State and gstAnimation <> 0) then |
161 if (CurAmmoGear^.State and gstAnimation <> 0) then |
160 DrawRotated(sprShotgun, hx, hy, hwSign(Gear^.dX), aangle) |
162 DrawRotated(sprShotgun, hx, hy, sign, aangle) |
161 else |
163 else |
162 DrawRotated(sprHandShotgun, hx, hy, hwSign(Gear^.dX), aangle); |
164 DrawRotated(sprHandShotgun, hx, hy, sign, aangle); |
163 end; |
165 end; |
164 gtDEagleShot: DrawRotated(sprDEagle, hx, hy, hwSign(Gear^.dX), aangle); |
166 gtDEagleShot: DrawRotated(sprDEagle, hx, hy, sign, aangle); |
165 gtSniperRifleShot: begin |
167 gtSniperRifleShot: begin |
166 if (CurAmmoGear^.State and gstAnimation <> 0) then |
168 if (CurAmmoGear^.State and gstAnimation <> 0) then |
167 DrawRotatedF(sprSniperRifle, hx, hy, 1, hwSign(Gear^.dX), aangle) |
169 DrawRotatedF(sprSniperRifle, hx, hy, 1, sign, aangle) |
168 else |
170 else |
169 DrawRotatedF(sprSniperRifle, hx, hy, 0, hwSign(Gear^.dX), aangle) |
171 DrawRotatedF(sprSniperRifle, hx, hy, 0, sign, aangle) |
170 end; |
172 end; |
171 gtBallgun: DrawRotated(sprHandBallgun, hx, hy, hwSign(Gear^.dX), aangle); |
173 gtBallgun: DrawRotated(sprHandBallgun, hx, hy, sign, aangle); |
172 gtRCPlane: begin |
174 gtRCPlane: begin |
173 DrawRotated(sprHandPlane, hx, hy, hwSign(Gear^.dX), 0); |
175 DrawRotated(sprHandPlane, hx, hy, sign, 0); |
174 defaultPos:= false |
176 defaultPos:= false |
175 end; |
177 end; |
176 gtRope: begin |
178 gtRope: begin |
177 if Gear^.X < CurAmmoGear^.X then |
179 if Gear^.X < CurAmmoGear^.X then |
178 begin |
180 begin |
183 begin |
185 begin |
184 dAngle:= 180; |
186 dAngle:= 180; |
185 hAngle:= 0; |
187 hAngle:= 0; |
186 i:= -1 |
188 i:= -1 |
187 end; |
189 end; |
188 sx:= hwRound(Gear^.X) + WorldDx; |
|
189 sy:= hwRound(Gear^.Y) + WorldDy; |
|
190 if ((Gear^.State and gstWinner) = 0) then |
190 if ((Gear^.State and gstWinner) = 0) then |
191 begin |
191 begin |
192 DrawHedgehog(sx, sy, |
192 DrawHedgehog(ox, oy, |
193 i, |
193 i, |
194 1, |
194 1, |
195 0, |
195 0, |
196 DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + dAngle); |
196 DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + dAngle); |
197 with HH^ do |
197 with HH^ do |
198 if (HatTex <> nil) then |
198 if (HatTex <> nil) then |
199 begin |
199 begin |
200 DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, sx, sy, 0, i, 32, 32, |
200 DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, ox, oy, 0, i, 32, 32, |
201 i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle); |
201 i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle); |
202 if HatTex^.w > 64 then |
202 if HatTex^.w > 64 then |
203 begin |
203 begin |
204 Tint(HH^.Team^.Clan^.Color); |
204 Tint(HH^.Team^.Clan^.Color); |
205 DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, sx, sy, 32, i, 32, 32, |
205 DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, ox, oy, 32, i, 32, 32, |
206 i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle); |
206 i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle); |
207 Tint($FF, $FF, $FF, $FF) |
207 Tint($FF, $FF, $FF, $FF) |
208 end |
208 end |
209 end |
209 end |
210 end; |
210 end; |
211 DrawAltWeapon(Gear, sx, sy); |
211 DrawAltWeapon(Gear, ox, oy); |
212 defaultPos:= false |
212 defaultPos:= false |
213 end; |
213 end; |
214 gtBlowTorch: begin |
214 gtBlowTorch: begin |
215 DrawRotated(sprBlowTorch, hx, hy, hwSign(Gear^.dX), aangle); |
215 DrawRotated(sprBlowTorch, hx, hy, sign, aangle); |
216 DrawHedgehog(sx, sy, |
216 DrawHedgehog(sx, sy, |
217 hwSign(Gear^.dX), |
217 sign, |
218 3, |
218 3, |
219 HH^.visStepPos div 2, |
219 HH^.visStepPos div 2, |
220 0); |
220 0); |
221 with HH^ do |
221 with HH^ do |
222 if (HatTex <> nil) then |
222 if (HatTex <> nil) then |
223 begin |
223 begin |
224 DrawTextureF(HatTex, |
224 DrawTextureF(HatTex, |
225 1, |
225 1, |
226 sx, |
226 sx, |
227 hwRound(Gear^.Y) - 8 + WorldDy, |
227 sy - 5, |
228 0, |
228 0, |
229 hwSign(Gear^.dX), |
229 sign, |
230 32, |
230 32, |
231 32); |
231 32); |
232 if HatTex^.w > 64 then |
232 if HatTex^.w > 64 then |
233 begin |
233 begin |
234 Tint(HH^.Team^.Clan^.Color); |
234 Tint(HH^.Team^.Clan^.Color); |
235 DrawTextureF(HatTex, |
235 DrawTextureF(HatTex, |
236 1, |
236 1, |
237 sx, |
237 sx, |
238 hwRound(Gear^.Y) - 8 + WorldDy, |
238 sy - 5, |
239 32, |
239 32, |
240 hwSign(Gear^.dX), |
240 sign, |
241 32, |
241 32, |
242 32); |
242 32); |
243 Tint($FF, $FF, $FF, $FF) |
243 Tint($FF, $FF, $FF, $FF) |
244 end |
244 end |
245 end; |
245 end; |
246 defaultPos:= false |
246 defaultPos:= false |
247 end; |
247 end; |
248 gtShover: DrawRotated(sprHandBaseball, hx, hy, hwSign(Gear^.dX), aangle + 180); |
248 gtShover: DrawRotated(sprHandBaseball, hx, hy, sign, aangle + 180); |
249 gtFirePunch: begin |
249 gtFirePunch: begin |
250 DrawHedgehog(sx, sy, |
250 DrawHedgehog(sx, sy, |
251 hwSign(Gear^.dX), |
251 sign, |
252 1, |
252 1, |
253 4, |
253 4, |
254 0); |
254 0); |
255 defaultPos:= false |
255 defaultPos:= false |
256 end; |
256 end; |
390 dec(HH^.Timer) |
388 dec(HH^.Timer) |
391 end; |
389 end; |
392 amt:= CurrentHedgehog^.CurAmmoType; |
390 amt:= CurrentHedgehog^.CurAmmoType; |
393 CurWeapon:= GetAmmoEntry(HH^); |
391 CurWeapon:= GetAmmoEntry(HH^); |
394 case amt of |
392 case amt of |
395 amBazooka: DrawRotated(sprHandBazooka, hx, hy, hwSign(Gear^.dX), aangle); |
393 amBazooka: DrawRotated(sprHandBazooka, hx, hy, sign, aangle); |
396 amMortar: DrawRotated(sprHandMortar, hx, hy, hwSign(Gear^.dX), aangle); |
394 amMortar: DrawRotated(sprHandMortar, hx, hy, sign, aangle); |
397 amMolotov: DrawRotated(sprHandMolotov, hx, hy, hwSign(Gear^.dX), aangle); |
395 amMolotov: DrawRotated(sprHandMolotov, hx, hy, sign, aangle); |
398 amBallgun: DrawRotated(sprHandBallgun, hx, hy, hwSign(Gear^.dX), aangle); |
396 amBallgun: DrawRotated(sprHandBallgun, hx, hy, sign, aangle); |
399 amDrill: DrawRotated(sprHandDrill, hx, hy, hwSign(Gear^.dX), aangle); |
397 amDrill: DrawRotated(sprHandDrill, hx, hy, sign, aangle); |
400 amRope: DrawRotated(sprHandRope, hx, hy, hwSign(Gear^.dX), aangle); |
398 amRope: DrawRotated(sprHandRope, hx, hy, sign, aangle); |
401 amShotgun: DrawRotated(sprHandShotgun, hx, hy, hwSign(Gear^.dX), aangle); |
399 amShotgun: DrawRotated(sprHandShotgun, hx, hy, sign, aangle); |
402 amDEagle: DrawRotated(sprHandDEagle, hx, hy, hwSign(Gear^.dX), aangle); |
400 amDEagle: DrawRotated(sprHandDEagle, hx, hy, sign, aangle); |
403 amSineGun: DrawRotated(sprHandShotgun, hx, hy, hwSign(Gear^.dX), aangle); |
401 amSineGun: DrawRotated(sprHandShotgun, hx, hy, sign, aangle); |
404 amPortalGun: if (CurWeapon^.Timer and 2) <> 0 then // Add a new Hedgehog value instead of abusing timer? |
402 amPortalGun: if (CurWeapon^.Timer and 2) <> 0 then // Add a new Hedgehog value instead of abusing timer? |
405 DrawRotatedF(sprPortalGun, hx, hy, 0, hwSign(Gear^.dX), aangle) |
403 DrawRotatedF(sprPortalGun, hx, hy, 0, sign, aangle) |
406 else |
404 else |
407 DrawRotatedF(sprPortalGun, hx, hy, 1+(CurWeapon^.Timer and 1), hwSign(Gear^.dX), aangle); |
405 DrawRotatedF(sprPortalGun, hx, hy, 1+(CurWeapon^.Timer and 1), sign, aangle); |
408 amSniperRifle: DrawRotatedF(sprSniperRifle, hx, hy, 0, hwSign(Gear^.dX), aangle); |
406 amSniperRifle: DrawRotatedF(sprSniperRifle, hx, hy, 0, sign, aangle); |
409 amBlowTorch: DrawRotated(sprHandBlowTorch, hx, hy, hwSign(Gear^.dX), aangle); |
407 amBlowTorch: DrawRotated(sprHandBlowTorch, hx, hy, sign, aangle); |
410 amCake: DrawRotated(sprHandCake, hx, hy, hwSign(Gear^.dX), aangle); |
408 amCake: DrawRotated(sprHandCake, hx, hy, sign, aangle); |
411 amGrenade: DrawRotated(sprHandGrenade, hx, hy, hwSign(Gear^.dX), aangle); |
409 amGrenade: DrawRotated(sprHandGrenade, hx, hy, sign, aangle); |
412 amWatermelon: DrawRotated(sprHandMelon, hx, hy, hwSign(Gear^.dX), aangle); |
410 amWatermelon: DrawRotated(sprHandMelon, hx, hy, sign, aangle); |
413 amSkip: DrawRotated(sprHandSkip, hx, hy, hwSign(Gear^.dX), aangle); |
411 amSkip: DrawRotated(sprHandSkip, hx, hy, sign, aangle); |
414 amClusterBomb: DrawRotated(sprHandCluster, hx, hy, hwSign(Gear^.dX), aangle); |
412 amClusterBomb: DrawRotated(sprHandCluster, hx, hy, sign, aangle); |
415 amDynamite: DrawRotated(sprHandDynamite, hx, hy, hwSign(Gear^.dX), aangle); |
413 amDynamite: DrawRotated(sprHandDynamite, hx, hy, sign, aangle); |
416 amHellishBomb: DrawRotated(sprHandHellish, hx, hy, hwSign(Gear^.dX), aangle); |
414 amHellishBomb: DrawRotated(sprHandHellish, hx, hy, sign, aangle); |
417 amGasBomb: DrawRotated(sprHandCheese, hx, hy, hwSign(Gear^.dX), aangle); |
415 amGasBomb: DrawRotated(sprHandCheese, hx, hy, sign, aangle); |
418 amMine: DrawRotated(sprHandMine, hx, hy, hwSign(Gear^.dX), aangle); |
416 amMine: DrawRotated(sprHandMine, hx, hy, sign, aangle); |
419 amSMine: DrawRotated(sprHandSMine, hx, hy, hwSign(Gear^.dX), aangle); |
417 amSMine: DrawRotated(sprHandSMine, hx, hy, sign, aangle); |
420 amSeduction: DrawRotated(sprHandSeduction, hx, hy, hwSign(Gear^.dX), aangle); |
418 amSeduction: DrawRotated(sprHandSeduction, hx, hy, sign, aangle); |
421 amVampiric: DrawRotatedF(sprHandVamp, hx, hy, (RealTicks div 125) mod 4, hwSign(Gear^.dX), aangle); |
419 amVampiric: DrawRotatedF(sprHandVamp, hx, hy, (RealTicks div 125) mod 4, sign, aangle); |
422 amRCPlane: begin |
420 amRCPlane: begin |
423 DrawRotated(sprHandPlane, hx, hy, hwSign(Gear^.dX), 0); |
421 DrawRotated(sprHandPlane, hx, hy, sign, 0); |
424 defaultPos:= false |
422 defaultPos:= false |
425 end; |
423 end; |
426 amGirder: begin |
424 amGirder: begin |
427 DrawRotated(sprHandConstruction, hx, hy, hwSign(Gear^.dX), aangle); |
425 DrawRotated(sprHandConstruction, hx, hy, sign, aangle); |
428 DrawSpriteClipped(sprGirder, |
426 DrawSpriteClipped(sprGirder, |
429 sx-256, |
427 ox-256, |
430 sy-256, |
428 oy-256, |
431 LongInt(topY)+WorldDy, |
429 LongInt(topY)+WorldDy, |
432 LongInt(rightX)+WorldDx, |
430 LongInt(rightX)+WorldDx, |
433 cWaterLine+WorldDy, |
431 cWaterLine+WorldDy, |
434 LongInt(leftX)+WorldDx) |
432 LongInt(leftX)+WorldDx) |
435 end; |
433 end; |
436 amBee: DrawRotatedF(sprHandBee, hx, hy, (RealTicks div 125) mod 4, hwSign(Gear^.dX), aangle); |
434 amBee: DrawRotatedF(sprHandBee, hx, hy, (RealTicks div 125) mod 4, sign, aangle); |
437 amFlamethrower: DrawRotatedF(sprHandFlamethrower, hx, hy, (RealTicks div 125) mod 4, hwSign(Gear^.dX), aangle); |
435 amFlamethrower: DrawRotatedF(sprHandFlamethrower, hx, hy, (RealTicks div 125) mod 4, sign, aangle); |
438 amResurrector: begin |
436 amResurrector: begin |
439 DrawCircle(hwRound(Gear^.X), hwRound(Gear^.y), 100, 1.5, 0, 0, |
437 DrawCircle(ox, oy, 100, 1.5, 0, 0, |
440 $FF, $FF); // I'd rather not like to hardcore 100 here |
438 $FF, $FF); // I'd rather not like to hardcode 100 here |
441 end; |
439 end; |
442 end; |
440 end; |
443 |
441 |
444 case amt of |
442 case amt of |
445 amAirAttack, |
443 amAirAttack, |
446 amMineStrike: DrawRotated(sprHandAirAttack, sx, hwRound(Gear^.Y) + WorldDy, hwSign(Gear^.dX), 0); |
444 amMineStrike: DrawRotated(sprHandAirAttack, sx, oy, sign, 0); |
447 amPickHammer: DrawHedgehog(sx, sy, |
445 amPickHammer: DrawHedgehog(sx, sy, |
448 hwSign(Gear^.dX), |
446 sign, |
449 1, |
447 1, |
450 2, |
448 2, |
451 0); |
449 0); |
452 amTeleport: DrawRotatedF(sprTeleport, sx, sy, 0, hwSign(Gear^.dX), 0); |
450 amTeleport: DrawRotatedF(sprTeleport, sx, sy, 0, sign, 0); |
453 amKamikaze: DrawHedgehog(sx, sy, |
451 amKamikaze: DrawHedgehog(sx, sy, |
454 hwSign(Gear^.dX), |
452 sign, |
455 1, |
453 1, |
456 5, |
454 5, |
457 0); |
455 0); |
458 amWhip: DrawRotatedF(sprWhip, |
456 amWhip: DrawRotatedF(sprWhip, |
459 sx, |
457 sx, |
460 sy, |
458 sy, |
461 0, |
459 0, |
462 hwSign(Gear^.dX), |
460 sign, |
463 0); |
461 0); |
464 amHammer: DrawRotatedF(sprHammer, |
462 amHammer: DrawRotatedF(sprHammer, |
465 sx, |
463 sx, |
466 sy, |
464 sy, |
467 0, |
465 0, |
468 hwSign(Gear^.dX), |
466 sign, |
469 0); |
467 0); |
470 else |
468 else |
471 DrawHedgehog(sx, sy, |
469 DrawHedgehog(sx, sy, |
472 hwSign(Gear^.dX), |
470 sign, |
473 0, |
471 0, |
474 4, |
472 4, |
475 0); |
473 0); |
476 |
474 |
477 HatVisible:= true; |
475 HatVisible:= true; |
621 end; |
619 end; |
622 |
620 |
623 with HH^ do |
621 with HH^ do |
624 begin |
622 begin |
625 if ((Gear^.State and not gstWinner) = 0) |
623 if ((Gear^.State and not gstWinner) = 0) |
|
624 or ((Gear^.State = gstWait) and (Gear^.dY.QWordValue = 0)) |
626 or (bShowFinger and ((Gear^.State and gstHHDriven) <> 0)) then |
625 or (bShowFinger and ((Gear^.State and gstHHDriven) <> 0)) then |
627 begin |
626 begin |
628 t:= hwRound(Gear^.Y) - cHHRadius - 12 + WorldDy; |
627 t:= sy - cHHRadius - 9; |
629 if (cTagsMask and htTransparent) <> 0 then |
628 if (cTagsMask and htTransparent) <> 0 then |
630 Tint($FF, $FF, $FF, $80); |
629 Tint($FF, $FF, $FF, $80); |
631 if ((cTagsMask and htHealth) <> 0) then |
630 if ((cTagsMask and htHealth) <> 0) then |
632 begin |
631 begin |
633 dec(t, HealthTagTex^.h + 2); |
632 dec(t, HealthTagTex^.h + 2); |
634 DrawCentered(hwRound(Gear^.X) + WorldDx, t, HealthTagTex) |
633 DrawCentered(ox, t, HealthTagTex) |
635 end; |
634 end; |
636 if (cTagsMask and htName) <> 0 then |
635 if (cTagsMask and htName) <> 0 then |
637 begin |
636 begin |
638 dec(t, NameTagTex^.h + 2); |
637 dec(t, NameTagTex^.h + 2); |
639 DrawCentered(hwRound(Gear^.X) + WorldDx, t, NameTagTex) |
638 DrawCentered(ox, t, NameTagTex) |
640 end; |
639 end; |
641 if (cTagsMask and htTeamName) <> 0 then |
640 if (cTagsMask and htTeamName) <> 0 then |
642 begin |
641 begin |
643 dec(t, Team^.NameTagTex^.h + 2); |
642 dec(t, Team^.NameTagTex^.h + 2); |
644 DrawCentered(hwRound(Gear^.X) + WorldDx, t, Team^.NameTagTex) |
643 DrawCentered(ox, t, Team^.NameTagTex) |
645 end; |
644 end; |
646 if (cTagsMask and htTransparent) <> 0 then |
645 if (cTagsMask and htTransparent) <> 0 then |
647 Tint($FF, $FF, $FF, $FF) |
646 Tint($FF, $FF, $FF, $FF) |
648 end; |
647 end; |
649 if (Gear^.State and gstHHDriven) <> 0 then // Current hedgehog |
648 if (Gear^.State and gstHHDriven) <> 0 then // Current hedgehog |
650 begin |
649 begin |
651 if bShowFinger and ((Gear^.State and gstHHDriven) <> 0) then |
650 if bShowFinger and ((Gear^.State and gstHHDriven) <> 0) then |
652 DrawSprite(sprFinger, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 64 + WorldDy, |
651 DrawSprite(sprFinger, ox - 16, oy - 64, |
653 GameTicks div 32 mod 16); |
652 GameTicks div 32 mod 16); |
654 |
653 |
655 if (Gear^.State and gstDrowning) = 0 then |
654 if (Gear^.State and gstDrowning) = 0 then |
656 if (Gear^.State and gstHHThinking) <> 0 then |
655 if (Gear^.State and gstHHThinking) <> 0 then |
657 DrawSprite(sprQuestion, hwRound(Gear^.X) - 10 + WorldDx, hwRound(Gear^.Y) - cHHRadius - 34 + WorldDy, (RealTicks shr 9) mod 8) |
656 DrawSprite(sprQuestion, ox - 10, oy - cHHRadius - 34, (RealTicks shr 9) mod 8) |
658 end |
657 end |
659 end; |
658 end; |
660 |
659 |
661 if HH^.Effects[hePoisoned] then |
660 if HH^.Effects[hePoisoned] then |
662 begin |
661 begin |