Skip to content

Show level names in level info and recent files#1452

Merged
chreden merged 11 commits intomasterfrom
issue/1394
Oct 30, 2025
Merged

Show level names in level info and recent files#1452
chreden merged 11 commits intomasterfrom
issue/1394

Conversation

@chreden
Copy link
Owner

@chreden chreden commented Aug 3, 2025

Make best effort to show the in-game name of the loaded level.

Approaches included:

  • TOMBPC.DAT if present for 1-3
  • ENGLISH.DAT if present for 4-5
  • STRINGS.TXT for remasters if present
  • TR1/2X gameflow/text files if present
  • Last resort hash list for other level names

Includes an update to nlohmann json to be able to cope with the trailing commas in the TRX json files. All json parsing has been given extra flags to allow for comments and trailing commas.

Level names are shown in the recent files display and the level info. Sorting mode can be selected in the settings window.

The hashes list is incomplete but will be added to.

Closes #1394

@chreden chreden force-pushed the issue/1394 branch 2 times, most recently from 22a0380 to 65636c6 Compare October 4, 2025 09:35
start sorting names, read tr2x names

More trx parsing

Update nlohman json

Update to nlohman json 3ed64e502a6371311af3c2f309e6525b2f5f6f18
Use new parameter to allow trailing commas

Update IFiles.h
@chreden chreden added this to the Next milestone Oct 25, 2025
@chreden chreden changed the title Level names Show level names in level info and recent files Oct 29, 2025
@chreden chreden marked this pull request as ready for review October 29, 2025 00:06
@chreden chreden requested review from lahm86 and makotocchi October 29, 2025 00:07
@chreden chreden self-assigned this Oct 29, 2025
@chreden chreden enabled auto-merge (squash) October 29, 2025 00:07
@lahm86
Copy link
Collaborator

lahm86 commented Oct 29, 2025

Looks good. The only thing I noticed was case-sensitivity. For example, if I make level1.phd in TR1R lowercase, it doesn't recognise it. In TRX ("OG" install) there is a crash if there is a mismatch between case in the game flow path for the level and the file itself.

Handle case being different for names.
Handle path not being present (there are dummy entries in trx gameflow)
@chreden
Copy link
Owner Author

chreden commented Oct 29, 2025

Looks good. The only thing I noticed was case-sensitivity. For example, if I make level1.phd in TR1R lowercase, it doesn't recognise it. In TRX ("OG" install) there is a crash if there is a mismatch between case in the game flow path for the level and the file itself.

Thanks, handled the case mismatch. The crash was because it wasn't checking the path element was present and it made it all the way to the dummy elements.

@chreden chreden merged commit eeed72d into master Oct 30, 2025
1 check passed
@chreden chreden deleted the issue/1394 branch October 30, 2025 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show actual level names where possible

2 participants