14 for (i = 0; i < 6; i++) {
20 for (i = 0; i < 8; i++) {
39 for (i = 0; i < 6; i++) {
40 item = stats->
equip[i];
48 for (i = 0; i < 6; i++) {
60 if (panel->
slot == 2 || panel->
slot == 3) {
79 for (i = 0; i < 8; i++) {
81 if (row > panel->
count - 1) {
84 item = panel->
items[row];
112 for (i = 0; i < 8; i++) {
173 for (i = 0; i < 6; i++) {
174 item = stats->
equip[i];
190 for (i = 0; i < 8; i++) {
191 index = panel->
scroll + i;
192 if (index < panel->count) {
193 item = panel->
items[index];
194 if (item == -1 || item > 0) {
204 if (panel->
count > 8) {
274 oldSlot = panel->
slot;
277 if (panel->
slot < 0) {
282 if (panel->
slot >= 6) {
286 if (oldSlot != panel->
slot) {
293 for (i = 0; i < count; i++) {
298 for (i = 0; i < count; i++) {
303 panel->
count = count + 1;
304 panel->
items[0] = -1;
350 if (panel->
count >= 9) {
368 oldCursor = panel->
cursor;
369 oldScroll = panel->
scroll;
370 if (panel->
count >= 9) {
393 if (panel->
count < 8) {
409 if (oldCursor != panel->
cursor) {
418 if (oldScroll != panel->
scroll) {
432 if (oldCursor != panel->
cursor || oldScroll != panel->
scroll) {
557 switch (panel->
state) {
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)
s32 STSTATUS_slotStrings[]
The strings of the empty equipment slots.
static void STSTATUS_closeEquipSlots(EquipPanel *panel, EquipPanelWindows *windows)
Starts closing the slots' panel for the item list.
void STSTATUS_showEquipList(EquipPanel *panel, EquipPanelWindows *windows, s32 show)
Fills the list of the items that fit the slot.
void STSTATUS_showEquipItem(EquipPanel *panel, EquipPanelWindows *windows, s32 item)
An item's name and, for slots 2 and 3, its kind (none: string 0x51)
void STSTATUS_updateEquipPanel(EquipPanel *panel, EquipPanelWindows *windows)
The equipment panel's task: creates its windows, then runs and draws it; when killed it clears the fi...
void STSTATUS_showSlotItem(EquipPanel *panel, EquipPanelWindows *windows, s32 show)
The item in the slot being changed, or the slot's name if it's empty.
static void STSTATUS_closeSlotItem(EquipPanel *panel, EquipPanelWindows *windows)
Once the list's panel is closed, starts closing the slot's item panel.
void STSTATUS_drawEquipPanel(EquipPanel *panel)
Draws the equipment panels: the partner's equipment, the list of items that fit the slot and the slot...
void STSTATUS_showEquipment(EquipPanel *panel, EquipPanelWindows *windows, s32 show)
The partner's equipment, or the slots' names where it has none.
EquipPanel * STSTATUS_createEquipPanel(StatsScreen *screen)
Creates the fifth screen's equipment panel (task) for its chosen party member.
void STSTATUS_createEquipWindows(EquipPanel *panel, EquipPanelWindows *windows)
Creates the equipment panel's windows: the six slots, the list of items that fit the chosen one,...
static void STSTATUS_openEquipList(EquipPanel *panel, EquipPanelWindows *windows)
Once the slot's item panel is in, shows the slot's item and starts the list's panel.
s32 STSTATUS_slotLists[]
The item list of each equipment slot.
static void STSTATUS_chooseEquipSlot(EquipPanel *panel, EquipPanelWindows *windows)
Choosing a slot: up and down move the cursor, cross lists the owned items for the slot ("none" first,...
static void STSTATUS_openSlotItem(EquipPanel *panel)
Once the title's panel is closed, starts the slot's item panel.
s32 STSTATUS_kindStrings[]
The strings of the item kinds (WeaponData.kind), from 1.
static void STSTATUS_closeEquipPanel(EquipPanel *panel, EquipPanelWindows *windows)
Starts closing the panel: the slots' panel, the equipment and the cursor.
static void STSTATUS_openEquipSlots(EquipPanel *panel, EquipPanelWindows *windows)
Once the slots' panel is in, shows the equipment and the slot cursor.
static void STSTATUS_enterEquipList(EquipPanel *panel, EquipPanelWindows *windows)
Once the list's panel is in, shows the list, its cursor, the stats with the slot emptied and,...
static void STSTATUS_closeEquipTitle(EquipPanel *panel, EquipPanelWindows *windows)
Once the slots' panel is closed, starts closing the title's panel.
static void STSTATUS_chooseEquipItem(EquipPanel *panel, EquipPanelWindows *windows)
Choosing the item: up and down move the cursor, L1 and R1 scroll a page, the stats show the item's ef...
static void STSTATUS_closeEquipList(EquipPanel *panel, EquipPanelWindows *windows)
Starts closing the list's panel.
void STSTATUS_runEquipPanel(EquipPanel *panel, EquipPanelWindows *windows)
The equipment panel's steps: a slot is chosen, then an item from the list of those that fit it,...
static void STSTATUS_openEquipTitle(EquipPanel *panel, EquipPanelWindows *windows)
Once the title's panel is in, shows the title and starts the slots' panel.
#define TEXT_ITEM_INFO
ITMINF.
#define TEXT_STATUS
STATUS: the field menu's and STSTATUS's.
#define TEXT_ITEM_NAMES
ITMNAM.
#define FILE_MENU_SPRITES
Files the engine loads by number.
FileCache FILE_CACHE
The file cache.
#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_SELECT
Sounds the overlays share, with SOUNDTST's names.
#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)
struct EquipPanelWindows::@16 rows[8]
ScrollBar * scrollBar
for more than 8 items
TextWindow * times
the "x" before count
TextWindow * slots[6]
the equipment
TextWindow * count
how many are owned
A list of the fifth screen (STSTATUS_createEquipPanel)
s32 slot
the equipment slot being changed
s32 arrowShown
the scroll arrows blink
s16 items[0x194]
those that fit the slot, -1: remove
s32 showSlot
draw the slot's item icon
void(* nextState)(struct EquipPanel *task)
s32 scroll
the first one shown
s16 owned[0x194]
listItems' result, sorted into items
void *(* getEntry)(u32 fileAndIndex)
struct PartnerStats *(* getPartnerStats)(s32 partner)
s32(* getPartyMember)(u32 index)
s8 items[0x193]
counts, up to 99
s32(* getCategory)(s32 item)
getItemCategory
struct ItemInfo *(* get)(s32 item)
getItem
ItemRecord data
the type's record, or the usable items' effect
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(* draw)()
(sheet, frame, x, y)
void(* setTexture)()
(x, y)
The field menu's fifth screen (STSTATUS_createStatusScreen)
void(* previewStats)(struct StatsScreen *screen, s32 slot, s32 item)
s32 unk70
only cleared, when the equipment panel closes
s32(* updateFade)(PanelAnim *fade)
s32(* canEquip)(s32 partner, s32 slot, s32 item)
s32(* listItems)(s32 list, s16 *out)
6, 7: special lists; returns the count
void(* startFade)(PanelAnim *fade, s32 fadeIn)
void(* equip)(s32 partner, s32 slot, s32 item)
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_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)
ItemInfo.data's record, by ItemInfo.type.