Go to the source code of this file.
Data Structures | |
| struct | DisplayScrollObject |
| One eight-byte OAM entry in the credits' private sprite buffer. More... | |
Macros | |
| #define | CREDITS_LINE_PIXELS 192 |
| #define | CREDITS_VISIBLE_ROWS 16 |
| #define | CREDITS_COLUMNS 6 |
| #define | CREDITS_RING_ROWS 32 |
| #define | CREDITS_LINE_TILES 24 |
| #define | CREDITS_RING_TILES (CREDITS_RING_ROWS * CREDITS_LINE_TILES) |
| #define | CREDITS_RING_BYTES (CREDITS_RING_TILES * TILE_SIZE_4BPP) |
| #define | CREDITS_BUFFER_BYTES 0x900 |
| #define | CREDITS_RASTER_STRIDE 256 |
| #define | CREDITS_DECODER_HEAP_SLOT 49 |
| #define | CREDITS_BORDER_SPRITES 24 |
| #define | CREDITS_OAM_ENTRIES 128 |
| #define | SCROLL_OBJECTS (*(struct DisplayScrollObject **)&gFlashNumRemainingBytes) |
| #define | CREDITS_LAST_LINE_POSITION (*(s16 *)&gFlash) |
| #define | CREDITS_END_OF_TEXT (*(s16 *)&gFlash_Handler0) |
| #define | CREDITS_STAFF_TITLE "GOLDEN SUN STAFF CREDITS" |
| #define | CREDITS_FACES_SUBTITLE " & Faces" |
| #define | CREDITS_SOUND_DIRECTION_LABEL "Sound Director" |
| #define | CREDITS_GRAPHICS_SUPPORT_LABEL "Graphic Supports" |
| #define | CREDITS_ARTWORK_LABEL "Artwork" |
Typedefs | |
| typedef s32(*) | PackedDecoder(const u8 *source, void *destination, u32 fill) |
Functions | |
| void | Graphics_ClearCharacterBlockAndPalette (s32 alternate) |
| Fills 30 KB of 256-color tiles with color 1 and clears 128 palette colors. | |
| void | Graphics_LoadCharacterBlockAndPalette (u32 resourceId, s32 alternate) |
| Loads a credits backdrop into one of the two tile/palette halves. | |
| void | DisplayScroll_BuildHblankWordTable (u32 *destination) |
| Builds the 512 tilemap words surrounding a sliding credits backdrop: blank margins, 240 consecutive tile pairs, then a zero-filled tail. | |
| void | DisplayScroll_StepPositionEveryFourFrames (void) |
| A VBlank task of the credits slideshow: drifts both backdrops together, keeping their horizontal offsets aligned throughout the crossfade. | |
| s32 | DisplayScroll_RunSlideshow (void) |
| Crossfades the credits backdrop sequence through alternating tile banks while the staff names scroll over it, then restores the display for the following screen. | |
| STATIC_ASSERT (sizeof(struct DisplayScrollObject)==8) | |
| void | DisplayScroll_UpdateObjects (void) |
| A VBlank task scheduled by DisplayScroll_InitObjectTable: maps the visible sixteen rows onto the tile ring and uploads their sprites. | |
| void | DisplayScroll_RenderEnteringLine (void) |
| A main-loop task scheduled by DisplayScroll_InitObjectTable: renders each entering line sixteen rows ahead of the visible top, into the hidden half of the tile ring. | |
| void | DisplayScroll_InitObjectTable (void) |
| Allocates the credits sprites, builds the blank border and text rows, clears the tile ring and schedules scrolling and line rendering. | |
| s32 | DisplayScroll_DrawLine (const u8 *text, s32 firstTile, s32 alignment) |
| Centers, right-aligns or left-aligns one credits line in a 192-pixel row. | |
Variables | |
| const u32 | gDisplayScroll_SlideResources [] |
| Battle backgrounds shown in the credits; 0 clears the display. | |
| u16 | gFlash_Handler3 |
| Credits scroll position in pixels, in the low half of a flash work cell. | |
| static const u8 | sBlankCreditLine [] = "" |
| Blank credits line. | |
| const void * | gDisplayScroll_LineTable [] |
| Credits text, one row per line, terminated by 0. | |
| #define CREDITS_LINE_PIXELS 192 |
Definition at line 40 of file credits.c.
Referenced by DisplayScroll_DrawLine().
| #define CREDITS_VISIBLE_ROWS 16 |
Definition at line 41 of file credits.c.
Referenced by DisplayScroll_InitObjectTable(), DisplayScroll_RenderEnteringLine(), and DisplayScroll_UpdateObjects().
| #define CREDITS_COLUMNS 6 |
Definition at line 42 of file credits.c.
Referenced by DisplayScroll_InitObjectTable(), and DisplayScroll_UpdateObjects().
| #define CREDITS_RING_ROWS 32 |
Definition at line 43 of file credits.c.
Referenced by DisplayScroll_InitObjectTable(), DisplayScroll_RenderEnteringLine(), and DisplayScroll_UpdateObjects().
| #define CREDITS_LINE_TILES 24 |
Definition at line 44 of file credits.c.
Referenced by DisplayScroll_InitObjectTable(), DisplayScroll_RenderEnteringLine(), and DisplayScroll_UpdateObjects().
| #define CREDITS_RING_TILES (CREDITS_RING_ROWS * CREDITS_LINE_TILES) |
Definition at line 45 of file credits.c.
Referenced by DisplayScroll_InitObjectTable(), and DisplayScroll_UpdateObjects().
| #define CREDITS_RING_BYTES (CREDITS_RING_TILES * TILE_SIZE_4BPP) |
Definition at line 46 of file credits.c.
Referenced by DisplayScroll_InitObjectTable().
| #define CREDITS_BUFFER_BYTES 0x900 |
Definition at line 47 of file credits.c.
Referenced by DisplayScroll_DrawLine().
| #define CREDITS_RASTER_STRIDE 256 |
Definition at line 48 of file credits.c.
Referenced by DisplayScroll_DrawLine().
| #define CREDITS_DECODER_HEAP_SLOT 49 |
Definition at line 49 of file credits.c.
Referenced by Graphics_LoadCharacterBlockAndPalette().
| #define CREDITS_BORDER_SPRITES 24 |
Definition at line 50 of file credits.c.
Referenced by DisplayScroll_UpdateObjects().
| #define CREDITS_OAM_ENTRIES 128 |
Definition at line 51 of file credits.c.
Referenced by DisplayScroll_InitObjectTable().
| #define SCROLL_OBJECTS (*(struct DisplayScrollObject **)&gFlashNumRemainingBytes) |
Definition at line 287 of file credits.c.
Referenced by DisplayScroll_InitObjectTable(), and DisplayScroll_UpdateObjects().
Definition at line 289 of file credits.c.
Referenced by DisplayScroll_InitObjectTable(), and DisplayScroll_RenderEnteringLine().
| #define CREDITS_END_OF_TEXT (*(s16 *)&gFlash_Handler0) |
Definition at line 290 of file credits.c.
Referenced by DisplayScroll_InitObjectTable(), DisplayScroll_RenderEnteringLine(), and DisplayScroll_UpdateObjects().
| void Graphics_ClearCharacterBlockAndPalette | ( | s32 | alternate | ) |
Fills 30 KB of 256-color tiles with color 1 and clears 128 palette colors.
Called by the credits slideshow before loading a backdrop into a half.
| alternate | 0 selects the first half (VRAM 0x06000000, palette 0-127). 1 selects the second half (VRAM 0x06008000, palette 128-255, fill 129). |
Definition at line 57 of file credits.c.
Referenced by DisplayScroll_RunSlideshow(), Graphics_ClearCharacterBlockAndPalette(), and Graphics_LoadCharacterBlockAndPalette().
Loads a credits backdrop into one of the two tile/palette halves.
A zero resource clears that half; the second half offsets its palette indices. Called by DisplayScroll_RunSlideshow for each picture.
Definition at line 122 of file credits.c.
Referenced by DisplayScroll_RunSlideshow(), and Graphics_LoadCharacterBlockAndPalette().
| void DisplayScroll_BuildHblankWordTable | ( | u32 * | destination | ) |
Builds the 512 tilemap words surrounding a sliding credits backdrop: blank margins, 240 consecutive tile pairs, then a zero-filled tail.
Called by DisplayScroll_RunSlideshow.
Definition at line 159 of file credits.c.
Referenced by DisplayScroll_BuildHblankWordTable(), and DisplayScroll_RunSlideshow().
| void DisplayScroll_StepPositionEveryFourFrames | ( | void | ) |
A VBlank task of the credits slideshow: drifts both backdrops together, keeping their horizontal offsets aligned throughout the crossfade.
Definition at line 191 of file credits.c.
Referenced by DisplayScroll_RunSlideshow(), and DisplayScroll_StepPositionEveryFourFrames().
| s32 DisplayScroll_RunSlideshow | ( | void | ) |
Crossfades the credits backdrop sequence through alternating tile banks while the staff names scroll over it, then restores the display for the following screen.
Reached through the scroll far-call table at the end of the game.
Definition at line 204 of file credits.c.
Referenced by DisplayScroll_RunSlideshow().
| STATIC_ASSERT | ( | sizeof(struct DisplayScrollObject) | = =8 | ) |
| void DisplayScroll_UpdateObjects | ( | void | ) |
A VBlank task scheduled by DisplayScroll_InitObjectTable: maps the visible sixteen rows onto the tile ring and uploads their sprites.
Advances one pixel every fourth frame until the end-of-text latch stops the scroll.
Definition at line 933 of file credits.c.
Referenced by DisplayScroll_InitObjectTable(), and DisplayScroll_UpdateObjects().
| void DisplayScroll_RenderEnteringLine | ( | void | ) |
A main-loop task scheduled by DisplayScroll_InitObjectTable: renders each entering line sixteen rows ahead of the visible top, into the hidden half of the tile ring.
A null table entry latches the end-of-text state.
Definition at line 961 of file credits.c.
Referenced by DisplayScroll_InitObjectTable(), and DisplayScroll_RenderEnteringLine().
| void DisplayScroll_InitObjectTable | ( | void | ) |
Allocates the credits sprites, builds the blank border and text rows, clears the tile ring and schedules scrolling and line rendering.
Called by DisplayScroll_RunSlideshow; the credits keep their state in borrowed flash-library cells (see the graphics README).
Definition at line 983 of file credits.c.
Referenced by DisplayScroll_InitObjectTable(), and DisplayScroll_RunSlideshow().
Centers, right-aligns or left-aligns one credits line in a 192-pixel row.
Rasterizes its glyphs and shadow, packs 4-bit pixels and uploads 24 tiles beginning at firstTile. Called by the line-rendering task and, for the blank rows, by DisplayScroll_InitObjectTable. Returns -1 at the null end marker, otherwise zero.
Definition at line 1041 of file credits.c.
Referenced by DisplayScroll_DrawLine(), DisplayScroll_InitObjectTable(), and DisplayScroll_RenderEnteringLine().
| const u32 gDisplayScroll_SlideResources[] |
Battle backgrounds shown in the credits; 0 clears the display.
Definition at line 82 of file credits.c.
Referenced by DisplayScroll_RunSlideshow().
|
extern |
Credits scroll position in pixels, in the low half of a flash work cell.
Referenced by Bios_CpuSet(), DisplayScroll_InitObjectTable(), DisplayScroll_RenderEnteringLine(), DisplayScroll_UpdateObjects(), EraseAtmelFlashChip(), EraseAtmelFlashSector(), EraseFlashChip(), EraseFlashSector(), IdentifyFlash(), LzPack_ConsumeSlotBytes(), LzPack_CopyBufferedBytes(), LzPack_FindWindowMatch(), LzPack_InsertSlotNode(), LzPack_PackStream(), LzPack_RemoveSlotNode(), LzPack_ResetSlotBuckets(), ProgramAtmelFlashSector(), ProgramFlashByte(), and STATIC_ASSERT().
|
static |
| const void* gDisplayScroll_LineTable[] |
Credits text, one row per line, terminated by 0.
Definition at line 313 of file credits.c.
Referenced by DisplayScroll_InitObjectTable(), and DisplayScroll_RenderEnteringLine().