1589 ((GameFlags and gfInvulnerable) = 0) and |
1589 ((GameFlags and gfInvulnerable) = 0) and |
1590 (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and |
1590 (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and |
1591 (CurrentHedgehog^.HealthTagTex <> nil) and |
1591 (CurrentHedgehog^.HealthTagTex <> nil) and |
1592 ((CurrentHedgehog^.Gear^.State and gstHHDriven) <> 0) then |
1592 ((CurrentHedgehog^.Gear^.State and gstHHDriven) <> 0) then |
1593 begin |
1593 begin |
1594 t:= 10; |
1594 t:= 11; |
1595 i:= t; |
1595 i:= t; |
1596 {$IFDEF USE_TOUCH_INTERFACE} |
1596 {$IFDEF USE_TOUCH_INTERFACE} |
1597 i:= t + pauseButton.frame.y + pauseButton.frame.h; |
1597 i:= t + pauseButton.frame.y + pauseButton.frame.h; |
1598 {$ENDIF} |
1598 {$ENDIF} |
1599 DrawTexture(cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - 16, i, CurrentHedgehog^.HealthTagTex); |
1599 DrawTexture(cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - 16, i, CurrentHedgehog^.HealthTagTex); |
1600 if (CurrentHedgehog^.Effects[hePoisoned] > 0) then |
|
1601 DrawSprite(sprHealthPoisonHud, (cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - 36), i, 0) |
|
1602 else |
|
1603 DrawSprite(sprHealthHud, (cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - 36), i, 0); |
|
1604 if cVampiric then |
|
1605 DrawSprite(sprVampHud, (cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - 62), i, 0); |
|
1606 inc(t, CurrentHedgehog^.HealthTagTex^.h); |
1600 inc(t, CurrentHedgehog^.HealthTagTex^.h); |
1607 cDemoClockFPSOffsetY:= t; |
1601 cDemoClockFPSOffsetY:= t; |
|
1602 |
|
1603 t:= SpritesData[sprHealthHud].Width + 18; |
|
1604 // Main health icon. Appearance depends on game mode and poisoning state |
|
1605 if ((GameFlags and gfResetHealth) = 0) then |
|
1606 if (CurrentHedgehog^.Effects[hePoisoned] <> 0) then |
|
1607 DrawSprite(sprHealthPoisonHud, (cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - t), i, 0) |
|
1608 else |
|
1609 DrawSprite(sprHealthHud, (cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - t), i, 0) |
|
1610 else |
|
1611 if (CurrentHedgehog^.Effects[hePoisoned] <> 0) then |
|
1612 DrawSprite(sprMedicPoisonHud, (cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - t), i, 0) |
|
1613 else |
|
1614 DrawSprite(sprMedicHud, (cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - t), i, 0); |
|
1615 // Put halo above health icon for resurrectable hog |
|
1616 if (CurrentHedgehog^.Effects[heResurrectable] <> 0) then |
|
1617 DrawSprite(sprHaloHud, (cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - t - 2), i - SpritesData[sprHaloHud].Height + 1, 0); |
|
1618 |
|
1619 // Additional health-related states |
|
1620 inc(t, 2); |
|
1621 // Invulnerable |
|
1622 if (CurrentHedgehog^.Effects[heInvulnerable] <> 0) then |
|
1623 begin |
|
1624 inc(t, SpritesData[sprInvulnHud].Width + 2); |
|
1625 DrawSprite(sprInvulnHud, (cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - t), i, 0) |
|
1626 end |
|
1627 // Karma |
|
1628 else if ((GameFlags and gfKarma) <> 0) then |
|
1629 begin |
|
1630 inc(t, SpritesData[sprKarmaHud].Width + 2); |
|
1631 DrawSprite(sprKarmaHud, (cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - t), i, 0) |
|
1632 end; |
|
1633 // Vampirism |
|
1634 if cVampiric then |
|
1635 begin |
|
1636 inc(t, SpritesData[sprVampHud].Width + 2); |
|
1637 DrawSprite(sprVampHud, (cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - t), i, 0); |
|
1638 end; |
1608 end |
1639 end |
1609 else |
1640 else |
1610 cDemoClockFPSOffsetY:= 0; |
1641 cDemoClockFPSOffsetY:= 0; |
1611 |
1642 |
1612 // Wind bar |
1643 // Wind bar |