19 if (saved != (u_long *)-1) {
20 if (++task->
frame == 12) {
24 for (i = 0; i < 4; i += 2) {
40 while (IsIdleGPU(0)) {
63 if (task->
blink[i] != 0 || task->
sel == i) {
65 if (task->
blink[i] >= 0x14) {
69 task->
blink[i] -= 0x14;
73 row = task->
blink[i] >> 2;
74 if (row >= 0 && row < 5) {
90 switch (task->
state) {
112 if (pressed & (1 <<
PAD_UP)) {
113 if (task->
sel != 0) {
117 }
else if (pressed & (1 <<
PAD_DOWN)) {
RECT FIGHTSTG_cursorBarRect
where FIGHTSTG_drawCursorBar puts the cursor's bar in VRAM
void FIGHTSTG_drawCursorBar(s32 arg)
The vsync callback while the list is open: draws the picked line's bar, moving through its frames,...
void FIGHTSTG_updateCursor(MenuCursor *task)
The menu cursor's task: sets FIGHTSTG_drawCursorBar as the vsync callback, draws the lines' sprites a...
void FIGHTSTG_drawCursorSprites(MenuCursor *task)
Draws each line's sprite of the cursor, the picked one blinking through the palettes and the one left...
MenuCursor * FIGHTSTG_createCursor(CursorLayout *layout)
Creates a menu cursor laid out by layout.
#define BATTLE_LAYER_MENUS
the HUD, the menus and the messages
FIGHTSTG.PRO: the battle.
GfxState GFX
GFX: the graphics state and its 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 FILE_BATTLE_MENU
The battle menu's files (WFIGHTMN, WFIGHTTS): FILE_BATTLE_IMAGES is an archive whose entries go throu...
FileCache FILE_CACHE
The file cache.
u_long FIGHTSTG_cursorBarOt[2]
and their ordering table
DR_MOVE FIGHTSTG_cursorBarMoves[4]
FIGHTSTG_drawCursorBar draws its bar with them.
PadState PAD
Controller input: cleared by initPad, then the methods.
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
#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...
A menu cursor's layout, which FIGHTSTG_createCursor copies into its task: a highlight bar over count ...
void *(* getEntry)(u32 fileAndIndex)
s32(* getFrameTime)(void)
void(* vsyncFunc)(s32 arg)
s32(* getRepeated)(s32 pad)
s32(* getPressed)(s32 pad)
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(* setLayerId)()
(id, depth)
void(* setClutRow)()
(row)
void(* draw)()
(sheet, frame, x, y)
void(* setTexture)()
(x, y)
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find