Skip to content

Refactor and extend TR types#547

Merged
lahm86 merged 17 commits intoLostArtefacts:masterfrom
lahm86:issue-507-tr-types
Sep 18, 2023
Merged

Refactor and extend TR types#547
lahm86 merged 17 commits intoLostArtefacts:masterfrom
lahm86:issue-507-tr-types

Conversation

@lahm86
Copy link
Copy Markdown
Collaborator

@lahm86 lahm86 commented Sep 17, 2023

The main goal here is to get a step ahead of the next round of IO refactoring. The plan there is to have things such as models, entities and static meshes linked directly to type enums rather than using just numbers. This will eventually shift the specifics to the IO - so for example, TR2Entity has TypeID as a short but TRModel has it as a uint - these will become TR2Type in both cases and the necessary casting handled during IO instead of repeatedly throughout the solution.

Sorry this is another big one. It may be best going through commit-by-commit - here is a summary of the changes:

  • Each game now has a complete type enum and namespaces for each changed to TRLevelControl.Model to avoid using bloat everywhere
  • Explicit values have been assigned to each enum entry to make lookup easier
  • The enums have been renamed from TRXEntities to TRXType - this makes the difference clear between TRXEntity and its type
  • The type utility classes have been tidied up to match. No utility classes yet for 4/5 - this can be done when it's time to randomize those games
  • TRGE DLLs updated as they make use of weapon types in each game

@lahm86 lahm86 added this to the 1.8.0 milestone Sep 17, 2023
@lahm86 lahm86 self-assigned this Sep 17, 2023
@lahm86 lahm86 merged commit 0d39890 into LostArtefacts:master Sep 18, 2023
@lahm86 lahm86 deleted the issue-507-tr-types branch September 18, 2023 18:37
lahm86 added a commit to lahm86/TR-Rando that referenced this pull request Feb 12, 2024
@lahm86 lahm86 mentioned this pull request Feb 12, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants