Alchemy
Loading...
Searching...
No Matches

battle_command.h

Go to the documentation of this file.
1#ifndef ALCHEMY_UNIT_WINDOW_BATTLE_COMMAND_H
2#define ALCHEMY_UNIT_WINDOW_BATTLE_COMMAND_H
3
4#include "types.h"
5#include "edition.h"
6#include "glyph.h"
7
8struct UiWindow;
9struct RenderOutput;
10
11struct RenderOutput *RenderOutput_Create(s32 slot, s32 oamFlags,
12 struct UiWindow *window, s32 offsetX,
13 s32 offsetY);
15 struct UiWindow *input,
16 s32 x, s32 y);
18 struct UiWindow *input, s32 x,
19 s32 y);
21 struct UiWindow *input,
22 s32 x, s32 y);
24 struct UiWindow *input, s32 x,
25 s32 y);
26struct RenderOutput *CreateSideObject(s32 character, s32 unused, s32 side,
27 struct UiWindow *window, s32 x, s32 y);
28void Ui_LoadCharacterEntryForSlot(u32 side, s32 character, s32 unused);
29void RenderOutput_SetAnimation(struct RenderOutput *out, s32 mode);
30void RenderOutput_SetInvertedSentinel(void *output, s32 priority);
31void UiWindow_FillFromScene(void *spans);
32void UiWindow_FillScreenBlockRect(s32 unused0, s32 unused1, u32 width,
33 u32 height, s32 value);
34
37void UiWindow_DrawColumnBorders(struct UiWindow *window, u32 flags);
38#ifdef UBFIX
39void UiWindow_DrawStatusBarTiles(struct UiWindow *window, s32 x, s32 y,
40 s32 length);
41#else
43 s32 length);
44#endif
45void PartyStatusDraw(s32 flags);
46void PartyStatus_Close(void);
47void UiWindow_SetTileAttributeBitRect(const struct UiWindow *window, s32 x,
48 s32 y, s32 width, s32 height, u32 set);
49
50struct SaveSummary;
51
52void *Text_FormatPlayTime(s32 value, u8 *out);
63void PaletteGlow_UpdateSine(void);
64void PaletteGlow_Start(void);
65void PaletteGlow_Stop(void);
66void UiWindow_FillTilemapRect(struct UiWindow *window, s32 x, s32 y, s32 width,
67 s32 height);
68void SaveMenu_ShowPartySprites(struct UiWindow *origin, s32 x, s32 y,
69 struct SaveSummary *descriptor);
72void SaveMenu_ShowDjinnSprites(struct UiWindow *origin, s32 x, s32 y);
75void SaveMenu_DrawDjinnCounts(struct UiWindow *win, struct SaveSummary *row);
76void SaveMenu_DrawFileSummary(struct UiWindow *win, struct SaveSummary *rec);
77s32 SaveMenu_SelectSlot(s32 file, s32 mode);
81s32 NameEntry_AcceptsMark(s32 mark, s32 letter);
83void UiWindow_CopyTilemapRegion(const struct UiWindow *window,
84 const void *source);
85void UiWindow_SetTileAttributeRect(const struct UiWindow *window, s32 x, s32 y,
86 s32 width, s32 height, u32 palette);
89s32 UiText_SetRenderString(const u8 *str);
90void UiText_DrawPaddedLabel(struct UiWindow *window, u8 *name);
93void Djinn_ShowJoinedMessage(s32 member, s32 element, s32 djinn);
95void Party_ShowJoinedMessage(s32 member);
96void Party_ShowPairJoinedMessage(s32 first, s32 second);
97void RenderResource_LoadPair(s32 picture, s32 slot);
98struct RenderOutput *
99RenderResource_CreatePair(s32 picture, struct UiWindow *window, s32 x, s32 y);
100void RenderOutput_BobPair(struct RenderOutput *obj);
101void RenderResource_LoadFrame(s32 icon, s32 slot, s32 remap);
103 struct UiWindow *window, s32 x,
104 s32 y);
106
107struct BattleActionRecord;
108struct BattleAct;
109struct GlyphPalette;
110struct OwnerActionSlot;
111struct SelectionWork;
112
113#ifdef UBFIX
115void UiWindow_DrawThreeTileColumn(struct UiWindow *window, s32 arg1, s32 arg2,
116 s32 arg3, s32 unused);
117#else
119int UiWindow_DrawThreeTileColumn(struct UiWindow *window, s32 arg1, s32 arg2,
120 s32 arg3, s32 unused);
121#endif
122void Graphics_MergeShiftedTileRows(u32 *first, u32 *second, u32 *output,
123 s32 shift);
124void Link_DrawShiftedTilePair(s32 offset);
127s32 ItemIcon_LoadIntoSlot(s32 resource, s32 index);
129s32 UiGlyph_LoadPortrait(u32 member, s32 cacheSlot);
134void UiText_LoadRemappedGlyph(struct GlyphPalette *palette, s32 glyph,
135 s32 tile);
136void UiText_DrawCharacter(struct SelectionWork *work, s32 index, u32 kind);
137void Graphics_SetBg1Priority3(void);
138void Graphics_SetBg1Priority0(void);
144#ifdef UBFIX
145void UiText_FormatNumberToHalfwords(s16 *out, s32 value);
146#else
148#endif
150 const struct OwnerActionSlot *newGrid, u16 *out,
151 s32 *gained, s32 *lost);
152#ifdef UBFIX
154 s32 ability);
155#else
157 s32 ability);
158#endif
159struct UiWindow *DjinnMenu_ShowChangePreview(struct UiWindow *win, s32 owner,
160 s32 code, s32 page,
161 s32 *pageCount);
162s32 Ui_RunOwnerStatusScreen(u16 *list, s32 listCount, s32 owner);
163s32 Battle_SelectAbility(s32 owner, s32 unused);
164s32 SummonMenu_SelectSummon(s32 unused0, s32 unused1, const u8 *standby);
166void Vram_CopyTile(u32 source_tile, u32 destination_tile);
167s32 ItemList_SelectEntry(s32 owner, u16 *entries, s32 count);
168s32 BattleMenu_RunActionSelection(s32 unitId, u16 *actions, s32 count);
169s32 BattleTarget_RunSelection(s32 selection, s32 mode, u32 spread, u32 kind);
172s32 Battle_ClassifyEntryKind(const struct BattleAct *act);
174 s32 count);
175
176void AffineEffect_UpdateFrame(void);
180s32 Menu_SelectResource(s32 start, s32 goal);
181void Menu_LoadResourceSlot(s32 slot, s32 index);
183void Menu_CenterResourceEntries(s32 row, s32 width, s32 resourceBase);
184void Menu_LayoutResourceEntries(s32 x, s32 y, s32 width, s32 resourceBase);
185s32 Menu_SelectTopEntry(s32 selection);
188void Menu_DrawModeLabel(void);
189void Menu_DrawModeIndicator(void);
193s32 Menu_RunConfirmSelection(s32 low, s32 message, s32 w, s32 selection);
196
198void Menu_DrawSelectionRow(struct UiWindow *work, s32 first, const s16 *second);
199#ifdef UBFIX
200void Menu_RunSelection(void);
201#else
203#endif
204s32 Menu_HandleSelectionRowInput(struct UiWindow *arg, s16 value, s16 *sub,
205 s16 *mode);
207void Text_FormatHex(u32 value, u32 count, u8 *out);
208void Menu_DrawFlagBitTable(struct UiWindow *window, s32 start_flag);
209s32 Menu_HandleFlagGridInput(struct UiWindow *window, s32 *page, s32 *cursor);
210void Menu_ReservedNoOp(void);
211void Djinn_SetFoundFlagAndAdd(s32 owner, s32 element, s32 index);
215
216#endif
s32 Menu_RunCommandRow(s32 mode)
Selects a command icon, returning its kind, -1 for cancel or -2 for a shoulder-button switch.
Definition command_row.c:28
struct UiWindow * UiText_ShowMessageAndWaitComplete(s32 message, s32 x, s32 y)
Opens a message at (x, y), waits for its text to finish, and returns its window so the caller can hol...
Definition command_row.c:9
s32 BattleLayout_HighlightPartyPanels(u16 *ids)
Dims the party strip, then highlight the actor IDs up to the 0xff terminator.
void Ui_SetRectHighlight(s32 x, s32 y, s32 width, s32 height, s32 paletteBit)
Sets bit 12 of each tile in a screen-space rectangle, preserving the other tile attributes.
s32 Battle_SelectAbility(s32 owner, s32 unused)
Selects a Djinni for the current battle command.
Definition djinn_menu.c:28
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
Font glyphs and their palettes.
void Menu_LoadResourceSlot(s32 slot, s32 index)
Decodes one command-icon table entry into the requested VRAM cache slot.
Definition icon_menu.c:362
void Menu_DrawModeIndicator(void)
Definition icon_menu.c:645
s32 Menu_SelectCoinsOrMedals(s32 selection)
Selects icons 0x20 and 0x21 (Coins, Lucky Medals) centered on row 17.
Definition icon_menu.c:849
void Menu_CenterResourceEntries(s32 row, s32 width, s32 resourceBase)
Centers the icons and their label window together on the given tile row.
Definition icon_menu.c:399
s32 Menu_RunResourceSelectionLoop(s32 initial)
Selects an icon position with wrapped directional input.
Definition icon_menu.c:260
s32 Menu_SelectSanctumService(s32 selection)
Selects a sanctum service, icons 0x19-0x1c (Revive, Cure Poison, Repel Evil, Remove Curse),...
Definition icon_menu.c:776
void Menu_EndResourceSelection(void)
Stops the icon pulse, closes the label window and releases each loaded icon before freeing the resour...
Definition icon_menu.c:240
s32 Menu_RunConfirmSelection(s32 bottom, s32 message, s32 labelWidth, s32 selection)
Selects Yes/No (icons 5/6); canceling returns 1 (No).
Definition icon_menu.c:795
s32 Menu_SelectResourceLayout(s32 mode)
Selects either the transfer method (mode 0) or password level.
Definition icon_menu.c:675
s32 Menu_RunConfirmSelectionAt(s32 x, s32 y, s32 selection)
Selects Yes/No at (x, y); canceling returns 1 (No).
Definition icon_menu.c:823
s32 Menu_SelectResource(s32 start, s32 goal)
Animates a cursor from start to goal with table-driven delays.
Definition icon_menu.c:311
s32 Menu_SelectTopEntry(s32 selection)
Builds the field command menu, omitting Djinn when none are owned.
Definition icon_menu.c:448
s32 Menu_SelectSaveSlotAction(void)
Builds the title menu from the save summaries and optional send flags.
Definition icon_menu.c:511
s32 Menu_AnimateSelectionToEntry(s32 start, s32 command)
Opens the field command menu and animates from start to the command's icon.
Definition icon_menu.c:495
void Menu_AppendResourceEntry(s32 icon)
Appends a command icon if fewer than six are present.
Definition icon_menu.c:375
void * AffineEffect_InitializeWork(void)
Allocates and clears the resource-menu state, then schedules its icon pulse.
Definition icon_menu.c:229
void Menu_LayoutResourceEntries(s32 x, s32 y, s32 width, s32 resourceBase)
Places icons at three-tile intervals from (x, y), then creates their label window immediately to the ...
Definition icon_menu.c:422
void AffineEffect_UpdateFrame(void)
Draws the resource-menu icons, pulsing the selected icon with one affine matrix, and updates the hori...
Definition icon_menu.c:40
void Menu_DrawModeLabel(void)
Redraws the password-level explanation when the selected level changes.
Definition icon_menu.c:570
s32 Menu_SelectShopCommand(s32 selection)
Selects a shop command, icons 0x11-0x14 (Buy, Sell, Artifacts, Repair), centered on row 17.
Definition icon_menu.c:760
s32 Item_ClassifyUseAbility(s32 unit, s32 item)
Checks whether an item can be used in battle.
Definition item_menu.c:11
s32 ItemList_SelectEntry(s32 owner, u16 *entries, s32 count)
Chooses an inventory-list position for battle use, or -1 on cancel.
Definition item_menu.c:46
void Vram_CopyTile(u32 sourceTile, u32 destinationTile)
Copies one 4bpp VRAM tile, ignoring the palette and flip bits of each entry.
Definition item_menu.c:38
void Party_ShowJoinedMessage(s32 member)
Shows that a member joined the party while the join fanfare (sound 81) plays, until it ends or A,...
Definition joined.c:183
s32 PartyTalkMenu_Choose(s32 unused)
The Colosso choice of what to do: "Descriptions", "Cheer" or "Nothing", chosen with a pointing hand.
Definition joined.c:33
void Djinn_ShowJoinedMessage(s32 member, s32 element, s32 djinn)
Shows that a Djinni joined a member while the join fanfare (sound 81) plays, until it ends or A,...
Definition joined.c:109
s32 Party_LookupCharacterValueByFlag32(u32 index)
Returns the portrait character of party member member (0-8): from gCharacter_ChildSpriteTable during ...
Definition joined.c:170
void Party_ShowPairJoinedMessage(s32 first, s32 second)
Shows that two members joined the party while the join fanfare (sound 81) plays, until it ends or A,...
Definition joined.c:224
void UiWindow_CopyTilemapRegion(const struct UiWindow *window, const void *source)
Decompresses the type-01 tilemap source and copies it over window's rectangle, both into the BG scree...
Definition name_entry.c:56
void Resource_CopyFixedBlockA(s32 slot)
Loads the 16x16 sprite gResource_FixedBlockATiles into VRAM slot slot.
Definition name_entry.c:137
s32 NameEntry_EditOwnerName(s32 member)
The name entry screen for party member member: the player types a name of up to NAME_MAX_LETTERS lett...
Definition name_entry.c:232
s32 UiText_SetRenderString(const u8 *str)
Puts the string str into the UI's text entries and returns its width in pixels.
Definition name_entry.c:151
void UiWindow_SetTileAttributeRect(const struct UiWindow *window, s32 x, s32 y, s32 width, s32 height, u32 palette)
Like UiWindow_SetTileAttributeBitRect, but ORs all of palette into the palette number of each entry (...
Definition name_entry.c:89
void UiText_DrawPaddedLabel(struct UiWindow *window, u8 *name)
Draws the name being entered, name, at the top left of window, with the free places up to its seventh...
Definition name_entry.c:181
void Resource_CopyFixedBlockB(s32 slot)
Loads the pointing hand cursor's tiles into VRAM slot slot.
Definition name_entry.c:132
UNUSED s32 NameEntry_AcceptsMark(s32 mark, s32 letter)
The international name entry has no voicing marks: where the Japanese edition checks a mark against t...
Definition name_entry.c:11
void UiWindow_FillFromScene(void *spans)
Fills spans with the horizontal extent of the windows on each of the 20 tile rows,...
Definition outputs.c:239
void RenderOutput_SetAnimation(struct RenderOutput *out, s32 mode)
Switches the sprite output out to animation mode from its first step.
Definition outputs.c:219
struct RenderOutput * RenderOutput_Create(s32 slot, s32 oamFlags, struct UiWindow *window, s32 offsetX, s32 offsetY)
Creates a sprite output for the VRAM cache slot slot and attaches it to window, placed at (offsetX,...
Definition outputs.c:13
struct RenderOutput * RenderOutput_CreateFromTable(s32 tableEntry, struct UiWindow *window, s32 x, s32 y)
Loads the pattern at the start of gRenderResource_PairSourceTable into a free VRAM slot and shows it ...
Definition outputs.c:117
struct RenderOutput * RenderOutput_CreateFromResource(s32 mode, s32 resource, struct UiWindow *window, s32 x, s32 y)
Loads resource resource in loading mode mode into a VRAM slot and shows it as a 16x16 sprite at (x,...
Definition outputs.c:63
struct RenderOutput * RenderOutput_CreateWithTransform(s32 icon, struct UiWindow *window, s32 x, s32 y)
Builds a 16x16 icon from frame pattern 1 with overlay pattern icon drawn over it, and shows it at (x,...
Definition outputs.c:96
void Ui_LoadCharacterEntryForSlot(u32 side, s32 character, s32 unused)
Reloads the portrait image of character into portrait slot side (0 or 1), keeping its sprite: used to...
Definition outputs.c:185
void UiWindow_FillScreenBlockRect(s32 unused0, s32 unused1, u32 width, u32 height, s32 value)
Fills the top-left width x height tiles of the 32-tile-wide BG screen block at 0x06002000 with the ti...
Definition outputs.c:256
void RenderOutput_SetInvertedSentinel(void *output, s32 priority)
Sets the draw layer of the sprite output output to 255 - priority, so a higher priority draws on a lo...
Definition outputs.c:228
struct RenderOutput * RenderOutput_CreateLoaded(s32 icon, s32 layers, struct UiWindow *window, s32 x, s32 y)
Copies icon icon (with layers passed on to the copier) into a free VRAM slot and shows it as a 16x16 ...
Definition outputs.c:78
struct RenderOutput * CreateSideObject(s32 character, s32 unused, s32 side, struct UiWindow *window, s32 x, s32 y)
Shows the 32x32 portrait of character at (x, y) in window, in portrait slot side (0 or 1,...
Definition outputs.c:138
s32 Battle_ClassifyEntryKind(const struct BattleAct *act)
Returns the target selection category for an ability's effect.
s32 Battle_CollectPartyCommands(struct BattleActionRecord *commands, u16 *actors, s32 commandCount)
Collects commands in party order, including target, cost and randomized priority.
void UiWindow_SetTileAttributeBitRect(const struct UiWindow *window, s32 x, s32 y, s32 width, s32 height, u32 set)
Sets (set 1) or clears (0) bit 12 of the tilemap entries of the width x height tile rectangle at (x,...
void UiWindow_BuildLayoutBounds(s32 flags)
Works out where the party status window goes for flags: one column per party member (those in battle ...
s32 UiWindow_DrawStatusBarTiles(struct UiWindow *window, s32 x, s32 y, s32 length)
void UiWindow_CreateWithLayoutBounds(s32 flags)
Opens the party status window with flags (see PARTY_STATUS_*) in a new heap block and draws it.
void PartyStatusDraw(s32 flags)
Draws the party status window with flags (see PARTY_STATUS_*): each member's name,...
void PartyStatus_Close(void)
Closes the party status window and frees its heap block.
void UiWindow_DrawColumnBorders(struct UiWindow *window, u32 flags)
Draws the vertical lines between the members' columns of the party status window, with their top and ...
void UiText_DrawCharacter(struct SelectionWork *work, s32 index, u32 icon)
Loads a selection icon, initializes its sprite and binds the decoded tiles.
Definition pictures.c:454
void UiText_LoadRemappedGlyph(struct GlyphPalette *palette, s32 glyph, s32 tile)
Loads a command icon into 8bpp OBJ VRAM, sharing a compact palette across the selection's icons.
Definition pictures.c:419
s32 Resource_LoadIndexedIntoBuffer(s32 slotIndex, s32 icon)
Decodes a command-icon table entry in temporary transfer work and reload the requested cache slot.
Definition pictures.c:401
void Graphics_SetBg1Priority3(void)
Puts BG1 behind the other priority levels while the command strip is active.
Definition pictures.c:465
UNUSED void Graphics_InstallBg1VCountHandler(void)
Clears BG0 vertical scroll and installs the BG1 priority change at line 136.
Definition pictures.c:483
s32 Ui_GetTableWordZero(s32 no)
Return gUi_FixedTileBlocks[0]; treat any nonzero no as 0 as well.
Definition pictures.c:366
void Graphics_SetBg1Priority0(void)
Restores BG1 priority 0; the VCount handler applies this below the strip.
Definition pictures.c:474
struct RenderOutput * RenderResource_CreateFrame(s32 icon, s32 remap, struct UiWindow *window, s32 x, s32 y)
Shows command icon icon (see RenderResource_LoadFrame) as a 32x32 256-colour sprite at (x,...
Definition pictures.c:85
struct RenderOutput * RenderResource_CreatePair(s32 picture, struct UiWindow *window, s32 x, s32 y)
Shows picture picture of gRenderResource_PairSourceTable as two 32x32 sprites side by side at (x,...
Definition pictures.c:28
struct UiWindow * Link_CreateCountdownLabelWindow(void)
Creates the link timer window and draws its fixed time heading.
Definition pictures.c:392
void RenderResource_LoadFrame(s32 icon, s32 slot, s32 remap)
Decompresses command icon icon (a 32x32 picture of 256 colours, 1 KB) into VRAM slot slot,...
Definition pictures.c:67
s32 Resource_LoadIndexedEntryToBuffer(s32 resource, s32 index)
Builds the ability glyph in temporary transfer work, reloads the requested cache slot and returns its...
Definition pictures.c:325
void RenderResource_LoadPair(s32 picture, s32 slot)
Decompresses picture picture of gRenderResource_PairSourceTable (two 32x32 sprites side by side,...
Definition pictures.c:12
void Link_DrawShiftedTilePair(s32 offset)
Animates the two link indicator tiles with opposing two/three-pixel shifts.
Definition pictures.c:237
UNUSED void UiIcon_Decompress(GlyphTransfer *work)
Copies the 4bpp decoder into RAM, calls it with the transfer's encoded source and byte buffer,...
Definition pictures.c:376
s32 ItemIcon_LoadIntoSlot(s32 resource, s32 index)
Composes the item icon with style 0x1a in temporary transfer work and reload the requested cache slot...
Definition pictures.c:312
void Ui_ApplyTableScaleToObject(struct RenderOutput *obj)
Makes the sprite obj pulse: scales it about its centre by gUi_ObjectPulseScales (in 1/65536,...
Definition pictures.c:105
s32 Resource_LoadTableEntryToBuffer(s32 resource, s32 index)
Composes a table-entry glyph in temporary transfer work, reloads its cache slot, then releases the te...
Definition pictures.c:299
s32 UiGlyph_LoadPortrait(u32 member, s32 cacheSlot)
Loads a party portrait into the supplied cache slot and returns its tile.
Definition pictures.c:341
void Graphics_ExpandVramTilesByColorTable(u16 *dst)
Expands two palette variants of the ten source tile rows at 0x06000600, mapping each packed nibble th...
Definition pictures.c:256
int UiWindow_DrawThreeTileColumn(struct UiWindow *window, s32 x, s32 y, s32 pattern, s32 unused)
Definition pictures.c:179
void Graphics_MergeShiftedTileRows(u32 *first, u32 *second, u32 *output, s32 shift)
Merges two 8x8 4bpp tiles row by row.
Definition pictures.c:193
s32 Menu_BuildLocalizedPatternTiles(void)
Definition pictures.c:137
void RenderOutput_BobPair(struct RenderOutput *obj)
Bobs the two sprites of a pair (see RenderResource_CreatePair) up and down by gUi_PairBobOffsets,...
Definition pictures.c:50
s32 BattleMenu_RunActionSelection(s32 unitId, u16 *actions, s32 count)
Selects a Psynergy-list position, or -1 on cancel.
An ability's definition, a row of gBattleAction_DefinitionTable: its targeting, kind,...
A unit's chosen action for the turn: its command, the command's parameter, its target and range,...
A compact palette shared by a selection's command icons: the slot each icon colour was given,...
Definition glyph.h:19
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),...
u16 y
screen pixels
u16 x
screen pixels
A save file's summary for the file screen: the leader's name, level and class, the area,...
Definition save_state.h:29
u8 name[12]
the leader's
Definition save_state.h:31
u8 djinn[4]
the party's Djinn of each element
Definition save_state.h:37
The command icon row's work block: the icons' shared palette, up to six icons, the label window,...
struct UiWindow * window
A window: a framed rectangle of the tilemap with its sprite outputs, its opening or closing animation...
Definition uiwindow.h:11
u16 y
tiles
Definition uiwindow.h:16
u16 x
tiles
Definition uiwindow.h:15
u16 height
tiles
Definition uiwindow.h:14
u16 width
tiles
Definition uiwindow.h:13
s32 SummonMenu_SelectSummon(s32 unused0, s32 unused1, const u8 *standby)
Shows learned summons four per page; returns the selected summon number.
Definition summon_menu.c:18
The integer types, TRUE, UNUSED and the fixed-address macros.
signed int s32
Definition types.h:14
unsigned int u32
Definition types.h:15
signed short s16
Definition types.h:12
unsigned short u16
Definition types.h:13
unsigned char u8
Definition types.h:11
s32 NameEntry_CountLetters(const u8 *name)
s32 Menu_HandleSelectionRowInput(struct UiWindow *window, s16 scene, s16 *entrance, s16 *selectedField)
Edits the debug scene or entrance, returning -1 to warp and -2 to cancel.
Definition debug.c:92
void Menu_DrawSelectionRow(struct UiWindow *work, s32 scene, const s16 *entrance)
Draws the debug scene and entrance numbers with their category/area labels.
Definition debug.c:19
s32 DebugMenu_BrowseIcons(void)
Browses pages of item, Psynergy and status-pattern icons, suspending the menu controller while the br...
Definition debug.c:327
UNUSED void DebugMenu_ScheduleSceneSelector(void)
Schedules the debug scene and entrance selector; 0xc80 is a scheduler order, not a number of frames t...
Definition debug.c:10
void Menu_DrawFlagBitTable(struct UiWindow *window, s32 page)
Draws one page of 256 flags as sixteen rows of hexadecimal labels and bits.
Definition debug.c:208
void Text_FormatHex(u32 value, u32 count, u8 *out)
Writes the lowest count digits of value, up to five, most significant first as uppercase hexadecimal ...
Definition debug.c:187
s32 Menu_RunSelectionWithCursorObject(void)
Shows a 16x16 flag grid per page and processes input until closed.
Definition debug.c:154
s32 Menu_RunWorkspaceResultLoop(void)
Handles Save, Sleep and Options from the field workspace.
Definition debug.c:303
s32 DebugMenu_BrowseEntryGlyphs(void)
Browses the character and sprite portrait maps as one circular list.
Definition debug.c:421
s32 Menu_HandleFlagGridInput(struct UiWindow *window, s32 *page, s32 *cursor)
Moves within the flag grid, changes pages, or toggles the selected flag.
Definition debug.c:243
void Menu_ReservedNoOp(void)
Reserved menu entry.
Definition debug.c:292
s16 Menu_RunSelection(void)
Definition debug.c:39
void Djinn_SetFoundFlagAndAdd(s32 owner, s32 element, s32 index)
Sets the Djinni's collected flag, then adds it to the specified owner.
Definition debug.c:295
s32 DjinnMenu_ListChangedDjinn(const struct OwnerActionSlot *oldGrid, const struct OwnerActionSlot *newGrid, u16 *out, s32 *gained, s32 *lost)
List Psynergy in the new grid, marking newly gained entries with bit 15, then append lost entries wit...
s32 Ui_CreateOutputFromResourceSlot(struct UiWindow *window, s32 x, s32 y, s32 abilityId)
s32 UiText_FormatNumberToHalfwords(s16 *out, s32 value)
struct UiWindow * DjinnMenu_ShowChangePreview(struct UiWindow *win, s32 owner, s32 encodedDjinn, s32 page, s32 *pageCount)
Temporarily toggle a Djinni and recalculate its owner's stats to show the change.
s32 Save_WriteSelectedSlot(void)
The Save command: lets the player choose a file (the current one first), asks whether to save over it...
Definition save.c:1174
s32 SaveState_DeleteSelectedSlot(void)
The file menu's Erase: lets the player choose a file, asks whether to erase it and on Yes deletes bot...
Definition save.c:429
void UiWindow_FillTilemapRect(struct UiWindow *window, s32 x, s32 y, s32 width, s32 height)
Fills the width x height tile rectangle at (x, y) inside window, clipped to the screen as UiWindow_Se...
Definition save.c:538
s32 SaveState_WriteSlotPair(s32 file)
Writes both halves of the save buffer, as they are, to save file file.
Definition save.c:281
void SaveMenu_ShowDjinnSprites(struct UiWindow *window, s32 x, s32 y)
Shows the four Djinn sprites, one for each element, in a row from tile (x, y) inside window,...
Definition save.c:669
u32 SaveState_BuildSummaryHeader(void)
Prepares the save buffer for writing: stamps the game state with the time and options,...
Definition save.c:159
s32 SaveMenu_SelectSlot(s32 selectedFile, s32 menuMode)
Definition save.c:834
void SaveMenu_HidePartySprites(void)
Stops placing the party sprites of the save file menu and releases them.
Definition save.c:625
UNUSED s32 SaveState_ConfirmAndProcessSelectedSlot(void)
Asks whether to save over the current file and, on Yes, writes the save stamp into it (SaveState_Proc...
Definition save.c:347
s32 SaveState_CopySlotPair(void)
The file menu's Copy: lets the player choose a file, reads both of its records into the save buffer a...
Definition save.c:377
void SaveMenu_DrawFileSummary(struct UiWindow *window, struct SaveSummary *summary)
Draws the summary of save file summary into window: the leader's name, level and class,...
Definition save.c:769
void PaletteGlow_UpdateSine(void)
A scheduler callback that makes colours 8-11 of BG palette 14 glow: each follows a sine wave of the f...
Definition save.c:473
void PaletteGlow_Start(void)
Starts the palette glow (PaletteGlow_UpdateSine) in the scheduler.
Definition save.c:527
u32 SaveState_FindFreeSummarySlot(void)
Returns the first save file whose summary shows it empty (level 0), or SAVE_NO_FREE_FILE when all thr...
Definition save.c:65
void SaveMenu_DrawDjinnCounts(struct UiWindow *window, struct SaveSummary *summary)
Draws the Djinn counts of save file summary, one for each element, two digits each,...
Definition save.c:740
void SaveMenu_HideDjinnSprites(void)
Stops placing the Djinn sprites of the save file menu and releases them.
Definition save.c:696
s32 Resource_LoadFixedBlockBIntoFreeSlot(void)
Loads the pointing hand cursor's tiles (gResource_FixedBlockBTiles, 128 bytes) into a free VRAM slot ...
Definition save.c:1269
void PaletteGlow_Stop(void)
Definition save.c:531
s16 SaveState_WriteCurrentSlotPair(void)
Saves the game to the current file (gSaveSlot): builds the summary and writes both halves of the save...
Definition save.c:245
s32 SaveState_CountRecordsExcludingFlagged(s32 excludeSent)
Returns how many save files there are, leaving out those whose summary has its send flag set when exc...
Definition save.c:80
s32 SaveState_LoadRecordIntoWork(s32 mode)
Lets the player choose a file in save menu mode (see SaveMenuMode) and loads it into the save buffer ...
Definition save.c:1232
s32 SaveState_ProcessSelectedSlot(void)
Writes the 64-byte save stamp (gSaveStamp, which lies in the first half of the save buffer) into the ...
Definition save.c:308
s32 SaveState_ScanRecordFlags(void)
Loads the save file summaries for the title menu and returns how many files there are: plus 100 when ...
Definition save.c:111
void SaveMenu_PlaceDjinnSprites(void)
A scheduler callback: draws each Djinn sprite of the save file menu at its place, at scale 1....
Definition save.c:711
void * Text_FormatPlayTime(s32 frames, u8 *out)
Writes the play time frames (at 60 frames a second) into out as hours and minutes,...
Definition save.c:26
void SaveMenu_PlacePartySprites(void)
A scheduler callback: draws each party sprite of the save file menu at its place and scale for this f...
Definition save.c:640
void SaveMenu_ShowPartySprites(struct UiWindow *window, s32 x, s32 y, struct SaveSummary *summary)
Shows the party of save file summary (up to four members) as sprites in a row from tile (x,...
Definition save.c:595
s32 Ui_RunOwnerStatusScreen(u16 *list, s32 listCount, s32 owner)
Shows a party member's stats and condition help until B or the link session ends.
Definition status.c:41
s32 BattleTarget_RunSelection(s32 selection, s32 mode, u32 spread, u32 kind)
Chooses a party/enemy target and animates its selection markers.
Definition targets.c:27