14 for (j = 0; j < 3; j++) {
18 for (i = 0; i < 5; i++, pos++) {
22 for (i = 0; i < 5; i++, pos++) {
30 for (i = 0; i < 2; i++) {
38 for (i = 0; i < 3; i++) {
42 for (i = 0; i < 6; i++) {
45 for (i = 0; i < 6; i++) {
48 for (i = 0; i < 7; i++) {
69 for (i = 0; i < 5; i++, layout++) {
73 for (i = 0; i < 5; i++) {
79 for (i = 0; i < 5; i++) {
82 for (i = 0; i < 5; i++) {
102 for (i = 0; i < 5; i++, layout++) {
106 for (i = 0; i < 5; i++) {
112 for (i = 0; i < 5; i++) {
115 for (i = 0; i < 5; i++) {
127 for (i = 0; i < 2; i++) {
131 for (i = 0; i < 2; i++) {
151 for (i = 0; i < 3; i++) {
166 for (i = 0; i < 3; i++) {
181 for (i = 0; i < 6; i++) {
182 item = stats->
equip[i];
191 for (i = 0; i < 6; i++) {
205 for (i = 0; i < 6; i++) {
212 for (i = 0; i < 7; i++) {
219 for (i = 0; i < 13; i++) {
236 for (i = 0; i < 13; i++) {
272 if (*(stats->
equip + slot) != 0) {
278 *(stats->
equip + slot) = 0;
284 hand = &stats->
equip[2];
287 if (stats->
equip[3] != 0) {
288 hand = &stats->
equip[3];
296 for (j = 0; j < 2; j++) {
297 equip = &stats->
equip[j + 4];
308 stats->
equip[2] = item;
309 stats->
equip[3] = item;
311 *(stats->
equip + slot) = item;
316 for (i = 0; i < 6; i++) {
326 if (before < after) {
328 }
else if (after < before) {
345 for (i = 0; i < 7; i++) {
353 if (before < after) {
355 }
else if (after < before) {
361 for (i = 0; i < 13; i++) {
390 for (i = 0; i < screen->
count; i++) {
400 for (i = 0; i < screen->
count; i++) {
469 for (i = 0; i < 6; i++) {
470 item = stats->
equip[i];
501 switch (screen->
step) {
556 if (option != screen->
option) {
581 if (screen->
option == 0) {
597 if (screen->
option == 0) {
620 if (screen->
count == 1) {
717 if (member != screen->
member) {
735 if (screen->
option == 0) {
761 if (screen->
count == 1) {
903 switch (screen->
state) {
907 for (i = 0; i < 3; i++) {
912 for (i = 0; i < screen->
count; i++) {
916 for (i = 0; i < 2; i++) {
948 return (
Task *)screen;
DigivolvePanel * STSTATUS_createDigivolvePanel(StatsScreen *screen)
Creates the fifth screen's digivolution panel (task) for its chosen party member.
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)
EquipPanel * STSTATUS_createEquipPanel(StatsScreen *screen)
Creates the fifth screen's equipment panel (task) for its chosen party member.
#define TEXT_STATUS
STATUS: the field menu's and STSTATUS's.
#define TEXT_DIGIMON_NAMES
DIGNAM.
#define TEXT_ITEM_NAMES
ITMNAM.
#define FILE_MENU_SPRITES
Files the engine loads by number.
FileCache FILE_CACHE
The file cache.
#define STAT_STRENGTH
the six battle stats
#define EQUIP_KIND_GROUP_ACCESSORY
one of its group at a time
#define STAT_LEVEL
Indices of a partner's stats (PartnerStats.stats, computeStats, setStat)
#define STAT_RESISTS
the first of the seven resistances
#define EQUIP_KIND_BOTH_HANDS
takes slots 2 and 3
DigimonData *(* GET_DIGIMON)(s32 id)
getDigimon for the overlays, in the small data (.sdata) between game/items.c's and file/file_table....
#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_MENU_CONFIRM
SYSTEM07.
#define SOUND_SELECT
Sounds the overlays share, with SOUNDTST's names.
#define SOUND_MENU_CANCEL
SYSTEM01.
#define SOUND_MENU_MOVE
SYSTEM06.
#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 STSTATUS_updateStatusScreen(StatsScreen *screen, StatsScreenWindows *windows)
The fifth screen's task: counts the party, starts the pages' fades and creates the windows,...
void STSTATUS_drawStatusScreen(StatsScreen *screen)
Draws the partners' portraits and frames, the chosen one's, its equipment and the panels' frames.
void STSTATUS_showPartnerStats(StatsScreen *screen, StatsScreenWindows *windows, s32 show)
Shows the party member's stats, in another palette the ones that are raised.
static void STSTATUS_closeSecondOfThreeStatusPages(StatsScreen *screen, StatsScreenWindows *windows)
Three members: once the second page is closed, starts closing the first and the title.
void STSTATUS_createStatusWindows(StatsScreen *screen, StatsScreenWindows *windows)
Creates the windows of the fifth screen.
void STSTATUS_showStatusPage(StatsScreen *screen, StatsScreenWindows *windows, s32 member, s32 show)
As STSTATUS_showCardPage.
void STSTATUS_showPartnerEquipment(StatsScreen *screen, StatsScreenWindows *windows, s32 show)
The party member's equipment, or the slots' names where it has none.
static void STSTATUS_openFirstOfTwoStatusPages(StatsScreen *screen, StatsScreenWindows *windows)
Two members: once the first page and the title are in, shows them and starts the second page and the ...
static void STSTATUS_startStatusScreen(StatsScreen *screen)
Starts the fades of the first page and the title (and, with one party member, of the help's panel); t...
void STSTATUS_showChosenPage(StatsScreen *screen, StatsScreenWindows *windows, s32 member, s32 show)
As STSTATUS_showStatusPage, on the first page.
Task * STSTATUS_createStatusScreen(FieldMenuScreen *menu, s32 extra)
Creates the field menu's fifth screen (task), the party's stats, slots and equipment.
static void STSTATUS_waitStatusPanel(StatsScreen *screen, StatsScreenWindows *windows)
Once the panel is gone, goes back to the question.
static void STSTATUS_openStatusScreenAlone(StatsScreen *screen, StatsScreenWindows *windows)
One member: once the page and the panels are in, shows the page, the title and the help.
s32 STSTATUS_equipStats[]
The stats screen 4 shows, as STSTATUS_panelStats.
s32 STSTATUS_pageStats4[]
static void STSTATUS_closeStatusScreenAlone(StatsScreen *screen)
One member: once the page and the panels are closed, goes on to the end.
void STSTATUS_previewStats(StatsScreen *screen, s32 slot, s32 item)
Shows the party member's stats as they would be with the item in the slot, in another palette the one...
static void STSTATUS_endStatusPages(StatsScreen *screen)
With the pages closed: the chosen member's question, or the screen's end.
void STSTATUS_runStatusChoice(StatsScreen *screen, StatsScreenWindows *windows)
Runs the fifth screen's question: the panels come in, the cursor picks one of the two options and the...
static void STSTATUS_stepStatusCursor(StatsScreen *screen)
Moves the member cursor's palette on every 9 frames.
static void STSTATUS_closeStatusScreen(StatsScreen *screen, StatsScreenWindows *windows)
Starts closing the pages: the last page, the help's panel and, with one member, the title.
void STSTATUS_showStatusChoices(StatsScreen *screen, StatsScreenWindows *windows, s32 show)
Shows or hides the fifth screen's two options: the digivolution panel and the equipment panel.
static void STSTATUS_openThirdStatusPage(StatsScreen *screen, StatsScreenWindows *windows)
Three members: once the third page and the help's panel are in, shows the page and the help.
static void STSTATUS_closeThirdStatusPage(StatsScreen *screen, StatsScreenWindows *windows)
Three members: once the third page and the help's panel are closed, starts closing the second.
void STSTATUS_runStatusScreen(StatsScreen *screen, StatsScreenWindows *windows)
The fifth screen's steps: the pages fade in, a party member is chosen and its panel opens,...
static void STSTATUS_openSecondOfThreeStatusPages(StatsScreen *screen, StatsScreenWindows *windows)
Three members: once the second page is in, shows it and starts the third page and the help's panel.
static void STSTATUS_closeFirstStatusPage(StatsScreen *screen)
Two or three members: once the first page and the title are closed, goes on to the end.
s32 STSTATUS_equipStrings[]
The strings of the empty equipment slots, as STSTATUS_slotStrings.
static void STSTATUS_openStatusPanel(StatsScreen *screen, StatsScreenWindows *windows)
Creates the chosen option's panel: the digivolution panel or the equipment panel.
static void STSTATUS_openSecondOfTwoStatusPages(StatsScreen *screen, StatsScreenWindows *windows)
Two members: once the second page and the help's panel are in, shows the page and the help.
static void STSTATUS_openFirstOfThreeStatusPages(StatsScreen *screen, StatsScreenWindows *windows)
Three members: once the first page and the title are in, shows them and starts the second page.
static void STSTATUS_chooseStatusMember(StatsScreen *screen)
Choosing a party member: up and down move the cursor, cross closes the pages for the member's questio...
static void STSTATUS_closeSecondOfTwoStatusPages(StatsScreen *screen, StatsScreenWindows *windows)
Two members: once the second page and the help's panel are closed, starts closing the first and the t...
void STSTATUS_showPartnerSlots(StatsScreen *screen, StatsScreenWindows *windows, s32 show)
The partner's slots: the entries in it (getPartnerSlots), the one it starts battles as (battleDigivol...
void(* setPos)()
(cursor, x, y)
void(* setVisible)()
(cursor, visible)
Digimon definition (DIGIMON_DATA, 52 of them; the first 8 are the partners)
u8 nameId
string in file 0x4F
void *(* getEntry)(u32 fileAndIndex)
struct PartnerStats *(* getPartnerStats)(s32 partner)
void(* computeStats)(s32 partner, union PartnerTotals *out)
s32(* getPartyMember)(u32 index)
s32(* getPartnerSlots)()
(partner, s16 *out): the count
Partner partners[PARTNER_COUNT]
s32(* getCategory)(s32 item)
getItemCategory
struct ItemInfo *(* get)(s32 item)
getItem
ItemRecord data
the type's record, or the usable items' effect
PartnerStats.equip as a whole: STSTATUS and STITSHOP save it with a struct copy before they equip an ...
A partner Digimon from its name on (Partner.info), as getPartnerStats gives it.
One of the eight partner Digimon.
s32 battleDigivolve
an entry id, compared with the slots': the Digimon the battle starts it as, 0 for its own
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)
TextWindow * values[13]
the stats of STSTATUS_equipStats
void * panel
STSTATUS_createDigivolvePanel's or STSTATUS_createEquipPanel's, while open.
TextWindow * slots[3]
the partner's getPartnerSlots entries
The field menu's fifth screen (STSTATUS_createStatusScreen)
void(* previewStats)(struct StatsScreen *screen, s32 slot, s32 item)
s32 option
the options' cursor
s32 frames[3]
of the partners' portraits
void(* nextState)(struct StatsScreen *task)
void(* setSubstate)(struct StatsScreen *task, s32 substate)
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(* setPalette)(struct TextWindow *obj, u8 arg)
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
#define PALETTE_BLUE
a light blue: what is highlighted or current
#define PALETTE_WHITE
The text windows' palettes (TextWindow.palette, setPalette): rows of the font's CLUTs,...
TextWindow * createTextWindow(s16 layerId, s16 style, s16 x, s16 y)
A text window on a layer, in a font style, at (x, y)
ItemInfo.data's record, by ItemInfo.type.
computeStats' result: the stats with the equipment added, by STAT_* or by name.
s16 tp
what the training's intensities cost
s16 lowered[3]
taken from battle[0], [1] and [4]
struct PartnerTotals::@10 fields