tr2/inventory_ring/control: default to gym option until launched

This monitors when the gym is launched so that it isn't re-selected
when later exiting to title.

Resolves #2192.
This commit is contained in:
lahm86 2025-01-12 22:05:41 +00:00
parent 200c5d5bba
commit 79f55ce955
3 changed files with 10 additions and 0 deletions

View file

@ -10,6 +10,7 @@
- fixed excessive braid movement when dead in windy rooms (#2265, regression from 0.8)
- fixed item counter shown even for a single medipack (#2222, regression from 0.3)
- fixed item counter always hidden in NG+, even for keys (#2223, regression from 0.3)
- fixed the passport object not being selected when exiting to title (#2192, regression from 0.8)
## [0.8](https://github.com/LostArtefacts/TRX/compare/tr2-0.8...tr2-0.8) - 2025-01-01
- completed decompilation efforts  TR2X.dll is gone, Tomb2.exe no longer needed (#1694)

View file

@ -162,6 +162,10 @@ int32_t Level_Initialise(
g_GameInfo.current_level.num = level_num;
g_GameInfo.current_level.type = level_type;
if (level_type != GFL_TITLE && level_type != GFL_DEMO) {
g_GymInvOpenEnabled = false;
}
if (level_type != GFL_TITLE && level_type != GFL_CUTSCENE) {
g_CurrentLevel = level_num;
}
@ -278,6 +282,8 @@ GAME_FLOW_COMMAND DisplayCredits(void)
return (GAME_FLOW_COMMAND) { .action = GF_EXIT_TO_TITLE };
}
g_GymInvOpenEnabled = true;
Music_Play(MX_SKIDOO_THEME, MPM_ALWAYS);
for (int32_t i = 0; i < 8; i++) {

View file

@ -619,6 +619,9 @@ void Lara_Control(const int16_t item_num)
if (item->hit_points <= 0) {
item->hit_points = -1;
if (g_CurrentLevel == LV_GYM) {
g_GymInvOpenEnabled = true;
}
if (!g_Lara.death_timer) {
Music_Stop();
}