summaryrefslogtreecommitdiff
path: root/mm/src/code
diff options
context:
space:
mode:
authorlouist103 <35883445+louist103@users.noreply.github.com>2024-01-12 21:54:55 -0500
committerGarrett Cox <garrettjcox@gmail.com>2024-05-22 09:04:57 -0500
commitcf7264f072f5bd5fe78d34d5a5ad5fe921d97b8d (patch)
treeeb84250cf9411a18a6e4b172ac8a05ec78a263d8 /mm/src/code
parent59b355de5ea5496cb5625d4b7f2fa746ee803e1b (diff)
Fix faces for link.
Diffstat (limited to 'mm/src/code')
-rw-r--r--mm/src/code/z_player_lib.c99
1 files changed, 81 insertions, 18 deletions
diff --git a/mm/src/code/z_player_lib.c b/mm/src/code/z_player_lib.c
index fbdd95f8b..2a792d0f9 100644
--- a/mm/src/code/z_player_lib.c
+++ b/mm/src/code/z_player_lib.c
@@ -1631,22 +1631,85 @@ Gfx gCullFrontDList[] = {
gsSPEndDisplayList(),
};
-TexturePtr sPlayerEyesTextures[PLAYER_EYES_MAX] = {
- gLinkHumanEyesOpenTex, // PLAYER_EYES_OPEN
- gLinkHumanEyesHalfTex, // PLAYER_EYES_HALF
- gLinkHumanEyesClosedTex, // PLAYER_EYES_CLOSED
- gLinkHumanEyesRollRightTex, // PLAYER_EYES_ROLL_RIGHT
- gLinkHumanEyesRollLeftTex, // PLAYER_EYES_ROLL_LEFT
- gLinkHumanEyesRollUpTex, // PLAYER_EYES_ROLL_UP
- gLinkHumanEyesRollDownTex, // PLAYER_EYES_ROLL_DOWN
- object_link_child_Tex_003800, // PLAYER_EYES_7
-};
-
-TexturePtr sPlayerMouthTextures[PLAYER_MOUTH_MAX] = {
- gLinkHumanMouthClosedTex, // PLAYER_MOUTH_CLOSED
- gLinkHumanMouthTeethTex, // PLAYER_MOUTH_TEETH
- gLinkHumanMouthAngryTex, // PLAYER_MOUTH_ANGRY
- gLinkHumanMouthHappyTex, // PLAYER_MOUTH_HAPPY
+TexturePtr sPlayerEyesTextures[PLAYER_FORM_MAX][PLAYER_EYES_MAX] = {
+ {
+ // It doesn't seem to matter since it always has the same eyes
+ gLinkFierceDeityEyesTex,
+ gLinkFierceDeityEyesTex,
+ gLinkFierceDeityEyesTex,
+ gLinkFierceDeityEyesTex,
+ gLinkFierceDeityEyesTex,
+ gLinkFierceDeityEyesTex,
+ gLinkFierceDeityEyesTex,
+ },
+ {
+ gLinkGoronEyesOpenTex,
+ gLinkGoronEyesHalfTex,
+ gLinkGoronEyesClosedTex,
+ gLinkGoronEyesSurprisedTex,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ },
+ {
+ gLinkZoraEyesOpenTex,
+ gLinkZoraEyesHalfTex,
+ gLinkZoraEyesClosedTex,
+ gLinkZoraEyesRollRightTex,
+ gLinkZoraEyesRollLeftTex,
+ gLinkZoraEyesRollUpTex,
+ gLinkZoraEyesRollDownTex,
+ object_link_zora_Tex_003800,
+ },
+ {
+ object_link_nuts_Tex_0048B0,
+ object_link_nuts_Tex_0048B0,
+ object_link_nuts_Tex_0048B0,
+ object_link_nuts_Tex_0048B0,
+ object_link_nuts_Tex_0048B0,
+ object_link_nuts_Tex_0048B0,
+ object_link_nuts_Tex_0048B0,
+ object_link_nuts_Tex_0048B0,
+ },
+ {
+ gLinkHumanEyesOpenTex, // PLAYER_EYES_OPEN
+ gLinkHumanEyesHalfTex, // PLAYER_EYES_HALF
+ gLinkHumanEyesClosedTex, // PLAYER_EYES_CLOSED
+ gLinkHumanEyesRollRightTex, // PLAYER_EYES_ROLL_RIGHT
+ gLinkHumanEyesRollLeftTex, // PLAYER_EYES_ROLL_LEFT
+ gLinkHumanEyesRollUpTex, // PLAYER_EYES_ROLL_UP
+ gLinkHumanEyesRollDownTex, // PLAYER_EYES_ROLL_DOWN
+ object_link_child_Tex_003800, // PLAYER_EYES_7
+ },
+};
+
+TexturePtr sPlayerMouthTextures[PLAYER_FORM_MAX][PLAYER_MOUTH_MAX] = {
+ {
+ gLinkFierceDeityMouthTex,
+ gLinkFierceDeityMouthTex,
+ gLinkFierceDeityMouthTex,
+ gLinkFierceDeityMouthTex,
+ },
+ {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ },
+ {
+ gLinkZoraMouthClosedTex,
+ object_link_zora_Tex_004400,
+ gLinkZoraMouthAngryTex,
+ gLinkZoraMouthHappyTex,
+ },
+ { NULL, NULL, NULL, NULL },
+ {
+ gLinkHumanMouthClosedTex, // PLAYER_MOUTH_CLOSED
+ gLinkHumanMouthTeethTex, // PLAYER_MOUTH_TEETH
+ gLinkHumanMouthAngryTex, // PLAYER_MOUTH_ANGRY
+ gLinkHumanMouthHappyTex, // PLAYER_MOUTH_HAPPY
+ },
};
typedef struct PlayerFaceIndices {
@@ -1698,13 +1761,13 @@ void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dL
}
}
- gSPSegment(&gfx[0], 0x08, Lib_SegmentedToVirtual(sPlayerEyesTextures[eyeIndex]));
+ gSPSegment(&gfx[0], 0x08, Lib_SegmentedToVirtual(sPlayerEyesTextures[playerForm][eyeIndex]));
if (mouthIndex < 0) {
mouthIndex = sPlayerFaces[face].mouthIndex;
}
- gSPSegment(&gfx[1], 0x09, Lib_SegmentedToVirtual(sPlayerMouthTextures[mouthIndex]));
+ gSPSegment(&gfx[1], 0x09, Lib_SegmentedToVirtual(sPlayerMouthTextures[playerForm][mouthIndex]));
POLY_OPA_DISP = &gfx[2];