7#define COUNTDOWN_START_FRAMES 900
8#define FRAMES_PER_SECOND 60
42 if (target != current) {
43 difference = target - current;
44 step = difference / 3;
50 newOffset = current + step;
77 if (signature->
v !=
'V')
79 if (signature->
s !=
'S')
91 if (signature->
e !=
'E')
93 if (signature->
d ==
'D')
103 timer = state->
timer;
107 nextTimer = timer - 1;
108 state->
timer = nextTimer;
What every part of the menu object shares: its includes, edition values, macros and the link round st...
#define BATTLE_MENU_MESSAGE_COPY
#define BATTLE_MENU_MESSAGE_CAPACITY
struct BattleWork * gBattleWork
void Camera_ConfigureSceneFar(s32 pos)
void AudioCommand_PlayFar(s32 id)
void WaitFrames(s32 frames)
The game's frame loop: runs frames frames and returns.
struct GameState gGameState
u16 gLinkPeerSignatures[][12]
24 bytes per peer
void UiText_RenderWideStringAtOffset(u16 *text, struct UiWindow *window, s32 x, s32 y)
Draws a zero-terminated string of 16-bit character codes into a text canvas window at pixel (x,...
volatile u32 gKeysPressed
Keys that went down this frame.
#define FRAMES_PER_SECOND
void UpdateLinkSessionCountdown(void)
Advances the link command-entry timer, slides the battle panels, and redraws the remaining seconds.
#define COUNTDOWN_START_FRAMES
s32 UiText_ShowLocalizedMessageAndWait(void)
Tests whether this battle forbids escape.
struct UiWindow * Link_CreateCountdownLabelWindow(void)
Creates the link timer window and draws its fixed time heading.
void Link_DrawShiftedTilePair(s32 offset)
Animates the two link indicator tiles with opposing two/three-pixel shifts.
void Runtime_PushSlotEntry(void *slotEntry, s32 slot)
Links a sprite entry into depth slot slot (clamped to 0..255) for this frame.
#define SE_TRIPLE_TONE_LOW
The battle's own work: its enemies, units and their objects, the turn's actions, the spoils,...
u8 challengeFlag
bits: 1 a party unit was challenged; nonzero, the party cannot run
u8 linkPaused
set when the link drops or the console's id changes
u8 linkSide
this console's multiplayer id
u8 battleStart
how the next battle starts (Battle_SetStart)
The partner console's signature as the link battle timer reads it: four letters that restart the coun...
A window: a framed rectangle of the tilemap with its sprite outputs, its opening or closing animation...
void UiText_DrawNumberInWindow(s32 value, s32 width, struct UiWindow *window, s32 x, s32 y)
Draws a number (width as UiText_FormatNumber) into a window's tilemap at pixel (x,...
s32 Ui_FillVramBlockPattern(void)
Fills the text canvas with the window background colour (4).
void UiWork_Finalize(struct UiWindow *window, s32 instant)
Closes a window: clears its contents and remembers its last rectangle.
struct UiWindow * UiWindow_Create(s32 x, s32 y, s32 width, s32 height, s32 attrs)
Opens a window at tile (x, y) of width by height tiles in the first free window slot,...