45#include "text/msg_ids.h"
54#define CLEAR_PASSWORD_BUFFER_SIZE 320
56#define CLEAR_PASSWORD_BUFFER_SIZE 260
59#if (LANGUAGE == LANGUAGE_GERMAN) || (LANGUAGE == LANGUAGE_SPANISH) || \
60 (LANGUAGE == LANGUAGE_FRENCH) || (LANGUAGE == LANGUAGE_ITALIAN)
61#define CLEAR_LINK_WINDOW_X 4
62#define CLEAR_LINK_WINDOW_WIDTH 22
64#define CLEAR_LINK_WINDOW_X 6
65#define CLEAR_LINK_WINDOW_WIDTH 18
68#if (LANGUAGE == LANGUAGE_GERMAN)
69#define CLEAR_LINK_LANGUAGE_TAG 'E'
70#elif (LANGUAGE == LANGUAGE_FRENCH)
71#define CLEAR_LINK_LANGUAGE_TAG 'F'
72#elif (LANGUAGE == LANGUAGE_SPANISH)
73#define CLEAR_LINK_LANGUAGE_TAG 'S'
74#elif (LANGUAGE == LANGUAGE_ITALIAN)
75#define CLEAR_LINK_LANGUAGE_TAG 'I'
76#elif (LANGUAGE == LANGUAGE_JAPANESE)
77#define CLEAR_LINK_LANGUAGE_TAG 'C'
79#define CLEAR_LINK_LANGUAGE_TAG 'U'
82#if (LANGUAGE == LANGUAGE_GERMAN) || (LANGUAGE == LANGUAGE_SPANISH) || \
83 (LANGUAGE == LANGUAGE_FRENCH) || (LANGUAGE == LANGUAGE_ITALIAN)
84#define CLEAR_LINK_ERROR_WINDOW_X 4
85#define CLEAR_LINK_ERROR_WINDOW_WIDTH 22
87#define CLEAR_LINK_ERROR_WINDOW_X 5
88#define CLEAR_LINK_ERROR_WINDOW_WIDTH 20
91#if (LANGUAGE == LANGUAGE_SPANISH) || (LANGUAGE == LANGUAGE_FRENCH) || \
92 (LANGUAGE == LANGUAGE_ITALIAN)
93#define CLEAR_HELP_WINDOW_X 8
94#define CLEAR_HELP_WINDOW_WIDTH 13
96#define CLEAR_HELP_WINDOW_X 10
97#define CLEAR_HELP_WINDOW_WIDTH 10
101#define CLEAR_PAGE_LABEL_X 80
103#define CLEAR_PAGE_LABEL_X 0
106#if (LANGUAGE == LANGUAGE_GERMAN) || (LANGUAGE == LANGUAGE_SPANISH) || \
107 (LANGUAGE == LANGUAGE_FRENCH) || (LANGUAGE == LANGUAGE_ITALIAN)
108#define CLEAR_MESSAGE_WINDOW_X 0
109#define CLEAR_MESSAGE_WINDOW_WIDTH 30
110#elif (LANGUAGE == LANGUAGE_JAPANESE)
111#define CLEAR_MESSAGE_WINDOW_X 3
112#define CLEAR_MESSAGE_WINDOW_WIDTH 24
114#define CLEAR_MESSAGE_WINDOW_X 1
115#define CLEAR_MESSAGE_WINDOW_WIDTH 28
118#define PASSWORD_SYMBOLS_PER_PAGE 50
119#define PASSWORD_SYMBOL_MASK 0x3f
124#define CLEAR_EXTRA_CODE_HELD gClear_ExtraCodeHeld
126#define CLEAR_EXTRA_CODE_HELD (*(s16 *)&gClear_ExtraCodeHeld)
171 for (
y = 0;
y < 20;
y++) {
172 for (
x = 0;
x < 30;
x++)
174 *tilemap++ = blankTile;
175 *tilemap++ = blankTile;
178 for (
y = 0;
y <= 3;
y++) {
201 level = (
u16)frame >> 1;
231#define CLEAR_SEQUENCE_KEYS(sequence) (sequence)
233#define CLEAR_SEQUENCE_KEYS(sequence) \
234 (((struct { u16 key[1]; } *)(sequence))->key)
280#undef CLEAR_SEQUENCE_KEYS
286#if (LANGUAGE != LANGUAGE_JAPANESE)
288 text[0] = cell +
'A';
290 text[0] = cell +
'A' + 1;
292 text[0] = cell +
'A' + 2;
296 text[0] = cell +
'A';
298 text[0] = cell +
'A' + 1;
300 text[0] = cell +
'A' + 2;
319 text[0] = cell - 111;
326 text[0] = cell + 104;
351 return -((
u32)(-sceneDifference | sceneDifference) >> 31);
391 s32 requiredLinkMask;
392 s32 linkConnectionOk;
394 s32 passwordHeadingMessage;
442 if (blendStarted == 0) {
584 linkMessage = MsgClearSaveLabel;
601 for (peerIndex = 0; peerIndex != 4; peerIndex++) {
617 u32 peer = ((control << 26) >> 30) ^ 1;
622 if (received[1] ==
'V') {
623 if (received[2] ==
'T') {
624 if (received[3] ==
'S') {
646 requiredLinkMask = 3;
647 linkConnectionOk = 1;
648 for (v7 = 0; v7 <= 0x927bf; v7++) {
650 if ((requiredLinkMask &
gLinkStatus) == requiredLinkMask) {
654 linkConnectionOk = 0;
662 if (linkConnectionOk == 0) {
697 saveData[encodedSize] = (
u16)sum >> 8;
698 saveData[encodedSize + 1] = sum;
709 passwordHeadingMessage = MsgClearPasswordLabel;
710 headingWindow = (
struct UiWindow *)windowHandle;
713 if (pageCount == 1) {
715 helpWindow = (
struct UiWindow *)windowHandle;
721 helpWindow = (
struct UiWindow *)windowHandle;
738 pageIndex = (pageIndex + 1);
740 if (pageIndex == pageCount) {
753 wrappedPage = pageIndex + pageCount;
757 wrappedPage = pageIndex + pageCount;
762 wrappedPage = (wrappedPage % pageCount);
764 pageIndex = wrappedPage;
768 v5 = passwordHeadingMessage;
780 if (pageCount != 0) {
783 tileValue = v7 + 0xf301;
784 if (v7 == pageIndex) {
785 tileValue = v7 + 0xf30b;
788 v7 + 18 - pageCount, -1, v6);
790 }
while (v7 != pageCount);
794 (17 - (
s32)pageCount), -1, 0);
803 if (v6 > encodedSize) {
807 v7 != v6; v7++, pageGlyphIndex++) {
815 passwordColumn = (v7 % 10);
816 if (passwordColumn > 4) {
819 glyphColumn = (pageGlyphIndex % 10);
820 row = (pageGlyphIndex / 10);
826 glyphColumn = (pageGlyphIndex % 10);
856 const void *compressedTiles) {
867 offset = (window->
y * 32 + window->
x) * 2;
868 vram = (
u16 *)(0x06002000 + offset);
869 shadow = (
u16 *)((
u8 *)shadow + offset);
870 for (row = 0; row <= 7; row++) {
871 for (col = 0; col <= 15; col++) {
872 s16 tile = (window->
width * row + col) | 0xf000;
893 cell = window->
y * 32 + window->
x;
894 vram = (
s16 *)0x06002000 + cell;
899 s32 tile = base + 32;
903 s16 value = tile | -0x1000;
911 }
while (remaining >= 0);
975 for (i = 0; i != length; i++) {
983 for (i = 0; i != 8; i++) {
988 for (i = 0; i != 6; i++) {
994 for (i = 0; i != 4; i++) {
999 if (stats->
baseHp > 1999) {
1005 if (stats->
basePp > 1999) {
1025 packedStats[i * 2] =
1029 if (owner->
level > 99) {
1032 if (owner->
level == 0) {
1035 levelBits |= owner->
level << (i * 7);
1036 for (j = 0; j != 4; j++) {
1039 for (j = 0; j != 15; j++) {
1042 for (k = 0; k != 8; k++) {
1044 keyItemBits |= 1 << k;
1054 for (i = 0; i != 4; i++) {
1058 for (n = 0; n != 15; n++) {
1063 out[outputIndex] += item >> (bitOffset + 1);
1064 out[outputIndex + 1] += item << (7 - bitOffset);
1067 if (bitOffset == 7) {
1076 for (i = 0; i != 4; i++) {
1081 for (m = 0; m != 23; m++) {
1085 for (n = 0; n != 15; n++) {
1088 j = (owner->
inventory[n] & 0xf800) >> 11;
1095 if (bitOffset < 0) {
1096 out[outputIndex] += (
u16)j >> -bitOffset;
1100 out[outputIndex] += (
u16)j << bitOffset;
1102 if (bitOffset == -5) {
1115 s32 statsOffset = 8 + (mode != 0);
1117 for (i = 0; i != 2; i++) {
1118 out[statsOffset] = packedStats[i * 4] >> 24;
1119 out[statsOffset + 1] = packedStats[i * 4] >> 16;
1120 out[statsOffset + 2] = packedStats[i * 4] >> 8;
1121 out[statsOffset + 3] = packedStats[i * 4];
1122 out[statsOffset + 4] = packedStats[i * 4 + 1] >> 24;
1123 out[statsOffset + 5] = packedStats[i * 4 + 1] >> 16;
1124 out[statsOffset + 6] = packedStats[i * 4 + 1] >> 8;
1125 out[statsOffset + 7] = packedStats[i * 4 + 1];
1126 out[statsOffset + 7] |= packedStats[i * 4 + 2] >> 28;
1127 out[statsOffset + 8] = packedStats[i * 4 + 2] >> 20;
1128 out[statsOffset + 9] = packedStats[i * 4 + 2] >> 12;
1129 out[statsOffset + 10] = packedStats[i * 4 + 2] >> 4;
1130 out[statsOffset + 11] = packedStats[i * 4 + 2] << 4;
1131 out[statsOffset + 11] |= packedStats[i * 4 + 3] >> 28;
1132 out[statsOffset + 12] = packedStats[i * 4 + 3] >> 20;
1133 out[statsOffset + 13] = packedStats[i * 4 + 3] >> 12;
1134 out[statsOffset + 14] = packedStats[i * 4 + 3] >> 4;
1140 out[1] = levelBits >> 8;
1141 out[2] = levelBits >> 16;
1142 out[3] = (levelBits >> 20 & 0xf0) | (djinnBits & 0x0f);
1143 out[4] = djinnBits >> 4;
1144 out[5] = djinnBits >> 12;
1145 out[6] = djinnBits >> 20;
1148 out[8] = keyItemBits;
1168 xorKey = data[size - 1];
1170 for (i = 0; i != size - 1; i++)
1179 for (j = 0; j != 6; j++) {
1180 sourceBit = (data[inputIndex] >> (7 - inputBit)) & 1;
1182 if (inputBit == 8) {
1186 symbol |= sourceBit << (5 - j);
1187 if (inputIndex == size)
1191 out[symbolCount++] = symbol;
1193 if (groupSymbols == 9) {
1198 }
while (inputIndex != size);
1200 for (i = 0; i != symbolCount; i++)
1214 if (byteCount != 0) {
1219 if ((crc & 0x8000) != 0) {
1220 crc = (crc << 1) + 0xFFFFEFDF;
1225 }
while (bitIndex != 8);
1228 }
while (byteIndex != byteCount);
1234 {0,
CONDITION_ALWAYS, 0, 0, 0,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
1270 0x9510941, 0x8d108b3, 0x868081e,
1274 0xc900c8, 0xcb00ca, 0xcd00cc, 0xcf00ce,
1278 180, 181, 182, 183, 186, 187, 188, 189,
1279 191, 192, 193, 194, 195, 196, 226, 227,
1280 228, 229, 236, 238, 239, 240, 241,
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
s32 SaveMenu_Run(void)
Runs new/continue/copy/delete, arena entry and save-data transfer/password menus.
#define CLEAR_MESSAGE_WINDOW_WIDTH
static s32 Clear_PackPasswordData(s32 unused, s32 mode, u8 *out)
Packs selected flags, levels, Djinn and optional stats/inventories/coins.
#define CLEAR_EXTRA_CODE_HELD
Whether a key of the extra code is still held.
u8 * Clear_GetExits(void)
#define CLEAR_SEQUENCE_KEYS(sequence)
static UNUSED void SaveMenu_FillTileBlock(const struct UiWindow *window)
UNUSED: fills a 16-by-eight region with palette 15 tiles beginning at tile 32.
#define PASSWORD_SYMBOL_MASK
#define CLEAR_LINK_ERROR_WINDOW_WIDTH
u32 gClear_PasswordFlags[]
s16 gClear_ExtraCodeProgress
static s32 Clear_GetSaveRecoveryBlockMask(void)
Returns -1 when the flagged saved scene blocks recovery, otherwise zero.
struct SceneEntrance gClear_Entrances[]
const u16 gClear_ExtraCodeSequence[]
#define CLEAR_HELP_WINDOW_X
#define CLEAR_LINK_LANGUAGE_TAG
static void Clear_CheckButtonCodes(void)
Tracks two hidden key sequences, requiring a full release after each key.
#define CLEAR_LINK_ERROR_WINDOW_X
static void Clear_LoadBackground(void)
Loads the Golden Sun logo, maps its tiles and resets background scroll.
u16 gClear_PasswordStackItems[]
const u16 gClear_CodeSequence[]
Hidden command: sequence of pressed keys, terminated by 0.
s16 gClear_ExtraCodeUnlocked
#define CLEAR_PASSWORD_BUFFER_SIZE
u8 * Clear_GetPlacements(void)
#define CLEAR_LINK_WINDOW_WIDTH
#define CLEAR_MESSAGE_WINDOW_X
#define CLEAR_HELP_WINDOW_WIDTH
struct ScenePlacement gClear_Placements[]
static void Clear_NameEntryCharacter(s32 cell, u8 *text)
Converts a six-bit password symbol to the edition's one- or two-byte glyph.
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.
struct SceneEvent gClear_Events[]
#define CLEAR_PAGE_LABEL_X
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_GetEvents(void)
u32 gClear_PasswordKeyItems[]
u8 * Clear_GetEntrances(void)
The file select overlay's scene tables, for the scene loader: one entrance, the exit,...
u32 gClear_PasswordMembers[]
static s32 Clear_EncodePassword(u8 *data, s32 size, u8 *out)
Obscures the packed bytes and emits position-adjusted six-bit password symbols.
static void Clear_UpdateBlend(void)
Advances the logo blend every two frames and removes itself at completion.
#define CLEAR_LINK_WINDOW_X
#define PASSWORD_SYMBOLS_PER_PAGE
The engine calls the debug menus import, and their palette swatch tiles.
DMA channel registers, and the DMA and CPU fills.
static __inline__ void Dma_Set(const volatile void *source, volatile void *destination, u32 control, volatile u32 *channel)
Starts a DMA transfer: stores the source, destination and control words into channel's registers with...
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
The engine call layer: one typed inline for each of the thirteen main-image routines below that the s...
static s32 FieldScheduler_AddCallback(SchedulerCallback callback, s32 priority)
Registers a main-image scheduler callback.
static s32 FieldResource_DecodeType01(const void *source, void *destination)
Decodes type-01 compressed data.
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
u8 * Engine_ResourceGetTableEntry(s32 resource)
s32 Engine_TaskRemoveCallback(void(*callback)(void))
void Engine_EventCloseScreen(void)
void Engine_EventWaitForScreen(void)
void Engine_EventOpenScreen(void)
void Engine_BlendSetDarkenTarget16(s32 target)
void Engine_GameFlagSet(s32 flag)
s32 Engine_GameFlagIsSet(s32 flag)
void Engine_EventWait(s32 frames)
The scene table formats: entrances, exits, placements and events, and the macros that write them.
#define SCENE_EXITS(scene)
void GameFlag_ClearBit(s32 flag)
Clears flag.
Game flags, named where their meaning is shown.
#define FLAG_RETREAT_BLOCKED
Retreat is blocked, from Psynergy or an item.
#define FLAG_KEEP_PARTY_POSITION
#define FLAG_INVENTORY_SNAPSHOT
Set while the Colosso holds the party's equipment (the inventory snapshot).
#define FLAG_IN_LINK_LOBBY
Set when the cleared game's menu goes to the link lobby: there Psynergy has no effect and the system ...
#define FLAG_MENU_OPEN
Set while the field menu is open; scenes hold their moving actors still.
The frame loop's globals: lag counts, the CPU load display and the VBlank flags.
volatile u8 gSleepDisabled
Nonzero: WaitFrames counts no idle time and ignores sleep requests.
u8 gDebugMode
Debug builds: Start+Select pauses the frame loop.
volatile u8 gIdleSleepEnabled
Sleep after three idle minutes.
void UiText_ShowPositionedMessageAndWait(s32 message, s32 flags)
Shows a message in a window centred on the screen, waits until it is typed out and closes it.
GameState, the game's state: play time, coins, the scene and the leader's position,...
struct GameState gGameState
The work slots of gWorkSlot, read through their own names.
u16 gLinkPeerSignatures[][12]
24 bytes per peer
The screen blend's globals and the graphics routines.
void * Runtime_BumpAllocateAlternatePool(s32 size)
As MemAlloc, but tries EWRAM first.
The hardware's I/O registers and their bits, as pret names them.
#define BLDCNT_EFFECT_BLEND
weighted by REG_BLDALPHA
#define BLEND_ALPHA(top, bottom)
A REG_BLDALPHA value: top and bottom are the two targets' weights, out of 16.
The register write queue that VBlank carries out after each finished frame.
#define IO_WRITE_QUEUE_PUSH(address, value, control)
Disables interrupts to add one register write or DMA to the queue; a write to a full queue is dropped...
Items: their definitions, types, flags and effects.
struct ItemDefinition * Item_Get(s32 item)
The keypad state the VBlank interrupt keeps.
volatile u32 gKeysHeld
Keys down now.
volatile u32 gKeysPressed
Keys that went down this frame.
s32 SceneData_ReturnZero(void)
The heaps: allocating and freeing blocks.
void Runtime_BumpFree(void *buffer)
The reel game's title lettering.
s32 NameEntry_EditOwnerName(s32 member)
The name entry screen for party member member: the player types a name of up to NAME_MAX_LETTERS lett...
s32 Menu_AskYesNo(s32 atBottom)
Asks yes or no at the top of the screen, or at the bottom with atBottom set.
void Event_SetDestination(s32 scene, s32 entrance)
Makes the event leave for the given entrance of the given scene: raises the exit request 999 and writ...
void PaletteGlow_Update(s32 phase, s32 brightness)
Sets the window colours (BG palette 15, colours 4 to 10) for a window hue (0 to 23) and brightness (0...
s32 Party_RemoveActiveOwner(s32 owner)
Takes character owner out of the party: clears its game flag and closes the gap it leaves in gGameSta...
s32 Party_AddActiveOwner(s32 owner)
Adds character owner to the end of the party: sets its game flag and appends it to gGameState....
void Link_DrawShiftedTilePair(s32 offset)
Animates the two link indicator tiles with opposing two/three-pixel shifts.
void Graphics_ExpandVramTilesByColorTable(u16 *dst)
Expands two palette variants of the ten source tile rows at 0x06000600, mapping each packed nibble th...
The work pointers in the gWorkSlot table, by name.
#define Ram_MapCellBuffer
Resource numbers, named where their contents are known.
char ResourceId_GoldenSunLogo
FIELD_AT_OFFSET and the entity and camera views older scene code reads.
Scene numbers, named after their places.
s32 SerialRuntime_BeginSend(void *source, s32 size)
Starts sending size bytes from source to the partner in 20-byte blocks: sets the send source,...
void SerialRuntime_RemoveIrqHandlers(void)
Clears gSerialExchangeActive, which stops the per-frame exchange, and removes the link interrupt hand...
void SerialRuntime_Initialize(void)
Resets the serial port into multiplayer mode, installs the serial and timer 3 interrupt handlers,...
The link cable's runtime: serial packets, registers and transfer state.
volatile u16 gLinkStatus
Link status, updated by the VBlank exchange handler.
struct SerialTransferState gSerialTransfer
void InventorySnapshot_Restore(void)
Gives back the inventories, shortcuts and party order InventorySnapshot_Save put aside,...
Song and sound effect ids, indices into gSound_SongTable.
#define SE_MENU_CURSOR_MOVE
struct EventWork * gEventWork
void Engine_AudioPlayCue()
s32 startTransition
SCENE_TRANSITION(style, variant).
u16 requestedExit
the exit kind taken, which ends the scene
A field actor: a person or thing on the field with a position, motion toward a target,...
u8 motionFlags
ActorMotionFlag bits; zero is free flight in 3D, and 3 is set on creation.
The game's state: play time, coins, the scene and the leader's position, the active party and the opt...
u8 paletteGlow[2]
window hue (0 to 24), brightness
u32 playTime
frames, copied from gPlayTimeFrames when saving
u32 buildStamp
Runtime_GetBuildStampTime's value when the game was last saved; its low half goes into the file's sum...
u8 unk20f
Set on saving at the end of the game; copied to the file's summary as sendFlag.
u8 idleSleepEnabled
the option, saved from gIdleSleepEnabled
s16 sceneVariant
the current scene's variant from its record
s32 selectedActor
the leader: its unit and its actor
s16 savedScene
where a defeat returns to without a defeat point
s16 savedEntrance
where a defeat returns to without a defeat point
A party member as the password reads them: their level, base stats, inventory and Djinn.
struct PasswordStats stats
A party member's base stats, which the password clamps and packs.
A linked console's signature: four letters naming its language and game.
A scene entrance: where and facing which way the party arrives, and the camera's bounds there (-1 for...
A scene event: its kind and detail, the trigger it answers, its condition and its value (a message or...
An actor a scene places: its sprite, the condition for placing it, how it behaves,...
u8 payload[20]
one block of the data sent
The window system's work: the windows' tilemap, the windows, the three text channels,...
u16 tilemap[640]
the windows' BG tilemap, 32 by 20 tiles
A window: a framed rectangle of the tilemap with its sprite outputs, its opening or closing animation...
The system's routines and globals: interrupts, BIOS sound bias, random numbers and sleep.
Values that differ by patch level or language, chosen once for their code.
void Ui_LoadWindowGraphics(void)
Loads the window font and frame tiles into BG character block 0, the window palette into BG palette 1...
The kanji glyphs and the text marks drawn with characters.
@ TEXT_MARK_VOICED
the voiced mark (dakuten)
void UiText_DrawResource(s32 message, struct UiWindow *window, s32 x, s32 y)
Decodes a message and draws it into a text canvas window at pixel (x, y).
void UiText_DrawString(const u8 *text, struct UiWindow *window, s32 x, s32 y)
Draws a byte string into a text canvas window at pixel (x, y).
void UiWindow_DrawDividerLine(struct UiWindow *win, u32 x1, u32 y1, u32 x2, u32 y2)
Draws a straight divider line inside a window from tile (x1, y1) to (x2, y2), horizontal or vertical:...
void UiText_DrawCharacterAtOffset(s32 message, const struct UiWindow *window, u32 offsetX, u32 offsetY)
Decodes a message and draws it as tiles in a window at pixel (offsetX, offsetY) of its interior.
The integer types, TRUE, UNUSED and the fixed-address macros.
UiWindow, a window's work, and marking its tilemap rows for transfer.
#define UiRender_MarkRow(render, y)
Requests transfer of the four-row tilemap band containing window row y.
#define UI_PAGE_ARROW_RIGHT
#define UI_PAGE_ARROW_LEFT
#define UI_PAGE_ARROW_VRAM
struct BattleUnit * UnitGet(u32 owner)
Returns the unit record of owner: 0 to 7 are the playable characters in the game state,...
void Party_BeginChildhood(void)
Sets FLAG_CHILDHOOD and recomputes Isaac, Garet and Jenna, whose classes then take their childhood fo...
void GameState_InitDefaults(void)
Clears the game-state header, scene state, flags and save stamp; sets a new game's defaults: Isaac al...
u32 Runtime_GetBuildStampTime(void)
Encodes the build-stamp time as ((hours * 16 + minutes) * 64 + seconds) with bit 12 set.
s32 Save_WriteSelectedSlot(void)
The Save command: lets the player choose a file (the current one first), asks whether to save over it...
s32 SaveState_DeleteSelectedSlot(void)
The file menu's Erase: lets the player choose a file, asks whether to erase it and on Yes deletes bot...
s32 SaveState_CopySlotPair(void)
The file menu's Copy: lets the player choose a file, reads both of its records into the save buffer a...
s32 SaveState_LoadRecordIntoWork(s32 mode)
Lets the player choose a file in save menu mode (see SaveMenuMode) and loads it into the save buffer ...
s32 SaveState_ScanRecordFlags(void)
Loads the save file summaries for the title menu and returns how many files there are: plus 100 when ...
void UiWork_FinalizePendingCore(void)
Closes each message channel's window whose text has ended, then waits ten frames.
void UiText_ShowCenteredMessage(s32 message, s32 mode, s32 yOffset)
Shows a message centred on the screen (yOffset tiles lower) and waits until it is typed out,...
void UiWindow_SetTilemapEntry(struct UiWindow *window, s32 value, s32 x, s32 y, u32 mode)
Writes value into a window's tilemap at tile (x, y) of its interior, with the palette mode names (TIL...
The window renderer's work.
void RenderOutput_PrepareForRedraw(struct UiWindow *window)
Clears a window's contents: redraws its empty frame and releases the render outputs it carries.
void UiWork_Finalize(struct UiWindow *window, s32 instant)
Closes a window: clears its contents and remembers its last rectangle.
struct UiWindow * UiWindow_Create(s32 x, s32 y, s32 width, s32 height, s32 attrs)
Opens a window at tile (x, y) of width by height tiles in the first free window slot,...