17 for (j = 0; j < 3; j++) {
21 for (i = 0; i < 5; i++, pos++) {
25 for (i = 0; i < 5; i++, pos++) {
43 for (i = 0; i < 5; i++, layout++) {
47 for (i = 0; i < 5; i++) {
53 for (i = 0; i < 5; i++) {
56 for (i = 0; i < 5; i++) {
80 for (i = 0; i < screen->
count; i++) {
132 for (i = 0; i < screen->
count; i++) {
136 sprite.
setPivot(0x7C, i * 0x2E + 0x27);
139 sprite.
setPivot(0x7C, i * 0x2E + 0x27);
153 for (i = 0; i < screen->
count; i++) {
157 sprite.
setPivot(0, i * 0x2E + 0x25);
160 sprite.
setPivot(0x7C, i * 0x2E + 0x27);
163 sprite.
setPivot(0, i * 0x2E + 0x25);
168 sprite.
setPivot(0, i * 0x2E + 0x25);
170 sprite.
setPivot(0x7C, i * 0x2E + 0x27);
172 sprite.
setPivot(0, i * 0x2E + 0x25);
201 switch (screen->
first) {
204 if (screen->
second == 1) {
211 if (screen->
second == 0) {
218 if (screen->
second == 0) {
231 if (screen->
count == 1) {
238 if (screen->
count == 1) {
252 if (screen->
count == 2) {
257 if (screen->
count == 2) {
296 if (old != screen->
cursor) {
339 if (old != screen->
second) {
385 switch (screen->
count) {
527 switch (screen->
state) {
531 for (i = 0; i < 3; i++) {
536 for (i = 0; i < screen->
count; i++) {
540 for (i = 0; i < 2; i++) {
566 return (
Task *)screen;
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...
#define TEXT_STATUS
STATUS: the field menu's and STSTATUS's.
#define FILE_MENU_SPRITES
Files the engine loads by number.
FileCache FILE_CACHE
The file cache.
#define STAT_LEVEL
Indices of a partner's stats (PartnerStats.stats, computeStats, setStat)
#define STRETCH_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)
static void STSTATUS_openFirstSortPage(SortScreen *screen, SortScreenWindows *windows)
Once the first page and its panel are in, shows the page and, with one member, the help,...
static void STSTATUS_stepSortArrow(SortScreen *screen)
Moves the swap arrow's palette on every 11 frames.
s32 STSTATUS_pageStats9[]
static void STSTATUS_closeSecondOfThreeSortPages(SortScreen *screen, SortScreenWindows *windows)
Three members: once the second page is closed, starts closing the first and the title.
void STSTATUS_showSortPage(SortScreen *screen, SortScreenWindows *windows, s32 member, s32 show)
As STSTATUS_showCardPage.
static void STSTATUS_stepSortCursor(SortScreen *screen)
Moves the member cursor's palette on every 8 frames.
void STSTATUS_runSortScreen(SortScreen *screen, SortScreenWindows *windows)
The party order screen's steps: the pages fade in, two members are chosen and swapped,...
void STSTATUS_updateSortScreen(SortScreen *screen, SortScreenWindows *windows)
The party order screen's task: counts the party, starts the fades and creates the windows,...
static void STSTATUS_closeSortScreenAlone(SortScreen *screen)
One member: ends the screen once the page is closed.
static void STSTATUS_swapMembers(SortScreen *screen)
Once both pages are hidden, swaps the two members in the party and starts their portraits again.
static void STSTATUS_closeThirdSortPage(SortScreen *screen, SortScreenWindows *windows)
Three members: once the third page and the help's panel are closed, starts closing the second.
Task * STSTATUS_createSortScreen(FieldMenuScreen *menu, s32 extra)
Creates the field menu's party order screen (task), where two members swap places.
static void STSTATUS_closeFirstSortPage(SortScreen *screen)
Two or three members: ends the screen once the first page and the title are closed.
void STSTATUS_drawSortScreen(SortScreen *screen)
Draws the cursors, the partners' portraits and frames, the two being swapped squashed by the fade,...
static void STSTATUS_closeSecondOfTwoSortPages(SortScreen *screen, SortScreenWindows *windows)
Two members: once the second page and the help's panel are closed, starts closing the first and the t...
static void STSTATUS_showSwappedPages(SortScreen *screen, SortScreenWindows *windows)
Once the fade is back, shows both pages again and goes back to choosing.
static void STSTATUS_openSecondSortPage(SortScreen *screen, SortScreenWindows *windows)
Once the second page is in, shows it and, with two members, the help, else starts the third page.
static void STSTATUS_chooseFirstToSwap(SortScreen *screen, SortScreenWindows *windows)
Choosing the first member to swap: up and down move the cursor (wrapping), cross picks the member and...
static void STSTATUS_chooseSecondToSwap(SortScreen *screen, SortScreenWindows *windows)
Choosing whom to swap the first member with: up and down move the arrow (wrapping,...
static void STSTATUS_closeSortScreen(SortScreen *screen, SortScreenWindows *windows)
Starts closing the screen: the help, the last page and its panel.
static void STSTATUS_openThirdSortPage(SortScreen *screen, SortScreenWindows *windows)
Once the third page and the help's panel are in, shows the page and the help.
static void STSTATUS_animateSortPortraits(SortScreen *screen)
Moves the partners' portraits to their next frames every 13 frames.
void STSTATUS_createSortWindows(SortScreen *screen, SortScreenWindows *windows)
Creates the party order screen's windows: the title, the help and the party's pages.
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
#define SOUND_MENU_CONFIRM
SYSTEM07.
#define SOUND_MENU_CANCEL
SYSTEM01.
#define SOUND_MENU_MOVE
SYSTEM06.
void initSpriteDrawer(SpriteDrawer *obj)
Clears a sprite drawer to neutral (no scale, gray tint, follows the scroll), gives it its methods and...
void *(* getEntry)(u32 fileAndIndex)
struct PartnerStats *(* getPartnerStats)(s32 partner)
void(* computeStats)(s32 partner, union PartnerTotals *out)
s32(* getPartyMember)(u32 index)
s32 party[3]
partner indices
The screen of STSTATUS_createSortScreen.
s32 first
the members to swap
s32 frames[3]
of the partners' portraits
void(* nextState)(struct SortScreen *task)
s32 arrowShown
the swap's arrow
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(* setClutRow)()
(row)
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.
void(* setRightAlign)()
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.