12#define SCENE_TASK Task
13#define SCENE_CHILD FieldMenuScreen
14#define SCENE_CREATE OVL_NAME(createMenu)
15#define SCENE_PRIM_BUFFERS 0x14000
16#define SCENE_OT_SHIFT 3
27 for (j = 0; j < 3; j++) {
31 for (i = 0; i < 5; i++, pos++) {
35 for (i = 0; i < 5; i++, pos++) {
44 for (i = 0; i < 2; i++) {
50 for (i = 0; i < screen->
childCount - 2; i++, children++) {
51 (*children)->setDepth(*children, screen->
depth - 1);
67 for (i = 0; i < 5; i++, layout++) {
71 for (i = 0; i < 5; i++) {
77 for (i = 0; i < 5; i++) {
80 for (i = 0; i < 5; i++) {
92 for (i = 0; i < 2; i++) {
98 for (i = 0; i < 2; i++) {
116 for (i = 0; i < screen->
count; i++) {
124 for (i = 0; i < screen->
count; i++) {
159 if (screen->
count == 1) {
250 if (choice != screen->
choice) {
257 if (screen->
choice == 0) {
333 if (screen->
step == 1) {
335 }
else if (screen->
step == 2) {
414 switch (screen->
state) {
418 for (i = 0; i < 3; i++) {
423 for (i = 0; i < screen->
count; i++) {
427 for (i = 0; i < 2; i++) {
453 return (
Task *)screen;
static void STSTATUS_chooseCardOption(PartyScreen *screen, PartyScreenWindows *windows)
Choosing an option: up and down move the cursor, cross picks the card album or the deck editor and fa...
static void STSTATUS_openThirdCardPage(PartyScreen *screen, PartyScreenWindows *windows)
Three members: once the third page and the panels are in, shows the page, the help,...
static void STSTATUS_closeThirdCardPage(PartyScreen *screen, PartyScreenWindows *windows)
Three members: once the third page and the panels are closed, starts closing the second.
static void STSTATUS_closeCardScreen(PartyScreen *screen, PartyScreenWindows *windows)
Starts closing the screen: the last page, the panels, the help, the hint and the options.
void STSTATUS_showCardPage(PartyScreen *screen, PartyScreenWindows *windows, s32 member, s32 show)
Shows or hides a party member's page: name and five stats (as showPartnerPage)
Task * STSTATUS_createCardScreen(FieldMenuScreen *menu, s32 extra)
Creates the screen with the party's pages (task) whose two options go to the card album (MODE_CARD_AL...
static void STSTATUS_openSecondOfTwoCardPages(PartyScreen *screen, PartyScreenWindows *windows)
Two members: once the second page and the panels are in, shows the page, the help,...
void STSTATUS_updateCardScreen(PartyScreen *screen, PartyScreenWindows *windows)
The screen's update: counts the party and opens the pages.
static void STSTATUS_closeSecondOfTwoCardPages(PartyScreen *screen, PartyScreenWindows *windows)
Two members: once the second page and the panels are closed, starts closing the first.
void STSTATUS_showCardChoices(PartyScreen *screen, PartyScreenWindows *windows, s32 show)
Shows or hides the help and the two options with their cursor.
static void STSTATUS_createCardFader(PartyScreen *screen, PartyScreenWindows *windows)
Creates the fader that hides the screen.
static void STSTATUS_closeCardScreenAlone(PartyScreen *screen)
One member: once the page and the panels are closed, goes on to the end.
static void STSTATUS_endCardScreen(PartyScreen *screen)
The end: goes to the chosen card album or deck editor, or ends the screen.
void STSTATUS_runCardScreen(PartyScreen *screen, PartyScreenWindows *windows)
Runs the screen: the pages come in one after the other, the cursor picks one of the two options,...
static void STSTATUS_openCardScreenAlone(PartyScreen *screen, PartyScreenWindows *windows)
One member: once the page and the panels are in, shows the page, the help, the hint and the options.
s32 STSTATUS_pageStats[]
The stats a party member's page shows, in PartnerTotals.stats (as STSTATUS_pageStats2,...
void STSTATUS_createCardWindows(PartyScreen *screen, PartyScreenWindows *windows)
Creates the windows of a screen with the party's pages.
void STSTATUS_drawCardScreen(PartyScreen *screen)
Draws the party's portraits and their pages' panels.
static void STSTATUS_openSecondOfThreeCardPages(PartyScreen *screen, PartyScreenWindows *windows)
Three members: once the second page is in, shows it and starts the third and the help's panel.
static void STSTATUS_closeSecondOfThreeCardPages(PartyScreen *screen, PartyScreenWindows *windows)
Three members: once the second page is closed, starts closing the first.
static void STSTATUS_openFirstOfTwoCardPages(PartyScreen *screen, PartyScreenWindows *windows)
Two members: once the first page is in, shows it and starts the second page and the help's panel.
static void STSTATUS_startCardScreen(PartyScreen *screen)
Starts the fade of the first page (and, with one party member, of the panels); the next substate is t...
static void STSTATUS_openFirstOfThreeCardPages(PartyScreen *screen, PartyScreenWindows *windows)
Three members: once the first page is in, shows it and starts the second.
GfxState GFX
GFX: the graphics state and its methods.
GameState GAME
The save data, the game mode and the methods.
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
Cursor * createCursor(s16 layerId, s32 depth, s16 x, s16 y)
A menu cursor on a layer at (x, y)
#define TEXT_STATUS
STATUS: the field menu's and STSTATUS's.
FileCache FILE_CACHE
The file cache.
#define MODE_DECK_EDITOR
STCRDDEK.
#define MODE_CARD_ALBUM
STCRDABM.
#define STAT_LEVEL
Indices of a partner's stats (PartnerStats.stats, computeStats, setStat)
#define STRETCH_SPRITE(sprite, level, x, y)
#define ZOOM_SPRITE(sprite, level, x, y)
#define SCREEN_LAYER
The layer over the whole screen that most modes create first and draw their menus on (FIELDSTG and ST...
#define PAD_PRESSED(button)
One button of pad 1: newly pressed, auto-repeated while held, or held.
#define PAD_REPEATED(button)
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
#define SOUND_SELECT
Sounds the overlays share, with SOUNDTST's names.
#define SOUND_MENU_CANCEL
SYSTEM01.
#define SOUND_CURSOR
SYSTEM02: a cursor moves.
void initSpriteDrawer(SpriteDrawer *obj)
Clears a sprite drawer to neutral (no scale, gray tint, follows the scroll), gives it its methods and...
void(* setPos)()
(cursor, x, y)
void(* setVisible)()
(cursor, visible)
void *(* getEntry)(u32 fileAndIndex)
struct PartnerStats *(* getPartnerStats)(s32 partner)
void(* computeStats)(s32 partner, union PartnerTotals *out)
void(* requestMode)(s32 mode, s32 arg)
s32(* getPartyMember)(u32 index)
The windows of the screens STSTATUS_updateCardScreen and STSTATUS_updateDemoScreen.
TextWindow * help
two lines
The screens with the party's pages (STSTATUS_createCardScreen, STSTATUS_createDemoScreen)
void(* setSubstate)(struct PartyScreen *task, s32 substate)
void(* nextState)(struct PartyScreen *task)
s32 frames[3]
of their portraits' animations
s32 choice
0, 1: the options
void(* start)(struct ScreenFade *fade, s32 fadeIn, s32 frames)
TASK_DONE when done.
short(* playSound)(s32 id)
returns the voice of a key-on
Draws sprites from a sprite sheet (such as file 0x277, the menu graphics): a sheet has a table of fra...
void(* setScale)()
(x, y, z), ONE = 1.0
void(* setLayerId)()
(id, depth)
void(* draw)()
(sheet, frame, x, y)
void(* setTexture)()
(x, y)
WindowPos * layout
where the windows go, and their strings
PartnerAnim * partnerAnims
the partners' portraits
s32(* updateFade)(PanelAnim *fade)
void(* startFade)(PanelAnim *fade, s32 fadeIn)
Any task, seen through its header.
A text window (createTextWindow): up to six text buffers (0 is shown, 1-5 are "work" buffers that con...
void(* setRightAlign)()
no prototype: callers would truncate u8 args
void(* setLines)()
no prototype: callers would truncate u8 args
void(* setVisible)(struct TextWindow *obj, u8 arg)
Where a window goes, and the string it shows.
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
TextWindow * createTextWindow(s16 layerId, s16 style, s16 x, s16 y)
A text window on a layer, in a font style, at (x, y)
computeStats' result: the stats with the equipment added, by STAT_* or by name.