Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
overlay: fix regression in Overlay_DrawPickups
Browse files Browse the repository at this point in the history
Fixes #68
  • Loading branch information
rr- committed Apr 27, 2024
1 parent d5a3112 commit 1f3f609
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- fixed rare camera issues (#65, regression from 0.1)
- fixed flat rectangle colors (#70, regression from 0.1)
- fixed medpacks staying open after use in Lara's inventory (#69, regression from 0.1)
- fixed pickup sprites UI drawn forever in Lara's Home (#68, regression from 0.1)

## [0.1](https://github.com/rr-/TR2X/compare/...0.1) - 2024-04-26
- added version string to the inventory
Expand Down
6 changes: 3 additions & 3 deletions src/game/overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ void __cdecl Overlay_InitialisePickUpDisplay(void)
}
}

void __cdecl Overlay_DrawPickups(const bool pickup_state)
void __cdecl Overlay_DrawPickups(const bool timed)
{
const int32_t time = g_SaveGame.statistics.timer - m_OldGameTimer;
m_OldGameTimer = g_SaveGame.statistics.timer;

if (time < +0 || time >= 60) {
if (time <= 0 || time >= 60) {
return;
}

Expand All @@ -231,7 +231,7 @@ void __cdecl Overlay_DrawPickups(const bool pickup_state)
int32_t column = 0;
for (int i = 0; i < 12; i++) {
PICKUP_INFO *const pickup = &g_Pickups[i];
if (pickup_state) {
if (timed) {
pickup->timer -= time;
}

Expand Down

0 comments on commit 1f3f609

Please sign in to comment.