Merge branch 'main' into z64-remove

This commit is contained in:
Dragorn421 2025-05-30 17:33:03 +02:00
commit b4fc3324bb
No known key found for this signature in database
GPG Key ID: 381AEBAF3D429335
3 changed files with 11 additions and 12 deletions

View File

@ -269,11 +269,10 @@ typedef enum PlayerDoorType {
/* 3 */ PLAYER_DOORTYPE_FAKE /* 3 */ PLAYER_DOORTYPE_FAKE
} PlayerDoorType; } PlayerDoorType;
typedef enum PlayerFacePart { typedef struct PlayerFaceIndices {
/* 0 */ PLAYER_FACEPART_EYES, /* 0x0 */ u8 eyeIndex;
/* 1 */ PLAYER_FACEPART_MOUTH, /* 0x1 */ u8 mouthIndex;
/* 2 */ PLAYER_FACEPART_MAX } PlayerFaceIndices; // size = 0x2
} PlayerFacePart;
typedef enum PlayerEyes { typedef enum PlayerEyes {
/* 0 */ PLAYER_EYES_OPEN, /* 0 */ PLAYER_EYES_OPEN,

View File

@ -970,7 +970,7 @@ s32 Player_GetEnvironmentalHazard(PlayState* play) {
return envHazard + 1; 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`. // 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_OPEN, PLAYER_MOUTH_CLOSED }, // PLAYER_FACE_NEUTRAL
{ PLAYER_EYES_HALF, PLAYER_MOUTH_CLOSED }, // PLAYER_FACE_NEUTRAL_BLINKING_HALF { 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 the eyes index provided by the animation is negative, use the value provided by the `face` argument instead
if (eyesIndex < 0) { if (eyesIndex < 0) {
eyesIndex = sPlayerFaces[face][PLAYER_FACEPART_EYES]; eyesIndex = sPlayerFaces[face].eyeIndex;
} }
#ifndef AVOID_UB #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 the mouth index provided by the animation is negative, use the value provided by the `face` argument instead
if (mouthIndex < 0) { if (mouthIndex < 0) {
mouthIndex = sPlayerFaces[face][PLAYER_FACEPART_MOUTH]; mouthIndex = sPlayerFaces[face].mouthIndex;
} }
#ifndef AVOID_UB #ifndef AVOID_UB

View File

@ -233,9 +233,9 @@ def find_symbols_by_name(
def print_map_file(map_file: mapfile_parser.mapfile.MapFile, *, colors: bool): def print_map_file(map_file: mapfile_parser.mapfile.MapFile, *, colors: bool):
for segment in map_file: for segment in map_file:
print( print(
f"{colorama.Fore.GREEN if colors else ""}" f"{colorama.Fore.GREEN if colors else ''}"
f"{segment.name}" f"{segment.name}"
f"{colorama.Fore.RESET if colors else ""}" f"{colorama.Fore.RESET if colors else ''}"
) )
for file in segment: for file in segment:
# Ignore debug sections # Ignore debug sections
@ -246,9 +246,9 @@ def print_map_file(map_file: mapfile_parser.mapfile.MapFile, *, colors: bool):
): ):
continue continue
print( print(
f"{colorama.Fore.CYAN if colors else ""}" f"{colorama.Fore.CYAN if colors else ''}"
f" {file.asStr()}" f" {file.asStr()}"
f"{colorama.Fore.RESET if colors else ""}" f"{colorama.Fore.RESET if colors else ''}"
) )
for sym in file: for sym in file:
vram_str = f"{sym.vram:08X}" vram_str = f"{sym.vram:08X}"