258 |
258 |
259 // render finger (pointing arrow) |
259 // render finger (pointing arrow) |
260 if bShowFinger and ((Gear^.State and gstHHDriven) <> 0) then |
260 if bShowFinger and ((Gear^.State and gstHHDriven) <> 0) then |
261 begin |
261 begin |
262 ty := oy - 32; |
262 ty := oy - 32; |
263 // move finger higher up if tags are above hog |
263 // move finger higher up if tags or switching arrows are above hog |
264 if (cTagsMask and htTeamName) <> 0 then |
264 if (cTagsMask and htTeamName) <> 0 then |
265 ty := ty - HH^.Team^.NameTagTex^.h - 2; |
265 ty := ty - HH^.Team^.NameTagTex^.h - 2; |
266 if (cTagsMask and htName) <> 0 then |
266 if (cTagsMask and htName) <> 0 then |
267 ty := ty - HH^.NameTagTex^.h - 2; |
267 ty := ty - HH^.NameTagTex^.h - 2; |
268 if (cTagsMask and htHealth) <> 0 then |
268 if (cTagsMask and htHealth) <> 0 then |
269 ty := ty - HH^.HealthTagTex^.h - 2; |
269 ty := ty - HH^.HealthTagTex^.h - 2; |
|
270 if bShowSwitcher then |
|
271 ty := ty - SpritesData[sprSwitch].Height - 4; |
270 tx := ox; |
272 tx := ox; |
271 |
273 |
272 // don't go offscreen |
274 // don't go offscreen |
273 t:= 32; |
275 t:= 32; |
274 tx := min(max(tx, ViewLeftX + t), ViewRightX - t); |
276 tx := min(max(tx, ViewLeftX + t), ViewRightX - t); |
1294 var |
1296 var |
1295 HHGear: PGear; |
1297 HHGear: PGear; |
1296 vg: PVisualGear; |
1298 vg: PVisualGear; |
1297 i: Longword; |
1299 i: Longword; |
1298 aAngle: real; |
1300 aAngle: real; |
1299 startX, endX, startY, endY: LongInt; |
1301 startX, endX, startY, endY, ty: LongInt; |
1300 begin |
1302 begin |
1301 // airmine has its own sprite |
1303 // airmine has its own sprite |
1302 if (Gear^.State and gstFrozen <> 0) and (Gear^.Kind <> gtAirMine) then Tint($A0, $A0, $FF, $FF); |
1304 if (Gear^.State and gstFrozen <> 0) and (Gear^.Kind <> gtAirMine) then Tint($A0, $A0, $FF, $FF); |
1303 if Gear^.Target.X <> NoPointX then |
1305 if Gear^.Target.X <> NoPointX then |
1304 if Gear^.AmmoType = amBee then |
1306 if Gear^.AmmoType = amBee then |
1545 setTintAdd(true); |
1547 setTintAdd(true); |
1546 if IsTooDarkToRead(Gear^.Hedgehog^.Team^.Clan^.Color) then |
1548 if IsTooDarkToRead(Gear^.Hedgehog^.Team^.Clan^.Color) then |
1547 Tint($FFFFFFFF) |
1549 Tint($FFFFFFFF) |
1548 else |
1550 else |
1549 Tint($000000FF); |
1551 Tint($000000FF); |
1550 DrawSpriteRotatedF(sprSwitch, x + 1, y - 40, 1, 0, (RealTicks div 5) mod 360); |
1552 |
|
1553 ty := y - SpritesData[sprSwitch].Height; |
|
1554 // Move higher up if hedgehog tags are visible. |
|
1555 // This happens when finger is active. The finger is then moved above the switching arrows. |
|
1556 if bShowFinger then |
|
1557 begin |
|
1558 if (cTagsMask and htTeamName) <> 0 then |
|
1559 ty := ty - Gear^.Hedgehog^.Team^.NameTagTex^.h - 2; |
|
1560 if (cTagsMask and htName) <> 0 then |
|
1561 ty := ty - Gear^.Hedgehog^.NameTagTex^.h - 2; |
|
1562 if (cTagsMask and htHealth) <> 0 then |
|
1563 ty := ty - Gear^.Hedgehog^.HealthTagTex^.h - 2; |
|
1564 if (cTagsMask and (htTeamName or htName or htHealth)) <> 0 then |
|
1565 ty := ty - 4; |
|
1566 end; |
|
1567 |
|
1568 DrawSpriteRotatedF(sprSwitch, x + 1, ty, 1, 0, (RealTicks div 5) mod 360); |
1551 |
1569 |
1552 Tint(Gear^.Hedgehog^.Team^.Clan^.Color shl 8 or $FF); |
1570 Tint(Gear^.Hedgehog^.Team^.Clan^.Color shl 8 or $FF); |
1553 DrawSpriteRotatedF(sprSwitch, x + 1, y - 40, 0, 0, (RealTicks div 5) mod 360); |
1571 DrawSpriteRotatedF(sprSwitch, x + 1, ty, 0, 0, (RealTicks div 5) mod 360); |
1554 untint; |
1572 untint; |
1555 setTintAdd(false); |
1573 setTintAdd(false); |
1556 end; |
1574 end; |
1557 gtTarget: begin |
1575 gtTarget: begin |
1558 Tint($FF, $FF, $FF, round($FF * Gear^.Timer / 1000)); |
1576 Tint($FF, $FF, $FF, round($FF * Gear^.Timer / 1000)); |