1#ifndef ALCHEMY_BATTLE_COMMAND_INTERNAL_H
2#define ALCHEMY_BATTLE_COMMAND_INTERNAL_H
61#include "text/msg_ids.h"
114#define DJINN_PREVIEW_VITALS_X 4
116#define DJINN_PREVIEW_VITALS_X 5
120#define DJINN_PREVIEW_STAT_DIGIT_OFFSET 7
121#define DJINN_PREVIEW_STAT_X 4
123#define DJINN_PREVIEW_STAT_DIGIT_OFFSET 8
124#define DJINN_PREVIEW_STAT_X 6
128#define DJINN_PREVIEW_HELP_X 40
130#define DJINN_PREVIEW_HELP_X 24
133#if (LANGUAGE == LANGUAGE_SPANISH) || (LANGUAGE == LANGUAGE_FRENCH) || \
134 (LANGUAGE == LANGUAGE_ITALIAN)
135#define PSYNERGY_COST_SECOND_TILE 0xf005
137#define PSYNERGY_COST_SECOND_TILE 0xf01e
140#if (LANGUAGE == LANGUAGE_FRENCH)
141#define OWNER_STATUS_LEVEL_X 51
143#define OWNER_STATUS_LEVEL_X 56
147#define SUMMON_MENU_WINDOW_X 13
148#define SUMMON_MENU_WINDOW_WIDTH 17
150#define SUMMON_MENU_WINDOW_X 16
151#define SUMMON_MENU_WINDOW_WIDTH 14
155#define BATTLE_CLASS_ICON_X 0
157#define BATTLE_CLASS_ICON_X 4
160#if (LANGUAGE == LANGUAGE_FRENCH)
161#define BATTLE_COMMAND_NAME_X 14
163#define BATTLE_COMMAND_NAME_X 16
167#define BATTLE_SUMMON_ICON_X 80
169#define BATTLE_SUMMON_ICON_X 104
173#define BATTLE_SUMMON_WINDOW_WIDTH 17
175#define BATTLE_SUMMON_WINDOW_WIDTH 14
179#define BATTLE_SUMMON_ELEMENT_COLUMN 13
180#define BATTLE_SUMMON_COST_COLUMN 14
182#define BATTLE_SUMMON_ELEMENT_COLUMN 10
183#define BATTLE_SUMMON_COST_COLUMN 11
186#if (LANGUAGE == LANGUAGE_GERMAN) || (LANGUAGE == LANGUAGE_SPANISH) || \
187 (LANGUAGE == LANGUAGE_FRENCH) || (LANGUAGE == LANGUAGE_ITALIAN)
188#define BATTLE_ITEM_WINDOW_WIDTH 16
190#define BATTLE_ITEM_WINDOW_WIDTH 15
193#if (LANGUAGE == LANGUAGE_ENGLISH) || (LANGUAGE == LANGUAGE_GERMAN) || \
194 (LANGUAGE == LANGUAGE_ITALIAN)
195#define RESOURCE_MODE0_WINDOW_X 7
196#define RESOURCE_MODE0_WINDOW_WIDTH 17
197#elif (LANGUAGE == LANGUAGE_SPANISH)
198#define RESOURCE_MODE0_WINDOW_X 5
199#define RESOURCE_MODE0_WINDOW_WIDTH 21
200#elif (LANGUAGE == LANGUAGE_FRENCH)
201#define RESOURCE_MODE0_WINDOW_X 5
202#define RESOURCE_MODE0_WINDOW_WIDTH 22
204#define RESOURCE_MODE0_WINDOW_X 9
205#define RESOURCE_MODE0_WINDOW_WIDTH 13
208#if (LANGUAGE == LANGUAGE_GERMAN)
209#define RESOURCE_MODE1_WINDOW_X 1
210#define RESOURCE_MODE1_WINDOW_WIDTH 28
212#define RESOURCE_MODE1_WINDOW_X 3
213#define RESOURCE_MODE1_WINDOW_WIDTH 25
216#if (LANGUAGE == LANGUAGE_ENGLISH) || (LANGUAGE == LANGUAGE_GERMAN)
217#define TRANSFER_METHOD_WINDOW_X 6
218#define TRANSFER_METHOD_WINDOW_WIDTH 18
219#elif (LANGUAGE == LANGUAGE_SPANISH)
220#define TRANSFER_METHOD_WINDOW_X 4
221#define TRANSFER_METHOD_WINDOW_WIDTH 21
222#elif (LANGUAGE == LANGUAGE_FRENCH) || (LANGUAGE == LANGUAGE_ITALIAN)
223#define TRANSFER_METHOD_WINDOW_X 5
224#define TRANSFER_METHOD_WINDOW_WIDTH 20
226#define TRANSFER_METHOD_WINDOW_X 9
227#define TRANSFER_METHOD_WINDOW_WIDTH 13
231#define TRANSFER_METHOD_LABEL_X 2
233#define TRANSFER_METHOD_LABEL_X 0
236#if (LANGUAGE == LANGUAGE_ENGLISH) || (LANGUAGE == LANGUAGE_SPANISH) || \
237 (LANGUAGE == LANGUAGE_FRENCH) || (LANGUAGE == LANGUAGE_ITALIAN)
238#define TRANSFER_HELP_WINDOW_X 1
239#define TRANSFER_HELP_WINDOW_WIDTH 28
240#elif (LANGUAGE == LANGUAGE_GERMAN)
241#define TRANSFER_HELP_WINDOW_X 0
242#define TRANSFER_HELP_WINDOW_WIDTH 30
244#define TRANSFER_HELP_WINDOW_X 5
245#define TRANSFER_HELP_WINDOW_WIDTH 21
248#if (LANGUAGE == LANGUAGE_GERMAN)
249#define ENTRY11_COMMAND_LABEL_WIDTH 8
251#define ENTRY11_COMMAND_LABEL_WIDTH 7
253#define ENTRY11_COMMAND_LABEL_WIDTH 6
257#define ENTRY19_COMMAND_LABEL_WIDTH 10
259#define ENTRY19_COMMAND_LABEL_WIDTH 8
265#define OUTPUT_SIZE_16X16 0x40000000
266#define OUTPUT_SIZE_32X32 0x80000000
270#define PORTRAIT_SLOT_COUNT 2
271#define PORTRAIT_PALETTE 14
272#define PORTRAIT_SLOT_EMPTY 999
277#define BATTLE_MENU_MESSAGE_CAPACITY 52
278#define BATTLE_MENU_MESSAGE_COPY UiText_CopyMessageString
280#define BATTLE_MENU_MESSAGE_CAPACITY 32
281#define BATTLE_MENU_MESSAGE_COPY UiText_DecodeMessage
294#define BATTLE_OK 0x80
Sprite rotation and scale, and the affine matrices handed out each frame.
Animated sprites: their layers, frames and colour modes, and the resource slots they draw from.
B5Context, the object context a battle routine reads; most of its fields are still unnamed.
const u8 gDjinnMenu_BlinkTile[32]
@ LIST_TILE_PAGES_RIGHT
Right arrow.
@ SUMMON_ELEMENT_TILE
Element icon.
@ LIST_TILE_PAGE_NUMBER
Page number.
@ LIST_TILE_PAGES_LEFT
Left arrow.
@ LIST_TILE_PAGE_NUMBER_LIT
Current page number.
const u8 gDjinnMenu_ElementYOffsets[4]
const u8 gDjinnMenu_ElementXOffsets[4]
BattleEffectWork, the running battle effect's work, and its animation objects.
Which units are in a battle, and the Djinn recovery list.
Summons and the battle sprite definitions of the enemy classes.
BattleUnit_Recalculate, which recalculates a unit's stats.
BattlePlan, an action planned for its targets: the hits, criticals and multipliers rolled.
BattleUnit, a party member's or enemy's battle state, with the elements, abilities and actions it use...
BattleWork, the battle's own work, and the battle display work.
The task scheduler: tasks, their order and the scheduler's state.
The engine calls the debug menus import, and their palette swatch tiles.
The display transition's frames, windows and state.
The Djinn preview's sprites and arrow tiles.
DMA channel registers, and the DMA and CPU fills.
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
EffectStep and EffectPosition, the positions effects move through.
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
16.16 fixed-point constants, sine and cosine, and the library division.
Game flags, named where their meaning is shown.
FourObjectMotion, the row of four figures the Status and Djinn menus show.
The frame loop's globals: lag counts, the CPU load display and the VBlank flags.
GameState, the game's state: play time, coins, the scene and the leader's position,...
The work slots of gWorkSlot, read through their own names.
Font glyphs and their palettes.
void UiText_RenderWideStringInWindow(s16 *text, struct UiWindow *window, s32 x, s32 y)
Draws a zero-terminated string of 16-bit character codes into a window's tilemap at tile (x,...
The screen blend's globals and the graphics routines.
The heap's work slots and HeapState.
The hardware's I/O registers and their bits, as pret names them.
The register write queue that VBlank carries out after each finished frame.
The hardware's interrupt sources and the interrupt handler table.
Items: their definitions, types, flags and effects.
The IWRAM call layer: the routines the game keeps resident in IWRAM, each at its fixed address,...
The keypad state the VBlank interrupt keeps.
Declares nothing of its own: it only includes types.h and edition.h.
The heaps: allocating and freeing blocks.
The reel game's title lettering.
MotionObject, an effect object that moves and draws one sprite.
NodeChain, a chain of menu nodes.
Declares nothing of its own: it only includes edition.h and render_input.h.
Declares nothing of its own: it only includes battle_system.h.
Declares nothing of its own: it only includes static_assert.h and game_state.h.
The work pointers in the gWorkSlot table, by name.
Copying ARM routines to RAM to run them there.
A sprite's screen position and scale.
Resource numbers, named where their contents are known.
Declares nothing of its own: it only includes edition.h and types.h.
The save workspace: slot headers and summaries.
FIELD_AT_OFFSET and the entity and camera views older scene code reads.
The selection screen's sprites and nodes.
The link cable's runtime: serial packets, registers and transfer state.
ShopRuntime, a shop's work, and the shop screen's tiles.
Song and sound effect ids, indices into gSound_SongTable.
STATIC_ASSERT, a compile-time check that emits nothing.
A compact palette shared by a selection's command icons: the slot each icon colour was given,...
A list of render outputs: its first output and the link to append after.
A render output: a sprite in a window's output list (a character, an icon or a portrait),...
The command icon row's work block and one of its icons: pictures.c loads the icons,...
The command icon row's work block: the icons' shared palette, up to six icons, the label window,...
struct GlyphPalette palette
struct SelectionEntry entries[6]
struct AffineTransform affine
A text channel, one of three, which types decoded text into a window a few characters a frame and run...
u16 y
pen, 8.8 fixed-point pixels
u16 flags
nonzero keeps the window's size from page to page
u16 x
pen, 8.8 fixed-point pixels
u16 spacing[4]
Extra advance per line, in 1/256 pixels: after every character in Japanese, after a space in the othe...
struct UiWindow * work
the window typed into; NULL when free
u16 entry
next code in UiRenderWork.entries
A window: a framed rectangle of the tilemap with its sprite outputs, its opening or closing animation...
The system's routines and globals: interrupts, BIOS sound bias, random numbers and sleep.
Values that differ by patch level or language, chosen once for their code.
The kanji glyphs and the text marks drawn with characters.
TextReader, a cursor through message text.
Declares nothing of its own: it only includes edition.h and render_input.h.
void UiText_DrawPrefixedNumberAtOffset(s32 value, const struct UiWindow *work, s32 offsetX, s32 offsetY, s32 variant)
Draws a four-digit number after a two-glyph sign (window tiles 0x1d and 0x1e, or 0x1f and 0x1e with v...
The integer types, TRUE, UNUSED and the fixed-address macros.
UiWork, the window system's work, and the status screen's cursors.
Declares nothing of its own: it only includes edition.h and uiwindow.h.
UiWindow, a window's work, and marking its tilemap rows for transfer.
Declares nothing of its own: it only includes the window, battle command, resource and VRAM table hea...
The sprite VRAM block cache and its owners.
void UiWindow_PutGlyph(struct UiWindow *win, u32 tile, u32 x, u32 y, s32 mode)
Puts a character into a window's tilemap as a tile at tile (x, y) of its interior.
The window renderer's work.
void RenderOutput_AppendToList(struct RenderOutputList *list, struct RenderOutput *node)
Adds a render output to the end of a list; NULL lists are ignored.
struct UiChannelSlot * UiText_QueueRenderEntries(struct UiWindow *window, s32 entry, s32 x, s32 y, u16 *spacing, s32 flags)
Starts a free message channel typing the decoded text that begins at entry into window,...
The options screen's work and the selection work.