24#if VERSION_US || VERSION_JP
25#define CNTY_SEL_FILE 0x892
27#define CNTY_SEL_FILE 0x8A3
29#define CNTY_SEL_SPRITES (CNTY_SEL_FILE << 16)
30#define CNTY_SEL_IMAGES (CNTY_SEL_FILE << 16 | 1)
33#define SPRITE_BACKGROUND 0
34#define SPRITE_RIGHT_PANEL 1
35#define SPRITE_TOP_PANEL 2
36#define SPRITE_LEFT_PANEL 3
37#define SPRITE_OPTIONS 4
40#define CNTY_SEL_LAYER 0x100
43#define CNTY_SEL_SOUND_BANK 0x21
44#define CNTY_SEL_MUSIC MUSIC(0x21, 2)
CountryMenuTask * CNTY_SEL_startMenuTask(void)
Creates the screen's controller (task), which starts the background and panels.
PanelTask * CNTY_SEL_startLeftPanelTask(void)
Creates the left panel (task), closed.
void CNTY_SEL_setCursorSelection(CursorTask *task, s16 selection)
Moves the highlight to option selection (CursorTask.setSelection)
s32 CNTY_SEL_getTopPanelScale(PanelTask *task, s32 phase)
The top panel's height scale on the current frame of its opening (phase 0) or closing (1)
void CNTY_SEL_tickTopPanel(PanelTask *task)
The top panel's task: draws it; each TASK_DONE from the controller opens it, the next one closes it.
PanelTask * CNTY_SEL_startTopPanelTask(void)
Creates the top panel (task), closed.
PanelTween CNTY_SEL_rightPanelTweens[]
MenuStep
CountryMenuTask substates (Task.substate) in TASK_RUN.
s32 CNTY_SEL_getRightPanelScale(PanelTask *task, s32 phase)
The right panel's width scale on the current frame of its opening (phase 0) or closing (1)
void CNTY_SEL_drawLeftPanel(PanelTask *task)
Draws the left panel, with its own CLUT, its width scaled from the screen's left edge.
void CNTY_SEL_tickRightPanel(PanelTask *task)
The right panel's task: draws it; each TASK_DONE from the controller opens it, the next one closes it...
void CNTY_SEL_tickBackground(CountryBackgroundTask *task)
The background's task: scrolls and draws it; when done, keeps it scrolling while the screen fades to ...
void CNTY_SEL_tickMenu(CountryMenuTask *task, MenuChildren *children)
The screen's controller: opens the panels one after the other and lets the player pick an option with...
PanelTask * CNTY_SEL_startRightPanelTask(void)
Creates the right panel (task), closed.
void CNTY_SEL_drawTopPanel(PanelTask *task)
Draws the top panel, its height scaled from its top edge.
u8 CNTY_SEL_languages[]
The language of each option.
void CNTY_SEL_drawBackground(CountryBackgroundTask *task)
Draws the background, moved diagonally by half its scroll.
CountryBackgroundTask * CNTY_SEL_startBackgroundTask(void)
Creates the scrolling background (task)
s32 CNTY_SEL_getFadeLevel(s32 time)
How dark the fade-out is on its frame time: 0 to 255 over 30 frames.
void CNTY_SEL_tickCursor(CursorTask *task)
The highlighted option's task: blinks it through 8 CLUT rows, 4 frames each; when done (Start pressed...
void CNTY_SEL_drawFade(s32 level)
Darkens the whole screen by level (0 to 255, 255 is black)
s16 CNTY_SEL_stepAnimation(AnimState *anim, AnimFrame *frames, s32 depth)
Advances anim by the frames elapsed and returns the frame to show (0xFF at the end)
s32 CNTY_SEL_getLeftPanelScale(PanelTask *task, s32 phase)
The left panel's width scale on the current frame of its opening (phase 0) or closing (1)
CursorTask * CNTY_SEL_startCursorTask(void)
Creates the highlighted option (task), once the panels are open.
void CNTY_SEL_drawRightPanel(PanelTask *task)
Draws the right panel, its width scaled from the screen's right edge.
void CNTY_SEL_drawCursor(CursorTask *task)
Draws the highlighted option, in the colors of the CLUT row of its current frame.
void CNTY_SEL_tickLeftPanel(PanelTask *task)
The left panel's task: draws it; each TASK_DONE from the controller opens it, the next one closes it.
PanelTween CNTY_SEL_topPanelTweens[]
Opening (0) and closing (1) tweens of each panel's scale.
AnimFrame CNTY_SEL_cursorFlash[]
Sprite frames of the chosen option once Start is pressed.
void CNTY_SEL_tickScreen(Task *task, CountryMenuTask **menu)
The mode's root task: once the sound bank is loaded, sets up the display and the layer,...
LeftPanelTween CNTY_SEL_leftPanelTweens[]
RECT CNTY_SEL_fadeRect
A little larger than the screen.
#define TASK_HEADER(Type)
One frame of a sprite animation; frame 0xFF ends it (or loops it)
The scrolling background, which also fades the screen out.
void(* setSelection)(struct CursorTask *task, s16 selection)
s32 pad
0 in both tweens; never read: the tweens are 0xC bytes apart
A panel that opens and closes by scaling.
s16 phase
0: opening, 1: closing
A linear tween of a panel's scale.
Any task, seen through its header.