Alchemy
Loading...
Searching...
No Matches

psynergy_menu.h

Go to the documentation of this file.
1#ifndef ALCHEMY_PSYNERGY_MENU_H
2#define ALCHEMY_PSYNERGY_MENU_H
3
4/// @file
5/// The Psynergy menu's state.
6
7#include "unit/menu/menu.h"
8#include "global_cells.h"
9#include "static_assert.h"
10#include "menu_result.h"
11#include "render_input.h"
12#include "text/msg_ids.h"
13
14struct AnimationObject;
15
16struct BattleUnit;
17
18/// The Psynergy menu: its windows, icons and cursors, the party members' tabs
19/// and the Psynergy listed for the chosen member.
21 u8 unk000[8]; ///< not named by TBS code
22 s32 selectedOwner; ///< the party member chosen
23 u8 unk00c[4]; ///< not named by TBS code
25 struct RenderOutput *paneIcon[2]; ///< each pane's cursor
26 s8 tabIndex[2]; ///< each pane's member, in ownerTable
27 s8 tabCounts[2]; ///< members each pane chooses from
30 struct UiWindow *shortcutWindow; ///< the L and R shortcuts
32 u8 unk030[4]; ///< not named by TBS code
34 u8 unk038[0x0c]; ///< not named by TBS code
37 u8 unk0c8[0x44]; ///< not named by TBS code
39 /// The cursor grid: its place and its size.
40 ///@{
45 ///@}
46 struct AnimationObject *tabObjects[8]; ///< the party members' figures
47 s16 tabX[8]; ///< screen pixels
48 s16 rowPositions[8]; ///< screen pixels
49 s32 ownerScale[8]; ///< 16.16 fixed point, 0x10000 full size
50 u16 paneRow[2]; ///< each pane's Psynergy row chosen
51 u16 paneAction[2]; ///< each pane's Psynergy chosen, as an owner action entry
52 u8 unk17c[0x4c]; ///< not named by TBS code
53 u16 psynergies[32]; ///< the chosen member's Psynergy listed
54 u16 ownerTable[8]; ///< the party in order (Party_ListActiveOwners)
57 /// The user and the target: [1] is MENU_TARGET_WHOLE_PARTY for Psynergy
58 /// on the whole party.
61 /// bits: 1 the list shows the shortcut help | 0 set after a use or a
62 /// cancelled target
64 u16 skipSlide; ///< 1 skips the cursor's next slide once
65 u8 unk224[0x18]; ///< not named by TBS code
66 s16 slotY[4]; ///< screen pixels
67 u8 unk244[0x16]; ///< not named by TBS code
68 s16 useResult; ///< the use's result message, after MsgItemUseResult
69 u8 unk25c[4]; ///< not named by TBS code
70 s8 selectedIndexByOwner[8]; ///< each member's entry chosen last
71 u8 mode; ///< 0 to use Psynergy; 1 or 2 to set the L or R shortcut
72};
73
74STATIC_ASSERT(offsetof(struct PsynergyMenuState, auxiliaryWindow) == 0x010);
75STATIC_ASSERT(offsetof(struct PsynergyMenuState, psynergyWindow) == 0x020);
76STATIC_ASSERT(offsetof(struct PsynergyMenuState, entryGridCursor) == 0x044);
77STATIC_ASSERT(offsetof(struct PsynergyMenuState, entryIcons) == 0x048);
78STATIC_ASSERT(offsetof(struct PsynergyMenuState, messageWindow) == 0x10c);
79STATIC_ASSERT(offsetof(struct PsynergyMenuState, selectedColumn) == 0x110);
80STATIC_ASSERT(offsetof(struct PsynergyMenuState, selectedRow) == 0x111);
81STATIC_ASSERT(offsetof(struct PsynergyMenuState, columnCount) == 0x112);
82STATIC_ASSERT(offsetof(struct PsynergyMenuState, rowCount) == 0x113);
83STATIC_ASSERT(offsetof(struct PsynergyMenuState, paneAction[0]) == 0x178);
84STATIC_ASSERT(offsetof(struct PsynergyMenuState, psynergies) == 0x1c8);
85STATIC_ASSERT(offsetof(struct PsynergyMenuState, psynergyCount) == 0x218);
86STATIC_ASSERT(offsetof(struct PsynergyMenuState, ownerIds) == 0x21a);
87STATIC_ASSERT(offsetof(struct PsynergyMenuState, selectedIndexByOwner) ==
88 0x260);
89
90STATIC_ASSERT(offsetof(struct PsynergyMenuState, skipSlide) == 0x222);
91STATIC_ASSERT(offsetof(struct PsynergyMenuState, tabObjects) == 0x114);
92STATIC_ASSERT(offsetof(struct PsynergyMenuState, ownerScale) == 0x154);
93
94#endif
The work slots of gWorkSlot, read through their own names.
MenuResult, what a menu returns.
The sprite renderer's inputs and outputs: render inputs, OAM attributes and render output lists.
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 Psynergy menu: its windows, icons and cursors, the party members' tabs and the Psynergy listed fo...
struct UiWindow * psynergyWindow
struct UiWindow * shortcutWindow
the L and R shortcuts
u8 unk038[0x0c]
not named by TBS code
s32 ownerScale[8]
16.16 fixed point, 0x10000 full size
u16 paneAction[2]
each pane's Psynergy chosen, as an owner action entry
s16 slotY[4]
screen pixels
u16 paneRow[2]
each pane's Psynergy row chosen
u8 unk25c[4]
not named by TBS code
u8 unk17c[0x4c]
not named by TBS code
s8 tabCounts[2]
members each pane chooses from
struct RenderOutput * entryIcons[32]
u16 psynergies[32]
the chosen member's Psynergy listed
struct RenderOutput * paneIcon[2]
each pane's cursor
u8 mode
0 to use Psynergy; 1 or 2 to set the L or R shortcut
struct UiWindow * messageWindow
u16 flags
bits: 1 the list shows the shortcut help | 0 set after a use or a cancelled target
struct UiWindow * statusWindow
s32 selectedOwner
the party member chosen
s16 tabX[8]
screen pixels
u8 unk224[0x18]
not named by TBS code
u8 unk030[4]
not named by TBS code
u16 skipSlide
1 skips the cursor's next slide once
s8 selectedIndexByOwner[8]
each member's entry chosen last
struct UiWindow * auxiliaryWindow
s8 tabIndex[2]
each pane's member, in ownerTable
u8 ownerIds[2]
The user and the target: [1] is MENU_TARGET_WHOLE_PARTY for Psynergy on the whole party.
u8 unk000[8]
not named by TBS code
s16 useResult
the use's result message, after MsgItemUseResult
struct UiWindow * infoWindow
u8 unk0c8[0x44]
not named by TBS code
struct AnimationObject * tabObjects[8]
the party members' figures
struct UiWindow * listWindow
u16 ownerTable[8]
the party in order (Party_ListActiveOwners)
u8 unk00c[4]
not named by TBS code
s16 rowPositions[8]
screen pixels
struct RenderOutput * cursorIcon
struct RenderOutput * entryGridCursor
u8 unk244[0x16]
not named by TBS code
u8 selectedColumn
The cursor grid: its place and its size.
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
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