11 if (panel->
list == 0) {
13 for (i = 0; i < panel->
count; i++) {
39 for (i = 0, count = 0; i < 3; i++) {
40 row = &screen->
rows[member];
44 for (j = 0; j < 6; j++) {
46 if (tech >= 0xB8 && tech < 0xBD) {
48 for (k = 0, found = 0; k < 5; k++) {
49 if (tech == techs[k]) {
55 screen->
rows[member].
techs[count++] = tech;
88 info = &
TECHS[tech - 1];
90 return (power << 6) + power * stats.
fields.
battle[3] / 8;
112 if (
TECHS[tech - 1].kind == 3) {
125 for (i = 0; i < screen->
count; i++) {
135 for (; i < screen->
count; i++) {
154 for (i = 0; i < screen->
count; i++) {
157 if (full == screen->
count) {
182 for (j = 0; j < 3; j++) {
186 for (i = 0; i < 5; i++, pos++) {
190 for (i = 0; i < 5; i++, pos++) {
204 for (i = 0; i < 5; i++) {
223 for (i = 0; i < 5; i++, layout++) {
227 for (i = 0; i < 5; i++) {
233 for (i = 0; i < 5; i++) {
236 for (i = 0; i < 5; i++) {
284 for (i = 0; i < screen->
count; i++) {
315 for (i = 0; i < screen->
count; i++) {
387 if (screen->
count == 1) {
486 if (member != screen->
member) {
564 if (old != screen->
cursor) {
571 if (
TECHS[tech - 1].kind == 3) {
624 if (old != screen->
target) {
671 if (screen->
step == 0x1F) {
697 if (screen->
count == 1) {
844 switch (screen->
state) {
848 for (i = 0; i < 3; i++) {
853 for (i = 0; i < screen->
count; i++) {
857 for (i = 0; i < 2; i++) {
861 for (i = 0; i < screen->
count; i++) {
883 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...
Cursor * createCursor(s16 layerId, s32 depth, s16 x, s16 y)
A menu cursor on a layer at (x, y)
#define TEXT_SKILL_NAMES
SKLNAM.
#define TEXT_STATUS
STATUS: the field menu's and STSTATUS's.
#define TEXT_SKILL_INFO
SKLINF.
#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 SKILL_ID
PartnerEntry.skills.
#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...
s32 STSTATUS_itemLists[]
The item lists of the first screen's options.
TechData TECHS[443]
The techniques, from 1: technique n is TECHS[n - 1].
#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_RECOVERY
RECOVERY.
#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(* setPos)()
(cursor, x, y)
void(* setVisible)()
(cursor, visible)
void *(* getEntry)(u32 fileAndIndex)
s32(* getPartnerEntry)()
-1 if it hasn't the Digimon
struct PartnerStats *(* getPartnerStats)(s32 partner)
void(* computeStats)(s32 partner, union PartnerTotals *out)
s32(* getPartyMember)(u32 index)
s32(* getPartnerSlots)()
(partner, s16 *out): the count
s32(* list)(s32 type, s16 *out)
listItems
A list of the first screen (STSTATUS_createItemList)
s32 list
into STSTATUS_itemLists
One of a partner's Digimon (getPartnerEntry, setPartnerEntry)
s16 skills[6]
SKILL_ID and the flags below, 0 for none.
A partner Digimon from its name on (Partner.info), as getPartnerStats gives it.
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.
A technique (TECHS, from 1: technique n is TECHS[n - 1])
u8 effectPower
the effect's strength (a boost's amount, a drain's 128ths)
A party member's techniques on the tech screen.
s16 techs[5]
the ones it can use here
s16 slots[4]
getPartnerSlots
The tech screen's windows.
TextWindow * mp
the technique's cost
The tech screen (STSTATUS_createTechScreen)
void(* nextState)(struct TechScreen *task)
s32 member
who uses the technique
s32 frames[3]
of the partners' portraits
s32 targetShown
the target's cursor
void(* setSubstate)(struct TechScreen *task, s32 substate)
s32 memberShown
the user's cursor
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
static void STSTATUS_closeTechScreen(TechScreen *screen, TechScreenWindows *windows)
Starts closing the screen: the last page, the help's panel and, with one member, the title.
void STSTATUS_showChosenTech(TechScreen *screen, TechScreenWindows *windows, s32 show)
Shows or hides the chosen technique's name and MP cost.
static void STSTATUS_closeSecondOfThreeTechPages(TechScreen *screen, TechScreenWindows *windows)
Three members: once the second page is closed, starts closing the first and the title.
void STSTATUS_runTechScreen(TechScreen *screen, TechScreenWindows *windows)
The technique screen's update: opens the pages, picks who uses a technique, which one and on whom,...
s32 STSTATUS_useTech(TechScreen *screen, TechScreenWindows *windows, s32 failSound)
Uses the chosen healing technique on the target or on the whole party, then plays FAILSOUND and says ...
static void STSTATUS_closeNoFieldTechs(TechScreen *screen, TechScreenWindows *windows)
Cross takes the message away and goes back to choosing a member.
s32 STSTATUS_pageStats8[]
Task * STSTATUS_createTechScreen(FieldMenuScreen *menu, s32 extra)
Creates the field menu's technique screen (task)
static void STSTATUS_enterTechList(TechScreen *screen, TechScreenWindows *windows)
Once the list's panel is in, shows the techniques and the cursor on the first one.
static void STSTATUS_closeThirdTechPage(TechScreen *screen, TechScreenWindows *windows)
Three members: once the third page and the help's panel are closed, starts closing the second.
void STSTATUS_createTechWindows(TechScreen *screen, TechScreenWindows *windows)
Creates the technique screen's windows: the title, the party's pages, the help, the MP cost and the l...
s32 STSTATUS_listFieldTechs(TechScreen *screen, s32 member)
Lists the techniques of a party member that can be used here (0xB8-0xBC), each once,...
void STSTATUS_updateTechScreen(TechScreen *screen, TechScreenWindows *windows)
The technique screen's task: counts the party, lists each member's techniques that can be used here a...
static void STSTATUS_chooseTechTarget(TechScreen *screen, TechScreenWindows *windows)
Choosing whom the technique heals: up and down move the cursor, cross uses it or says the MP is short...
void STSTATUS_showTechList(TechScreen *screen, TechScreenWindows *windows, s32 show)
Shows or hides the list of the party member's techniques.
static void STSTATUS_closeTechScreenAlone(TechScreen *screen)
One member: ends the screen once the page and the panels are closed.
s32 STSTATUS_techSprites[]
The sprites of the technique counts, from 1.
static void STSTATUS_openTechList(TechScreen *screen, TechScreenWindows *windows)
Starts opening the member's technique list, or says they have none.
static void STSTATUS_closeTechList(TechScreen *screen)
Once the list's panel is closed, goes back to choosing a member.
static void STSTATUS_openFirstOfThreeTechPages(TechScreen *screen, TechScreenWindows *windows)
Three members: once the first page and the title are in, shows them and starts the second page.
static void STSTATUS_chooseTechMember(TechScreen *screen)
Choosing who uses a technique: up and down move the cursor, cross opens the member's techniques,...
void STSTATUS_fillItemList(ItemList *panel)
Fills the item list with the owned items of its option's list (STSTATUS_itemLists) and counts them.
static void STSTATUS_closeShortMp(TechScreen *screen, TechScreenWindows *windows)
Cross takes the short MP message away and goes back to the list.
static void STSTATUS_closeFirstTechPage(TechScreen *screen)
Two or three members: ends the screen once the first page and the title are closed.
static void STSTATUS_openThirdTechPage(TechScreen *screen, TechScreenWindows *windows)
Three members: once the third page and the help's panel are in, shows the page.
static void STSTATUS_chooseTech(TechScreen *screen, TechScreenWindows *windows)
Choosing a technique: up and down move the cursor, cross uses it (after choosing whom,...
void STSTATUS_drawTechScreen(TechScreen *screen)
Draws the partners' portraits and frames, the cursors and the help arrow.
static void STSTATUS_showTechHelp(TechScreen *screen, TechScreenWindows *windows)
Shows the member cursor and the help for choosing who uses a technique.
s32 STSTATUS_getTechHealing(s32 partner, s32 tech)
A technique's healing: 64 times its power, plus its power times the partner's wisdom over 8.
static void STSTATUS_openFirstOfTwoTechPages(TechScreen *screen, TechScreenWindows *windows)
Two members: once the first page and the title are in, shows them and starts the second page and the ...
static void STSTATUS_closeTechUsed(TechScreen *screen, TechScreenWindows *windows)
Cross takes the technique's result away and goes back to where it was chosen.
static void STSTATUS_startTechScreen(TechScreen *screen)
Starts the fades of the first page and the title (and, with one party member, of the help's panel); t...
static void STSTATUS_stepTechCursor(TechScreen *screen)
Moves the member cursor's palette on every 9 frames.
static void STSTATUS_openTechScreenAlone(TechScreen *screen, TechScreenWindows *windows)
One member: once the page and the panels are in, shows the title and the page.
static void STSTATUS_animateTechPortraits(TechScreen *screen)
Moves the partners' portraits to their next frames every 13 frames.
void STSTATUS_showTechPage(TechScreen *screen, TechScreenWindows *windows, s32 member, s32 show)
As STSTATUS_showCardPage.
s32 STSTATUS_getChosenTech(TechScreen *screen)
The chosen technique, or 0 if its user hasn't the MP for it.
static void STSTATUS_openSecondOfThreeTechPages(TechScreen *screen, TechScreenWindows *windows)
Three members: once the second page is in, shows it and starts the third page and the help's panel.
static void STSTATUS_sayNoFieldTechs(TechScreen *screen, TechScreenWindows *windows)
Hides the member cursor and says the member has no technique to use here.
static void STSTATUS_openSecondOfTwoTechPages(TechScreen *screen, TechScreenWindows *windows)
Two members: once the second page and the help's panel are in, shows the page.
static void STSTATUS_closeSecondOfTwoTechPages(TechScreen *screen, TechScreenWindows *windows)
Two members: once the second page and the help's panel are closed, starts closing the first and the t...
#define PALETTE_WHITE
The text windows' palettes (TextWindow.palette, setPalette): rows of the font's CLUTs,...
#define PALETTE_GREY
what is unavailable
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.
s16 battle[6]
strength (raised by weapons), defense (by armour), spirit, wisdom, speed and charisma (by all equipme...
struct PartnerTotals::@10 fields