djinn_menu.h
games/tbs/include/djinn_menu.h on GitHub
Structures
DjinnListTable
struct DjinnListTable
The Djinn menu's lists: each party member's Djinn entries and their count.
| Field | Declared as | |
|---|---|---|
ids | u16 ids[DJINN_LIST_OWNERS][DJINN_LIST_ROWS] | |
counts | s8 counts[DJINN_LIST_OWNERS] |
Used by DjinnMenu_BuildLists, DjinnMenu_DrawElementList.
DjinnMenuBackdrop
struct DjinnMenuBackdrop
The Djinn menu's lists, the field tiles and palette it restores on closing, and the tutorial's state.
| Field | Declared as | |
|---|---|---|
list | struct DjinnListTable list | |
tiles | u8 tiles[0x2000] | |
palette | u16 palette[64] | |
tutorialTimer | s32 tutorialTimer | frames into the tutorial's current step |
tutorialStep | long tutorialStep | The Djinn tutorial's step: 0 outside it, else 1, 14, 27 or 28 to start, by flags 0x16f and 0x171. |
Used by DjinnMenu_Run, DjinnMenu_SelectDjinn, Menu_OpenBackdropScreen, OwnerAction_RunCompareLoop.
DjinnMenuWork
struct DjinnMenuWork
The Djinn menu's work, in the HEAP_SLOT_MENU work slot.
| Field | Declared as | |
|---|---|---|
unk000 | u8 unk000[8] | not named by TBS code |
owner | s32 owner | |
unk00c | u8 unk00c[4] | not named by TBS code |
statusWindow | struct UiWindow *statusWindow | |
cursor | struct RenderOutput *cursor | |
unk018 | u8 unk018[4] | not named by TBS code |
selectedColumn | s8 selectedColumn[2] | each pane's member, in owners |
unk01e | u8 unk01e[6] | not named by TBS code |
window | struct UiWindow *window | |
unknownWindow028 | struct UiWindow *unknownWindow028 | |
unk02c | u8 unk02c[4] | not named by TBS code |
listWindow | struct UiWindow *listWindow | |
secondWindow | struct UiWindow *secondWindow | |
unk038 | u8 unk038[0xd4] | not named by TBS code |
helpWindow | struct UiWindow *helpWindow | |
unk110 | u8 unk110[0x24] | not named by TBS code |
ownerX | s16 ownerX[8] | screen pixels |
ownerY | s16 ownerY[8] | screen pixels |
unk154 | u8 unk154[0x20] | not named by TBS code |
selection | u16 selection[2] | each pane's Djinni row chosen |
pairEntries | u16 pairEntries[2] | 255 at first |
secondCursor | struct RenderOutput *secondCursor | |
unk180 | u8 unk180[0x04] | not named by TBS code |
backdrop | struct DjinnMenuBackdrop *backdrop | |
unk188 | u8 unk188[0x80] | not named by TBS code |
owners | u16 owners[DJINN_LIST_OWNERS] | the party in order |
pairCount | u8 pairCount | |
ownerCount | u8 ownerCount | |
shownOwner | u8 shownOwner[2] | the member giving and the one receiving |
unk21c | u8 unk21c[4] | not named by TBS code |
pending | u16 pending | bits: 1 a give or trade awaits its confirmation | 0 a second Djinni is to be chosen |
unk222 | u8 unk222[0x12] | not named by TBS code |
slotX | u16 slotX[4] | |
slotY | u16 slotY[4] | |
unk244 | u8 unk244[0x10] | not named by TBS code |
pairIndex | u8 pairIndex[2] | The Djinn chosen in each pane: index in their element, element, owner. @{ |
pairElement | u8 pairElement[2] | |
pairOwner | u8 pairOwner[2] | not named by TBS code |
Used by DjinnMenu_BuildLists, DjinnMenu_DrawElementList, DjinnMenu_DrawPairPreview, DjinnMenu_DrawStatPreview, DjinnMenu_Run, DjinnMenu_RunScreen, DjinnMenu_SelectDjinn, DjinnMenu_ShowCurrentList, DjinnMenu_ShowHelp, DjinnMenu_ShowOwnerStatus, Djinn_CheckTurnBalance, Djinn_CountTurns, Djinn_MarkBalancedEntries, Menu_OpenBackdropScreen, Menu_SetFirstObjectRowCoordinates, OwnerAction_RunCompareLoop.
Macros, without a comment: DJINN_ENTRY_INDEX, DJINN_ENTRY_ELEMENT, DJINN_ENTRY_OWNER, DJINN_ENTRY_IS_SET, DJINN_ELEMENTS, DJINN_PER_ELEMENT, DJINN_LIST_OWNERS, DJINN_LIST_ROWS.