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

camera: move cinematic frame data to TRX #2429

Merged
merged 9 commits into from
Feb 2, 2025

Conversation

lahm86
Copy link
Collaborator

@lahm86 lahm86 commented Feb 1, 2025

Resolves #2413.

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 moves cinematic frame and cutscene globals to TRX. It also extends the fix for #2413 into TR2, which I've tested by removing the frames in the OG levels.

For testing, we can check the cutscenes and all in-game cinematics are working (scion, Midas hand, Rig start, dragon dagger, HSH start/end).

This moves CINE_FRAME to TRX from TR2 and updates TR1 to use this
struct (identical to CINE_CAMERA previously).
This moves CINE_POSITION to TRX from TR1 and updates TR2 to use this
struct. It now has a full XYZ_16 for rotations, although arguably only
Y is used.
This moves g_CineTargetAngle into CINE_POSITION for TR2 only.
This introduces a common cine data container for frames. This will
later be made local to the camera.
This replaces the global g_CinePos with positional data within
CINE_DATA itself, reducing the need for an extra struct definition and
variable.
This moves cinematic frames into a new common camera cinematic module;
they should only be changed on level reading.

This also adds checks to TR2 in case there are no frames and a
cinematic is loaded.

Resolves LostArtefacts#2413.
This shifts cine frame reading to TRX.
This replaces the global cine data with an accessor.
This introduces a utility function for invoking an in-game cinematic to
reduce some code repetition.
@lahm86 lahm86 added OG bug A bug in original game Internal The invisible stuff TR2 TR1 labels Feb 1, 2025
@lahm86 lahm86 self-assigned this Feb 1, 2025
@lahm86 lahm86 requested review from a team as code owners February 1, 2025 21:46
@lahm86 lahm86 requested review from rr-, walkawayy, aredfan and a team and removed request for a team February 1, 2025 21:46
Copy link
Collaborator

@rr- rr- left a comment

Choose a reason for hiding this comment

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

Code LGTM

@lahm86 lahm86 merged commit 8565024 into LostArtefacts:develop Feb 2, 2025
8 checks passed
@lahm86 lahm86 deleted the trx-cinematic-cameras branch February 2, 2025 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internal The invisible stuff OG bug A bug in original game TR1 TR2
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Missing cinematic cameras cause special animations to crash
3 participants