Go to the source code of this file.
Functions | |
| struct RenderOutput * | RenderOutput_Create (s32 slot, s32 oamFlags, struct UiWindow *window, s32 offsetX, s32 offsetY) |
| Creates a sprite output for the VRAM cache slot slot and attaches it to window, placed at (offsetX, offsetY) pixels from the window's inner corner (one tile in from its top-left border). | |
| struct RenderOutput * | RenderOutput_CreateFromResource (s32 mode, s32 resource, struct UiWindow *input, s32 x, s32 y) |
| Loads resource resource in loading mode mode into a VRAM slot and shows it as a 16x16 sprite at (x, y) in window. | |
| struct RenderOutput * | RenderOutput_CreateLoaded (s32 code, s32 layers, struct UiWindow *input, s32 x, s32 y) |
| Copies icon icon (with layers passed on to the copier) into a free VRAM slot and shows it as a 16x16 sprite at (x, y) in window. | |
| struct RenderOutput * | RenderOutput_CreateWithTransform (s32 icon, struct UiWindow *input, s32 x, s32 y) |
| Builds a 16x16 icon from frame pattern 1 with overlay pattern icon drawn over it, and shows it at (x, y) in window on draw layer 251. | |
| struct RenderOutput * | RenderOutput_CreateFromTable (s32 table_entry, struct UiWindow *input, s32 x, s32 y) |
| Loads the pattern at the start of gRenderResource_PairSourceTable into a free VRAM slot and shows it as a 16x16 sprite at (x, y) in window. | |
| struct RenderOutput * | CreateSideObject (s32 character, s32 unused, s32 side, struct UiWindow *window, s32 x, s32 y) |
| Shows the 32x32 portrait of character at (x, y) in window, in portrait slot side (0 or 1, or any other value for the first free one; the second is tried first). | |
| void | Ui_LoadCharacterEntryForSlot (u32 side, s32 character, s32 unused) |
| Reloads the portrait image of character into portrait slot side (0 or 1), keeping its sprite: used to change the picture of a portrait already on screen. | |
| void | RenderOutput_SetAnimation (struct RenderOutput *out, s32 mode) |
| Switches the sprite output out to animation mode from its first step. | |
| void | RenderOutput_SetInvertedSentinel (void *output, s32 priority) |
| Sets the draw layer of the sprite output output to 255 - priority, so a higher priority draws on a lower layer. | |
| void | UiWindow_FillFromScene (void *spans) |
| Fills spans with the horizontal extent of the windows on each of the 20 tile rows, read from the UI tilemap by the ARM routine Tile_BuildMetatiles copied into RAM. | |
| void | UiWindow_FillScreenBlockRect (s32 unused0, s32 unused1, u32 width, u32 height, s32 value) |
| Fills the top-left width x height tiles of the 32-tile-wide BG screen block at 0x06002000 with the tilemap entry value. | |
| void | UiWindow_BuildLayoutBounds (s32 flags) |
| Works out where the party status window goes for flags: one column per party member (those in battle when a battle is on), plus the Djinn column, right-aligned on the 30-tile screen row at the top. | |
| void | UiWindow_CreateWithLayoutBounds (s32 flags) |
| Opens the party status window with flags (see PARTY_STATUS_*) in a new heap block and draws it. | |
| void | UiWindow_DrawColumnBorders (struct UiWindow *window, u32 flags) |
| Draws the vertical lines between the members' columns of the party status window, with their top and bottom joints, at the offsets listed in gUiWindow_PartyColumnOffsets (shifted right past the Djinn column, whose own line comes first in the list). | |
| s32 | UiWindow_DrawStatusBarTiles (struct UiWindow *window, s32 x, s32 y, s32 length) |
| void | PartyStatusDraw (s32 flags) |
| Draws the party status window with flags (see PARTY_STATUS_*): each member's name, HP and optionally PP with their bars, and in battle the standby Djinn of each element. | |
| void | PartyStatus_Close (void) |
| Closes the party status window and frees its heap block. | |
| void | UiWindow_SetTileAttributeBitRect (const struct UiWindow *window, s32 x, s32 y, s32 width, s32 height, u32 set) |
| Sets (set 1) or clears (0) bit 12 of the tilemap entries of the width x height tile rectangle at (x, y) inside window, clipped to the screen: bit 12 is the lowest bit of the entry's palette number, so this switches the rectangle between two palettes. | |
| void * | Text_FormatPlayTime (s32 value, u8 *out) |
| Writes the play time frames (at 60 frames a second) into out as hours and minutes, "hhh:mm" with the hours right-aligned in three characters, and returns out. | |
| u32 | SaveState_FindFreeSummarySlot (void) |
| Returns the first save file whose summary shows it empty (level 0), or SAVE_NO_FREE_FILE when all three are in use. | |
| s32 | SaveState_CountRecordsExcludingFlagged (s32 flag) |
| Returns how many save files there are, leaving out those whose summary has its send flag set when excludeSent is nonzero, or SAVE_ERROR_NO_MEMORY when the backup memory cannot be read. | |
| s32 | SaveState_ScanRecordFlags (void) |
| Loads the save file summaries for the title menu and returns how many files there are: plus 100 when every file has its send flag set, or SAVE_ERROR_NO_MEMORY when the backup memory cannot be read. | |
| u32 | SaveState_BuildSummaryHeader (void) |
| Prepares the save buffer for writing: stamps the game state with the time and options, then fills the file summary shown on the file menus (the leader's name, level and class, the play time, area, coins, Djinn of each element, the party, the send flag and how many of game flags 48-127 are set) and its checksum, the sum of the 968 words from gGameFlagBytes on. | |
| s16 | SaveState_WriteCurrentSlotPair (void) |
| Saves the game to the current file (gSaveSlot): builds the summary and writes both halves of the save buffer. | |
| s32 | SaveState_WriteSlotPair (s32 arg0) |
| Writes both halves of the save buffer, as they are, to save file file. | |
| s32 | SaveState_ProcessSelectedSlot (void) |
| Writes the 64-byte save stamp (gSaveStamp, which lies in the first half of the save buffer) into the current file's first record, leaving the rest of the record as it was saved. | |
| s32 | SaveState_ConfirmAndProcessSelectedSlot (void) |
| Asks whether to save over the current file and, on Yes, writes the save stamp into it (SaveState_ProcessSelectedSlot) and says so. | |
| s32 | SaveState_CopySlotPair (void) |
| The file menu's Copy: lets the player choose a file, reads both of its records into the save buffer and writes them to the first empty file. | |
| s32 | SaveState_DeleteSelectedSlot (void) |
| The file menu's Erase: lets the player choose a file, asks whether to erase it and on Yes deletes both of its records. | |
| void | PaletteGlow_UpdateSine (void) |
| A scheduler callback that makes colours 8-11 of BG palette 14 glow: each follows a sine wave of the frame counter, eight frames behind the one before. | |
| void | PaletteGlow_Start (void) |
| Starts the palette glow (PaletteGlow_UpdateSine) in the scheduler. | |
| void | PaletteGlow_Stop (void) |
| void | UiWindow_FillTilemapRect (struct UiWindow *window, s32 x, s32 y, s32 width, s32 height) |
| Fills the width x height tile rectangle at (x, y) inside window, clipped to the screen as UiWindow_SetTileAttributeBitRect clips, with the blank tile entry 0xe006 of the UI tilemap. | |
| void | SaveMenu_ShowPartySprites (struct UiWindow *origin, s32 x, s32 y, struct SaveSummary *descriptor) |
| Shows the party of save file summary (up to four members) as sprites in a row from tile (x, y) inside window, and starts placing them every frame (SaveMenu_PlacePartySprites). | |
| void | SaveMenu_HidePartySprites (void) |
| Stops placing the party sprites of the save file menu and releases them. | |
| void | SaveMenu_PlacePartySprites (void) |
| A scheduler callback: draws each party sprite of the save file menu at its place and scale for this frame. | |
| void | SaveMenu_ShowDjinnSprites (struct UiWindow *origin, s32 x, s32 y) |
| Shows the four Djinn sprites, one for each element, in a row from tile (x, y) inside window, and starts placing them every frame (SaveMenu_PlaceDjinnSprites). | |
| void | SaveMenu_HideDjinnSprites (void) |
| Stops placing the Djinn sprites of the save file menu and releases them. | |
| void | SaveMenu_PlaceDjinnSprites (void) |
| A scheduler callback: draws each Djinn sprite of the save file menu at its place, at scale 1.0, for this frame. | |
| void | SaveMenu_DrawDjinnCounts (struct UiWindow *win, struct SaveSummary *row) |
| Draws the Djinn counts of save file summary, one for each element, two digits each, 24 pixels apart on row 16 of window, under the Djinn sprites. | |
| void | SaveMenu_DrawFileSummary (struct UiWindow *win, struct SaveSummary *rec) |
| Draws the summary of save file summary into window: the leader's name, level and class, the play time and the coins. | |
| s32 | SaveMenu_SelectSlot (s32 file, s32 mode) |
| s32 | Save_WriteSelectedSlot (void) |
| The Save command: lets the player choose a file (the current one first), asks whether to save over it when it has data, then saves the game to it, object table included, and makes it the current file. | |
| s32 | SaveState_LoadRecordIntoWork (s32 mode) |
| Lets the player choose a file in save menu mode (see SaveMenuMode) and loads it into the save buffer as the current file, restoring its play time and options. | |
| s32 | Resource_LoadFixedBlockBIntoFreeSlot (void) |
| Loads the pointing hand cursor's tiles (gResource_FixedBlockBTiles, 128 bytes) into a free VRAM slot and returns the slot. | |
| s32 | NameEntry_AcceptsMark (s32 mark, s32 letter) |
| The international name entry has no voicing marks: where the Japanese edition checks a mark against the letter before it, this edition keeps a function that accepts every character. | |
| s32 | NameEntry_CountLetters (const u8 *name) |
| void | UiWindow_CopyTilemapRegion (const struct UiWindow *window, const void *source) |
| Decompresses the type-01 tilemap source and copies it over window's rectangle, both into the BG screen block at 0x06002000 and into the UI tilemap that mirrors it. | |
| void | UiWindow_SetTileAttributeRect (const struct UiWindow *window, s32 x, s32 y, s32 width, s32 height, u32 palette) |
| Like UiWindow_SetTileAttributeBitRect, but ORs all of palette into the palette number of each entry (bits 12-15) after clearing only its lowest bit. | |
| void | Resource_CopyFixedBlockB (s32 slot) |
| Loads the pointing hand cursor's tiles into VRAM slot slot. | |
| void | Resource_CopyFixedBlockA (s32 slot) |
| Loads the 16x16 sprite gResource_FixedBlockATiles into VRAM slot slot. | |
| s32 | UiText_SetRenderString (const u8 *str) |
| Puts the string str into the UI's text entries and returns its width in pixels. | |
| void | UiText_DrawPaddedLabel (struct UiWindow *window, u8 *name) |
| Draws the name being entered, name, at the top left of window, with the free places up to its seventh character shown as underscores in text colour 2. | |
| s32 | NameEntry_EditOwnerName (s32 member) |
| The name entry screen for party member member: the player types a name of up to NAME_MAX_LETTERS letters on the keyboard and ends with End (or Start, which jumps there). | |
| s32 | PartyTalkMenu_Choose (s32 unused) |
| The Colosso choice of what to do: "Descriptions", "Cheer" or "Nothing", chosen with a pointing hand. | |
| void | Djinn_ShowJoinedMessage (s32 member, s32 element, s32 djinn) |
| Shows that a Djinni joined a member while the join fanfare (sound 81) plays, until it ends or A, B, L or R is pressed. | |
| s32 | Party_LookupCharacterValueByFlag32 (u32 index) |
| Returns the portrait character of party member member (0-8): from gCharacter_ChildSpriteTable during the prologue, from gCharacter_SpriteTable otherwise; 0 for any other member. | |
| void | Party_ShowJoinedMessage (s32 member) |
| Shows that a member joined the party while the join fanfare (sound 81) plays, until it ends or A, B, L or R is pressed. | |
| void | Party_ShowPairJoinedMessage (s32 first, s32 second) |
| Shows that two members joined the party while the join fanfare (sound 81) plays, until it ends or A, B, L or R is pressed. | |
| void | RenderResource_LoadPair (s32 picture, s32 slot) |
| Decompresses picture picture of gRenderResource_PairSourceTable (two 32x32 sprites side by side, 512 bytes) into VRAM slot slot. | |
| struct RenderOutput * | RenderResource_CreatePair (s32 picture, struct UiWindow *window, s32 x, s32 y) |
| Shows picture picture of gRenderResource_PairSourceTable as two 32x32 sprites side by side at (x, y) in window, on draw layer 253, and returns the left one (the right one follows it in the window's list). | |
| void | RenderOutput_BobPair (struct RenderOutput *obj) |
| Bobs the two sprites of a pair (see RenderResource_CreatePair) up and down by gUi_PairBobOffsets, one step every four frames. | |
| void | RenderResource_LoadFrame (s32 icon, s32 slot, s32 remap) |
| Decompresses command icon icon (a 32x32 picture of 256 colours, 1 KB) into VRAM slot slot, remapping its first 768 bytes' colours by table when remap is nonzero. | |
| struct RenderOutput * | RenderResource_CreateFrame (s32 icon, s32 remap, struct UiWindow *window, s32 x, s32 y) |
| Shows command icon icon (see RenderResource_LoadFrame) as a 32x32 256-colour sprite at (x, y) in window, on draw layer 251. | |
| void | Ui_ApplyTableScaleToObject (struct RenderOutput *obj) |
| Makes the sprite obj pulse: scales it about its centre by gUi_ObjectPulseScales (in 1/65536, used in 1/256), one step every two frames, and puts it on draw layer 252. | |
| s32 | Menu_BuildLocalizedPatternTiles (void) |
| int | UiWindow_DrawThreeTileColumn (struct UiWindow *window, s32 arg1, s32 arg2, s32 arg3, s32 unused) |
| void | Graphics_MergeShiftedTileRows (u32 *first, u32 *second, u32 *output, s32 shift) |
| Merges two 8x8 4bpp tiles row by row. | |
| 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 through gGraphics_ExpandNibbleTable. | |
| s32 | Resource_LoadTableEntryToBuffer (s32 resource, s32 index) |
| Composes a table-entry glyph in temporary transfer work, reloads its cache slot, then releases the temporary work and returns the tile index. | |
| s32 | ItemIcon_LoadIntoSlot (s32 resource, s32 index) |
| Composes the item icon with style 0x1a in temporary transfer work and reload the requested cache slot. | |
| s32 | Resource_LoadIndexedEntryToBuffer (s32 resource, s32 index) |
| Builds the ability glyph in temporary transfer work, reloads the requested cache slot and returns its tile index. | |
| s32 | UiGlyph_LoadPortrait (u32 member, s32 cacheSlot) |
| Loads a party portrait into the supplied cache slot and returns its tile. | |
| s32 | Ui_GetTableWordZero (s32 no) |
| Return gUi_FixedTileBlocks[0]; treat any nonzero no as 0 as well. | |
| void | UiIcon_Decompress (GlyphTransfer *work) |
| Copies the 4bpp decoder into RAM, calls it with the transfer's encoded source and byte buffer, then releases the copied code. | |
| struct UiWindow * | Link_CreateCountdownLabelWindow (void) |
| Creates the link timer window and draws its fixed time heading. | |
| s32 | Resource_LoadIndexedIntoBuffer (s32 arg0, s32 arg1) |
| Decodes a command-icon table entry in temporary transfer work and reload the requested cache slot. | |
| void | UiText_LoadRemappedGlyph (struct GlyphPalette *palette, s32 glyph, s32 tile) |
| Loads a command icon into 8bpp OBJ VRAM, sharing a compact palette across the selection's icons. | |
| void | UiText_DrawCharacter (struct SelectionWork *work, s32 index, u32 kind) |
| Loads a selection icon, initializes its sprite and binds the decoded tiles. | |
| void | Graphics_SetBg1Priority3 (void) |
| Puts BG1 behind the other priority levels while the command strip is active. | |
| void | Graphics_SetBg1Priority0 (void) |
| Restores BG1 priority 0; the VCount handler applies this below the strip. | |
| void | Graphics_InstallBg1VCountHandler (void) |
| Clears BG0 vertical scroll and installs the BG1 priority change at line 136. | |
| struct UiWindow * | UiText_ShowMessageAndWaitComplete (s32 message, s32 x, s32 y) |
| Opens a message at (x, y), waits for its text to finish, and returns its window so the caller can hold it open for a separate prompt. | |
| s32 | Menu_RunCommandRow (s32 mode) |
| Selects a command icon, returning its kind, -1 for cancel or -2 for a shoulder-button switch. | |
| void | Ui_SetRectHighlight (s32 x, s32 y, s32 width, s32 height, s32 alt) |
| Sets bit 12 of each tile in a screen-space rectangle, preserving the other tile attributes. | |
| s32 | BattleLayout_HighlightPartyPanels (u16 *ids) |
| Dims the party strip, then highlight the actor IDs up to the 0xff terminator. | |
| s32 | UiText_FormatNumberToHalfwords (s16 *out, s32 value) |
| s32 | DjinnMenu_ListChangedDjinn (const struct OwnerActionSlot *oldGrid, const struct OwnerActionSlot *newGrid, u16 *out, s32 *gained, s32 *lost) |
| List Psynergy in the new grid, marking newly gained entries with bit 15, then append lost entries with bit 14. | |
| s32 | Ui_CreateOutputFromResourceSlot (struct UiWindow *input, s32 x, s32 y, s32 ability) |
| struct UiWindow * | DjinnMenu_ShowChangePreview (struct UiWindow *win, s32 owner, s32 code, s32 page, s32 *pageCount) |
| Temporarily toggle a Djinni and recalculate its owner's stats to show the change. | |
| s32 | Ui_RunOwnerStatusScreen (u16 *list, s32 listCount, s32 owner) |
| Shows a party member's stats and condition help until B or the link session ends. | |
| s32 | Battle_SelectAbility (s32 owner, s32 unused) |
| Selects a Djinni for the current battle command. | |
| s32 | SummonMenu_SelectSummon (s32 unused0, s32 unused1, const u8 *standby) |
| Shows learned summons four per page; returns the selected summon number. | |
| s32 | Item_ClassifyUseAbility (s32 unit, s32 item) |
| Checks whether an item can be used in battle. | |
| void | Vram_CopyTile (u32 source_tile, u32 destination_tile) |
| Copies one 4bpp VRAM tile, ignoring the palette and flip bits of each entry. | |
| s32 | ItemList_SelectEntry (s32 owner, u16 *entries, s32 count) |
| Chooses an inventory-list position for battle use, or -1 on cancel. | |
| s32 | BattleMenu_RunActionSelection (s32 unitId, u16 *actions, s32 count) |
| Selects a Psynergy-list position, or -1 on cancel. | |
| s32 | BattleTarget_RunSelection (s32 selection, s32 mode, u32 spread, u32 kind) |
| Chooses a party/enemy target and animates its selection markers. | |
| void | UpdateLinkSessionCountdown (void) |
| Advances the link command-entry timer, slides the battle panels, and redraws the remaining seconds. | |
| s32 | UiText_ShowLocalizedMessageAndWait (void) |
| Tests whether this battle forbids escape. | |
| s32 | Battle_ClassifyEntryKind (const struct BattleAct *act) |
| Returns the target selection category for an ability's effect. | |
| s32 | Battle_CollectPartyCommands (struct BattleActionRecord *out, u16 *in, s32 count) |
| Collects commands in party order, including target, cost and randomized priority. | |
| void | AffineEffect_UpdateFrame (void) |
| Draws the resource-menu icons, pulsing the selected icon with one affine matrix, and updates the horizontal window spans to reveal the active icon row. | |
| void * | AffineEffect_InitializeWork (void) |
| Allocates and clears the resource-menu state, then schedules its icon pulse. | |
| void | Menu_EndResourceSelection (void) |
| Stops the icon pulse, closes the label window and releases each loaded icon before freeing the resource-menu state. | |
| s32 | Menu_RunResourceSelectionLoop (s32 initial) |
| Selects an icon position with wrapped directional input. | |
| s32 | Menu_SelectResource (s32 start, s32 goal) |
| Animates a cursor from start to goal with table-driven delays. | |
| void | Menu_LoadResourceSlot (s32 slot, s32 index) |
| Decodes one command-icon table entry into the requested VRAM cache slot. | |
| void | Menu_AppendResourceEntry (s32 no) |
| Appends a command icon if fewer than six are present. | |
| void | Menu_CenterResourceEntries (s32 row, s32 width, s32 resourceBase) |
| Centers the icons and their label window together on the given tile row. | |
| void | Menu_LayoutResourceEntries (s32 x, s32 y, s32 width, s32 resourceBase) |
| Places icons at three-tile intervals from (x, y), then creates their label window immediately to the right. | |
| s32 | Menu_SelectTopEntry (s32 selection) |
| Builds the field command menu, omitting Djinn when none are owned. | |
| s32 | Menu_AnimateSelectionToEntry (s32 arg0, s32 arg1) |
| Opens the field command menu and animates from start to the command's icon. | |
| s32 | Menu_SelectSaveSlotAction (void) |
| Builds the title menu from the save summaries and optional send flags. | |
| void | Menu_DrawModeLabel (void) |
| Redraws the password-level explanation when the selected level changes. | |
| void | Menu_DrawModeIndicator (void) |
| s32 | Menu_SelectResourceLayout (s32 mode) |
| Selects either the transfer method (mode 0) or password level. | |
| s32 | Menu_SelectShopCommand (s32 selection) |
| Selects a shop command, icons 0x11-0x14 (Buy, Sell, Artifacts, Repair), centered on row 17. | |
| s32 | Menu_SelectSanctumService (s32 selection) |
| Selects a sanctum service, icons 0x19-0x1c (Revive, Cure Poison, Repel Evil, Remove Curse), centered on row 17. | |
| s32 | Menu_RunConfirmSelection (s32 low, s32 message, s32 w, s32 selection) |
| Selects Yes/No (icons 5/6); canceling returns 1 (No). | |
| s32 | Menu_RunConfirmSelectionAt (s32 x, s32 y, s32 selection) |
| Selects Yes/No at (x, y); canceling returns 1 (No). | |
| s32 | Menu_SelectCoinsOrMedals (s32 selection) |
| Selects icons 0x20 and 0x21 (Coins, Lucky Medals) centered on row 17. | |
| void | DebugMenu_ScheduleSceneSelector (void) |
| Schedules the debug scene and entrance selector; 0xc80 is a scheduler order, not a number of frames to wait. | |
| void | Menu_DrawSelectionRow (struct UiWindow *work, s32 first, const s16 *second) |
| Draws the debug scene and entrance numbers with their category/area labels. | |
| s16 | Menu_RunSelection (void) |
| s32 | Menu_HandleSelectionRowInput (struct UiWindow *arg, s16 value, s16 *sub, s16 *mode) |
| Edits the debug scene or entrance, returning -1 to warp and -2 to cancel. | |
| s32 | Menu_RunSelectionWithCursorObject (void) |
| Shows a 16x16 flag grid per page and processes input until closed. | |
| void | Text_FormatHex (u32 value, u32 count, u8 *out) |
| Writes the lowest count digits of value, up to five, most significant first as uppercase hexadecimal in out, without a null terminator. | |
| void | Menu_DrawFlagBitTable (struct UiWindow *window, s32 start_flag) |
| Draws one page of 256 flags as sixteen rows of hexadecimal labels and bits. | |
| s32 | Menu_HandleFlagGridInput (struct UiWindow *window, s32 *page, s32 *cursor) |
| Moves within the flag grid, changes pages, or toggles the selected flag. | |
| void | Menu_ReservedNoOp (void) |
| Reserved menu entry. | |
| void | Djinn_SetFoundFlagAndAdd (s32 owner, s32 element, s32 index) |
| Sets the Djinni's collected flag, then adds it to the specified owner. | |
| s32 | Menu_RunWorkspaceResultLoop (void) |
| Handles Save, Sleep and Options from the field workspace. | |
| s32 | DebugMenu_BrowseIcons (void) |
| Browses pages of item, Psynergy and status-pattern icons, suspending the menu controller while the browser owns its window and cache entries. | |
| s32 | DebugMenu_BrowseEntryGlyphs (void) |
| Browses the character and sprite portrait maps as one circular list. | |
| struct RenderOutput * RenderOutput_Create | ( | s32 | slot, |
| s32 | oamFlags, | ||
| struct UiWindow * | window, | ||
| s32 | offsetX, | ||
| s32 | offsetY ) |
Creates a sprite output for the VRAM cache slot slot and attaches it to window, placed at (offsetX, offsetY) pixels from the window's inner corner (one tile in from its top-left border).
oamFlags holds the OAM shape and size bits. The sprite draws on layer 255 until the caller changes it. Returns the output, or NULL with the VRAM slot released when all outputs are in use.
Definition at line 13 of file outputs.c.
Referenced by CreateSideObject(), Debug_SelectAbilityPair(), DebugMenu_BrowseIcons(), NameEntry_EditOwnerName(), OptionMenu_Open(), PartyTalkMenu_Choose(), RenderOutput_Create(), RenderOutput_CreateFromResource(), RenderOutput_CreateFromTable(), RenderOutput_CreateLoaded(), RenderOutput_CreateWithTransform(), RenderResource_CreateFrame(), RenderResource_CreatePair(), SaveMenu_SelectSlot(), SystemMenu_Open(), and Ui_CreateOutputFromResourceSlot().
| struct RenderOutput * RenderOutput_CreateFromResource | ( | s32 | mode, |
| s32 | resource, | ||
| struct UiWindow * | window, | ||
| s32 | x, | ||
| s32 | y ) |
Loads resource resource in loading mode mode into a VRAM slot and shows it as a 16x16 sprite at (x, y) in window.
Returns NULL when it cannot be loaded.
Definition at line 63 of file outputs.c.
Referenced by RenderOutput_CreateFromResource().
| struct RenderOutput * RenderOutput_CreateLoaded | ( | s32 | icon, |
| s32 | layers, | ||
| struct UiWindow * | window, | ||
| s32 | x, | ||
| s32 | y ) |
Copies icon icon (with layers passed on to the copier) into a free VRAM slot and shows it as a 16x16 sprite at (x, y) in window.
Returns NULL when no slot is free.
Definition at line 78 of file outputs.c.
Referenced by RenderOutput_CreateLoaded().
| struct RenderOutput * RenderOutput_CreateWithTransform | ( | s32 | icon, |
| struct UiWindow * | window, | ||
| s32 | x, | ||
| s32 | y ) |
Builds a 16x16 icon from frame pattern 1 with overlay pattern icon drawn over it, and shows it at (x, y) in window on draw layer 251.
Returns NULL when no VRAM slot is free.
Definition at line 96 of file outputs.c.
Referenced by RenderOutput_CreateWithTransform().
| struct RenderOutput * RenderOutput_CreateFromTable | ( | s32 | tableEntry, |
| struct UiWindow * | window, | ||
| s32 | x, | ||
| s32 | y ) |
Loads the pattern at the start of gRenderResource_PairSourceTable into a free VRAM slot and shows it as a 16x16 sprite at (x, y) in window.
tableEntry is passed on to the loader, which loads that same pattern for every value. Returns NULL when no slot is free.
Definition at line 117 of file outputs.c.
Referenced by RenderOutput_CreateFromTable().
| struct RenderOutput * CreateSideObject | ( | s32 | character, |
| s32 | unused, | ||
| s32 | side, | ||
| struct UiWindow * | window, | ||
| s32 | x, | ||
| s32 | y ) |
Shows the 32x32 portrait of character at (x, y) in window, in portrait slot side (0 or 1, or any other value for the first free one; the second is tried first).
Each slot has its own palette, 14 or 15. In the prologue, characters 0 and 1 show portraits 18 and 19 instead. unused is passed on to the loader, which ignores it. Returns the sprite, or NULL when the character has no portrait or both slots are taken.
Definition at line 138 of file outputs.c.
Referenced by CreateSideObject(), and UiWindow_CreateWithSideObject().
Reloads the portrait image of character into portrait slot side (0 or 1), keeping its sprite: used to change the picture of a portrait already on screen.
With any other side, the slot already showing that character's portrait is used, and nothing happens when none does. unused is passed on to the loader, which ignores it.
Definition at line 185 of file outputs.c.
Referenced by Ui_LoadCharacterEntryForSlot().
| void RenderOutput_SetAnimation | ( | struct RenderOutput * | out, |
| s32 | mode ) |
Switches the sprite output out to animation mode from its first step.
Does nothing when out is NULL.
Definition at line 219 of file outputs.c.
Referenced by RenderOutput_SetAnimation().
| void RenderOutput_SetInvertedSentinel | ( | void * | output, |
| s32 | priority ) |
Sets the draw layer of the sprite output output to 255 - priority, so a higher priority draws on a lower layer.
Does nothing when output is NULL.
Definition at line 228 of file outputs.c.
Referenced by RenderOutput_SetInvertedSentinel().
| void UiWindow_FillFromScene | ( | void * | spans | ) |
Fills spans with the horizontal extent of the windows on each of the 20 tile rows, read from the UI tilemap by the ARM routine Tile_BuildMetatiles copied into RAM.
With no UI work, every row is filled with 0xe0e0 (no window).
Definition at line 239 of file outputs.c.
Referenced by UiWindow_FillFromScene().
Fills the top-left width x height tiles of the 32-tile-wide BG screen block at 0x06002000 with the tilemap entry value.
The first two parameters are ignored.
Definition at line 256 of file outputs.c.
Referenced by UiWindow_FillScreenBlockRect().
| void UiWindow_BuildLayoutBounds | ( | s32 | flags | ) |
Works out where the party status window goes for flags: one column per party member (those in battle when a battle is on), plus the Djinn column, right-aligned on the 30-tile screen row at the top.
It is four tiles high outside battle and three in battle, plus one with the PP row.
Definition at line 41 of file party_status.c.
Referenced by PartyStatusDraw(), UiWindow_BuildLayoutBounds(), and UiWindow_CreateWithLayoutBounds().
| void UiWindow_CreateWithLayoutBounds | ( | s32 | flags | ) |
Opens the party status window with flags (see PARTY_STATUS_*) in a new heap block and draws it.
The UI is held busy while it is drawn.
Definition at line 85 of file party_status.c.
Referenced by UiWindow_CreateWithLayoutBounds(), and UiWindow_OpenMode1AndWaitFrame().
Draws the vertical lines between the members' columns of the party status window, with their top and bottom joints, at the offsets listed in gUiWindow_PartyColumnOffsets (shifted right past the Djinn column, whose own line comes first in the list).
In battle it also draws the window's bottom edge.
Definition at line 106 of file party_status.c.
Referenced by PartyStatusDraw(), and UiWindow_DrawColumnBorders().
Definition at line 165 of file party_status.c.
Referenced by PartyStatusDraw(), and UiWindow_DrawStatusBarTiles().
| void PartyStatusDraw | ( | s32 | flags | ) |
Draws the party status window with flags (see PARTY_STATUS_*): each member's name, HP and optionally PP with their bars, and in battle the standby Djinn of each element.
The HP is drawn in text colour 2 at zero and colour 4 at a quarter or less. When the flags change, the window is erased and laid out again first.
Definition at line 233 of file party_status.c.
Referenced by PartyStatusDraw(), Ui_RunOwnerStatusScreen(), and UiWindow_CreateWithLayoutBounds().
| void PartyStatus_Close | ( | void | ) |
Closes the party status window and frees its heap block.
Definition at line 378 of file party_status.c.
Referenced by PartyStatus_Close(), and UiWork_CloseAndRelease().
| void UiWindow_SetTileAttributeBitRect | ( | const struct UiWindow * | window, |
| s32 | x, | ||
| s32 | y, | ||
| s32 | width, | ||
| s32 | height, | ||
| u32 | set ) |
Sets (set 1) or clears (0) bit 12 of the tilemap entries of the width x height tile rectangle at (x, y) inside window, clipped to the screen: bit 12 is the lowest bit of the entry's palette number, so this switches the rectangle between two palettes.
The clip uses 29 for the bottom edge test and 20 for the clipped height.
Definition at line 394 of file party_status.c.
Referenced by UiWindow_SetTileAttributeBitRect().
Writes the play time frames (at 60 frames a second) into out as hours and minutes, "hhh:mm" with the hours right-aligned in three characters, and returns out.
The time stops at 999:59.
Definition at line 26 of file save.c.
Referenced by SaveMenu_DrawFileSummary(), and Text_FormatPlayTime().
| u32 SaveState_FindFreeSummarySlot | ( | void | ) |
Returns the first save file whose summary shows it empty (level 0), or SAVE_NO_FREE_FILE when all three are in use.
The summaries must be loaded.
Definition at line 65 of file save.c.
Referenced by SaveState_CopySlotPair(), and SaveState_FindFreeSummarySlot().
Returns how many save files there are, leaving out those whose summary has its send flag set when excludeSent is nonzero, or SAVE_ERROR_NO_MEMORY when the backup memory cannot be read.
Definition at line 80 of file save.c.
Referenced by Sanctum_ChooseRestartOption(), and SaveState_CountRecordsExcludingFlagged().
| s32 SaveState_ScanRecordFlags | ( | void | ) |
Loads the save file summaries for the title menu and returns how many files there are: plus 100 when every file has its send flag set, or SAVE_ERROR_NO_MEMORY when the backup memory cannot be read.
Sets gTitleExtraOptionEnabled when a file has any of game flags 48-127 set, and gTitleSendOptionEnabled when a file has its send flag set and R and Left are held.
Definition at line 111 of file save.c.
Referenced by Menu_SelectSaveSlotAction(), SaveMenu_Run(), SaveState_ScanRecordFlags(), and Title_Run().
| u32 SaveState_BuildSummaryHeader | ( | void | ) |
Prepares the save buffer for writing: stamps the game state with the time and options, then fills the file summary shown on the file menus (the leader's name, level and class, the play time, area, coins, Djinn of each element, the party, the send flag and how many of game flags 48-127 are set) and its checksum, the sum of the 968 words from gGameFlagBytes on.
Returns the checksum.
Definition at line 159 of file save.c.
Referenced by Save_WriteSelectedSlot(), SaveState_BuildSummaryHeader(), and SaveState_WriteCurrentSlotPair().
| s16 SaveState_WriteCurrentSlotPair | ( | void | ) |
Saves the game to the current file (gSaveSlot): builds the summary and writes both halves of the save buffer.
Returns 0, gSaveSlot itself (-1) when no file is chosen, or a SAVE_ERROR_* after showing its message.
Definition at line 245 of file save.c.
Referenced by SaveState_WriteCurrentSlotPair().
Writes both halves of the save buffer, as they are, to save file file.
Returns 0, or a SAVE_ERROR_* after showing its message.
Definition at line 281 of file save.c.
Referenced by SaveState_WriteSlotPair().
| s32 SaveState_ProcessSelectedSlot | ( | void | ) |
Writes the 64-byte save stamp (gSaveStamp, which lies in the first half of the save buffer) into the current file's first record, leaving the rest of the record as it was saved.
Returns 0, -1 when no file is chosen, or a SAVE_ERROR_* after showing its message.
Definition at line 308 of file save.c.
Referenced by LinkLobby_SaveBattleResults(), LinkLobby_SaveMonsterBattleResults(), SaveState_ConfirmAndProcessSelectedSlot(), and SaveState_ProcessSelectedSlot().
| s32 SaveState_ConfirmAndProcessSelectedSlot | ( | void | ) |
Asks whether to save over the current file and, on Yes, writes the save stamp into it (SaveState_ProcessSelectedSlot) and says so.
"OK to save over this file?" and "Your game was saved." Returns that result. Nothing calls it.
Definition at line 347 of file save.c.
Referenced by SaveState_ConfirmAndProcessSelectedSlot().
| s32 SaveState_CopySlotPair | ( | void | ) |
The file menu's Copy: lets the player choose a file, reads both of its records into the save buffer and writes them to the first empty file.
Returns 0, -1 when cancelled, or a SAVE_ERROR_* after showing its message (the game says "Failed to erase." both when no file is empty and when the write fails).
Definition at line 377 of file save.c.
Referenced by SaveMenu_Run(), and SaveState_CopySlotPair().
| s32 SaveState_DeleteSelectedSlot | ( | void | ) |
The file menu's Erase: lets the player choose a file, asks whether to erase it and on Yes deletes both of its records.
"OK to erase this?" Returns 0 (also when the player answers No), -1 when cancelled, or a SAVE_ERROR_* after showing its message.
Definition at line 429 of file save.c.
Referenced by SaveMenu_Run(), and SaveState_DeleteSelectedSlot().
| void PaletteGlow_UpdateSine | ( | void | ) |
A scheduler callback that makes colours 8-11 of BG palette 14 glow: each follows a sine wave of the frame counter, eight frames behind the one before.
With s the sine from -1 to 1, the colour is red 22 + 2s, green 16 + s and blue 20 + s (of 31).
Definition at line 473 of file save.c.
Referenced by PaletteGlow_Start(), PaletteGlow_Stop(), and PaletteGlow_UpdateSine().
| void PaletteGlow_Start | ( | void | ) |
Starts the palette glow (PaletteGlow_UpdateSine) in the scheduler.
Definition at line 527 of file save.c.
Referenced by PaletteGlow_Start(), and SaveMenu_SelectSlot().
| void PaletteGlow_Stop | ( | void | ) |
Definition at line 531 of file save.c.
Referenced by PaletteGlow_Stop().
Fills the width x height tile rectangle at (x, y) inside window, clipped to the screen as UiWindow_SetTileAttributeBitRect clips, with the blank tile entry 0xe006 of the UI tilemap.
Definition at line 538 of file save.c.
Referenced by SaveMenu_SelectSlot(), and UiWindow_FillTilemapRect().
| void SaveMenu_ShowPartySprites | ( | struct UiWindow * | origin, |
| s32 | x, | ||
| s32 | y, | ||
| struct SaveSummary * | descriptor ) |
Shows the party of save file summary (up to four members) as sprites in a row from tile (x, y) inside window, and starts placing them every frame (SaveMenu_PlacePartySprites).
Definition at line 595 of file save.c.
Referenced by SaveMenu_SelectSlot(), and SaveMenu_ShowPartySprites().
| void SaveMenu_HidePartySprites | ( | void | ) |
Stops placing the party sprites of the save file menu and releases them.
Definition at line 625 of file save.c.
Referenced by SaveMenu_HidePartySprites(), and SaveMenu_SelectSlot().
| void SaveMenu_PlacePartySprites | ( | void | ) |
A scheduler callback: draws each party sprite of the save file menu at its place and scale for this frame.
Definition at line 640 of file save.c.
Referenced by SaveMenu_HidePartySprites(), SaveMenu_PlacePartySprites(), and SaveMenu_ShowPartySprites().
Shows the four Djinn sprites, one for each element, in a row from tile (x, y) inside window, and starts placing them every frame (SaveMenu_PlaceDjinnSprites).
Does nothing when window is NULL.
Definition at line 669 of file save.c.
Referenced by SaveMenu_SelectSlot(), and SaveMenu_ShowDjinnSprites().
| void SaveMenu_HideDjinnSprites | ( | void | ) |
Stops placing the Djinn sprites of the save file menu and releases them.
Definition at line 696 of file save.c.
Referenced by SaveMenu_HideDjinnSprites(), and SaveMenu_SelectSlot().
| void SaveMenu_PlaceDjinnSprites | ( | void | ) |
A scheduler callback: draws each Djinn sprite of the save file menu at its place, at scale 1.0, for this frame.
Definition at line 711 of file save.c.
Referenced by SaveMenu_HideDjinnSprites(), SaveMenu_PlaceDjinnSprites(), and SaveMenu_ShowDjinnSprites().
| void SaveMenu_DrawDjinnCounts | ( | struct UiWindow * | window, |
| struct SaveSummary * | summary ) |
Draws the Djinn counts of save file summary, one for each element, two digits each, 24 pixels apart on row 16 of window, under the Djinn sprites.
Does nothing when window is NULL.
Definition at line 740 of file save.c.
Referenced by SaveMenu_DrawDjinnCounts(), and SaveMenu_SelectSlot().
| void SaveMenu_DrawFileSummary | ( | struct UiWindow * | window, |
| struct SaveSummary * | summary ) |
Draws the summary of save file summary into window: the leader's name, level and class, the play time and the coins.
Does nothing when window is 0.
Definition at line 769 of file save.c.
Referenced by SaveMenu_DrawFileSummary(), and SaveMenu_SelectSlot().
Definition at line 834 of file save.c.
Referenced by Save_WriteSelectedSlot(), SaveMenu_SelectSlot(), SaveState_CopySlotPair(), SaveState_DeleteSelectedSlot(), and SaveState_LoadRecordIntoWork().
| s32 Save_WriteSelectedSlot | ( | void | ) |
The Save command: lets the player choose a file (the current one first), asks whether to save over it when it has data, then saves the game to it, object table included, and makes it the current file.
The question is "OK to save over this file?" Returns 0 (also when the player answers No), -1 when cancelled, or a SAVE_ERROR_* after showing its message.
Definition at line 1174 of file save.c.
Referenced by Menu_RunWorkspaceResultLoop(), Save_WriteSelectedSlot(), and SaveMenu_Run().
Lets the player choose a file in save menu mode (see SaveMenuMode) and loads it into the save buffer as the current file, restoring its play time and options.
Returns 0, -1 when cancelled, or a SAVE_ERROR_* after showing its message.
Definition at line 1232 of file save.c.
Referenced by SaveMenu_Run(), and SaveState_LoadRecordIntoWork().
| s32 Resource_LoadFixedBlockBIntoFreeSlot | ( | void | ) |
Loads the pointing hand cursor's tiles (gResource_FixedBlockBTiles, 128 bytes) into a free VRAM slot and returns the slot.
Definition at line 1269 of file save.c.
Referenced by Colosso_EnsureMarkerSlot(), and Resource_LoadFixedBlockBIntoFreeSlot().
The international name entry has no voicing marks: where the Japanese edition checks a mark against the letter before it, this edition keeps a function that accepts every character.
Nothing calls it.
Definition at line 11 of file name_entry.c.
Referenced by NameEntry_AcceptsMark().
Referenced by NameEntry_CountLetters().
| void UiWindow_CopyTilemapRegion | ( | const struct UiWindow * | window, |
| const void * | source ) |
Decompresses the type-01 tilemap source and copies it over window's rectangle, both into the BG screen block at 0x06002000 and into the UI tilemap that mirrors it.
Definition at line 56 of file name_entry.c.
Referenced by NameEntry_CountLetters(), NameEntry_EditOwnerName(), and UiWindow_CopyTilemapRegion().
| void UiWindow_SetTileAttributeRect | ( | const struct UiWindow * | window, |
| s32 | x, | ||
| s32 | y, | ||
| s32 | width, | ||
| s32 | height, | ||
| u32 | palette ) |
Like UiWindow_SetTileAttributeBitRect, but ORs all of palette into the palette number of each entry (bits 12-15) after clearing only its lowest bit.
Definition at line 89 of file name_entry.c.
Referenced by NameEntry_CountLetters(), NameEntry_EditOwnerName(), PartyTalkMenu_Choose(), and UiWindow_SetTileAttributeRect().
| void Resource_CopyFixedBlockB | ( | s32 | slot | ) |
Loads the pointing hand cursor's tiles into VRAM slot slot.
Definition at line 132 of file name_entry.c.
Referenced by NameEntry_CountLetters(), and Resource_CopyFixedBlockB().
| void Resource_CopyFixedBlockA | ( | s32 | slot | ) |
Loads the 16x16 sprite gResource_FixedBlockATiles into VRAM slot slot.
Definition at line 137 of file name_entry.c.
Referenced by NameEntry_CountLetters(), and Resource_CopyFixedBlockA().
Puts the string str into the UI's text entries and returns its width in pixels.
Definition at line 151 of file name_entry.c.
Referenced by NameEntry_CountLetters(), NameEntry_EditOwnerName(), and UiText_SetRenderString().
Draws the name being entered, name, at the top left of window, with the free places up to its seventh character shown as underscores in text colour 2.
Definition at line 181 of file name_entry.c.
Referenced by NameEntry_CountLetters(), NameEntry_EditOwnerName(), and UiText_DrawPaddedLabel().
The name entry screen for party member member: the player types a name of up to NAME_MAX_LETTERS letters on the keyboard and ends with End (or Start, which jumps there).
A puts the key under the cursor into the name, B or Delete removes the last letter, and B on an empty name cancels. Ending with an empty name keeps the old one. Returns 0, or -1 when cancelled.
Definition at line 232 of file name_entry.c.
Referenced by DebugMenu_EditIsaacName(), NameEntry_CountLetters(), NameEntry_EditOwnerName(), and SaveMenu_Run().
The Colosso choice of what to do: "Descriptions", "Cheer" or "Nothing", chosen with a pointing hand.
Returns the choice (0-2), or -1 when cancelled with B.
Definition at line 33 of file joined.c.
Referenced by Colosso_GreetAtStage(), NameEntry_CountLetters(), and PartyTalkMenu_Choose().
Shows that a Djinni joined a member while the join fanfare (sound 81) plays, until it ends or A, B, L or R is pressed.
The message is The <element> Djinni <name> joined <member>., with the element's Djinni portrait. djinn is the Djinni's number in its element.
Definition at line 109 of file joined.c.
Referenced by Djinn_ShowJoinedMessage(), and NameEntry_CountLetters().
Returns the portrait character of party member member (0-8): from gCharacter_ChildSpriteTable during the prologue, from gCharacter_SpriteTable otherwise; 0 for any other member.
Definition at line 170 of file joined.c.
Referenced by NameEntry_CountLetters(), Party_LookupCharacterValueByFlag32(), Party_ShowJoinedMessage(), and Party_ShowPairJoinedMessage().
| void Party_ShowJoinedMessage | ( | s32 | member | ) |
Shows that a member joined the party while the join fanfare (sound 81) plays, until it ends or A, B, L or R is pressed.
The message is <member> joined your party., with the member's portrait.
Definition at line 183 of file joined.c.
Referenced by NameEntry_CountLetters(), and Party_ShowJoinedMessage().
Shows that two members joined the party while the join fanfare (sound 81) plays, until it ends or A, B, L or R is pressed.
The message is <first> and <second> joined your party., with both portraits.
Definition at line 224 of file joined.c.
Referenced by NameEntry_CountLetters(), and Party_ShowPairJoinedMessage().
Decompresses picture picture of gRenderResource_PairSourceTable (two 32x32 sprites side by side, 512 bytes) into VRAM slot slot.
The heap block is not freed when slot is not a valid VRAM slot.
Definition at line 12 of file pictures.c.
Referenced by NameEntry_CountLetters(), RenderResource_CreatePair(), and RenderResource_LoadPair().
| struct RenderOutput * RenderResource_CreatePair | ( | s32 | picture, |
| struct UiWindow * | window, | ||
| s32 | x, | ||
| s32 | y ) |
Shows picture picture of gRenderResource_PairSourceTable as two 32x32 sprites side by side at (x, y) in window, on draw layer 253, and returns the left one (the right one follows it in the window's list).
Returns NULL when no VRAM slot is free.
Definition at line 28 of file pictures.c.
Referenced by Menu_RunWorkspaceOptions(), Menu_RunWorkspaceSelectionLoop(), NameEntry_CountLetters(), RenderResource_CreatePair(), and SaveMenu_SelectSlot().
| void RenderOutput_BobPair | ( | struct RenderOutput * | obj | ) |
Bobs the two sprites of a pair (see RenderResource_CreatePair) up and down by gUi_PairBobOffsets, one step every four frames.
Definition at line 50 of file pictures.c.
Referenced by Menu_RunWorkspaceOptions(), Menu_RunWorkspaceSelectionLoop(), NameEntry_CountLetters(), RenderOutput_BobPair(), and SaveMenu_SelectSlot().
Decompresses command icon icon (a 32x32 picture of 256 colours, 1 KB) into VRAM slot slot, remapping its first 768 bytes' colours by table when remap is nonzero.
Definition at line 67 of file pictures.c.
Referenced by Menu_RunWorkspaceOptions(), Menu_RunWorkspaceSelectionLoop(), NameEntry_CountLetters(), RenderResource_CreateFrame(), and RenderResource_LoadFrame().
| struct RenderOutput * RenderResource_CreateFrame | ( | s32 | icon, |
| s32 | remap, | ||
| struct UiWindow * | window, | ||
| s32 | x, | ||
| s32 | y ) |
Shows command icon icon (see RenderResource_LoadFrame) as a 32x32 256-colour sprite at (x, y) in window, on draw layer 251.
Returns NULL when no VRAM slot is free.
Definition at line 85 of file pictures.c.
Referenced by NameEntry_CountLetters(), OptionMenu_Open(), RenderResource_CreateFrame(), and SystemMenu_Open().
| void Ui_ApplyTableScaleToObject | ( | struct RenderOutput * | obj | ) |
Makes the sprite obj pulse: scales it about its centre by gUi_ObjectPulseScales (in 1/65536, used in 1/256), one step every two frames, and puts it on draw layer 252.
Does nothing when obj is NULL.
Definition at line 105 of file pictures.c.
Referenced by NameEntry_CountLetters(), OptionMenu_AnimateCursors(), SystemMenu_AnimateCursor(), and Ui_ApplyTableScaleToObject().
| s32 Menu_BuildLocalizedPatternTiles | ( | void | ) |
Definition at line 137 of file pictures.c.
Referenced by Battle_CollectPartyCommands(), Menu_BuildLocalizedPatternTiles(), and NameEntry_CountLetters().
| int UiWindow_DrawThreeTileColumn | ( | struct UiWindow * | window, |
| s32 | arg1, | ||
| s32 | arg2, | ||
| s32 | arg3, | ||
| s32 | unused ) |
Definition at line 179 of file pictures.c.
Referenced by BattleMenu_RunActionSelection(), DjinnMenu_ShowChangePreview(), NameEntry_CountLetters(), and UiWindow_DrawThreeTileColumn().
Merges two 8x8 4bpp tiles row by row.
Shift the second tile horizontally by shift pixels, using the first tile wherever the shifted pixel is transparent.
Definition at line 193 of file pictures.c.
Referenced by Graphics_MergeShiftedTileRows(), Link_DrawShiftedTilePair(), and NameEntry_CountLetters().
| void Link_DrawShiftedTilePair | ( | s32 | offset | ) |
Animates the two link indicator tiles with opposing two/three-pixel shifts.
Definition at line 237 of file pictures.c.
Referenced by Battle_CollectPartyCommands(), Link_DrawShiftedTilePair(), NameEntry_CountLetters(), SaveMenu_Run(), and UpdateLinkSessionCountdown().
| void Graphics_ExpandVramTilesByColorTable | ( | u16 * | dst | ) |
Expands two palette variants of the ten source tile rows at 0x06000600, mapping each packed nibble through gGraphics_ExpandNibbleTable.
Definition at line 256 of file pictures.c.
Referenced by Battle_CollectPartyCommands(), Graphics_ExpandVramTilesByColorTable(), NameEntry_CountLetters(), and SaveMenu_Run().
Composes a table-entry glyph in temporary transfer work, reloads its cache slot, then releases the temporary work and returns the tile index.
Definition at line 299 of file pictures.c.
Referenced by NameEntry_CountLetters(), Resource_LoadTableEntryToBuffer(), and Ui_RunOwnerStatusScreen().
Composes the item icon with style 0x1a in temporary transfer work and reload the requested cache slot.
Return its tile index.
Definition at line 312 of file pictures.c.
Referenced by Battle_CollectPartyCommands(), ItemIcon_LoadIntoSlot(), ItemList_SelectEntry(), and NameEntry_CountLetters().
Builds the ability glyph in temporary transfer work, reloads the requested cache slot and returns its tile index.
Definition at line 325 of file pictures.c.
Referenced by Battle_CollectPartyCommands(), NameEntry_CountLetters(), Resource_LoadIndexedEntryToBuffer(), and Ui_CreateOutputFromResourceSlot().
Loads a party portrait into the supplied cache slot and returns its tile.
In the prologue, Isaac and Garet use their childhood portrait entries.
Definition at line 341 of file pictures.c.
Referenced by Battle_CollectPartyCommands(), NameEntry_CountLetters(), Ui_RunOwnerStatusScreen(), and UiGlyph_LoadPortrait().
Return gUi_FixedTileBlocks[0]; treat any nonzero no as 0 as well.
Definition at line 366 of file pictures.c.
Referenced by NameEntry_CountLetters(), and Ui_GetTableWordZero().
| void UiIcon_Decompress | ( | GlyphTransfer * | work | ) |
Copies the 4bpp decoder into RAM, calls it with the transfer's encoded source and byte buffer, then releases the copied code.
Its ARM entry reads the stream through r0 and writes bytes through r1, as UiIcon_Decode does. Nothing calls it.
Definition at line 376 of file pictures.c.
Referenced by NameEntry_CountLetters(), and UiIcon_Decompress().
| struct UiWindow * Link_CreateCountdownLabelWindow | ( | void | ) |
Creates the link timer window and draws its fixed time heading.
Definition at line 392 of file pictures.c.
Referenced by Link_CreateCountdownLabelWindow(), NameEntry_CountLetters(), and UpdateLinkSessionCountdown().
Decodes a command-icon table entry in temporary transfer work and reload the requested cache slot.
Return its tile index.
Definition at line 401 of file pictures.c.
Referenced by Battle_CollectPartyCommands(), NameEntry_CountLetters(), Resource_LoadIndexedIntoBuffer(), and UiText_DrawCharacter().
| void UiText_LoadRemappedGlyph | ( | struct GlyphPalette * | palette, |
| s32 | glyph, | ||
| s32 | tile ) |
Loads a command icon into 8bpp OBJ VRAM, sharing a compact palette across the selection's icons.
Copy each newly encountered color from OBJ to BG palette storage before uploading the remapped pixels.
Definition at line 419 of file pictures.c.
Referenced by NameEntry_CountLetters(), UiText_DrawCharacter(), and UiText_LoadRemappedGlyph().
| void UiText_DrawCharacter | ( | struct SelectionWork * | work, |
| s32 | index, | ||
| u32 | icon ) |
Loads a selection icon, initializes its sprite and binds the decoded tiles.
The icon's kind also chooses its command-name label.
Definition at line 454 of file pictures.c.
Referenced by Menu_RunCommandRow(), NameEntry_CountLetters(), and UiText_DrawCharacter().
| void Graphics_SetBg1Priority3 | ( | void | ) |
Puts BG1 behind the other priority levels while the command strip is active.
Definition at line 465 of file pictures.c.
Referenced by Graphics_SetBg1Priority3(), Menu_RunCommandRow(), and NameEntry_CountLetters().
| void Graphics_SetBg1Priority0 | ( | void | ) |
Restores BG1 priority 0; the VCount handler applies this below the strip.
Definition at line 474 of file pictures.c.
Referenced by Graphics_InstallBg1VCountHandler(), Graphics_SetBg1Priority0(), Menu_RunCommandRow(), and NameEntry_CountLetters().
| void Graphics_InstallBg1VCountHandler | ( | void | ) |
Clears BG0 vertical scroll and installs the BG1 priority change at line 136.
Nothing calls it.
Definition at line 483 of file pictures.c.
Referenced by Graphics_InstallBg1VCountHandler(), and NameEntry_CountLetters().
Opens a message at (x, y), waits for its text to finish, and returns its window so the caller can hold it open for a separate prompt.
Definition at line 9 of file command_row.c.
Referenced by Battle_CollectPartyCommands(), Menu_RunCommandRow(), NameEntry_CountLetters(), and UiText_ShowMessageAndWaitComplete().
Selects a command icon, returning its kind, -1 for cancel or -2 for a shoulder-button switch.
Mode 0 is the top menu; the other mode selects a battle command and remembers its own cursor. Tutorial input is replayed through the same selection path.
Definition at line 28 of file command_row.c.
Referenced by Battle_CollectPartyCommands(), Menu_RunCommandRow(), and NameEntry_CountLetters().
Sets bit 12 of each tile in a screen-space rectangle, preserving the other tile attributes.
Keep the original bottom-edge test (29) and height (20).
Definition at line 329 of file command_row.c.
Referenced by Battle_SelectAbility(), BattleLayout_HighlightPartyPanels(), BattleMenu_RunActionSelection(), ItemList_SelectEntry(), NameEntry_CountLetters(), SummonMenu_SelectSummon(), Ui_RunOwnerStatusScreen(), and Ui_SetRectHighlight().
Dims the party strip, then highlight the actor IDs up to the 0xff terminator.
Missing IDs are ignored; the search stops at the party's own terminator.
Definition at line 375 of file command_row.c.
Referenced by Battle_CollectPartyCommands(), BattleLayout_HighlightPartyPanels(), and NameEntry_CountLetters().
Definition at line 17 of file djinn_preview.c.
Referenced by DjinnMenu_ShowChangePreview(), NameEntry_CountLetters(), and UiText_FormatNumberToHalfwords().
| s32 DjinnMenu_ListChangedDjinn | ( | const struct OwnerActionSlot * | oldGrid, |
| const struct OwnerActionSlot * | newGrid, | ||
| u16 * | out, | ||
| s32 * | gained, | ||
| s32 * | lost ) |
List Psynergy in the new grid, marking newly gained entries with bit 15, then append lost entries with bit 14.
Return the number of entries and report the gained/lost counts separately.
Definition at line 39 of file djinn_preview.c.
Referenced by DjinnMenu_ListChangedDjinn(), DjinnMenu_ShowChangePreview(), and NameEntry_CountLetters().
Definition at line 93 of file djinn_preview.c.
Referenced by DjinnMenu_ShowChangePreview(), NameEntry_CountLetters(), and Ui_CreateOutputFromResourceSlot().
| struct UiWindow * DjinnMenu_ShowChangePreview | ( | struct UiWindow * | win, |
| s32 | owner, | ||
| s32 | encodedDjinn, | ||
| s32 | page, | ||
| s32 * | pageCount ) |
Temporarily toggle a Djinni and recalculate its owner's stats to show the change.
Page 0 compares stats; later pages show gained and lost Psynergy. Restore the complete unit snapshot before returning the preview window.
Definition at line 109 of file djinn_preview.c.
Referenced by Battle_SelectAbility(), DjinnMenu_ShowChangePreview(), and NameEntry_CountLetters().
Shows a party member's stats and condition help until B or the link session ends.
The supplied list enables shoulder-button member switching. Measure stage deltas temporarily, then restore the unit from its snapshot.
Definition at line 41 of file status.c.
Referenced by Battle_CollectPartyCommands(), NameEntry_CountLetters(), and Ui_RunOwnerStatusScreen().
Selects a Djinni for the current battle command.
Entries encode its element, index, standby state and recovery turns; -1 means cancel. R opens the stat/Psynergy preview, and tutorial input follows the normal input path.
Definition at line 28 of file djinn_menu.c.
Referenced by Battle_CollectPartyCommands(), Battle_SelectAbility(), and NameEntry_CountLetters().
Shows learned summons four per page; returns the selected summon number.
Cancel returns -1. standby: number of standby Djinn for each element
Definition at line 18 of file summon_menu.c.
Referenced by Battle_CollectPartyCommands(), NameEntry_CountLetters(), and SummonMenu_SelectSummon().
Checks whether an item can be used in battle.
Return: 0 usable, 1 unusable, 2 unusable in battle. unit: character index item: inventory item value
Definition at line 11 of file item_menu.c.
Referenced by Battle_CollectPartyCommands(), Item_ClassifyUseAbility(), ItemList_SelectEntry(), and NameEntry_CountLetters().
Copies one 4bpp VRAM tile, ignoring the palette and flip bits of each entry.
Definition at line 38 of file item_menu.c.
Referenced by BattleMenu_RunActionSelection(), ItemList_SelectEntry(), NameEntry_CountLetters(), and Vram_CopyTile().
Chooses an inventory-list position for battle use, or -1 on cancel.
Keeps unavailable items visible with their help text, but rejects confirmation.
Definition at line 46 of file item_menu.c.
Referenced by Battle_CollectPartyCommands(), ItemList_SelectEntry(), and NameEntry_CountLetters().
Selects a Psynergy-list position, or -1 on cancel.
The list shows PP cost and range, and confirmation rejects abilities the unit cannot use.
Definition at line 9 of file psynergy_menu.c.
Referenced by Battle_CollectPartyCommands(), BattleMenu_RunActionSelection(), and NameEntry_CountLetters().
Chooses a party/enemy target and animates its selection markers.
Return the encoded side and party position, or -1 on cancel. Healing and status-cure categories choose an appropriate initial ally and supply condition help.
Definition at line 27 of file targets.c.
Referenced by Battle_CollectPartyCommands(), BattleTarget_RunSelection(), and NameEntry_CountLetters().
| void UpdateLinkSessionCountdown | ( | void | ) |
Advances the link command-entry timer, slides the battle panels, and redraws the remaining seconds.
Pause flags and peer signatures stop the timer.
Definition at line 23 of file link_timer.c.
Referenced by Battle_CollectPartyCommands(), NameEntry_CountLetters(), and UpdateLinkSessionCountdown().
| s32 UiText_ShowLocalizedMessageAndWait | ( | void | ) |
Tests whether this battle forbids escape.
Show the reason until A/B or the link timer expires, returning 1 when escape is forbidden and 0 otherwise.
Definition at line 127 of file link_timer.c.
Referenced by Battle_CollectPartyCommands(), NameEntry_CountLetters(), and UiText_ShowLocalizedMessageAndWait().
Returns the target selection category for an ability's effect.
0 other, 1 restore HP, 2 restore PP, 3 cure poison, 4 cure status ailments, 5 revive, 6 cure all status ailments. act: ability data
Definition at line 11 of file party_commands.c.
Referenced by Battle_ClassifyEntryKind(), Battle_CollectPartyCommands(), and NameEntry_CountLetters().
| s32 Battle_CollectPartyCommands | ( | struct BattleActionRecord * | commands, |
| u16 * | actors, | ||
| s32 | commandCount ) |
Collects commands in party order, including target, cost and randomized priority.
Cancelling returns to the preceding choice; linked battles exchange completion signatures before releasing the command UI.
Definition at line 39 of file party_commands.c.
Referenced by Battle_CollectPartyCommands(), and NameEntry_CountLetters().
| void AffineEffect_UpdateFrame | ( | void | ) |
Draws the resource-menu icons, pulsing the selected icon with one affine matrix, and updates the horizontal window spans to reveal the active icon row.
Definition at line 40 of file icon_menu.c.
Referenced by AffineEffect_InitializeWork(), AffineEffect_UpdateFrame(), Menu_EndResourceSelection(), and NameEntry_CountLetters().
| void * AffineEffect_InitializeWork | ( | void | ) |
Allocates and clears the resource-menu state, then schedules its icon pulse.
Definition at line 229 of file icon_menu.c.
Referenced by AffineEffect_InitializeWork(), Menu_AnimateSelectionToEntry(), Menu_RunConfirmSelection(), Menu_RunConfirmSelectionAt(), Menu_SelectCoinsOrMedals(), Menu_SelectResourceLayout(), Menu_SelectSanctumService(), Menu_SelectSaveSlotAction(), Menu_SelectShopCommand(), Menu_SelectTopEntry(), and NameEntry_CountLetters().
| void Menu_EndResourceSelection | ( | void | ) |
Stops the icon pulse, closes the label window and releases each loaded icon before freeing the resource-menu state.
Definition at line 240 of file icon_menu.c.
Referenced by Menu_AnimateSelectionToEntry(), Menu_EndResourceSelection(), Menu_RunConfirmSelection(), Menu_RunConfirmSelectionAt(), Menu_SelectCoinsOrMedals(), Menu_SelectResourceLayout(), Menu_SelectSanctumService(), Menu_SelectSaveSlotAction(), Menu_SelectShopCommand(), Menu_SelectTopEntry(), and NameEntry_CountLetters().
Selects an icon position with wrapped directional input.
A returns the position; B or Start returns -1. Redraws the label only after a move.
Definition at line 260 of file icon_menu.c.
Referenced by Menu_RunConfirmSelection(), Menu_RunConfirmSelectionAt(), Menu_RunResourceSelectionLoop(), Menu_SelectCoinsOrMedals(), Menu_SelectResourceLayout(), Menu_SelectSanctumService(), Menu_SelectSaveSlotAction(), Menu_SelectShopCommand(), Menu_SelectTopEntry(), and NameEntry_CountLetters().
Animates a cursor from start to goal with table-driven delays.
Draws each intervening label, pauses at the destination, and returns its position.
Definition at line 311 of file icon_menu.c.
Referenced by Menu_AnimateSelectionToEntry(), Menu_SelectResource(), and NameEntry_CountLetters().
Decodes one command-icon table entry into the requested VRAM cache slot.
Definition at line 362 of file icon_menu.c.
Referenced by Menu_AppendResourceEntry(), Menu_LoadResourceSlot(), and NameEntry_CountLetters().
| void Menu_AppendResourceEntry | ( | s32 | icon | ) |
Appends a command icon if fewer than six are present.
Its initial position is on the bottom icon row; a layout routine places the final row.
Definition at line 375 of file icon_menu.c.
Referenced by Menu_AnimateSelectionToEntry(), Menu_AppendResourceEntry(), Menu_RunConfirmSelection(), Menu_RunConfirmSelectionAt(), Menu_SelectCoinsOrMedals(), Menu_SelectResourceLayout(), Menu_SelectSanctumService(), Menu_SelectSaveSlotAction(), Menu_SelectShopCommand(), Menu_SelectTopEntry(), and NameEntry_CountLetters().
Centers the icons and their label window together on the given tile row.
A nonzero resourceBase supplies labels; otherwise command-name IDs do.
Definition at line 399 of file icon_menu.c.
Referenced by Menu_AnimateSelectionToEntry(), Menu_CenterResourceEntries(), Menu_RunConfirmSelection(), Menu_SelectCoinsOrMedals(), Menu_SelectResourceLayout(), Menu_SelectSanctumService(), Menu_SelectSaveSlotAction(), Menu_SelectShopCommand(), Menu_SelectTopEntry(), and NameEntry_CountLetters().
Places icons at three-tile intervals from (x, y), then creates their label window immediately to the right.
Coordinates and label width are in tiles.
Definition at line 422 of file icon_menu.c.
Referenced by Menu_LayoutResourceEntries(), Menu_RunConfirmSelectionAt(), and NameEntry_CountLetters().
Builds the field command menu, omitting Djinn when none are owned.
Translates between command IDs and visible icon positions using the two lookup rows.
Definition at line 448 of file icon_menu.c.
Referenced by Menu_RunTopSelection(), Menu_SelectTopEntry(), and NameEntry_CountLetters().
Opens the field command menu and animates from start to the command's icon.
Returns the final icon position after closing the menu.
Definition at line 495 of file icon_menu.c.
Referenced by Event_MeetFlint(), Menu_AnimateSelectionToEntry(), NameEntry_CountLetters(), and WorldMap_ShowDjinnTutorial().
| s32 Menu_SelectSaveSlotAction | ( | void | ) |
Builds the title menu from the save summaries and optional send flags.
Translates the chosen visible position back to its save-action code.
Definition at line 511 of file icon_menu.c.
Referenced by Menu_SelectSaveSlotAction(), NameEntry_CountLetters(), and SaveMenu_Run().
| void Menu_DrawModeLabel | ( | void | ) |
Redraws the password-level explanation when the selected level changes.
Definition at line 570 of file icon_menu.c.
Referenced by Menu_DrawModeLabel(), Menu_SelectResourceLayout(), and NameEntry_CountLetters().
| void Menu_DrawModeIndicator | ( | void | ) |
Definition at line 645 of file icon_menu.c.
Referenced by Menu_DrawModeIndicator(), Menu_SelectResourceLayout(), and NameEntry_CountLetters().
Selects either the transfer method (mode 0) or password level.
Schedules the appropriate help redraw while the icon menu is active, then closes both help windows and the icon menu.
Definition at line 675 of file icon_menu.c.
Referenced by Menu_SelectResourceLayout(), NameEntry_CountLetters(), and SaveMenu_Run().
Selects a shop command, icons 0x11-0x14 (Buy, Sell, Artifacts, Repair), centered on row 17.
selection: initial position; returns the selected position.
Definition at line 760 of file icon_menu.c.
Referenced by Menu_SelectShopCommand(), and NameEntry_CountLetters().
Selects a sanctum service, icons 0x19-0x1c (Revive, Cure Poison, Repel Evil, Remove Curse), centered on row 17.
Definition at line 776 of file icon_menu.c.
Referenced by Menu_SelectSanctumService(), and NameEntry_CountLetters().
Selects Yes/No (icons 5/6); canceling returns 1 (No).
bottom: 0 places the menu on row 0; otherwise row 17. message: first name message, or 0 for command names. labelWidth: name window width, or 0 for width 3. selection: initial position
Definition at line 795 of file icon_menu.c.
Referenced by Menu_RunConfirmSelection(), NameEntry_CountLetters(), Save_WriteSelectedSlot(), SaveMenu_Run(), SaveState_ConfirmAndProcessSelectedSlot(), and SaveState_DeleteSelectedSlot().
Selects Yes/No at (x, y); canceling returns 1 (No).
Definition at line 823 of file icon_menu.c.
Referenced by Menu_RunConfirmSelectionAt(), and NameEntry_CountLetters().
Selects icons 0x20 and 0x21 (Coins, Lucky Medals) centered on row 17.
selection: initial position; returns the selected position.
Definition at line 849 of file icon_menu.c.
Referenced by Menu_SelectCoinsOrMedals(), NameEntry_CountLetters(), and TolbiSpring_RunSpringGame().
| void DebugMenu_ScheduleSceneSelector | ( | void | ) |
Schedules the debug scene and entrance selector; 0xc80 is a scheduler order, not a number of frames to wait.
Nothing in the game calls it.
Definition at line 10 of file debug.c.
Referenced by DebugMenu_ScheduleSceneSelector(), and NameEntry_CountLetters().
Draws the debug scene and entrance numbers with their category/area labels.
Definition at line 19 of file debug.c.
Referenced by Menu_DrawSelectionRow(), Menu_HandleSelectionRowInput(), Menu_RunSelection(), and NameEntry_CountLetters().
| s16 Menu_RunSelection | ( | void | ) |
Definition at line 39 of file debug.c.
Referenced by DebugMenu_ScheduleSceneSelector(), Menu_RunSelection(), and NameEntry_CountLetters().
| s32 Menu_HandleSelectionRowInput | ( | struct UiWindow * | window, |
| s16 | scene, | ||
| s16 * | entrance, | ||
| s16 * | selectedField ) |
Edits the debug scene or entrance, returning -1 to warp and -2 to cancel.
Shoulder buttons step by ten; it keeps the original 99-step entrance wrap.
Definition at line 92 of file debug.c.
Referenced by Menu_HandleSelectionRowInput(), Menu_RunSelection(), and NameEntry_CountLetters().
| s32 Menu_RunSelectionWithCursorObject | ( | void | ) |
Shows a 16x16 flag grid per page and processes input until closed.
Starts on page 8 and always returns 0.
Definition at line 154 of file debug.c.
Referenced by Menu_RunSelectionWithCursorObject(), and NameEntry_CountLetters().
Writes the lowest count digits of value, up to five, most significant first as uppercase hexadecimal in out, without a null terminator.
Definition at line 187 of file debug.c.
Referenced by Menu_DrawFlagBitTable(), NameEntry_CountLetters(), and Text_FormatHex().
Draws one page of 256 flags as sixteen rows of hexadecimal labels and bits.
Definition at line 208 of file debug.c.
Referenced by Menu_DrawFlagBitTable(), Menu_RunSelectionWithCursorObject(), and NameEntry_CountLetters().
Moves within the flag grid, changes pages, or toggles the selected flag.
Returns 1 when flags/page need redrawing, -1 to close, and 0 otherwise.
Definition at line 243 of file debug.c.
Referenced by Menu_HandleFlagGridInput(), Menu_RunSelectionWithCursorObject(), and NameEntry_CountLetters().
| void Menu_ReservedNoOp | ( | void | ) |
Reserved menu entry.
Definition at line 292 of file debug.c.
Referenced by Menu_ReservedNoOp(), and NameEntry_CountLetters().
Sets the Djinni's collected flag, then adds it to the specified owner.
Definition at line 295 of file debug.c.
Referenced by Djinn_SetFoundFlagAndAdd(), and NameEntry_CountLetters().
| s32 Menu_RunWorkspaceResultLoop | ( | void | ) |
Handles Save, Sleep and Options from the field workspace.
A cancelled save or options screen reopens the workspace; cancelling the workspace returns -1.
Definition at line 303 of file debug.c.
Referenced by Menu_RunWorkspaceResultLoop(), and NameEntry_CountLetters().
| s32 DebugMenu_BrowseIcons | ( | void | ) |
Browses pages of item, Psynergy and status-pattern icons, suspending the menu controller while the browser owns its window and cache entries.
Definition at line 327 of file debug.c.
Referenced by DebugMenu_BrowseIcons(), DebugMenu_OpenIconBrowser(), ItemLevel_OpenIconBrowser(), and NameEntry_CountLetters().
| s32 DebugMenu_BrowseEntryGlyphs | ( | void | ) |
Browses the character and sprite portrait maps as one circular list.
Shows each entry's glyph and label, then releases both windows on A or B.
Definition at line 421 of file debug.c.
Referenced by DebugMenu_BrowseEntryGlyphs(), ItemLevel_OpenGlyphBrowser(), and NameEntry_CountLetters().