Alchemy
Loading...
Searching...
No Matches

link_timer.c File Reference

The link battle timer and the no-escape check. More...

Go to the source code of this file.

Data Structures

struct  LinkSignature
 The partner console's signature as the link battle timer reads it: four letters that restart the countdown. More...

Macros

#define COUNTDOWN_START_FRAMES   900
#define FRAMES_PER_SECOND   60

Functions

void UpdateLinkSessionCountdown (void)
 Advances the link command-entry timer, slides the battle panels, and redraws the remaining seconds.
s32 UiText_ShowLocalizedMessageAndWait (void)
 Tests whether this battle forbids escape.

Detailed Description

The link battle timer and the no-escape check.

Part of battle_command.c, the menu object, compiled only through it.

Definition in file link_timer.c.

Macro Definition Documentation

◆ COUNTDOWN_START_FRAMES

#define COUNTDOWN_START_FRAMES   900

Definition at line 7 of file link_timer.c.

Referenced by UpdateLinkSessionCountdown().

◆ FRAMES_PER_SECOND

#define FRAMES_PER_SECOND   60

Definition at line 8 of file link_timer.c.

Referenced by UpdateLinkSessionCountdown().

Function Documentation

◆ UpdateLinkSessionCountdown()

void UpdateLinkSessionCountdown ( void )

Advances the link command-entry timer, slides the battle panels, and redraws the remaining seconds.

Pause flags and peer signatures stop the timer.

Definition at line 23 of file link_timer.c.

Referenced by Battle_CollectPartyCommands(), NameEntry_CountLetters(), and UpdateLinkSessionCountdown().

◆ UiText_ShowLocalizedMessageAndWait()

s32 UiText_ShowLocalizedMessageAndWait ( void )

Tests whether this battle forbids escape.

Show the reason until A/B or the link timer expires, returning 1 when escape is forbidden and 0 otherwise.

Definition at line 127 of file link_timer.c.

Referenced by Battle_CollectPartyCommands(), NameEntry_CountLetters(), and UiText_ShowLocalizedMessageAndWait().