Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game flow rework (pt 11) #2418

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open

Game flow rework (pt 11) #2418

wants to merge 11 commits into from

Conversation

rr-
Copy link
Collaborator

@rr- rr- commented Jan 31, 2025

Checklist

  • I have read the coding conventions
  • I have added a changelog entry about what my pull request accomplishes, or it is an internal change
  • I have added a readme entry about my new feature or OG bug fix, or it is a different change

Description

This PR reorganizes the stages for processing saved games and initializing levels, making sure that the order matches between both games. As a result, in the next iteration we should be able to remove the load_level sequence event from TR1, simplifying the experience for the builders.

@rr- rr- added Internal The invisible stuff TR2 TR1 labels Jan 31, 2025
@rr- rr- self-assigned this Jan 31, 2025
@rr- rr- requested review from a team as code owners January 31, 2025 23:57
@rr- rr- requested review from lahm86, walkawayy and aredfan and removed request for a team January 31, 2025 23:57
Copy link
Collaborator

@lahm86 lahm86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just noticed one thing (which may be temporary anyway before eliminating load_level)

  • In TR1, the cutscene angles are incorrect

@aredfan
Copy link
Collaborator

aredfan commented Feb 1, 2025

  • TR1X: skipping demo 1 ends up loading Caves instead of the main menu
  • TR2X: loading a save from the main menu crashes the game (make a new save game beforehand)

@rr-
Copy link
Collaborator Author

rr- commented Feb 1, 2025

LGTM, just noticed one thing (which may be temporary anyway before eliminating load_level)

  • In TR1, the cutscene angles are incorrect

Fixed

@rr-
Copy link
Collaborator Author

rr- commented Feb 1, 2025

  • TR1X: skipping demo 1 ends up loading Caves instead of the main menu

Fixed

  • TR2X: loading a save from the main menu crashes the game (make a new save game beforehand)

I can't reproduce this in the newest version.

@lahm86
Copy link
Collaborator

lahm86 commented Feb 1, 2025

I get the crash too, the stack trace is as follows.

libtrx/log_windows.c 46 M_StackTrace --- 0x00c40000: D:\Games\Dev\TR2X\TR2X.exe
libtrx/log_windows.c 58 M_StackTrace 05. 0x00d4d889: (/app/build/tr2/win/../../../src/tr2/subprojects/libtrx/memory.c:26:9) Memory_Free
libtrx/log_windows.c 58 M_StackTrace 06. 0x00d4d8e8: (/app/build/tr2/win/../../../src/tr2/subprojects/libtrx/memory.c:36:5) Memory_FreePointer
libtrx/log_windows.c 58 M_StackTrace 07. 0x00d0bf5f: (/app/build/tr2/win/../../../src/tr2/subprojects/libtrx/engine/audio_sample.c:474:9) Audio_Sample_UnloadAll
libtrx/log_windows.c 58 M_StackTrace 08. 0x00c70197: (/app/build/tr2/win/game/level.c:532:5) M_LoadSamples
libtrx/log_windows.c 58 M_StackTrace 09. 0x00c7071a: (/app/build/tr2/win/game/level.c:661:5) M_LoadFromFile
libtrx/log_windows.c 58 M_StackTrace 10. 0x00c70882: (/app/build/tr2/win/game/level.c:707:5) Level_Load
libtrx/log_windows.c 58 M_StackTrace 11. 0x00c70993: (/app/build/tr2/win/game/level.c:741:10) Level_Initialise
libtrx/log_windows.c 58 M_StackTrace 12. 0x00c53a1d: (/app/build/tr2/win/game/game_flow/sequencer.c:89:14) M_HandlePlayLevel
libtrx/log_windows.c 58 M_StackTrace 13. 0x00d1d0d9: (/app/build/tr2/win/../../../src/tr2/subprojects/libtrx/game/game_flow/sequencer.c:35:22) GF_InterpretSequence
libtrx/log_windows.c 58 M_StackTrace 14. 0x00c541eb: (/app/build/tr2/win/game/game_flow/sequencer_misc.c:33:13) GF_DoLevelSequence
libtrx/log_windows.c 58 M_StackTrace 15. 0x00ca7144: (/app/build/tr2/win/game/shell/common.c:392:26) Shell_Main
libtrx/log_windows.c 58 M_StackTrace 16. 0x00caf47c: (/app/build/tr2/win/main.c:16:5) SDL_main
libtrx/log_windows.c 58 M_StackTrace 17. 0x00d50d63: (/SDL/build/../src/main/windows/SDL_windows_main.c:80:14) main_getcmdline

@rr-
Copy link
Collaborator Author

rr- commented Feb 1, 2025

Thanks. The crash should be now fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internal The invisible stuff TR1 TR2
Projects
Status: In review
Development

Successfully merging this pull request may close these issues.

3 participants