pull in startMode docs (#4988)

This commit is contained in:
briaguya
2025-02-03 15:58:49 -08:00
committed by GitHub
parent c7f335f23c
commit 8ae8770db8
2 changed files with 69 additions and 45 deletions

View File

@@ -7,6 +7,29 @@
struct Player;
// Determines behavior when spawning. See `PlayerStartMode`.
#define PLAYER_GET_START_MODE(thisx) (thisx->params & 0xF00) >> 8
typedef enum PlayerStartMode {
/* 0 */ PLAYER_START_MODE_NOTHING, // Update is empty and draw function is NULL, nothing occurs. Useful in cutscenes, for example.
/* 1 */ PLAYER_START_MODE_TIME_TRAVEL, // Arriving from time travel. Automatically adjusts by age.
/* 2 */ PLAYER_START_MODE_BLUE_WARP, // Arriving from a blue warp.
/* 3 */ PLAYER_START_MODE_DOOR, // Unused. Use a door immediately if one is nearby. If no door is in usable range, a softlock occurs.
/* 4 */ PLAYER_START_MODE_GROTTO, // Arriving from a grotto, launched upward from the ground.
/* 5 */ PLAYER_START_MODE_WARP_SONG, // Arriving from a warp song.
/* 6 */ PLAYER_START_MODE_FARORES_WIND, // Arriving from a Farores Wind warp.
/* 7 */ PLAYER_START_MODE_KNOCKED_OVER, // Knocked over on the ground and flashing red.
/* 8 */ PLAYER_START_MODE_UNUSED_8, // Unused, behaves the same as PLAYER_START_MODE_MOVE_FORWARD_SLOW.
/* 9 */ PLAYER_START_MODE_UNUSED_9, // Unused, behaves the same as PLAYER_START_MODE_MOVE_FORWARD_SLOW.
/* 10 */ PLAYER_START_MODE_UNUSED_10, // Unused, behaves the same as PLAYER_START_MODE_MOVE_FORWARD_SLOW.
/* 11 */ PLAYER_START_MODE_UNUSED_11, // Unused, behaves the same as PLAYER_START_MODE_MOVE_FORWARD_SLOW.
/* 12 */ PLAYER_START_MODE_UNUSED_12, // Unused, behaves the same as PLAYER_START_MODE_MOVE_FORWARD_SLOW.
/* 13 */ PLAYER_START_MODE_IDLE, // Idle standing still, or swim if in water.
/* 14 */ PLAYER_START_MODE_MOVE_FORWARD_SLOW, // Take a few steps forward at a slow speed (2.0f), or swim if in water.
/* 15 */ PLAYER_START_MODE_MOVE_FORWARD, // Take a few steps forward, using the speed from the last exit (gSaveContext.entranceSpeed), or swim if in water.
/* 16 */ PLAYER_START_MODE_MAX // Note: By default, this param has 4 bits allocated. The max value is 16.
} PlayerStartMode;
typedef enum PlayerSword {
/* 0 */ PLAYER_SWORD_NONE,
/* 1 */ PLAYER_SWORD_KOKIRI,