10#define WINDOW_WORK_MESSAGE_BUSY 0x12f8
12#define WINDOW_WORK_MESSAGE_BUSY 0x1188
18#if (LANGUAGE == LANGUAGE_ENGLISH)
19#define DEBUG_SECOND_FORM MsgBecameCursed
20#elif (LANGUAGE == LANGUAGE_GERMAN) || (LANGUAGE == LANGUAGE_FRENCH)
21#define DEBUG_SECOND_FORM MsgEnd
23#define DEBUG_SECOND_FORM MsgDebugSecondForm
42#define DEBUG_PRESET_LAST_ROW 332
43#define DEBUG_PRESET_END -1
78 for (row = 0;; row++) {
85 if (currentPreset == preset)
90 if (currentPreset != preset)
106 for (i = 0; i < 32; i++)
108 for (i = 0; i < 2; i++) {
127 for (i = 0; i < 4; i++) {
138#define DEBUG_VIEW_LIMIT \
139 (MsgLaliveroHowDidSearchForSheba - \
140 MsgBabiLighthouseTheyWereTerribleWeWereAbsolutely + 5)
165 unit->
name[i] = text[i];
189 if (secondRange == 0) {
190 message = MsgBabiLighthouseTheyWereTerribleWeWereAbsolutely;
202 if (secondRange != 0) {
240#define DEBUG_FIRST_ENCOUNTER 257
241#define DJINN_TUTORIAL_ENCOUNTER 28
254 s32 startModeSet = 0;
298 if (preset != loadedPreset) {
301 loadedPreset = preset;
void DebugBattle_ViewMessages(void)
Debug: a message viewer that never returns.
#define DJINN_TUTORIAL_ENCOUNTER
s32 DebugParty_LoadPreset(s32 preset)
Debug: replaces the party with the members of preset number preset.
struct DebugPartyEntry gDebug_PartyPresets[]
#define DEBUG_VIEW_LIMIT
The highest message index the viewer reaches.
#define DEBUG_PRESET_LAST_ROW
The last row of presets.tsv; the scan reports a missing preset past it.
#define DEBUG_FIRST_ENCOUNTER
The encounter the debug battle starts with, and the Djinn tutorial's.
void DebugBattle_RunMenu(void)
Debug: the battle test menu, which never returns.
#define WINDOW_WORK_MESSAGE_BUSY
#define DEBUG_SECOND_FORM
s32 Battle_RunEncounter(s32 enemyGroup)
Fights the battle against the enemy formation enemyGroup, from the opening transition to the end,...
What every part of the battle object shares: its includes, in their original order,...
#define VALUE_ABILITY_NAME
#define UNIT_NAME_LENGTH
The length of a unit's name, its terminator excluded.
s32 Party_AddActiveOwnerFar(s32 value)
struct BattleUnit * UnitGetFar(u32 owner)
s32 Inventory_AddItemFar(s32 owner_id, s32 item_id)
s32 GameFlag_SetBitFar(s32 flag)
s32 Inventory_RemoveFar(s32 owner, s32 slot)
s32 Unit_LearnPsynergyFar()
s32 Djinn_AddToOwnerFar(s32 owner, s32 index, s32 bit)
void Unit_LevelUpToFar(s32 unit, s32 lv)
s32 Party_RemoveActiveOwnerFar(s32 value)
s32 Inventory_EquipFar(s32 owner, s32 slot)
void GameFlag_ClearBitFar(s32 flag)
s32 Djinn_ActivateFar(s32 owner, s32 index, s32 bit)
void UnitCalcFar(s32 owner)
void GameState_InitDefaultsFar(void)
void AudioCommand_PlayFar(s32 id)
void Ui_AdjustValueWithoutLimitFar(s32 message, u16 *buf)
void UiWork_DrainPendingFar(s32 unused)
void UiWork_FinalizeFar(struct UiWindow *work, s32 release)
void UiWork_PushValueSlotFar(u32 value, u32 kind)
s32 UiWork_IsCompleteFar(void)
void UiWork_InitializeWithResourceCountersFar(void)
void UiWork_ClearValueNameTablesFar(void)
struct UiWindow * UiText_OpenMessageWindowFar(s32 message, s32 x, s32 y, u32 packed)
#define FLAG_DEBUG_BATTLE
set before every debug battle
#define FLAG_DJINN_TUTORIAL
#define FLAG_CHILDHOOD
the prologue: Isaac and Garet are children
void WaitFrames(s32 frames)
The game's frame loop: runs frames frames and returns.
#define Battle_SetStart(mode)
Sets the battle start type.
struct GameState gGameState
void Runtime_InitializeHeap(void)
Empties the heap: clears the 64 words of gWorkSlot (both pool pointers and every named slot) and sets...
@ DISPCNT_MODE_1
BG0 and BG1 text, BG2 affine.
volatile u32 gKeysHeld
Keys down now.
volatile u32 gKeysRepeat
Pressed keys, repeating while held: after 19 frames, then every 6.
char ResourceId_SuhallaGateBackdrop
void Scheduler_ResetTaskTable(void)
Empties the task table: every slot gets no routine, order 0xffff (sorted last) and no flags.
void Battle_ReservedNoOp2A08(void)
Does nothing; the debug battle menu (DebugBattle_RunMenu) calls it.
A unit in battle: a party member's or an enemy's stats, Psynergy, items, Djinn and ailments.
u32 djinnActive[4]
The Djinn set, one bit per Djinni; only these add their stat bonuses.
u8 djinnOwnedCounts[4]
the Djinn held in each element, at most 10
u8 djinnActiveCounts[4]
the Djinn set in each element; the class's element levels are read from these
u8 name[0x0f]
The name, one byte a character, ending in 0.
struct OwnerActionSlot actionSlots[32]
The action list: Psynergy taught for good, then the class's and the equipment's (Unit_RefreshPsynergy...
u8 level
1 to 99 for a character
u32 djinnAvailable[4]
The Djinn held, one bit per Djinni (by its index) in each element's word.
One row of the debug party presets (presets.tsv): a party member, the level to raise them to,...
s8 djinnCounts[NUM_ELEMENTS]
Djinn of each element to give and Set.
s8 owner
the party member, or DEBUG_PRESET_END
u16 items[4]
items to add and equip; 0 for none
u8 level
the level the member is raised to
u16 abilities[2]
abilities to teach; 0 for none
s16 special
the battle backdrop chosen for the scene or terrain
u8 messageSpeed
0 to 2; 1 on a new game
A window: a framed rectangle of the tilemap with its sprite outputs, its opening or closing animation...
void Ui_LoadWindowGraphics(void)
Loads the window font and frame tiles into BG character block 0, the window palette into BG palette 1...
void DebugText_Clear(void)
Blanks the debug text screen, homes the cursor and points BG0 at it.
void VramCache_Reset(void)
Frees every block and every cache entry.