Improve appearance for some age-restricted items #649
Merged
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.
Normally the game draws the Hylian Shield mesh because its ID in the adult model is the same value used for the Deku Stick mesh in the child model. But in the adult model there is also an unused mesh for an untextured N64-style Deku Stick, and once enabled with a simple patch it behaves correctly. To solve the texture issue, another hack changes its
materialIndex
to be the same as the bow mesh, so it looks wooden.adult_stick.mp4
When I first added the patches to enable those items as child, I looked at the draw functions to skip over the code that was causing crashes. But as it turns out, the real issue was in the init function instead: the textures for the laser and circle are CMAB files stored in the global
zelda_keep
object, so they're always loaded regardless of age; Grezzo added a (seemingly useless) age check to only apply those CMAB textures if Link is adult. So a simple patch to skip the age check is enough to make the textures draw correctly.child_hovers.mp4
I made some attempts to improve other models too, like the hookshot tip as child, but that requires fetching data from both Link objects, which I haven't had any success with yet. So for now I thought I would PR the two things above, then we'll see if something can be figured out for the rest.