include/window/menu_list.h
The menus' sprites and cursors, the party status window's layout, and the battle command menus' state, with its remembered page and row.
#include "edition.h"#include "static_assert.h"#include "edition_values.h"#include "types.h"#include "field/sprite.h"#include "system/globals.h"#include "window/screens.h"#include "window/window.h"#include "window/window_sprite.h"
Included by battle_effect_internal.h and field.h.
Structures
| Name | Description | |
|---|---|---|
struct | MENU_SPR | A menu sprite: a list link and its OAM attributes, as two words or as fields. |
struct | CURSOR_SPR | Unused: MENU_SPR's layout with its OAM fields named directly, for a sprite whose attributes are never written as words; nothing in the game declares one. |
struct | PARTY_STAT_WINDOW | The party status window's layout: its window, its place and size, and what it shows (PARTY_STATUS_ flags). |
struct | MENU_POINT | A point on the screen where a menu shows its cursor. |
struct | BATTLE_MENU_STATE | The battle command menus' state, HEAP_SLOT_BATTLE_MENU (260 bytes), reached as BattleMenuStateWork. |
Macros
| Name | Description | |
|---|---|---|
#define | MENU_SPR_INIT (sprite, shape) | Sets sprite shape (attr0/attr1) and clears the remaining fields. |
#define | BATTLE_MENU_NO_DJINNI 0x80000000 | BATTLE_MENU_STATE.chosenDjinn of a command that has chosen no Djinni. |
#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. |
#define | BattleMenuStateWork |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { BATTLE_LIST_ROWS } | The items a battle's item list shows at once, two tiles a row. |
enum | BATTLE_MENU_ICON { BATTLE_MENU_ICON_COMMAND, BATTLE_MENU_ICON_ABILITY, BATTLE_M … } | The sprites BATTLE_MENU_STATE.icons holds. |
Variables
| Name | Description | |
|---|---|---|
extern const Uint8 | MenuAnimatedCursorTiles [] | The animated cursor's pictures, a spinning pink gem, each 16 by 16 at a byte a pixel (graphics/ui/sprite_cursors/spin). |
Description
The menus' sprites and cursors, the party status window's layout, and the battle command menus' state, with its remembered page and row.
Macros in detail
MENU_SPR_INIT
#define MENU_SPR_INIT(sprite, shape)
Sets sprite shape (attr0/attr1) and clears the remaining fields.
Referenced by mnBattleCollectPartyCommands(), mnBattleCommandRowLoadIcon(), mnBattleItemMenuRun(), mnBattlePsynergyMenuRun(), mnBattleStatusScreenRun() and mnBattleSummonMenuRun().
Definition at line 77 of file menu_list.h.
BATTLE_MENU_NO_DJINNI
#define BATTLE_MENU_NO_DJINNI 0x80000000
BATTLE_MENU_STATE.chosenDjinn of a command that has chosen no Djinni.
Referenced by mnBattleCollectPartyCommands().
Definition at line 180 of file menu_list.h.
BATTLE_MENU_GET_CURSOR
#define BATTLE_MENU_GET_CURSOR(page_, row_, preferred_)
Restores the previous selection: page, row and return row.
Referenced by mnBattleDjinnMenuRun(), mnBattleItemMenuRun(), mnBattlePsynergyMenuRun() and mnBattleSummonMenuRun().
Definition at line 194 of file menu_list.h.
BATTLE_MENU_SET_CURSOR
#define BATTLE_MENU_SET_CURSOR(page_, row_, preferred_)
Saves the selection: page, row and return row.
Referenced by mnBattleCollectPartyCommands(), mnBattleItemMenuRun(), mnBattlePsynergyMenuRun() and mnBattleSummonMenuRun().
Definition at line 203 of file menu_list.h.
BattleMenuStateWork
#define BattleMenuStateWork
Referenced by mnBattleCollectPartyCommands(), mnBattleCommandRowRun(), mnBattleDjinnMenuRun(), mnBattleItemMenuRun(), mnBattleMenuUpdate(), mnBattlePsynergyMenuRun(), mnBattleRefuseFlee(), mnBattleStatusScreenRun(), mnBattleSummonMenuRun() and mnBattleTargetRunSelection().
Definition at line 211 of file menu_list.h.
Enumerations in detail
anonymous enum
enum { BATTLE_LIST_ROWS }
The items a battle's item list shows at once, two tiles a row.
| Enumerator | Value | Description |
|---|---|---|
BATTLE_LIST_ROWS | 5 |
Definition at line 18 of file menu_list.h.
BATTLE_MENU_ICON
enum BATTLE_MENU_ICON
The sprites BATTLE_MENU_STATE.icons holds.
| Enumerator | Value | Description |
|---|---|---|
BATTLE_MENU_ICON_COMMAND | the chosen command's icon, 32x32 | |
BATTLE_MENU_ICON_ABILITY | the chosen Psynergy, summon or item's icon | |
BATTLE_MENU_ICON_PORTRAIT | the party member's portrait | |
BATTLE_MENU_ICON_COUNT |
Definition at line 107 of file menu_list.h.
Variables in detail
MenuAnimatedCursorTiles
extern const Uint8 MenuAnimatedCursorTiles[]
The animated cursor's pictures, a spinning pink gem, each 16 by 16 at a byte
a pixel (graphics/ui/sprite_cursors/spin).
Referenced by mnBattleTargetRunSelection(), mnSelectionMenuCreate() and mnSelectionMenuDraw().
Definition at line 215 of file menu_list.h.