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

inject: add PS1 crystal data #1513

Merged
merged 1 commit into from
Sep 15, 2024

Conversation

lahm86
Copy link
Collaborator

@lahm86 lahm86 commented Sep 14, 2024

Resolves #1506.

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

Description

This allows injections to replace an unused palette slot with a specific color, and so allows an alternative to matching to the existing level palette. Data provided for each case of the savegame crystal, and the relevant config options updated/provided. The colour used is #4040FF.

I initially had in-game code to find the unused palette slots, but it was considerably expensive on loading times, so instead opted for the individual injection files with the information pre-calculated.

I also adjusted the teleport command to check crystal status to avoid tp'ing to ones that are consumed, mainly to allow checking how the crystal reacts to the lighting in different areas of the level.

This adds an option to replace the default savegame crystal model with one that matches PS1, using palette colour #4040FF on the mesh.

@lahm86 lahm86 added Data Requires injecting content / files that are not a part of the original game Enhancement Improvement of an existing feature Priority: medium labels Sep 14, 2024
@lahm86 lahm86 added this to the 4.4 milestone Sep 14, 2024
@lahm86 lahm86 self-assigned this Sep 14, 2024
@lahm86 lahm86 requested review from a team as code owners September 14, 2024 11:09
@lahm86 lahm86 requested review from rr-, walkawayy and aredfan and removed request for a team September 14, 2024 11:09
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.

Let's hold on with this approach for now – I believe that rather than forcing the injected texture colors into the level palette, we really should start supporting true color textures.

src/game/console_cmd.c Outdated Show resolved Hide resolved
@lahm86
Copy link
Collaborator Author

lahm86 commented Sep 14, 2024

I've squashed out the console change and opened #1518 for that. Shall I just ditch this PR, or leave it open for reference for the time being?

@rr-
Copy link
Collaborator

rr- commented Sep 14, 2024

@lahm86 let's leave it open, I should be able to deliver the true color texturing today.

@rr-
Copy link
Collaborator

rr- commented Sep 14, 2024

Should be easier to implement with #1520 😌 Our options include adding a new function to append a palette color, performing a texture swap, or ideally just injecting the entire object.

This allows injecting a savegame crystal model replacement to match the
PS1 style.

Resolves LostArtefacts#1506.
@lahm86
Copy link
Collaborator Author

lahm86 commented Sep 15, 2024

Updated to make use of the new palette logic - so much easier!

@lahm86 lahm86 requested review from rr- and aredfan September 15, 2024 09:22
Copy link
Collaborator

@aredfan aredfan left a comment

Choose a reason for hiding this comment

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

I've checked one crystal per level, and all are showing the right colour as expected whether the purple tint option is enabled or disabled.

@lahm86 lahm86 merged commit a5b2fb9 into LostArtefacts:develop Sep 15, 2024
5 checks passed
@lahm86 lahm86 deleted the issue-1506-ps1-crystals branch September 15, 2024 13:13
@rr- rr- added the TR1 label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Data Requires injecting content / files that are not a part of the original game Enhancement Improvement of an existing feature TR1
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Restore PS1 purple colouring on save crystals
3 participants