Alchemy
Loading...
Searching...
No Matches

character_menu.h

Go to the documentation of this file.
1#ifndef ALCHEMY_CHARACTER_MENU_H
2#define ALCHEMY_CHARACTER_MENU_H
3
4/// @file
5/// The character menu's state, and the ailments it shows.
6
9#include "unit/menu/menu.h"
10#include "types.h"
11#include "global_cells.h"
12#include "static_assert.h"
13#include "animspr.h"
14#include "window.h"
15
16struct BattleUnit;
17struct OwnerActionSlot;
18
19/// The work of the member chooser and the Status menu, in the HEAP_SLOT_MENU
20/// work slot.
22 u8 unk000[8]; ///< not named by TBS code
23 s32 selectedOwner; ///< the party member chosen
24 u8 unk00c[4]; ///< not named by TBS code
27 s8 ownerIndex[2]; ///< each pane's member, in ownerIds
28 s8 ownerCount[2]; ///< members each pane chooses from
31 struct UiWindow *unknownWindow028; ///< only cleared by name in TBS
33 u8 unk030[0x18]; ///< not named by TBS code
36 u8 unk0e8[0x24]; ///< not named by TBS code
43 s16 ownerX[8]; ///< screen pixels
44 s16 ownerY[8]; ///< screen pixels
45 s32 ownerScale[8]; ///< 16.16 fixed point, 0x10000 full size
49 u8 unk180[0x48]; ///< not named by TBS code
51 u16 ownerIds[8]; ///< the party in order (Party_ListActiveOwners)
54 u8 selectedIds[2]; ///< each pane's member
56 u16 page; ///< 3 for the member chooser, 0 for the Status menu
57 u8 unk222[2]; ///< not named by TBS code
59 s16 rowX[4]; ///< screen pixels
60 s16 rowY[4]; ///< screen pixels
61};
62
63STATIC_ASSERT(offsetof(struct CharacterMenuState, ownerWindow) == 0x10);
64STATIC_ASSERT(offsetof(struct CharacterMenuState, ownerCursors) == 0x14);
65STATIC_ASSERT(offsetof(struct CharacterMenuState, statusWindow) == 0x24);
66STATIC_ASSERT(offsetof(struct CharacterMenuState, entryIcons) == 0x48);
67STATIC_ASSERT(offsetof(struct CharacterMenuState, selectorWindow) == 0x10c);
68STATIC_ASSERT(offsetof(struct CharacterMenuState, selectedColumn) == 0x110);
69STATIC_ASSERT(offsetof(struct CharacterMenuState, ownerObjects) == 0x114);
70STATIC_ASSERT(offsetof(struct CharacterMenuState, ownerY) == 0x144);
71STATIC_ASSERT(offsetof(struct CharacterMenuState, selectedSlots) == 0x174);
72STATIC_ASSERT(offsetof(struct CharacterMenuState, statusCursor) == 0x17c);
73STATIC_ASSERT(offsetof(struct CharacterMenuState, ownerIds) == 0x208);
74STATIC_ASSERT(offsetof(struct CharacterMenuState, selectedIds) == 0x21a);
76STATIC_ASSERT(offsetof(struct CharacterMenuState, rowObjects) == 0x224);
78STATIC_ASSERT(sizeof(struct CharacterMenuState) == 0x244);
79
87};
88
89#endif
Animated sprites: their layers, frames and colour modes, and the resource slots they draw from.
CharacterAilment
@ CHARACTER_AILMENT_COUNT
@ CHARACTER_DOWN
@ CHARACTER_HAUNT
@ CHARACTER_CURSE
@ CHARACTER_POISON
@ CHARACTER_VENOM
The work slots of gWorkSlot, read through their own names.
STATIC_ASSERT, a compile-time check that emits nothing.
#define STATIC_ASSERT(condition)
C89 permits repeated extern declarations of the same array.
#define offsetof(type, member)
Definition stddef.h:19
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
Definition animspr.h:108
A unit in battle: a party member's or an enemy's stats, Psynergy, items, Djinn and ailments.
The work of the member chooser and the Status menu, in the HEAP_SLOT_MENU work slot.
s16 ownerX[8]
screen pixels
u16 page
3 for the member chooser, 0 for the Status menu
u8 unk222[2]
not named by TBS code
s8 ownerIndex[2]
each pane's member, in ownerIds
u8 unk00c[4]
not named by TBS code
struct UiWindow * unknownWindow028
only cleared by name in TBS
s32 ownerScale[8]
16.16 fixed point, 0x10000 full size
struct RenderOutput * categoryIcons[8]
u8 unk180[0x48]
not named by TBS code
struct UiWindow * actionWindow
struct RenderOutput * selectedIcon
s32 selectedOwner
the party member chosen
u8 unk030[0x18]
not named by TBS code
u16 ownerIds[8]
the party in order (Party_ListActiveOwners)
struct UiWindow * helpWindow
struct AnimationObject * rowObjects[4]
struct UiWindow * statusWindow
u8 selectedIds[2]
each pane's member
u8 unk000[8]
not named by TBS code
struct RenderOutput * entryIcons[32]
struct UiWindow * ownerWindow
s8 ownerCount[2]
members each pane chooses from
u8 unk0e8[0x24]
not named by TBS code
s16 rowX[4]
screen pixels
struct RenderOutput * statusCursor
s16 ownerY[8]
screen pixels
s16 rowY[4]
screen pixels
struct RenderOutput * ownerCursors[2]
struct AnimationObject * ownerObjects[8]
struct UiWindow * selectorWindow
An entry in a unit's action list: the action's id (OWNER_ACTION_ID_MASK) and marks for an action its ...
Definition battle_unit.h:19
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
The window renderer's work.