Pictures and command icons loaded for the menus, and BG1's priority. More...
Go to the source code of this file.
Macros | |
| #define | RANGE_PATTERN_SET_COUNT 2 |
| #define | RANGE_PATTERN_COUNT 6 |
| #define | RANGE_PATTERN_PAIR_WORDS 16 |
| #define | LINK_COUNTDOWN_DRAW_HEADING UiText_DrawStringInWindow |
Functions | |
| 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. | |
| static __inline__ u32 | XorWord (u32 word, u32 mask) |
| s32 | Menu_BuildLocalizedPatternTiles (void) |
| int | UiWindow_DrawThreeTileColumn (struct UiWindow *window, s32 x, s32 y, s32 pattern, 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. | |
| UNUSED 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 slotIndex, s32 icon) |
| 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 icon) |
| 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. | |
| UNUSED void | Graphics_InstallBg1VCountHandler (void) |
| Clears BG0 vertical scroll and installs the BG1 priority change at line 136. | |
Variables | |
| const u8 * | gRenderResource_PairSourceTable [] |
Pictures and command icons loaded for the menus, and BG1's priority.
Part of battle_command.c, the menu object, compiled only through it.
Definition in file pictures.c.
| #define RANGE_PATTERN_SET_COUNT 2 |
Definition at line 127 of file pictures.c.
Referenced by Menu_BuildLocalizedPatternTiles().
| #define RANGE_PATTERN_COUNT 6 |
Definition at line 128 of file pictures.c.
Referenced by Menu_BuildLocalizedPatternTiles().
| #define RANGE_PATTERN_PAIR_WORDS 16 |
Definition at line 129 of file pictures.c.
Referenced by Menu_BuildLocalizedPatternTiles().
| #define LINK_COUNTDOWN_DRAW_HEADING UiText_DrawStringInWindow |
Definition at line 388 of file pictures.c.
Referenced by Link_CreateCountdownLabelWindow().
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().
Definition at line 125 of file pictures.c.
| 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 | x, | ||
| s32 | y, | ||
| s32 | pattern, | ||
| 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().
| UNUSED 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().
| UNUSED 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().
|
extern |
Referenced by RenderResource_LoadPair(), and RenderResource_LoadTableEntry().