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

Improve appearance for some age-restricted items #649

Merged
merged 3 commits into from
Mar 10, 2023

Conversation

HylianFreddy
Copy link
Collaborator

  • Deku Sticks will appear as actual sticks even when used as adult.
    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

  • The Hookshot red laser and the Hover Boots yellow circle will appear correctly even for child Link.
    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.

@gymnast86 gymnast86 merged commit 28e80a9 into gamestabled:main Mar 10, 2023
@HylianFreddy HylianFreddy deleted the better-age-restricted-items branch March 10, 2023 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants