Alchemy
Loading...
Searching...
No Matches

djinn_menu.h

Go to the documentation of this file.
1#ifndef ALCHEMY_DJINN_MENU_H
2#define ALCHEMY_DJINN_MENU_H
3
4/// @file
5/// The Djinn menu: its list tables, backdrop and work, and the fields of a
6/// Djinni's list entry.
7
8#include "types.h"
9#include "global_cells.h"
10#include "render_input.h"
11
12#define DJINN_ENTRY_INDEX 31
13#define DJINN_ENTRY_ELEMENT 0xe0
14#define DJINN_ENTRY_OWNER 0xf00
15#define DJINN_ENTRY_IS_SET 0x8000
16
17#define DJINN_ELEMENTS 4
18#define DJINN_PER_ELEMENT 20
19#define DJINN_LIST_OWNERS 8
20#define DJINN_LIST_ROWS 10
21
22/// The Djinn menu's lists: each party member's Djinn entries and their count.
26};
27
28/// The Djinn menu's lists, the field tiles and palette it restores on closing,
29/// and the tutorial's state.
32 u8 tiles[0x2000];
34 s32 tutorialTimer; ///< frames into the tutorial's current step
35 /// The Djinn tutorial's step: 0 outside it, else 1, 14, 27 or 28 to start,
36 /// by flags 0x16f and 0x171.
38};
39
40/// The Djinn menu's work, in the HEAP_SLOT_MENU work slot.
42 u8 unk000[8]; ///< not named by TBS code
44 u8 unk00c[4]; ///< not named by TBS code
47 u8 unk018[4]; ///< not named by TBS code
48 s8 selectedColumn[2]; ///< each pane's member, in owners
49 u8 unk01e[6]; ///< not named by TBS code
52 u8 unk02c[4]; ///< not named by TBS code
55 u8 unk038[0xd4]; ///< not named by TBS code
57 u8 unk110[0x24]; ///< not named by TBS code
58 s16 ownerX[8]; ///< screen pixels
59 s16 ownerY[8]; ///< screen pixels
60 u8 unk154[0x20]; ///< not named by TBS code
61 u16 selection[2]; ///< each pane's Djinni row chosen
62 u16 pairEntries[2]; ///< 255 at first
64 u8 unk180[0x04]; ///< not named by TBS code
66 u8 unk188[0x80]; ///< not named by TBS code
67 u16 owners[DJINN_LIST_OWNERS]; ///< the party in order
70 u8 shownOwner[2]; ///< the member giving and the one receiving
71 u8 unk21c[4]; ///< not named by TBS code
72 /// bits: 1 a give or trade awaits its confirmation | 0 a second Djinni is
73 /// to be chosen
75 u8 unk222[0x12]; ///< not named by TBS code
78 u8 unk244[0x10]; ///< not named by TBS code
79 /// The Djinn chosen in each pane: index in their element, element, owner.
80 ///@{
83 u8 pairOwner[2]; ///< not named by TBS code
84 ///@}
85};
86
87STATIC_ASSERT(offsetof(struct DjinnMenuWork, statusWindow) == 0x10);
88STATIC_ASSERT(offsetof(struct DjinnMenuWork, selectedColumn) == 0x1c);
89STATIC_ASSERT(offsetof(struct DjinnMenuWork, ownerX) == 0x134);
90STATIC_ASSERT(offsetof(struct DjinnMenuWork, ownerY) == 0x144);
91STATIC_ASSERT(offsetof(struct DjinnMenuWork, selection) == 0x174);
92STATIC_ASSERT(offsetof(struct DjinnMenuWork, pending) == 0x220);
93STATIC_ASSERT(offsetof(struct DjinnMenuWork, pairIndex) == 0x254);
96
97#endif
#define DJINN_LIST_ROWS
Definition djinn_menu.h:20
#define DJINN_LIST_OWNERS
Definition djinn_menu.h:19
The work slots of gWorkSlot, read through their own names.
The sprite renderer's inputs and outputs: render inputs, OAM attributes and render output lists.
#define STATIC_ASSERT(condition)
C89 permits repeated extern declarations of the same array.
#define offsetof(type, member)
Definition stddef.h:19
The Djinn menu's lists: each party member's Djinn entries and their count.
Definition djinn_menu.h:23
u16 ids[DJINN_LIST_OWNERS][DJINN_LIST_ROWS]
Definition djinn_menu.h:24
s8 counts[DJINN_LIST_OWNERS]
Definition djinn_menu.h:25
The Djinn menu's lists, the field tiles and palette it restores on closing, and the tutorial's state.
Definition djinn_menu.h:30
u8 tiles[0x2000]
Definition djinn_menu.h:32
long tutorialStep
The Djinn tutorial's step: 0 outside it, else 1, 14, 27 or 28 to start, by flags 0x16f and 0x171.
Definition djinn_menu.h:37
struct DjinnListTable list
Definition djinn_menu.h:31
s32 tutorialTimer
frames into the tutorial's current step
Definition djinn_menu.h:34
The Djinn menu's work, in the HEAP_SLOT_MENU work slot.
Definition djinn_menu.h:41
struct UiWindow * listWindow
Definition djinn_menu.h:53
u8 unk244[0x10]
not named by TBS code
Definition djinn_menu.h:78
u16 pairEntries[2]
255 at first
Definition djinn_menu.h:62
struct UiWindow * secondWindow
Definition djinn_menu.h:54
u8 unk21c[4]
not named by TBS code
Definition djinn_menu.h:71
struct DjinnMenuBackdrop * backdrop
Definition djinn_menu.h:65
u8 unk222[0x12]
not named by TBS code
Definition djinn_menu.h:75
u8 unk188[0x80]
not named by TBS code
Definition djinn_menu.h:66
u16 pending
bits: 1 a give or trade awaits its confirmation | 0 a second Djinni is to be chosen
Definition djinn_menu.h:74
u8 unk038[0xd4]
not named by TBS code
Definition djinn_menu.h:55
u8 unk180[0x04]
not named by TBS code
Definition djinn_menu.h:64
u8 pairOwner[2]
not named by TBS code
Definition djinn_menu.h:83
struct RenderOutput * cursor
Definition djinn_menu.h:46
struct UiWindow * window
Definition djinn_menu.h:50
struct UiWindow * helpWindow
Definition djinn_menu.h:56
u8 unk02c[4]
not named by TBS code
Definition djinn_menu.h:52
struct UiWindow * statusWindow
Definition djinn_menu.h:45
u8 unk01e[6]
not named by TBS code
Definition djinn_menu.h:49
u16 owners[DJINN_LIST_OWNERS]
the party in order
Definition djinn_menu.h:67
u16 selection[2]
each pane's Djinni row chosen
Definition djinn_menu.h:61
s16 ownerX[8]
screen pixels
Definition djinn_menu.h:58
u8 unk018[4]
not named by TBS code
Definition djinn_menu.h:47
s8 selectedColumn[2]
each pane's member, in owners
Definition djinn_menu.h:48
u8 pairIndex[2]
The Djinn chosen in each pane: index in their element, element, owner.
Definition djinn_menu.h:81
u8 unk154[0x20]
not named by TBS code
Definition djinn_menu.h:60
u8 unk00c[4]
not named by TBS code
Definition djinn_menu.h:44
u8 pairElement[2]
Definition djinn_menu.h:82
struct RenderOutput * secondCursor
Definition djinn_menu.h:63
u8 unk110[0x24]
not named by TBS code
Definition djinn_menu.h:57
s16 ownerY[8]
screen pixels
Definition djinn_menu.h:59
struct UiWindow * unknownWindow028
Definition djinn_menu.h:51
u8 unk000[8]
not named by TBS code
Definition djinn_menu.h:42
u8 shownOwner[2]
the member giving and the one receiving
Definition djinn_menu.h:70
A render output: a sprite in a window's output list (a character, an icon or a portrait),...
A window: a framed rectangle of the tilemap with its sprite outputs, its opening or closing animation...
Definition uiwindow.h:11
The integer types, TRUE, UNUSED and the fixed-address macros.
signed int s32
Definition types.h:14
signed char s8
Definition types.h:10
signed short s16
Definition types.h:12
unsigned short u16
Definition types.h:13
unsigned char u8
Definition types.h:11