41 if (panel->
step > 0) {
42 if (panel->
level > ONE) {
47 }
else if (panel->
level < 0) {
68 for (j = 2; j >= 0; j--) {
118 if (prev != task->
choice) {
198 if (task->
step != 0) {
272 switch (task->
state) {
277 for (n = 0;
INNS[n].
mode != 0; n++) {
278 if (
id ==
INNS[n].mode) {
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_INN_NAMES
HTLNAM.
#define FILE_MENU_SPRITES
Files the engine loads by number.
FileCache FILE_CACHE
The file cache.
long open(char *name, unsigned long mode)
The kernel's file functions (libapi.h); the sim: device is the PC's.
#define PARTY_SIZE
How many partners the party holds.
static void sleepAtInn(Inn *task, InnChildren *data)
Under the fade: hides the panels and windows, pays the night and heals the party.
InnSubstate
updateInnMenu's substates: each group runs in order, by substate++
@ INN_SHOW_QUESTION
the price and yes/no
@ INN_WAIT_QUESTION_CLOSED
@ INN_OPEN_NAME
the inn's name and the money
@ INN_NO_MONEY
the "not enough money" message
@ INN_SLEEP
pay and heal behind the black screen
@ INN_PAY
the jingle and the fade to black
void updateInnMenu(Inn *task, InnChildren *data)
The inn's menu (INN_*): open the panels and ask (price x party size), then close, pay and sleep,...
void updateInn(Inn *task, InnChildren *data)
The inn task: creates its windows, then runs the menu and draws the panels at their levels.
s32 innUpdatePanel(PanelAnim *panel)
Moves a panel's level one frame on; 1 once it is fully open or closed.
void innStartPanel(PanelAnim *panel, s32 open)
Starts opening or closing a menu panel, with its sound.
Inn * createInn(s32 layerId)
Starts the inn of the current game mode on a layer.
static void chooseInnAnswer(Inn *task, InnChildren *data)
INN_CHOOSE: moves the cursor between yes and no; on yes pays if the party can, else shows the "not en...
void healParty(void)
Restores HP, MP and status of the party (the inn)
#define PAD_PRESSED(button)
One button of pad 1: newly pressed, auto-repeated while held, or held.
#define PAD_REPEATED(button)
ScreenFade * createScreenFade(s32 layerId)
A screen fade task on a layer, idle until started.
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
#define SOUND_MENU_CLOSE
SYSTEM04.
#define SOUND_MENU_CONFIRM
SYSTEM07.
#define SOUND_INN_JINGLE
JINGLE04: a night at the inn.
#define SOUND_SELECT
Sounds the overlays share, with SOUNDTST's names.
#define SOUND_MENU_OPEN
SYSTEM03.
#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)
s32(* getPartyMember)(u32 index)
The inn: pay INNS[inn].price per party member to restore HP, MP and status, with a fade to black and ...
void(* nextState)(struct Inn *task)
Opens or closes a menu panel: level goes 0 -> ONE in duration frames (or back at twice the speed),...
A partner Digimon from its name on (Partner.info), as getPartnerStats gives it.
void(* start)(struct ScreenFade *fade, s32 fadeIn, s32 frames)
TASK_DONE when done.
s32 music
the exclusive sound playing
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(* setFollowScroll)()
(on)
void(* draw)()
(sheet, frame, x, y)
void(* setTexture)()
(x, y)
void(* setRightAlign)()
no prototype: callers would truncate u8 args
void(* setVisible)(struct TextWindow *obj, u8 arg)
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)