Skip to content

Conversation

@Jameriquiah
Copy link

@Jameriquiah Jameriquiah commented Dec 25, 2025

This adds flipbook support to custom Fierce Deity models, otherwise normally the game would just crash upon loading a model with flipbooks set up on FD.

Obviously this has no effect on the vanilla FD Link model so he will still look exactly the same, its just for custom models.

Uses a new array for eyes and mouth, sFDEyesTextures and sFDMouthTextures.
Texture names for each eye and mouth frame models will need to use are:
gLinkFierceDeityEyesOpenTex
gLinkFierceDeityEyesHalfTex
gLinkFierceDeityEyesClosedTex
gLinkFierceDeityEyesRightTex
gLinkFierceDeityEyesLeftTex
gLinkFierceDeityEyesUpTex
gLinkFierceDeityEyesDownTex
gLinkFierceDeityEyesWincingTex

gLinkFierceDeityMouthClosedTex
gLinkFierceDeityMouthHalfTex
gLinkFierceDeityMouthOpenTex
gLinkFierceDeityMouthSmileTex

Textures also don't need to be resized to 64x64 as they aren't replacing any vanilla assets.

I also added support for Deku and Goron, only added Goron Mouth as the eyes already have flipbooks, just not as many frames. Important to note that Deku and Goron mouth do not animate at all so this literally serves no function pretty much, so I can remove it I don't mind. However with custom animations now being possible, it is possible for mod creators to assign these flipbook frames into their animations if they want to. Deku eyes seem to animate as you would expect.

New arrays for Deku are sDekuEyesTextures and sDekuMouthTextures.
Texture names are as follows:
gLinkDekuEyesOpenTex
gLinkDekuEyesHalfTex
gLinkDekuEyesClosedTex
gLinkDekuEyesRightTex
gLinkDekuEyesLeftTex
gLinkDekuEyesUpTex
gLinkDekuEyesDownTex
gLinkDekuEyesWincingTex

gLinkDekuMouthClosedTex
gLinkDekuMouthHalfTex
gLinkDekuMouthOpenTex
gLinkDekuMouthSmileTex

For Goron sGoronMouthTextures.
Textures are:
gLinkGoronMouthClosedTex
gLinkGoronMouthHalfTex
gLinkGoronMouthOpenTex
gLinkGoronMouthSmileTex

Build Artifacts

Copy link
Contributor

@Eblo Eblo left a comment

Choose a reason for hiding this comment

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

I'm on board with this, but I think the source footprint is unneeded. Do you have a custom FD mod that you can share so that I can test this?

sPlayerMouthTextures[PLAYER_FORM_FIERCE_DEITY][i] = (TexturePtr)sFDMouthTextures[i];
}

sFDFacePatchState = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

I can tell 0 means "not patched", but what's the significance between 1 or 2?

Copy link
Author

Choose a reason for hiding this comment

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

patch state 1 if for when no flipbooks are set, tells the game not to try again. patch state 2 is when it does detect flipbooks and also... actually does the same thing lol i probably dont need both in retrospect

Copy link
Contributor

@garrettjoecox garrettjoecox left a comment

Choose a reason for hiding this comment

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

While we're here, it seems reasonable to just add support for deku & goron no? Goron is a bit tricky though with it's abuse of PLAYER_EYES_WINCING

@Jameriquiah
Copy link
Author

Jameriquiah commented Dec 27, 2025

While we're here, it seems reasonable to just add support for deku & goron no? Goron is a bit tricky though with it's abuse of PLAYER_EYES_WINCING

i thought about it but it since flipbooks are tied to animations, i dont think they would really use them, maybe it would make deku blink or something idk lol. goron also prolly wouldnt use the mouth animations at all. could still be useful for custom animations tho since u could change the flipbook data to whatever u want

z_player_lib.c is no longer touched
@Jameriquiah
Copy link
Author

Jameriquiah commented Dec 27, 2025

implemented suggestions. z_player_lib.c is no longer touched

@Jameriquiah
Copy link
Author

Jameriquiah commented Dec 29, 2025

Updated it to include more forms, can remove Deku and Goron mouth if y'all would like me to.
Also fixed a critical oversight where the patch fails if it only detects one flipbook and not the other, which caused the game to crash, tweaked the code to check for eyes and mouth independently instead of together. This will allow mod creators to use either eyes or mouth and not the other if they choose.

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.

3 participants