mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00
fix end of level freeze
This commit is contained in:
parent
8a1d1b64d3
commit
e6525e3c21
4 changed files with 28 additions and 8 deletions
|
@ -26,6 +26,8 @@ Currently the following configuration options are supported:
|
|||
- `disable_medpacks`: hides all the medpacks (for No Meds challenge runs).
|
||||
- `disable_healing_between_levels`: disables healing Lara between level reloads
|
||||
(for No Heal challenge runs).
|
||||
- `fix_end_of_level_freeze`: fix game freeze when ending the level with the
|
||||
Action key held
|
||||
|
||||
## Building
|
||||
|
||||
|
|
30
src/func.c
30
src/func.c
|
@ -281,16 +281,30 @@ void __cdecl LevelStats(int level_id) {
|
|||
T_CentreH(txt, 1);
|
||||
T_CentreV(txt, 1);
|
||||
|
||||
// wait till action key
|
||||
while (InputStatus & IN_SELECT) {
|
||||
// wait till action key release
|
||||
if (TR1MConfig.fix_end_of_level_freeze) {
|
||||
while (InputStatus & IN_SELECT) {
|
||||
S_UpdateInput();
|
||||
S_InitialisePolyList();
|
||||
S_CopyBufferToScreen();
|
||||
S_UpdateInput();
|
||||
T_DrawText();
|
||||
S_OutputPolyList();
|
||||
S_DumpScreen();
|
||||
}
|
||||
} else {
|
||||
while (InputStatus & IN_SELECT) {
|
||||
S_UpdateInput();
|
||||
}
|
||||
S_InitialisePolyList();
|
||||
S_CopyBufferToScreen();
|
||||
S_UpdateInput();
|
||||
T_DrawText();
|
||||
S_OutputPolyList();
|
||||
S_DumpScreen();
|
||||
}
|
||||
S_InitialisePolyList();
|
||||
S_CopyBufferToScreen();
|
||||
S_UpdateInput();
|
||||
T_DrawText();
|
||||
S_OutputPolyList();
|
||||
S_DumpScreen();
|
||||
|
||||
// wait till action key press
|
||||
while (!(InputStatus & IN_SELECT)) {
|
||||
if (IsResetFlag) {
|
||||
break;
|
||||
|
|
|
@ -55,6 +55,9 @@ static int tr1m_read_config() {
|
|||
TR1MConfig.disable_medpacks = tr1m_json_get_boolean_value(
|
||||
json, "disable_medpacks"
|
||||
);
|
||||
TR1MConfig.fix_end_of_level_freeze = tr1m_json_get_boolean_value(
|
||||
json, "fix_end_of_level_freeze"
|
||||
);
|
||||
|
||||
json_value_free(json);
|
||||
free(cfg_data);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
struct {
|
||||
int disable_healing_between_levels;
|
||||
int disable_medpacks;
|
||||
int fix_end_of_level_freeze;
|
||||
} TR1MConfig;
|
||||
|
||||
struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue