summaryrefslogtreecommitdiff
path: root/src/code/z_player_lib.c
diff options
context:
space:
mode:
authorDerek Hensley <hensley.derek58@gmail.com>2025-05-29 06:17:38 -0700
committerGitHub <noreply@github.com>2025-05-29 09:17:38 -0400
commit8a95f90b2071d74b3627ec3222d263ef9a367277 (patch)
treeaf8b59f8cecc6adf5aff15fb7c536c6073471003 /src/code/z_player_lib.c
parentd62bf87542a2482f2f9930da1dad81ce2c3e7d8e (diff)
sPlayerFaces as array of structs instead of 2d array (#2559)
Diffstat (limited to 'src/code/z_player_lib.c')
-rw-r--r--src/code/z_player_lib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c
index 1ac27fdb6..d0f04de1c 100644
--- a/src/code/z_player_lib.c
+++ b/src/code/z_player_lib.c
@@ -970,7 +970,7 @@ s32 Player_GetEnvironmentalHazard(PlayState* play) {
return envHazard + 1;
}
-u8 sPlayerFaces[PLAYER_FACE_MAX][PLAYER_FACEPART_MAX] = {
+PlayerFaceIndices sPlayerFaces[PLAYER_FACE_MAX] = {
// The first 6 faces defined must be default blinking faces. See relevant code in `Player_UpdateCommon`.
{ PLAYER_EYES_OPEN, PLAYER_MOUTH_CLOSED }, // PLAYER_FACE_NEUTRAL
{ PLAYER_EYES_HALF, PLAYER_MOUTH_CLOSED }, // PLAYER_FACE_NEUTRAL_BLINKING_HALF
@@ -1093,7 +1093,7 @@ void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dL
// If the eyes index provided by the animation is negative, use the value provided by the `face` argument instead
if (eyesIndex < 0) {
- eyesIndex = sPlayerFaces[face][PLAYER_FACEPART_EYES];
+ eyesIndex = sPlayerFaces[face].eyeIndex;
}
#ifndef AVOID_UB
@@ -1104,7 +1104,7 @@ void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dL
// If the mouth index provided by the animation is negative, use the value provided by the `face` argument instead
if (mouthIndex < 0) {
- mouthIndex = sPlayerFaces[face][PLAYER_FACEPART_MOUTH];
+ mouthIndex = sPlayerFaces[face].mouthIndex;
}
#ifndef AVOID_UB