Alchemy
Loading...
Searching...
No Matches

menu_list.h File Reference

Menu lists: sprites, cursors, the party status window and paged selections. More...

Go to the source code of this file.

Data Structures

struct  MenuSprite
 A menu sprite: a list link and its OAM attributes, as two words or as fields. More...
struct  CursorSprite
 A cursor or prompt sprite: a list link and its OAM attributes as fields. More...
struct  PartyStatusWindow
 The party status window's layout: its window, its place and size, and what it shows (PARTY_STATUS_ flags). More...
struct  MenuPoint
 A point on the screen where a menu shows its cursor. More...
struct  BattleMenuWork
 The battle command menus' work, heap slot 57 (0x104 bytes), reached as gLinkCountdownWork. More...

Macros

#define MENU_SPRITE_SIZE_16   0x40000000
#define MenuSprite_Init(sprite, shape)
 Sets sprite shape (attr0/attr1) and clears the remaining fields.
#define BATTLE_MENU_GET_CURSOR(page_, row_, preferred_)
 Restores the previous selection: page, row and return row.
#define BATTLE_MENU_SET_CURSOR(page_, row_, preferred_)
 Saves the selection: page, row and return row.

Enumerations

enum  { BATTLE_LIST_ROWS = 5 }

Functions

 STATIC_ASSERT (sizeof(struct PartyStatusWindow)==16)
 STATIC_ASSERT (offsetof(struct PartyStatusWindow, flags)==12)
 STATIC_ASSERT (sizeof(struct BattleMenuWork)==0x104)
 STATIC_ASSERT (offsetof(struct BattleMenuWork, targetSceneOffset)==0x28)
 STATIC_ASSERT (offsetof(struct BattleMenuWork, row)==0x30)
 STATIC_ASSERT (offsetof(struct BattleMenuWork, commandSelection)==0x3c)
 STATIC_ASSERT (offsetof(struct BattleMenuWork, timerWindow)==0x44)
 STATIC_ASSERT (offsetof(struct BattleMenuWork, timer)==0x4c)
 STATIC_ASSERT (offsetof(struct BattleMenuWork, standbyDjinn)==0x54)
 STATIC_ASSERT (offsetof(struct BattleMenuWork, tutorialStep)==0xd8)
 STATIC_ASSERT (offsetof(struct BattleMenuWork, commandActor)==0xe0)
 STATIC_ASSERT (offsetof(struct BattleMenuWork, chosenDjinn)==0xe4)

Variables

struct BattleMenuWork * gLinkCountdownWork
u8 gResource_FixedBlockBTiles []
const u8 gMenu_AnimatedCursorTiles []

Detailed Description

Menu lists: sprites, cursors, the party status window and paged selections.

Definition in file menu_list.h.

Macro Definition Documentation

◆ MENU_SPRITE_SIZE_16

#define MENU_SPRITE_SIZE_16   0x40000000

◆ MenuSprite_Init

#define MenuSprite_Init ( sprite,
shape )
Value:
do { \
(sprite).oam.word.attr01 = (shape); \
(sprite).oam.word.attr23 = 0; \
} while (0)

Sets sprite shape (attr0/attr1) and clears the remaining fields.

Definition at line 76 of file menu_list.h.

Referenced by BattleMenu_RunActionSelection(), ItemList_SelectEntry(), SummonMenu_SelectSummon(), and UiText_DrawCharacter().

◆ BATTLE_MENU_GET_CURSOR

#define BATTLE_MENU_GET_CURSOR ( page_,
row_,
preferred_ )
Value:
do { \
(page_) = ((struct BattleMenuWork *)gWindowWork[42])->page; \
(row_) = ((struct BattleMenuWork *)gWindowWork[42])->row; \
(preferred_) = ((struct BattleMenuWork *)gWindowWork[42])->preferredRow; \
} while (0)
u8 gWindowWork[]
The battle command menus' work, heap slot 57 (0x104 bytes), reached as gLinkCountdownWork.
Definition menu_list.h:107

Restores the previous selection: page, row and return row.

Definition at line 163 of file menu_list.h.

Referenced by Battle_SelectAbility(), BattleMenu_RunActionSelection(), ItemList_SelectEntry(), and SummonMenu_SelectSummon().

◆ BATTLE_MENU_SET_CURSOR

#define BATTLE_MENU_SET_CURSOR ( page_,
row_,
preferred_ )
Value:
do { \
gLinkCountdownWork->page = (page_); \
gLinkCountdownWork->row = (row_); \
gLinkCountdownWork->preferredRow = (preferred_); \
} while (0)
struct BattleMenuWork * gLinkCountdownWork
s32 page
the list page chosen last
Definition menu_list.h:118
s32 preferredRow
the row to return to
Definition menu_list.h:119
s32 row
the list row chosen last
Definition menu_list.h:117

Saves the selection: page, row and return row.

Definition at line 183 of file menu_list.h.

Referenced by Battle_CollectPartyCommands(), BattleMenu_RunActionSelection(), ItemList_SelectEntry(), and SummonMenu_SelectSummon().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
BATTLE_LIST_ROWS 

Definition at line 20 of file menu_list.h.

Function Documentation

◆ STATIC_ASSERT() [1/12]

STATIC_ASSERT ( sizeof(struct PartyStatusWindow) = =16)

◆ STATIC_ASSERT() [2/12]

STATIC_ASSERT ( offsetof(struct PartyStatusWindow, flags) = =12)

◆ STATIC_ASSERT() [3/12]

STATIC_ASSERT ( sizeof(struct BattleMenuWork) = =0x104)

◆ STATIC_ASSERT() [4/12]

STATIC_ASSERT ( offsetof(struct BattleMenuWork, targetSceneOffset) = =0x28)

◆ STATIC_ASSERT() [5/12]

STATIC_ASSERT ( offsetof(struct BattleMenuWork, row) = =0x30)

◆ STATIC_ASSERT() [6/12]

STATIC_ASSERT ( offsetof(struct BattleMenuWork, commandSelection) = =0x3c)

◆ STATIC_ASSERT() [7/12]

STATIC_ASSERT ( offsetof(struct BattleMenuWork, timerWindow) = =0x44)

◆ STATIC_ASSERT() [8/12]

STATIC_ASSERT ( offsetof(struct BattleMenuWork, timer) = =0x4c)

◆ STATIC_ASSERT() [9/12]

STATIC_ASSERT ( offsetof(struct BattleMenuWork, standbyDjinn) = =0x54)

◆ STATIC_ASSERT() [10/12]

STATIC_ASSERT ( offsetof(struct BattleMenuWork, tutorialStep) = =0xd8)

◆ STATIC_ASSERT() [11/12]

STATIC_ASSERT ( offsetof(struct BattleMenuWork, commandActor) = =0xe0)

◆ STATIC_ASSERT() [12/12]

STATIC_ASSERT ( offsetof(struct BattleMenuWork, chosenDjinn) = =0xe4)

Variable Documentation

◆ gLinkCountdownWork

◆ gResource_FixedBlockBTiles

u8 gResource_FixedBlockBTiles[]
extern

◆ gMenu_AnimatedCursorTiles

const u8 gMenu_AnimatedCursorTiles[]
extern