19 if (index > task->
count - 1) {
28 drawer.
draw(sheet, 0x1F, 0x10, 0xA9);
31 drawer.
draw(sheet, 0x20, 0x90, 0xA9);
34 drawer.
draw(sheet, 0x27, 8, 0x3E);
35 drawer.
draw(sheet, 0x28, 0xA6, 0xA0);
36 drawer.
draw(sheet, 0x31, 0xB, 0xBC);
68 if (task->
count != 0) {
71 if (index > task->
count - 1) {
74 item = task->
usable[index];
93 1, 14, 69, 14, -1, 0, 0, 0,
96 1, 14, 69, 14, -1, 0, 0, 0,
99 2, 17, 78, 32, 47, 16, 77, 32,
113 switch (task->
state) {
118 for (i = 0; i < total; i++) {
119 if (task->
items[i] == 0) {
126 if (task->
count != 0) {
129 for (i = 0; i < total; i++) {
130 if (task->
items[i] == 0) {
142 if (task->
count != 0) {
160 if (pressed & (1 <<
PAD_L1)) {
161 if (--task->
page < 0) {
164 }
else if (pressed & (1 <<
PAD_R1)) {
170 if (page != task->
page) {
183 if (task->
count != 0) {
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.
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_ITEM_INFO
ITMINF.
#define TEXT_BATTLE_MENU
MFIGHT: WFIGHTMN's.
#define FILE_BATTLE_MENU
The battle menu's files (WFIGHTMN, WFIGHTTS): FILE_BATTLE_IMAGES is an archive whose entries go throu...
#define TEXT_ITEM_NAMES
ITMNAM.
#define FILE_MENU_SPRITES
Files the engine loads by number.
FileCache FILE_CACHE
The file cache.
#define ITEM_USE_BATTLE
usable in battle (FIGHTSTG's item menu)
Heap HEAP
The functions that return what a call left in v0 (allocMemHigh, findTask) and the ones that take othe...
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_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...
A menu cursor's layout, which FIGHTSTG_createCursor copies into its task: a highlight bar over count ...
void *(* getEntry)(u32 fileAndIndex)
s8 items[0x193]
counts, up to 99
void *(* alloc)(s32 size, s32 tag)
s32(* getCategory)(s32 item)
getItemCategory
struct ItemInfo *(* get)(s32 item)
getItem
s32(* list)(s32 type, s16 *out)
listItems
ItemRecord data
the type's record, or the usable items' effect
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(* draw)()
(sheet, frame, x, y)
void(* setTexture)()
(x, y)
void(* setPalette)(struct TextWindow *obj, u8 arg)
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
#define PALETTE_DARK_BLUE
TextWindow * createTextWindow(s16 layerId, s16 style, s16 x, s16 y)
A text window on a layer, in a font style, at (x, y)