Tweak: Refactor 3D drops handling#3071
Merged
garrettjoecox merged 3 commits intoHarbourMasters:developfrom Aug 20, 2023
Merged
Conversation
Contributor
Author
PurpleHato
approved these changes
Jul 12, 2023
Member
PurpleHato
left a comment
There was a problem hiding this comment.
LGTM!
Great refactor and nice addition to the bombhus drop!
garrettjoecox
approved these changes
Aug 7, 2023
Contributor
garrettjoecox
left a comment
There was a problem hiding this comment.
Ultimately this minimizes the original code changes while restoring authentic code/behavior
Sign me up. Would be neat if I could somehow see a diff of just the new changes on top of the original source but I'll hunt that down later. Great work
| shouldColor = CVarGetInteger("gCosmetics.Consumable_RedRupee.Changed", 0); | ||
| break; | ||
| case 3: | ||
| case 4: // orange rupee texture corresponds to the purple rupee (authentic bug) |
Contributor
There was a problem hiding this comment.
we like authentic bugs around here
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR aims to refactor and improve the 3D drops handling to address bugs when toggling on/off and simplify the logic.
The way 3d drops worked before was applying a different actor scale, yOffset and sometimes shadowScale either during actor init or actor update/draw. This resulted in having to constantly apply the original or 3d drop specific values which lead to the drops flashing or ending up in a stuck state when toggled on/off.
Instead, this PR uses the pattern that the authentic game does for making recovery hearts 3D, by applying a
Matrix_Scale. Doing this I was able to remove all the actor scale yOffset changes such that all the drops uses the authentic game values now, and only when 3d drops is only do we apply theMatrix_Scaleto make the GID appear as the right size. This resolves any lingering issues with toggling on the fly and ensures actor properties aren't left in a partially modified state.Ultimately this minimizes the original code changes while restoring authentic code/behavior. I have verified all drops have an appropriate scale with these changes.
Notable bug fixes in these changes:
ITEM00_BOMB_SPECIALwas using the arrow GID instead of the bomb GIDNotable additions:
Notable change:
Previously when 3d drops are on, the "red" rupees in the Shooting gallery tracker section where being switched from purple (authentic) to red. This was due to the GID for gold rupees matching the color. The problem is that the game authentically incorrectly labels gold rupees as pink, and purple rupees as orange, and so this "adjustment" was used to make the rupee match the red ones in the mini-game. After swapping the GID to match this behavior (pink using purple GID), I have removed this change as it was only applied to 3d drops and was changing authentic behavior beyond what the toggle implies.
So now the progress tracker rupees are correctly their "pink" variant (purple GID when 3d drops are on).
Admittedly, this PR is doing a bit, so I am targeting develop as it is more of a refactor than just "bug fixes" alone. I can rebase if we prefer it for Sulu instead.
Fixes #1343
Build Artifacts