Skip to Content
The Alchemy Project

include/menu/djinn_menu.h

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

Included by menu_internal.h.

Structures

NameDescription
structDJINN_LIST_TABLEThe Djinn menu's lists: each party member's Djinn entries and their count.
structDJINN_MENU_BACKDROPThe Djinn menu's lists, the field tiles and palette it restores on closing, and the tutorial's state (tutorialStep starts from FLAG_DJINN_LESSON_PART_A and FLAG_DJINN_LESSON_PART_B).
structDJINN_MENU_STATEThe Djinn menu's state, in the HEAP_SLOT_MENU heap slot from the menu's opening to its closing.

Macros

NameDescription
#defineDJINN_ENTRY_INDEX 31A Djinni's list entry, as mnDjinnListUnitEntries writes it into DJINN_LIST_TABLE.ids. bits: 15 set | 11..8 member | 7..5 element | 4..0 index
#defineDJINN_ENTRY_ELEMENT 0xe0its element (ELEMENT)
#defineDJINN_ENTRY_MEMBER 0xf00the party member holding it
#defineDJINN_ENTRY_IS_SET 0x8000set; an unset one is drawn in colour 2
#defineDJINN_ELEMENTS 4Venus, Mercury, Mars and Jupiter (ELEMENT)
#defineDJINN_LIST_MEMBERS 8list columns: one per party member
#defineDJINN_LIST_ROWS 10entries one party member's list holds

Enumerations

NameDescription
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 list tables, backdrop and state, and the fields of a Djinni's list entry.

Macros in detail

DJINN_ENTRY_INDEX

#define DJINN_ENTRY_INDEX 31

A Djinni's list entry, as mnDjinnListUnitEntries writes it into DJINN_LIST_TABLE.ids. bits: 15 set | 11..8 member | 7..5 element | 4..0 index

its number within its element

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

Definition at line 14 of file djinn_menu.h.

DJINN_ENTRY_ELEMENT

#define DJINN_ENTRY_ELEMENT 0xe0

its element (ELEMENT)

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; an unset one is drawn in colour 2

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

Definition at line 17 of file djinn_menu.h.

DJINN_ELEMENTS

#define DJINN_ELEMENTS 4

Venus, Mercury, Mars and Jupiter (ELEMENT)

Referenced by mnDjinnCountOwned(), mnDjinnListUnitEntries(), mnDjinnMenuDrawElementList() and mnDjinnMenuDrawStatPreview().

Definition at line 19 of file djinn_menu.h.

DJINN_LIST_MEMBERS

#define DJINN_LIST_MEMBERS 8

list columns: one per party member

Referenced by mnDjinnMenuSelectDjinn().

Definition at line 20 of file djinn_menu.h.

DJINN_LIST_ROWS

#define DJINN_LIST_ROWS 10

entries one party member's list holds

Referenced by mnDjinnMenuBuildLists().

Definition at line 21 of file djinn_menu.h.

Enumerations in detail

DJINN_PENDING

enum DJINN_PENDING

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

EnumeratorValueDescription
DJINN_PENDING_SECOND1a second Djinni is to be chosen
DJINN_PENDING_CONFIRM2a give or trade awaits its confirmation

Definition at line 43 of file djinn_menu.h.