The file select overlay: the Golden Sun logo, the start menu (new game, continue, copy and delete), the door to the Battle Arena and the transfer of a save's data, by link or as a password. More...
Go to the source code of this file.
Data Structures | |
| struct | SaveMenuSceneState |
| A view of the scene state that names its copy of the play time, checked against the loaded game's. More... | |
| struct | SaveLinkGreeting |
| A linked console's signature: four letters naming its language and game. More... | |
| struct | PasswordStats |
| A party member's base stats, which the password clamps and packs. More... | |
| struct | PasswordOwner |
| A party member as the password reads them: their level, base stats, inventory and Djinn. More... | |
Macros | |
| #define | CLEAR_PASSWORD_BUFFER_SIZE 320 |
| #define | CLEAR_LINK_WINDOW_X 6 |
| #define | CLEAR_LINK_WINDOW_WIDTH 18 |
| #define | CLEAR_LINK_LANGUAGE_TAG 'U' |
| #define | CLEAR_LINK_ERROR_WINDOW_X 5 |
| #define | CLEAR_LINK_ERROR_WINDOW_WIDTH 20 |
| #define | CLEAR_HELP_WINDOW_X 10 |
| #define | CLEAR_HELP_WINDOW_WIDTH 10 |
| #define | CLEAR_PAGE_LABEL_X 80 |
| #define | CLEAR_MESSAGE_WINDOW_X 1 |
| #define | CLEAR_MESSAGE_WINDOW_WIDTH 28 |
| #define | PASSWORD_SYMBOLS_PER_PAGE 50 |
| #define | PASSWORD_SYMBOL_MASK 0x3f |
| #define | CLEAR_EXTRA_CODE_HELD (*(s16 *)&gClear_ExtraCodeHeld) |
| Whether a key of the extra code is still held. | |
| #define | CLEAR_SEQUENCE_KEYS(sequence) |
Functions | |
| static s32 | Clear_PackPasswordData (s32 unused, s32 mode, u8 *out) |
| Packs selected flags, levels, Djinn and optional stats/inventories/coins. | |
| static s32 | Clear_EncodePassword (u8 *data, s32 size, u8 *out) |
| Obscures the packed bytes and emits position-adjusted six-bit password symbols. | |
| static u16 | Clear_ComputePasswordCrc16 (u32 byteCount, u8 *data) |
| Runs the original shift/subtract checksum, initially 0xffff, and returns its complemented low 16 bits. | |
| u8 * | Clear_GetEntrances (void) |
| The file select overlay's scene tables, for the scene loader: one entrance, the exit, and no placements or events. | |
| s32 | SceneData_ReturnZero (void) |
| u8 * | Clear_GetExits (void) |
| u8 * | Clear_GetPlacements (void) |
| u8 * | Clear_GetEvents (void) |
| static void | Clear_LoadBackground (void) |
| Loads the Golden Sun logo, maps its tiles and resets background scroll. | |
| static void | Clear_UpdateBlend (void) |
| Advances the logo blend every two frames and removes itself at completion. | |
| static void | Clear_CheckButtonCodes (void) |
| Tracks two hidden key sequences, requiring a full release after each key. | |
| static void | Clear_NameEntryCharacter (s32 cell, u8 *text) |
| Converts a six-bit password symbol to the edition's one- or two-byte glyph. | |
| static s32 | Clear_GetSaveRecoveryBlockMask (void) |
| Returns -1 when the flagged saved scene blocks recovery, otherwise zero. | |
| s32 | __divsi3 (s32, s32) |
| s32 | SaveMenu_Run (void) |
| Runs new/continue/copy/delete, arena entry and save-data transfer/password menus. | |
| static UNUSED void | SaveMenu_FillTileGrid (struct UiWindow *window, const void *compressedTiles) |
| UNUSED: decodes tiles and maps a 16-by-eight window region in VRAM and shadow. | |
| static UNUSED void | SaveMenu_FillTileBlock (const struct UiWindow *window) |
| UNUSED: fills a 16-by-eight region with palette 15 tiles beginning at tile 32. | |
Variables | |
| const u16 | gClear_CodeSequence [] |
| Hidden command: sequence of pressed keys, terminated by 0. | |
| const u16 | gClear_ExtraCodeSequence [] |
| struct SceneEntrance | gClear_Entrances [] |
| u32 | gClear_Exits [] |
| struct ScenePlacement | gClear_Placements [] |
| struct SceneEvent | gClear_Events [] |
| s16 | gClear_BlendFrame = 0 |
| s16 | gClear_CodeUnlocked = 0 |
| s16 | gClear_ExtraCodeUnlocked = 0 |
| s16 | gClear_CodeProgress = 0 |
| s16 | gClear_ExtraCodeProgress = 0 |
| s16 | gClear_CodeHeld = 0 |
| s32 | gClear_ExtraCodeHeld = 0 |
| u32 | gClear_PasswordMembers [] |
| u32 | gClear_PasswordFlags [] |
| u32 | gClear_PasswordKeyItems [] |
| u16 | gClear_PasswordStackItems [] |
The file select overlay: the Golden Sun logo, the start menu (new game, continue, copy and delete), the door to the Battle Arena and the transfer of a save's data, by link or as a password.
Definition in file clear.c.
| #define CLEAR_PASSWORD_BUFFER_SIZE 320 |
Definition at line 54 of file clear.c.
Referenced by SaveMenu_Run().
| #define CLEAR_LINK_WINDOW_X 6 |
Definition at line 64 of file clear.c.
Referenced by SaveMenu_Run().
| #define CLEAR_LINK_WINDOW_WIDTH 18 |
Definition at line 65 of file clear.c.
Referenced by SaveMenu_Run().
| #define CLEAR_LINK_LANGUAGE_TAG 'U' |
Definition at line 79 of file clear.c.
Referenced by SaveMenu_Run().
| #define CLEAR_LINK_ERROR_WINDOW_X 5 |
Definition at line 87 of file clear.c.
Referenced by SaveMenu_Run().
| #define CLEAR_LINK_ERROR_WINDOW_WIDTH 20 |
Definition at line 88 of file clear.c.
Referenced by SaveMenu_Run().
| #define CLEAR_HELP_WINDOW_X 10 |
Definition at line 96 of file clear.c.
Referenced by SaveMenu_Run().
| #define CLEAR_HELP_WINDOW_WIDTH 10 |
Definition at line 97 of file clear.c.
Referenced by SaveMenu_Run().
| #define CLEAR_PAGE_LABEL_X 80 |
Definition at line 101 of file clear.c.
Referenced by SaveMenu_Run().
| #define CLEAR_MESSAGE_WINDOW_X 1 |
Definition at line 114 of file clear.c.
Referenced by SaveMenu_Run().
| #define CLEAR_MESSAGE_WINDOW_WIDTH 28 |
Definition at line 115 of file clear.c.
Referenced by SaveMenu_Run().
| #define PASSWORD_SYMBOLS_PER_PAGE 50 |
Definition at line 118 of file clear.c.
Referenced by SaveMenu_Run().
| #define PASSWORD_SYMBOL_MASK 0x3f |
Definition at line 119 of file clear.c.
Referenced by Clear_EncodePassword(), and SaveMenu_Run().
| #define CLEAR_EXTRA_CODE_HELD (*(s16 *)&gClear_ExtraCodeHeld) |
Whether a key of the extra code is still held.
UB: the flag is a word the code reads and writes as its low halfword; UBFIX uses the word.
Definition at line 126 of file clear.c.
Referenced by Clear_CheckButtonCodes().
| #define CLEAR_SEQUENCE_KEYS | ( | sequence | ) |
Definition at line 233 of file clear.c.
Referenced by Clear_CheckButtonCodes().
Packs selected flags, levels, Djinn and optional stats/inventories/coins.
Clamps the source base stats and levels in place; returns the raw byte count.
Definition at line 946 of file clear.c.
Referenced by Clear_PackPasswordData(), and SaveMenu_Run().
Obscures the packed bytes and emits position-adjusted six-bit password symbols.
Definition at line 1155 of file clear.c.
Referenced by Clear_EncodePassword(), and SaveMenu_Run().
Runs the original shift/subtract checksum, initially 0xffff, and returns its complemented low 16 bits.
Definition at line 1207 of file clear.c.
Referenced by Clear_ComputePasswordCrc16(), and SaveMenu_Run().
| u8 * Clear_GetEntrances | ( | void | ) |
The file select overlay's scene tables, for the scene loader: one entrance, the exit, and no placements or events.
Definition at line 135 of file clear.c.
Referenced by Clear_GetEntrances().
| u8 * Clear_GetExits | ( | void | ) |
Definition at line 139 of file clear.c.
Referenced by Clear_GetExits().
| u8 * Clear_GetPlacements | ( | void | ) |
Definition at line 141 of file clear.c.
Referenced by Clear_GetPlacements().
| u8 * Clear_GetEvents | ( | void | ) |
Definition at line 143 of file clear.c.
Referenced by Clear_GetEvents().
|
static |
Loads the Golden Sun logo, maps its tiles and resets background scroll.
Definition at line 146 of file clear.c.
Referenced by Clear_LoadBackground(), and SaveMenu_Run().
|
static |
Advances the logo blend every two frames and removes itself at completion.
Definition at line 195 of file clear.c.
Referenced by Clear_UpdateBlend(), and SaveMenu_Run().
|
static |
Tracks two hidden key sequences, requiring a full release after each key.
Definition at line 238 of file clear.c.
Referenced by Clear_CheckButtonCodes(), and SaveMenu_Run().
Converts a six-bit password symbol to the edition's one- or two-byte glyph.
Definition at line 283 of file clear.c.
Referenced by Clear_NameEntryCharacter(), and SaveMenu_Run().
|
static |
Returns -1 when the flagged saved scene blocks recovery, otherwise zero.
Definition at line 341 of file clear.c.
Referenced by Clear_GetSaveRecoveryBlockMask(), and SaveMenu_Run().
| s32 SaveMenu_Run | ( | void | ) |
Runs new/continue/copy/delete, arena entry and save-data transfer/password menus.
Returns zero after choosing a destination; cancellation returns to selection.
Definition at line 372 of file clear.c.
Referenced by SaveMenu_Run().
UNUSED: decodes tiles and maps a 16-by-eight window region in VRAM and shadow.
Definition at line 855 of file clear.c.
Referenced by SaveMenu_FillTileGrid().
UNUSED: fills a 16-by-eight region with palette 15 tiles beginning at tile 32.
Definition at line 885 of file clear.c.
Referenced by SaveMenu_FillTileBlock().
| const u16 gClear_CodeSequence[] |
Hidden command: sequence of pressed keys, terminated by 0.
Definition at line 217 of file clear.c.
Referenced by Clear_CheckButtonCodes().
| const u16 gClear_ExtraCodeSequence[] |
Definition at line 221 of file clear.c.
Referenced by Clear_CheckButtonCodes().
| struct SceneEntrance gClear_Entrances[] |
Definition at line 1233 of file clear.c.
Referenced by Clear_GetEntrances().
| u32 gClear_Exits[] |
Definition at line 1238 of file clear.c.
Referenced by Clear_GetExits().
| struct ScenePlacement gClear_Placements[] |
Definition at line 1242 of file clear.c.
Referenced by Clear_GetPlacements().
| struct SceneEvent gClear_Events[] |
Definition at line 1246 of file clear.c.
Referenced by Clear_GetEvents().
| s16 gClear_BlendFrame = 0 |
Definition at line 1250 of file clear.c.
Referenced by Clear_UpdateBlend().
| s16 gClear_CodeUnlocked = 0 |
Definition at line 1252 of file clear.c.
Referenced by Clear_CheckButtonCodes(), and SaveMenu_Run().
| s16 gClear_ExtraCodeUnlocked = 0 |
Definition at line 1254 of file clear.c.
Referenced by Clear_CheckButtonCodes(), and SaveMenu_Run().
| s16 gClear_CodeProgress = 0 |
Definition at line 1256 of file clear.c.
Referenced by Clear_CheckButtonCodes().
| s16 gClear_ExtraCodeProgress = 0 |
Definition at line 1258 of file clear.c.
Referenced by Clear_CheckButtonCodes().
| s16 gClear_CodeHeld = 0 |
Definition at line 1260 of file clear.c.
Referenced by Clear_CheckButtonCodes().
| u32 gClear_PasswordMembers[] |
Definition at line 1265 of file clear.c.
Referenced by Clear_PackPasswordData().
| u32 gClear_PasswordFlags[] |
Definition at line 1269 of file clear.c.
Referenced by Clear_PackPasswordData().
| u32 gClear_PasswordKeyItems[] |
Definition at line 1273 of file clear.c.
Referenced by Clear_PackPasswordData().
| u16 gClear_PasswordStackItems[] |
Definition at line 1277 of file clear.c.
Referenced by Clear_PackPasswordData().