Skip to Content
The Alchemy Project

include/menu/djinn_menu.h

The Djinn menu: its lists, backdrop and state, the fields of a Djinni's list entry, and the Djinn tutorial's lines.

Included by battle_internal.h, menu_internal.h and screens_battle_command_row.c.

Structures

NameDescription
structDJINN_MENU_BACKDROPThe Djinn menu's lists, the field tiles and palette it restores on closing, and the tutorial's state, allocated when the menu opens and released when it closes.
structDJINN_PREVIEW_WINDOWA window as the Djinn menu's preview reads it: a WINDOW whose y it reads signed, in tiles.
structDJINN_MENU_STATEThe Djinn menu's state, in the HEAP_SLOT_MENU heap slot from the menu's opening to its closing, laid out as ITEM_MENU_STATE is: it names only what the Djinn screen reads, and says whose the rest is.

Macros

NameDescription
#defineDJINN_ENTRY_INDEX 31A Djinni's list entry, as mnDjinnListUnitEntries writes it into DJINN_MENU_BACKDROP.ids: its number in bits 0 to 4, its element in bits 5 to 7, the party member holding it in bits 8 to 11, and bit 15 while it is set.
#defineDJINN_ENTRY_ELEMENT 0xe0its element (ELEMENT)
#defineDJINN_ENTRY_MEMBER 0xf00the party member holding it
#defineDJINN_ENTRY_IS_SET 0x8000set; a standby one is TEXT_COLOR_RED
#defineDJINN_ENTRY_ELEMENT_SHIFT 5
#defineDJINN_ENTRY_MEMBER_SHIFT 8
#defineDJINN_ELEMENTS 4The Djinn list's dimensions.
#defineDJINN_LIST_MEMBERS 8List columns: one per party member.
#defineDJINN_LIST_ROWS 10Entries one party member's list holds.

Enumerations

NameDescription
enumDJINN_TUTORIAL_LINE { DJINN_TUTORIAL_LINE_GIVE, DJINN_TUTORIAL_LINE_SET_AFTER_GIVE … }The Djinn tutorial's lines, counted from its first (mnGetDjinnGiveMessage and btTutorialGetDjinnGiveMessage: one of its two copies, by FLAG_ALREADY_KNOWS_DJINN).
enumDJINN_PENDING { DJINN_PENDING_SECOND, DJINN_PENDING_CONFIRM }DJINN_MENU_STATE.pending's bits: what the chosen pair still waits for.

Description

The Djinn menu: its lists, backdrop and state, the fields of a Djinni's list entry, and the Djinn tutorial's lines.

Macros in detail

DJINN_ENTRY_INDEX

#define DJINN_ENTRY_INDEX 31

A Djinni's list entry, as mnDjinnListUnitEntries writes it into DJINN_MENU_BACKDROP.ids: its number in bits 0 to 4, its element in bits 5 to 7, the party member holding it in bits 8 to 11, and bit 15 while it is set.

its number within its element

Referenced by mnDjinnMenuDrawEntry(), mnDjinnMenuDrawStatPreview(), mnDjinnMenuRunPreview() and mnDjinnMenuSelectDjinn().

Definition at line 14 of file djinn_menu.h.

DJINN_ENTRY_ELEMENT

#define DJINN_ENTRY_ELEMENT 0xe0

its element (ELEMENT)

Referenced by mnDjinnMenuDrawEntry().

Definition at line 15 of file djinn_menu.h.

DJINN_ENTRY_MEMBER

#define DJINN_ENTRY_MEMBER 0xf00

the party member holding it

Definition at line 16 of file djinn_menu.h.

DJINN_ENTRY_IS_SET

#define DJINN_ENTRY_IS_SET 0x8000

set; a standby one is TEXT_COLOR_RED

Referenced by mnDjinnMenuDrawStatPreview(), mnDjinnMenuGetEntryState(), mnDjinnMenuRunPreview() and mnDjinnMenuSelectDjinn().

Definition at line 17 of file djinn_menu.h.

DJINN_ENTRY_ELEMENT_SHIFT

#define DJINN_ENTRY_ELEMENT_SHIFT 5

Referenced by mnDjinnListUnitEntries().

Definition at line 18 of file djinn_menu.h.

DJINN_ENTRY_MEMBER_SHIFT

#define DJINN_ENTRY_MEMBER_SHIFT 8

Referenced by mnDjinnListUnitEntries().

Definition at line 19 of file djinn_menu.h.

DJINN_ELEMENTS

#define DJINN_ELEMENTS 4

The Djinn list's dimensions. Elements: Venus, Mercury, Mars and Jupiter.

Referenced by mnDjinnListUnitEntries().

Definition at line 22 of file djinn_menu.h.

DJINN_LIST_MEMBERS

#define DJINN_LIST_MEMBERS 8

List columns: one per party member.

Definition at line 24 of file djinn_menu.h.

DJINN_LIST_ROWS

#define DJINN_LIST_ROWS 10

Entries one party member's list holds.

Definition at line 26 of file djinn_menu.h.

Enumerations in detail

DJINN_TUTORIAL_LINE

enum DJINN_TUTORIAL_LINE

The Djinn tutorial's lines, counted from its first (mnGetDjinnGiveMessage and btTutorialGetDjinnGiveMessage: one of its two copies, by FLAG_ALREADY_KNOWS_DJINN).

EnumeratorValueDescription
DJINN_TUTORIAL_LINE_GIVE0"To give your Djinni to someone else, move it like this."
DJINN_TUTORIAL_LINE_SET_AFTER_GIVE1"After choosing who gets the Djinni, you can \"set\" it."
DJINN_TUTORIAL_LINE_CLASS_PSYNERGY2"When your class changes, the Psynergy you can use may also change."
DJINN_TUTORIAL_LINE_SET_CHANGES3"Setting a Djinni changes your attributes and sometimes even your class."
DJINN_TUTORIAL_LINE_POWERS4"Each Djinni has different, unique powers."
DJINN_TUTORIAL_LINE_UNLEASH5"Once we have been set, you can unleash us in battle to use our powers."
DJINN_TUTORIAL_LINE_DEMONSTRATE6"So, {protagonist_name}, let me demonstrate the power of my attack now."
DJINN_TUTORIAL_LINE_UNLEASHED7"See! What did I tell you? When you unleashed me, I used my special attack ability!"
DJINN_TUTORIAL_LINE_STANDBY8"After being unleashed, we Djinn will then stand by, ready to be summoned back again..."
DJINN_TUTORIAL_LINE_SUMMON9"If you have multiple standby Djinn, you can summon even greater powers into battle!"
DJINN_TUTORIAL_LINE_UNLEASH_COMMAND10"Choose this command when you want to unleash me in battle, all right?"
DJINN_TUTORIAL_LINE_RECOVERY12Line 11, "Then you can summon even greater powers!", is one no code shows. "After a Djinni has been used to summon, it must spend time in recovery."
DJINN_TUTORIAL_LINE_SET_AGAIN13"And once we've recovered, we automatically set ourselves again, so we're ready to attack!"
DJINN_TUTORIAL_LINE_UNLEASH_HINT14"That's all you have to do to unleash a set Djinni!"

Definition at line 31 of file djinn_menu.h.

DJINN_PENDING

enum DJINN_PENDING

DJINN_MENU_STATE.pending's bits: what the chosen pair still waits for.

EnumeratorValueDescription
DJINN_PENDING_SECOND1Unused: a second Djinni is to be chosen
DJINN_PENDING_CONFIRM2a give or trade awaits its confirmation

Definition at line 104 of file djinn_menu.h.