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

Inventory ring work #2228

Merged
merged 18 commits into from
Jan 7, 2025
Merged

Inventory ring work #2228

merged 18 commits into from
Jan 7, 2025

Conversation

rr-
Copy link
Collaborator

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

Scope of the changes

  • Cleans up inventory ring types
  • Moves about a half of the inventory ring code to libtrx
  • Introduces INV_RING_SOURCE to maintain individual ring item lists
  • Re-separates the TR1 inventory ring code from the inventory phaser (merging them together was a mistake)
  • Reaches acceptable code similarity between TR1 and TR2
  • Rewrites TR1 inventory phase to use the new executor flow
  • Updates the phase executor to deal with interpolation
  • Moves the most basic interpolation APIs to libtrx
  • Introduces an annoying boolean g_GameInfo.inv_ring_shown to deal with health bar occluding the FPS counter in TR1
  • Fixes OG bug: arrows visible during quick save even with no keys #2225

What's left

  • Rework the new fader to play nice with 60 FPS (it's terrible atm, so this PR keeps the old APIs.)
  • Rework fade effects in the inventory phaser to use the fader API.
  • Merge the inventory ring phasers from TR1 and TR2.
  • Later, merge remaining inventory code, which is currently full of small differences (control and draw routines).
  • Eventually, rewrite the overlay module to finally use the UI and its layout capabilities, or at least add a way to show/hide widgets given a widget enum. Kill some of the GAME_INFO members.

Testing

Inventory ring:

  • animations
  • fade effects
  • game flow behavior
  • executing game flow commands in the inventory and outside of it
  • exiting the inventory in any way you can imagine - to the title screen and to various game contexts
  • passport meshes
  • cycling between different rings
  • equipping guns
  • consuming medpacks/flares
  • consuming puzzle items by interacting with the keyhole with the action key
  • consuming puzzle items by going to the menu manually
  • examining items (Lahm's recent work)
  • trying to use keyholes without a key
  • inventory ring UIs (save game, load game dialog, assault course stats, compass, stopwatch)
  • equipping guns via inventory etc
  • turbo speed and how it affects animations and the compass needle
  • 30/60 FPS and how it affects animations and the compass needle
  • health bars / FPS counter / arrows occlusion
  • etc…

Others:

  • TR1 and TR2 cutscene sync over time (since we did change the executor)

@rr- rr- added OG bug A bug in original game Internal The invisible stuff TR2 TR1 labels Jan 7, 2025
@rr- rr- self-assigned this Jan 7, 2025
@rr- rr- requested review from a team as code owners January 7, 2025 01:46
@rr- rr- requested review from lahm86, walkawayy and aredfan and removed request for a team January 7, 2025 01:46
@aredfan
Copy link
Collaborator

aredfan commented Jan 7, 2025

I found this TR1 issue while testing, which is ongoing.

  • You can hear Lara speaking after loading a save or exiting to title, with these steps.
  1. have a savegame ready
  2. /set music-in-inventory 0
  3. /play 0
  4. when Lara is speaking, press F6
  5. load a savegame
  6. when the ring closes, you can hear Lara's voice for a brief moment

This issue also happens if you open the inventory and select a loadgame, or exit to title.

Edit: Testing is done, no more issues found. 👍

@rr-
Copy link
Collaborator Author

rr- commented Jan 7, 2025

Thank you @aredfan! Fixed.

@rr- rr- merged commit 4aa26ca into develop Jan 7, 2025
8 checks passed
@rr- rr- deleted the inv-ring branch January 7, 2025 18:22
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.

OG bug: arrows visible during quick save even with no keys
3 participants