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

Add photo mode to TR2 #2278

Merged
merged 10 commits into from
Jan 13, 2025
Merged

Add photo mode to TR2 #2278

merged 10 commits into from
Jan 13, 2025

Conversation

rr-
Copy link
Collaborator

@rr- rr- commented Jan 13, 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

Resolves #2277.

The controls UI got bloated – we'll address it later.
I added a couple of ugly #if TR_VERSION throughout the photo mode code, but that's because the viewport module APIs are fundamentally different in both games for now.
I reduced the flicker when capturing the screenshot to minimum, and added a fade-out effect when exiting the game while in photo mode (TR2 only).

@rr- rr- added Feature New functionality TR2 labels Jan 13, 2025
@rr- rr- self-assigned this Jan 13, 2025
@rr- rr- requested review from a team as code owners January 13, 2025 09:53
@rr- rr- requested review from lahm86, walkawayy and aredfan and removed request for a team January 13, 2025 09:53
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.

Looks great overall 👍

  • The camera is too high during starting animations (Rig and HSH). Other in-game cinematics seem OK (dagger pull, shower)
  • Should we change the default input to F11 in TR1 to match?

@rr-
Copy link
Collaborator Author

rr- commented Jan 13, 2025

Looks great overall 👍

  • The camera is too high during starting animations (Rig and HSH). Other in-game cinematics seem OK (dagger pull, shower)

Fixed, but it'll be good to have this thoroughly rechecked.

  • Should we change the default input to F11 in TR1 to match?

Oh yeah I forgot to ask about this. I wouldn't touch TR1 TBH, and instead, I'd remap TR2 controls. WDYT? For example something like this:

INPUT_KEYBOARD_ASSIGN(INPUT_ROLE_PAUSE,                       SDL_SCANCODE_P)
INPUT_KEYBOARD_ASSIGN(INPUT_ROLE_TOGGLE_UI,                   SDL_SCANCODE_H)
INPUT_KEYBOARD_ASSIGN(INPUT_ROLE_TOGGLE_PHOTO_MODE,           SDL_SCANCODE_F1)
INPUT_KEYBOARD_ASSIGN(INPUT_ROLE_TOGGLE_BILINEAR_FILTER,      SDL_SCANCODE_F3)
INPUT_KEYBOARD_ASSIGN(INPUT_ROLE_TOGGLE_PERSPECTIVE_FILTER,   SDL_SCANCODE_F4)
INPUT_KEYBOARD_ASSIGN(INPUT_ROLE_TOGGLE_FULLSCREEN,           SDL_SCANCODE_UNKNOWN)
INPUT_KEYBOARD_ASSIGN(INPUT_ROLE_TOGGLE_Z_BUFFER,             SDL_SCANCODE_F7)
INPUT_KEYBOARD_ASSIGN(INPUT_ROLE_CYCLE_LIGHTING_CONTRAST,     SDL_SCANCODE_F8)
INPUT_KEYBOARD_ASSIGN(INPUT_ROLE_SWITCH_INTERNAL_SCREEN_SIZE, SDL_SCANCODE_F10)
INPUT_KEYBOARD_ASSIGN(INPUT_ROLE_SWITCH_RESOLUTION,           SDL_SCANCODE_F11)
INPUT_KEYBOARD_ASSIGN(INPUT_ROLE_TOGGLE_RENDERING_MODE,       SDL_SCANCODE_F12)

@lahm86
Copy link
Collaborator

lahm86 commented Jan 13, 2025

Remapping TR2 inputs as above sounds ideal 👍

@rr-
Copy link
Collaborator Author

rr- commented Jan 13, 2025

Updated the bindings.

@aredfan
Copy link
Collaborator

aredfan commented Jan 13, 2025

Looks great! Just 2 issues to report:

  • The camera ends up in an odd position if pause is used during cutscenes.
  • It looks like photo mode isn't usable in cutscenes.

@rr- rr- force-pushed the tr2-photo-mode branch 2 times, most recently from 07342bd to ee06350 Compare January 13, 2025 12:53
@rr-
Copy link
Collaborator Author

rr- commented Jan 13, 2025

@aredfan both fixed. I might've introduced one-frame-off glitches with the game camera and/or with the cutscenes, though.

@aredfan
Copy link
Collaborator

aredfan commented Jan 13, 2025

@aredfan both fixed. I might've introduced one-frame-off glitches with the game camera and/or with the cutscenes, though.

Thank you. 👍

I found a couple of bugs in cutscenes.

Cutscene 2 in PR build:
20250113_130156_Opera_House
Cutscene 3 in PR build:
20250113_130203_Diving_Area
Cutscene 3 in dev snapshot:
20250113_130314_Diving_Area

@rr-
Copy link
Collaborator Author

rr- commented Jan 13, 2025

Thank you @aredfan for the patience – I only tested cutscene 1. Thanks to Lahm's fix it should be fixed now.

@rr- rr- merged commit 0282cdb into develop Jan 13, 2025
8 checks passed
@rr- rr- deleted the tr2-photo-mode branch January 13, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New functionality TR2
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add photo mode to TR2
3 participants