src/scene/battle_arena.c
The Battle Arena, the hall Isaac walks into when Battle is chosen on the File Screen with a save that has a Djinni. More…
#include "flags.h"#include "battle/battle.h"#include "battle/battle_side.h"#include "debug/debug.h"#include "field/script_inline.h"#include "graphics/graphics.h"#include "sound/sound_driver_symbols.h"#include "text/msg_ids.h"
Structures
| Name | Description | |
|---|---|---|
struct | LINK_PEER_PAYLOAD | A console's link payload as the Battle Arena reads it from SerialPeerPayloads. values[0] is its signature word and values[1] its state word (BattleArenaSlotValues, placed by BattleArenaSlotColumns). |
Macros
| Name | Description | |
|---|---|---|
#define | FLAG_BATTLE_ARENA_ATTENDANT_ASKED FLAG_SCENE_TEMP(0x00) | The attendant has asked the player to take part. |
#define | FLAG_BATTLE_ARENA_OPPONENT_ASKED FLAG_SCENE_TEMP(0x01) | The opponent has asked for a battle: its signature matches, and it stands asked or in the circle. |
#define | FLAG_BATTLE_ARENA_PLAYER_APPLIED FLAG_SCENE_TEMP(0x02) | The player has applied for a battle ("Would you like to apply?"). |
#define | FLAG_BATTLE_ARENA_ENTERING_BATTLE FLAG_SCENE_TEMP(0x03) | The party is on its way into the battle. |
#define | FLAG_BATTLE_ARENA_PARTY_ORDER_NEXT FLAG_SCENE_TEMP(0x04) | ACTOR_PARTY_ORDER_VISITOR has given the linked finals' limit of three allies, so the next talk explains how to change the party's order. |
#define | FLAG_BATTLE_ARENA_LINK_DISCONNECTED FLAG_SCENE_TEMP(0x05) | The link was lost and the attendant has yet to say so. |
#define | FLAG_BATTLE_ARENA_IN_PARTY_FIRST FLAG_SCENE_TEMP(0xf0) | The first of eight flags, one per character from Isaac, each set while that character is in the battle party (scInit). |
#define | FLAG_BATTLE_ARENA_ATTENDANT_EXPLAINED FLAG_AREA_TEMP(0x00) | The attendant has explained the Battle Arena once. |
#define | FLAG_BATTLE_ARENA_LINK_CHILD FLAG_AREA_TEMP(0x02) | This console is the link's child (multiplayer id 1), which receives the parties first. |
#define | FLAG_BATTLE_ARENA_LINK_UP FLAG_AREA_TEMP(0x03) | The link is up. |
#define | FLAG_BATTLE_ARENA_LINK_BATTLE_ENDED FLAG_AREA_TEMP(0x04) | A linked battle has ended since the leader last walked south of z 224, so the party and the visitors speak of it. |
#define | FLAG_BATTLE_ARENA_LINK_BATTLE_WON FLAG_AREA_TEMP(0x05) | The last linked battle was won. |
#define | BATTLE_ARENA_UNIT_RECORD_BYTES (17 * 20) | A linked battle trades three party members' records and then the Djinn recovery table. |
#define | BATTLE_ARENA_RECOVERY_RECORD_BYTES (16 * 20) | The recovery table's record: the table (DJINN_RECOVERY_TABLE, 268 bytes) and the 52 bytes after it, 16 blocks of 20, two more than the table needs. |
#define | BATTLE_ARENA_UNIT_RECORD_COUNT 3 | The party members a linked battle takes. |
#define | BATTLE_ARENA_LINK_READY_MASK 3 | LinkStatusWork bits 0 and 1. |
#define | BATTLE_ARENA_TRANSFER_RETRY_LIMIT 24 | A record fails on the 25th tick it waits without a link or past the timeout. |
#define | BATTLE_ARENA_SEND_TIMEOUT_TICKS 600 | Ticks, about ten seconds, for the three party member records, and again for the recovery table. |
#define | BATTLE_ARENA_RECEIVE_TIMEOUT_TICKS 900 | Ticks, about fifteen seconds, for all four records received. |
#define | BATTLE_ARENA_PEER_WAIT_TICKS 25 | Ticks without a link (scBattleArenaWatchOpponent) or without the opponent's request (scBattleArenaEnterBattle) before the Battle Arena gives the opponent up. |
#define | BATTLE_ARENA_ASK_AGAIN_CALLS 300 | The calls of scBattleArenaAskToParticipate after which the attendant asks again. |
#define | WALL_BOARD_DIGITS 3 | The wall board's digits, which show the most linked battles won in a row, and the most they show. |
#define | WALL_BOARD_MAX 999 | |
#define | MONSTER_OFFER_LAST_NEXT 14 | The attendant's offers of another monster battle follow MsgLobbyNotBadNextMonster, two to each word of praise: a stronger monster at an odd offset, the next one at the even offset after it. |
#define | PEER_TAG (a, b, c, d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24)) | Four letters as one word, the first in its low byte. |
#define | BATTLE_ARENA_NO_RESULT 0 |
Enumerations
| Name | Description | |
|---|---|---|
enum | BATTLE_ARENA_METATILE_BEHAVIOR { METATILE_BEHAVIOR_BATTLE_ARENA_WAY_OUT, METATILE_BEHAVIOR_BA … } | The metatiles of the hall that start an event when stepped on. |
enum | anonymous enum { BATTLE_ARENA_GATE_ANIMATION } | The map's tileset animation of the iron gate in the north wall, run for eight ticks as the party walks to it from the diamond mark. |
enum | anonymous enum { LEVEL_BONUS_MAX } | The most monster battles won in a row that count: each adds a level to the next monster's over the party's average (battle_formation.c). |
enum | BATTLE_ARENA_ACTOR_ID { ACTOR_ATTENDANT, ACTOR_LINKED_WINS_TELLER, ACTOR_HEALER, ACT … } | The actors, numbering the rows of BattleArenaActorPlacements and BattleArenaBattleActorPlacements, which list the same people in the same order. |
enum | BATTLE_ARENA_SLOT { BATTLE_ARENA_SLOT_SIGNATURE, BATTLE_ARENA_SLOT_ASKED, BATTLE … } | The words of BattleArenaSlotValues, by slot. |
enum | BATTLE_ARENA_RAISED_CUE { BATTLE_ARENA_CUE_NONE, BATTLE_ARENA_CUE_ASK_TO_PARTICIPATE, … } | The Battle Arena's raised cues (FIELD_STATE.raisedCue). |
enum | LINK_TALLY { LINK_TALLY_MONSTER_WINS, LINK_TALLY_MONSTER_LOSSES, LINK_TAL … } | MainRoutineStateWork.linkTallies, as the Battle Arena keeps them. |
Functions
| Name | Description | |
|---|---|---|
Sint32 | scInit (void) | Each time the party comes into the hall, from the File Screen or back from the arena, the battle that brought it here is settled. |
Uint8 * | scGetEntrances (void) | The Battle Arena's entrances, which fdEngineRun reads through the overlay's entry table (entry.s). |
Sint32 | scGetExitRegions (void) | The exit regions entry: the Battle Arena has no exit boxes. |
static Sint32 | scBattleArenaRestartLink (void) | Restarts the link with interrupts locked. |
Uint8 * | scGetExits (void) | Both scenes share one exit table. |
Sint32 | scGetActorPlacements (void) | The actor placements entry. |
static Bool | scBattleArenaPeerSlotMatches (Sint32 slot) | Returns 1 when the opponent's payload holds slot's word in slot's column, 0 when it does not or there is no link. |
static void | scBattleArenaWriteSlotValue (Sint32 slot) | Publishes slot's word in its column of this console's link payload, where the opponent's scBattleArenaPeerSlotMatches reads it. |
static UNREAD_RESULT | scBattleArenaWatchOpponent (void) | The event that watches the opponent each tick in the Battle Arena. |
static Sint32 | scBattleArenaAskToParticipate (void) | Once both linked players have applied for a battle, the attendant behind the west counter calls out "If you want to participate, please step into the circle!", and calls it again now and then while the player keeps her waiting. |
static Sint32 | scBattleArenaReportLinkDisconnected (void) | When the link cable's connection is lost while a linked battle is being arranged, the attendant behind the west counter says "The link was disconnected.", and the arranging starts over. |
static Sint32 | scBattleArenaReceivePartyRecords (void) | Receives the opponent's three party member records into units FIRST_ENEMY_UNIT to FIRST_ENEMY_UNIT + 2 (the battle's enemies, by gmUnitGet) and its Djinn recovery table into the enemy side's (gmDjinnGetRecoveryTable(DJINN_RECOVERY_OPPONENT)). |
static Sint32 | scBattleArenaCopyPartyOwnerIds (Uint16 *memberIds) | Copies the character ids of the first three party members (MainRoutineStateWork.party), ends them with 0xff and returns how many. |
static Sint32 | scBattleArenaSendPartyRecords (void) | Sends the first three party members' records, marked BATTLE_SIDE_PARTY, then the Djinn recovery table. |
static Sint32 | scBattleArenaExchangePartyRecords (void) | Exchanges the two parties. |
static Sint32 | scBattleArenaEnterBattle (void) | Stepping onto the diamond mark in the middle of the hall, metatile (13, 12), once a battle is arranged starts it. |
static Sint32 | scBattleArenaChooseBattleMode (void) | Talking to the attendant, the woman behind the west counter, arranges a battle. |
static Sint32 | scBattleArenaTellLinkedWins (Sint32 actorId) | Talking to the muscleman behind the east counter gives the linked battles' record. |
static Sint32 | scBattleArenaChooseDebugParamSet (Sint32 actorId) | A developers' leftover: the white-bearded man in green stands south of the hall's wall, where the player can never walk. |
static Sint32 | scBattleArenaOpenSanctum (Sint32 actorId) | Talking to the healer in the tall hat, in the room up the east stairs, offers a Sanctum's services, the same as in any town (mnSanctumRun). |
static Bool | scBattleArenaPartyContains (Sint32 memberId) | Returns 1 when character memberId is among the first three party members while a linked battle is arranged (FLAG_LINK_BATTLE_ARRANGED), or its first four otherwise. |
static void | scBattleArenaEmpty (void) | Unused: does nothing. |
static Sint32 | scBattleArenaTalkByProgress (Sint32 actorId) | Talking to Garet, Ivan, Mia or Jenna in the room up the east stairs gets a line about the coming battle that depends on who will fight it. |
static Sint32 | scBattleArenaLeaveArena (void) | Walking south out of the hall, down the passage he came in by, metatile (13, 19), leaves the Battle Arena and goes back to the File Screen. |
static Sint32 | scBattleArenaTalkToVisitor (Sint32 actorId) | Talking to one of three visitors speaks of the Battle Arena: the swordsman in the room up the west stairs is a traveling warrior who warns not to underestimate the monsters, the old man with a cane there says up to three allies fight in the linked finals, and the old woman beside him wonders if this is the arena the old man dreamed of. |
static Sint32 | scBattleArenaExplainPartyOrder (Sint32 actorId) | Talking to the fair-haired boy on the west side of the hall gives two tips in turn. |
static Sint32 | scBattleArenaReportMonsterRecord (Sint32 actorId) | Talking to the old man with a cane beside the gate gives the most monster battles won in a row ("You've won 3 consecutive Monster Battles."), or before any, that he will be counting the player's victories. |
Uint8 * | scGetCues (void) | The first water beast's cave changes its cues once the first drain has lowered its water: the beast is gone and its two puddles can be frozen. |
static Sint32 | scBattleArenaSaveBattleResults (void) | Saves the file after a linked battle, between "Saving battle results." and "Battle results were saved.". |
static Sint32 | scBattleArenaSaveMonsterBattleResults (void) | Saves the file after a series of monster battles that set a new record, between "Saving Monster Battle results." and "Monster Battle results were saved.". |
static Sint32 | scBattleArenaDrawThreeDigitValue (Sint32 value) | Shows value, at most WALL_BOARD_MAX, on the board over the gate, metatiles (14, 8) to (16, 8). |
Variables
| Name | Description | |
|---|---|---|
extern Uint8 | BattleArenaSlotColumns [] | The payload word each slot of BattleArenaSlotValues goes in: 0 the signature's and 1 the state's. |
extern SCENE_ENTRANCE | BattleArenaEntrances [] | Where the party appears: BATTLE_ARENA_FROM_FILE_SCREEN from the File Screen, and the BATTLE_ARENA_AFTER_ ones after a battle (scBattleArenaEnterBattle). |
extern Uint32 | BattleArenaExits [] | |
extern ACTOR_PLACE | BattleArenaActorPlacements [] | |
extern ACTOR_PLACE | BattleArenaBattleActorPlacements [] | |
extern CUE | BattleArenaCues [] | |
const Sint32 | BattleArenaSlotValues [] | The words the Battle Arena publishes in its link payload, by slot. |
static Sint32 | BattleArenaWaitTicks | Ticks scBattleArenaWatchOpponent has gone without a link, 0 to BATTLE_ARENA_PEER_WAIT_TICKS. |
Uint32 | BattleArenaAskCalls | Calls of scBattleArenaAskToParticipate towards asking again, at BATTLE_ARENA_ASK_AGAIN_CALLS. |
Description
The Battle Arena, the hall Isaac walks into when Battle is chosen on the File Screen with a save that has a Djinni. He comes in from the south, up a short passage. Talking to the attendant behind the west counter arranges a battle: with a monster when no second Game Boy Advance answers, or over the link cable with a friend. Stepping onto the diamond mark in the middle of the hall then sends the party through the iron gate in the north wall into the arena. Afterwards the party is back here: the muscleman behind the east counter keeps the linked battles' record and the old man beside the gate the monster battles', and the board over the gate shows the longest run of linked wins. A healer in the room up the east stairs offers a Sanctum's services, Garet, Ivan, Mia and Jenna wait in that room, and visitors in the hall and the room up the west stairs talk about the rules.
Most of the code is the link: the two consoles publish where each player stands in the arranging, and trade their parties before the battle.
Macros in detail
FLAG_BATTLE_ARENA_ATTENDANT_ASKED
#define FLAG_BATTLE_ARENA_ATTENDANT_ASKED FLAG_SCENE_TEMP(0x00)
The attendant has asked the player to take part. Every
BATTLE_ARENA_ASK_AGAIN_CALLS-th call of scBattleArenaAskToParticipate clears
it so she asks again.
Referenced by scBattleArenaAskToParticipate(), scBattleArenaEnterBattle(), scBattleArenaReportLinkDisconnected() and scBattleArenaWatchOpponent().
Definition at line 54 of file battle_arena.c.
FLAG_BATTLE_ARENA_OPPONENT_ASKED
#define FLAG_BATTLE_ARENA_OPPONENT_ASKED FLAG_SCENE_TEMP(0x01)
The opponent has asked for a battle: its signature matches, and it stands asked or in the circle.
Referenced by scBattleArenaChooseBattleMode(), scBattleArenaEnterBattle() and scBattleArenaWatchOpponent().
Definition at line 57 of file battle_arena.c.
FLAG_BATTLE_ARENA_PLAYER_APPLIED
#define FLAG_BATTLE_ARENA_PLAYER_APPLIED FLAG_SCENE_TEMP(0x02)
The player has applied for a battle ("Would you like to apply?").
Referenced by scBattleArenaChooseBattleMode(), scBattleArenaEnterBattle() and scBattleArenaWatchOpponent().
Definition at line 59 of file battle_arena.c.
FLAG_BATTLE_ARENA_ENTERING_BATTLE
#define FLAG_BATTLE_ARENA_ENTERING_BATTLE FLAG_SCENE_TEMP(0x03)
The party is on its way into the battle.
Referenced by scBattleArenaAskToParticipate(), scBattleArenaEnterBattle() and scBattleArenaReportLinkDisconnected().
Definition at line 61 of file battle_arena.c.
FLAG_BATTLE_ARENA_PARTY_ORDER_NEXT
#define FLAG_BATTLE_ARENA_PARTY_ORDER_NEXT FLAG_SCENE_TEMP(0x04)
ACTOR_PARTY_ORDER_VISITOR has given the linked finals' limit of three allies,
so the next talk explains how to change the party's order.
Referenced by scBattleArenaExplainPartyOrder().
Definition at line 64 of file battle_arena.c.
FLAG_BATTLE_ARENA_LINK_DISCONNECTED
#define FLAG_BATTLE_ARENA_LINK_DISCONNECTED FLAG_SCENE_TEMP(0x05)
The link was lost and the attendant has yet to say so.
Referenced by scBattleArenaChooseBattleMode(), scBattleArenaEnterBattle(), scBattleArenaReportLinkDisconnected() and scBattleArenaWatchOpponent().
Definition at line 66 of file battle_arena.c.
FLAG_BATTLE_ARENA_IN_PARTY_FIRST
#define FLAG_BATTLE_ARENA_IN_PARTY_FIRST FLAG_SCENE_TEMP(0xf0)
The first of eight flags, one per character from Isaac, each set while that
character is in the battle party (scInit).
Referenced by scBattleArenaTalkByProgress() and scInit().
Definition at line 69 of file battle_arena.c.
FLAG_BATTLE_ARENA_ATTENDANT_EXPLAINED
#define FLAG_BATTLE_ARENA_ATTENDANT_EXPLAINED FLAG_AREA_TEMP(0x00)
The attendant has explained the Battle Arena once. Talking to her again offers to apply.
Referenced by scBattleArenaChooseBattleMode().
Definition at line 72 of file battle_arena.c.
FLAG_BATTLE_ARENA_LINK_CHILD
#define FLAG_BATTLE_ARENA_LINK_CHILD FLAG_AREA_TEMP(0x02)
This console is the link's child (multiplayer id 1), which receives the parties first.
Referenced by scBattleArenaExchangePartyRecords() and scBattleArenaPeerSlotMatches().
Definition at line 75 of file battle_arena.c.
FLAG_BATTLE_ARENA_LINK_UP
#define FLAG_BATTLE_ARENA_LINK_UP FLAG_AREA_TEMP(0x03)
The link is up. Both consoles were heard (BATTLE_ARENA_LINK_READY_MASK).
Referenced by scBattleArenaEnterBattle(), scBattleArenaPeerSlotMatches() and scBattleArenaWatchOpponent().
Definition at line 77 of file battle_arena.c.
FLAG_BATTLE_ARENA_LINK_BATTLE_ENDED
#define FLAG_BATTLE_ARENA_LINK_BATTLE_ENDED FLAG_AREA_TEMP(0x04)
A linked battle has ended since the leader last walked south of z 224, so the party and the visitors speak of it.
Referenced by scBattleArenaTalkByProgress(), scBattleArenaTalkToVisitor(), scBattleArenaWatchOpponent() and scInit().
Definition at line 80 of file battle_arena.c.
FLAG_BATTLE_ARENA_LINK_BATTLE_WON
#define FLAG_BATTLE_ARENA_LINK_BATTLE_WON FLAG_AREA_TEMP(0x05)
The last linked battle was won.
Referenced by scBattleArenaTalkByProgress(), scBattleArenaTalkToVisitor() and scInit().
Definition at line 82 of file battle_arena.c.
BATTLE_ARENA_UNIT_RECORD_BYTES
#define BATTLE_ARENA_UNIT_RECORD_BYTES (17 * 20)
A linked battle trades three party members' records and then the Djinn
recovery table. The serial runtime sends 20 bytes a block and ends a send
only when its count reaches exactly 0, so each record is a whole number of
blocks. A party member's is its Unit (BATTLE_UNIT_SIZE, 332 bytes) and the
eight bytes after it, 17 blocks of 20.
Referenced by scBattleArenaReceivePartyRecords() and scBattleArenaSendPartyRecords().
Definition at line 96 of file battle_arena.c.
BATTLE_ARENA_RECOVERY_RECORD_BYTES
#define BATTLE_ARENA_RECOVERY_RECORD_BYTES (16 * 20)
The recovery table's record: the table (DJINN_RECOVERY_TABLE, 268 bytes) and
the 52 bytes after it, 16 blocks of 20, two more than the table needs.
Referenced by scBattleArenaReceivePartyRecords() and scBattleArenaSendPartyRecords().
Definition at line 99 of file battle_arena.c.
BATTLE_ARENA_UNIT_RECORD_COUNT
#define BATTLE_ARENA_UNIT_RECORD_COUNT 3
The party members a linked battle takes. A smaller party sends absent records.
Referenced by scBattleArenaCopyPartyOwnerIds(), scBattleArenaReceivePartyRecords() and scBattleArenaSendPartyRecords().
Definition at line 102 of file battle_arena.c.
BATTLE_ARENA_LINK_READY_MASK
#define BATTLE_ARENA_LINK_READY_MASK 3
LinkStatusWork bits 0 and 1. Both consoles were heard this tick, as the
battle code's LINK_BOTH_CONNECTED.
Referenced by scBattleArenaPeerSlotMatches(), scBattleArenaReceivePartyRecords() and scBattleArenaSendPartyRecords().
Definition at line 105 of file battle_arena.c.
BATTLE_ARENA_TRANSFER_RETRY_LIMIT
#define BATTLE_ARENA_TRANSFER_RETRY_LIMIT 24
A record fails on the 25th tick it waits without a link or past the timeout.
Referenced by scBattleArenaReceivePartyRecords() and scBattleArenaSendPartyRecords().
Definition at line 107 of file battle_arena.c.
BATTLE_ARENA_SEND_TIMEOUT_TICKS
#define BATTLE_ARENA_SEND_TIMEOUT_TICKS 600
Ticks, about ten seconds, for the three party member records, and again for the recovery table.
Referenced by scBattleArenaSendPartyRecords().
Definition at line 110 of file battle_arena.c.
BATTLE_ARENA_RECEIVE_TIMEOUT_TICKS
#define BATTLE_ARENA_RECEIVE_TIMEOUT_TICKS 900
Ticks, about fifteen seconds, for all four records received.
Referenced by scBattleArenaReceivePartyRecords().
Definition at line 112 of file battle_arena.c.
BATTLE_ARENA_PEER_WAIT_TICKS
#define BATTLE_ARENA_PEER_WAIT_TICKS 25
Ticks without a link (scBattleArenaWatchOpponent) or without the opponent's
request (scBattleArenaEnterBattle) before the Battle Arena gives the opponent
up.
Referenced by scBattleArenaEnterBattle() and scBattleArenaWatchOpponent().
Definition at line 116 of file battle_arena.c.
BATTLE_ARENA_ASK_AGAIN_CALLS
#define BATTLE_ARENA_ASK_AGAIN_CALLS 300
The calls of scBattleArenaAskToParticipate after which the attendant asks
again.
Referenced by scBattleArenaAskToParticipate().
Definition at line 119 of file battle_arena.c.
WALL_BOARD_DIGITS
#define WALL_BOARD_DIGITS 3
The wall board's digits, which show the most linked battles won in a row, and the most they show.
Referenced by scBattleArenaDrawThreeDigitValue().
Definition at line 123 of file battle_arena.c.
WALL_BOARD_MAX
#define WALL_BOARD_MAX 999
Referenced by scBattleArenaDrawThreeDigitValue().
Definition at line 124 of file battle_arena.c.
MONSTER_OFFER_LAST_NEXT
#define MONSTER_OFFER_LAST_NEXT 14
The attendant's offers of another monster battle follow
MsgLobbyNotBadNextMonster, two to each word of praise: a stronger monster at
an odd offset, the next one at the even offset after it. The highest praise
offers the next monster at this offset ("Unbelievable!!! Would you like to
fight the next monster?") and a stronger one at the offset after.
Referenced by scInit().
Definition at line 130 of file battle_arena.c.
PEER_TAG
#define PEER_TAG(a, b, c, d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
Four letters as one word, the first in its low byte.
Referenced by BattleArenaSlotValues.
Definition at line 212 of file battle_arena.c.
BATTLE_ARENA_NO_RESULT
#define BATTLE_ARENA_NO_RESULT 0
#define BATTLE_ARENA_NO_RESULT
Referenced by scBattleArenaEnterBattle().
Definition at lines 273 and 275 of file battle_arena.c.
Enumerations in detail
BATTLE_ARENA_METATILE_BEHAVIOR
enum BATTLE_ARENA_METATILE_BEHAVIOR
The metatiles of the hall that start an event when stepped on.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_BATTLE_ARENA_WAY_OUT | 1 | The passage out to the south, metatile (13, 19). |
METATILE_BEHAVIOR_BATTLE_ARENA_CIRCLE | 10 | The diamond mark in the middle of the hall, metatile (13, 12). |
Definition at line 27 of file battle_arena.c.
anonymous enum
enum { BATTLE_ARENA_GATE_ANIMATION }
The map's tileset animation of the iron gate in the north wall, run for eight ticks as the party walks to it from the diamond mark.
| Enumerator | Value | Description |
|---|---|---|
BATTLE_ARENA_GATE_ANIMATION | 5 |
Definition at line 38 of file battle_arena.c.
anonymous enum
enum { LEVEL_BONUS_MAX }
The most monster battles won in a row that count: each adds a level to the
next monster's over the party's average (battle_formation.c).
| Enumerator | Value | Description |
|---|---|---|
LEVEL_BONUS_MAX | 90 |
Definition at line 86 of file battle_arena.c.
BATTLE_ARENA_ACTOR_ID
enum BATTLE_ARENA_ACTOR_ID
The actors, numbering the rows of BattleArenaActorPlacements and
BattleArenaBattleActorPlacements, which list the same people in the same
order. The rows of Garet, Ivan, Mia and Jenna take those characters' own ids.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_ATTENDANT | ACTOR_FIRST_PLACED | The attendant, who arranges every battle. ACTOR_GREETER calls her the girl at the counter. |
ACTOR_LINKED_WINS_TELLER | Reports the linked battles won, and answers for ACTOR_DEBUG_PARAMETERS_MAN. | |
ACTOR_HEALER | Opens a Sanctum's services (scBattleArenaOpenSanctum). The sprite is SPRITE_MAN_IN_TALL_HAT, the healer of every Sanctum in sanctum.c. | |
ACTOR_GREETER | ||
ACTOR_TRAVELING_WARRIOR | ||
ACTOR_FINALS_VISITOR | ||
ACTOR_OLD_MANS_ARENA_VISITOR | ||
ACTOR_DEBUG_PARAMETERS_MAN | Loads a debug parameter set (scBattleArenaChooseDebugParamSet). | |
ACTOR_PARTY_ORDER_VISITOR | Explains the linked finals' limit of three allies, then the party order. | |
ACTOR_COMMAND_TIME_VISITOR | ||
ACTOR_SUMMON_VISITOR | ||
ACTOR_SET_DJINN_VISITOR | ||
ACTOR_STANDBY_DJINN_VISITOR | ||
ACTOR_MONSTER_RULES_VISITOR | ||
ACTOR_MONSTER_WINS_TELLER | Reports the most Monster Battles won in a row. | |
ACTOR_EDGY_VISITOR | ||
ACTOR_WARY_VISITOR |
Definition at line 144 of file battle_arena.c.
BATTLE_ARENA_SLOT
enum BATTLE_ARENA_SLOT
The words of BattleArenaSlotValues, by slot. They are the signature, then the
state a console publishes.
| Enumerator | Value | Description |
|---|---|---|
BATTLE_ARENA_SLOT_SIGNATURE | 0 | |
BATTLE_ARENA_SLOT_ASKED | 1 | Has asked for a battle. |
BATTLE_ARENA_SLOT_IN_CIRCLE | 2 | Stands in the circle. |
BATTLE_ARENA_SLOT_UNUSED | 3 | |
BATTLE_ARENA_SLOT_IDLE | 4 | |
BATTLE_ARENA_SLOT_ALONE | 5 | Replaces the signature when no opponent answers the attendant and during a monster series. |
Definition at line 176 of file battle_arena.c.
BATTLE_ARENA_RAISED_CUE
enum BATTLE_ARENA_RAISED_CUE
The Battle Arena's raised cues (FIELD_STATE.raisedCue).
| Enumerator | Value | Description |
|---|---|---|
BATTLE_ARENA_CUE_NONE | 0 | |
BATTLE_ARENA_CUE_ASK_TO_PARTICIPATE | 1 | scBattleArenaAskToParticipate |
BATTLE_ARENA_CUE_DISCONNECTED | 2 | scBattleArenaReportLinkDisconnected |
Definition at line 190 of file battle_arena.c.
LINK_TALLY
enum LINK_TALLY
MainRoutineStateWork.linkTallies, as the Battle Arena keeps them.
| Enumerator | Value | Description |
|---|---|---|
LINK_TALLY_MONSTER_WINS | 0 | |
LINK_TALLY_MONSTER_LOSSES | 1 | |
LINK_TALLY_MONSTER_BEST_STREAK | 2 | the most won in a row |
LINK_TALLY_MONSTER_STREAK | 3 | those won in the current series |
LINK_TALLY_LINKED_WINS | 4 | |
LINK_TALLY_LINKED_LOSSES | 5 | |
LINK_TALLY_LINKED_BEST_STREAK | 6 | The most linked battles won in a row, on the wall board |
LINK_TALLY_LINKED_STREAK | 7 | those won in a row now |
Definition at line 198 of file battle_arena.c.
Functions in detail
scInit
Sint32 scInit(void)
Each time the party comes into the hall, from the File Screen or back from the arena, the battle that brought it here is settled. After a monster battle won, the attendant offers the next monster ("Not bad! Would you like to fight the next monster?"), with ever higher praise; No, or a loss, ends the series with the number won, and a new record is saved. A linked battle is counted, the board over the gate updated and the file saved. From the File Screen the link is started.
References BattleArenaAskCalls, BattleArenaWaitTicks, btDjinnRecoverAll(), fdActorFaceActor(), fdMapGridCopyMetatileAttributes(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), fdTilesetAnimationPause(), gmFlagClear(), gmFlagGet(), gmFlagSet(), gmPartyRestoreHpPp(), IdleSleepEnabled, MainRoutineStateWork, mnMessageArgumentPush(), scBattleArenaDrawThreeDigitValue(), scBattleArenaPartyContains(), scBattleArenaRestartLink(), scBattleArenaSaveBattleResults(), scBattleArenaSaveMonsterBattleResults(), scBattleArenaWatchOpponent(), scBattleArenaWriteSlotValue(), scFieldGameFlagGetByte(), scFieldGameFlagSetByte(), SerialTransfer, Sint32, state, sySerialInit(), sySetEventFlags(), sySetTickEvent(), sySoundLoadReverbCode() and sySynch().
Definition at lines 43 and 1692 of file battle_arena.c.
scGetEntrances
Uint8 *scGetEntrances(void)
The Battle Arena's entrances, which fdEngineRun reads through the overlay's
entry table (entry.s).
References BattleArenaEntrances.
Definition at line 280 of file battle_arena.c.
scGetExitRegions
Sint32 scGetExitRegions(void)
The exit regions entry: the Battle Arena has no exit boxes.
References Sint32.
Definition at line 286 of file battle_arena.c.
scBattleArenaRestartLink
static Sint32 scBattleArenaRestartLink(void)
Restarts the link with interrupts locked.
References Sint32, sySerialInit() and sySerialRemoveIRQHandlers().
Referenced by scBattleArenaChooseBattleMode() and scInit().
Definition at line 292 of file battle_arena.c.
scGetExits
Uint8 *scGetExits(void)
References BattleArenaExits.
Definition at line 305 of file battle_arena.c.
scGetActorPlacements
Sint32 scGetActorPlacements(void)
The actor placements entry.
References BattleArenaActorPlacements, BattleArenaBattleActorPlacements, MainRoutineStateWork and Sint32.
Definition at line 311 of file battle_arena.c.
scBattleArenaPeerSlotMatches
static Bool scBattleArenaPeerSlotMatches(Sint32 slot)
Returns 1 when the opponent's payload holds slot's word in slot's column, 0 when it does not or there is no link.
References BattleArenaSlotColumns, BattleArenaSlotValues, gmFlagClear(), gmFlagGet(), gmFlagSet(), LinkStatusWork, SerialPeerPayloads and Sint32.
Referenced by scBattleArenaChooseBattleMode(), scBattleArenaEnterBattle() and scBattleArenaWatchOpponent().
Definition at line 325 of file battle_arena.c.
scBattleArenaWriteSlotValue
static void scBattleArenaWriteSlotValue(Sint32 slot)
Publishes slot's word in its column of this console's link payload, where the
opponent's scBattleArenaPeerSlotMatches reads it.
References BattleArenaSlotColumns, BattleArenaSlotValues, SerialTransfer and Sint32.
Referenced by scBattleArenaChooseBattleMode(), scBattleArenaEnterBattle(), scBattleArenaReportLinkDisconnected(), scBattleArenaWatchOpponent() and scInit().
Definition at line 366 of file battle_arena.c.
scBattleArenaWatchOpponent
static UNREAD_RESULT scBattleArenaWatchOpponent(void)
The event that watches the opponent each tick in the Battle Arena.
References BattleArenaWaitTicks, fdActorGet(), fdScriptGetFlag(), gmFlagClear(), gmFlagGet(), gmFlagSet(), scBattleArenaPeerSlotMatches(), scBattleArenaWriteSlotValue(), SerialPeerPayloads, Sint32, state and syWordsClear().
Referenced by scBattleArenaEnterBattle() and scInit().
Definition at line 374 of file battle_arena.c.
scBattleArenaAskToParticipate
static Sint32 scBattleArenaAskToParticipate(void)
Once both linked players have applied for a battle, the attendant behind the west counter calls out "If you want to participate, please step into the circle!", and calls it again now and then while the player keeps her waiting.
scBattleArenaWatchOpponent raises it (BATTLE_ARENA_CUE_ASK_TO_PARTICIPATE)
while both have applied, and every BATTLE_ARENA_ASK_AGAIN_CALLS calls the
flag that keeps her quiet is cleared.
Returns the flag's value when FLAG_BATTLE_ARENA_ENTERING_BATTLE or
FLAG_BATTLE_ARENA_ATTENDANT_ASKED is set and nothing is shown. The path that
shows the line returns nothing (UB).
References BattleArenaAskCalls, fdScriptEnd(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptStart(), gmFlagClear(), gmFlagGet(), gmFlagSet(), Sint32 and sySynch().
Referenced by BattleArenaCues.
Definition at line 475 of file battle_arena.c.
scBattleArenaReportLinkDisconnected
static Sint32 scBattleArenaReportLinkDisconnected(void)
When the link cable's connection is lost while a linked battle is being arranged, the attendant behind the west counter says "The link was disconnected.", and the arranging starts over.
scBattleArenaWatchOpponent and scBattleArenaEnterBattle raise it
(BATTLE_ARENA_CUE_DISCONNECTED).
References fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptStart(), gmFlagClear(), scBattleArenaWriteSlotValue(), Sint32 and state.
Referenced by BattleArenaCues.
Definition at line 512 of file battle_arena.c.
scBattleArenaReceivePartyRecords
static Sint32 scBattleArenaReceivePartyRecords(void)
Receives the opponent's three party member records into units
FIRST_ENEMY_UNIT to FIRST_ENEMY_UNIT + 2 (the battle's enemies, by gmUnitGet)
and its Djinn recovery table into the enemy side's
(gmDjinnGetRecoveryTable(DJINN_RECOVERY_OPPONENT)).
Returns how many records hold a party member, or -1 when a transfer fails, overruns or runs out of time.
References gmDjinnGetRecoveryTable(), gmUnitGet(), LinkStatusWork, mnFieldMessageDecodeRawUnbounded(), SerialReceivedSize, Sint32, syHeapAllocateEWRAM(), syHeapRelease(), sySerialGetActiveTransfers(), sySerialStartReceive() and sySynch().
Referenced by scBattleArenaExchangePartyRecords().
Definition at line 538 of file battle_arena.c.
scBattleArenaCopyPartyOwnerIds
static Sint32 scBattleArenaCopyPartyOwnerIds(Uint16 *memberIds)
Copies the character ids of the first three party members
(MainRoutineStateWork.party), ends them with 0xff and returns how many. A
null destination only counts them.
References gmPartyCountMembers(), MainRoutineStateWork and Sint32.
Referenced by scBattleArenaSendPartyRecords().
Definition at line 685 of file battle_arena.c.
scBattleArenaSendPartyRecords
static Sint32 scBattleArenaSendPartyRecords(void)
Sends the first three party members' records, marked BATTLE_SIDE_PARTY, then
the Djinn recovery table.
Returns 0, or -1 when a send fails or runs out of time. The copies go through an EWRAM pool buffer freed before returning.
References gmDjinnGetRecoveryTable(), gmUnitGet(), LinkStatusWork, scBattleArenaCopyPartyOwnerIds(), Sint32, syHeapAllocateEWRAM(), syHeapRelease(), sySerialGetActiveTransfers(), sySerialStartSend(), sySynch() and syWordsCopy().
Referenced by scBattleArenaExchangePartyRecords().
Definition at line 726 of file battle_arena.c.
scBattleArenaExchangePartyRecords
static Sint32 scBattleArenaExchangePartyRecords(void)
Exchanges the two parties. The parent sends first, and the child (area flag
FLAG_BATTLE_ARENA_LINK_CHILD) receives first.
References gmFlagGet(), LinkExchangeState, scBattleArenaReceivePartyRecords(), scBattleArenaSendPartyRecords(), scFieldGameFlagSetByte(), Sint32, sySerialResetTransferState() and sySynch().
Referenced by scBattleArenaEnterBattle().
Definition at line 876 of file battle_arena.c.
scBattleArenaEnterBattle
static Sint32 scBattleArenaEnterBattle(void)
Stepping onto the diamond mark in the middle of the hall, metatile (13, 12), once a battle is arranged starts it. For a monster battle the attendant says "Good luck!" and Isaac walks north through the iron gate, which lifts, into the arena. For a linked battle "Awaiting your opponent..." shows until the friend steps onto the mark too, and Isaac walks slowly to the gate while the two parties are traded over the cable.
Before a battle is arranged, nothing happens on the mark. A lost link or a failed trade walks him back out and lets the attendant say so.
References ActorSpriteSlots, fdActorFaceActor(), fdActorWaitForMoveById(), fdActorWalkTo(), fdRequestBattleFromEncounterTable(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetAfterBattleDestination(), fdScriptSetDefeatDestination(), fdScriptSetMessageId(), fdScriptStart(), fdTilesetAnimationPause(), fdTilesetAnimationResume(), gmFlagClear(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork, mnMessageOpenWindow(), mnWindowClose(), scBattleArenaExchangePartyRecords(), scBattleArenaPeerSlotMatches(), scBattleArenaWatchOpponent(), scBattleArenaWriteSlotValue(), SerialTransfer, Sint32, state, syCloseEvent(), syHeapSlotAllocateEWRAM(), syHeapSlotRelease(), sySetEventFlags(), sySetTickEvent() and sySynch().
Referenced by BattleArenaCues.
Definition at line 932 of file battle_arena.c.
scBattleArenaChooseBattleMode
static Sint32 scBattleArenaChooseBattleMode(void)
Talking to the attendant, the woman behind the west counter, arranges a battle. With no second Game Boy Advance on the cable she says "You do not have an opponent. Would you like to battle a monster?", and Yes sends the party to the diamond mark. With a friend linked she explains the Battle Arena once, then offers to ask the friend for a battle, or to accept the friend's request.
References fdActorFaceActor(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptStart(), gmFlagClear(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork, scBattleArenaPeerSlotMatches(), scBattleArenaRestartLink(), scBattleArenaWriteSlotValue(), scFieldGameFlagSetByte(), Sint32 and sySynch().
Referenced by BattleArenaCues.
Definition at line 1115 of file battle_arena.c.
scBattleArenaTellLinkedWins
static Sint32 scBattleArenaTellLinkedWins(Sint32 actorId)
Talking to the muscleman behind the east counter gives the linked battles' record. From the front of the counter he tells the linked battles won in all; from the side, the ones won in a row, and points to the board over the gate for the best run. Before any linked battle he only says he will tell the player once the linked finals are over.
References fdActorFaceActor(), fdActorGet(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), MainRoutineStateWork, mnMessageArgumentClearAll(), mnMessageArgumentPush() and Sint32.
Referenced by BattleArenaCues.
Definition at line 1265 of file battle_arena.c.
scBattleArenaChooseDebugParamSet
static Sint32 scBattleArenaChooseDebugParamSet(Sint32 actorId)
A developers' leftover: the white-bearded man in green stands south of the
hall's wall, where the player can never walk. Talking to him shows "Choose
your parameters here." and a number picked with Left and Right; A loads that
numbered set of levels and equipment for testing (btDebugParamSetLoad) and
B gives up. The muscleman behind the east counter answers: "The settings are
made. The rest is up to you.", "There's no such parameter. Ask Mr. Sugimoto."
or "What is this, just a tease?".
References btDebugParamSetLoad(), fdActorFaceActor(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), MainRoutineStateWork, mnTextDrawNumber(), mnWindowClose(), mnWindowCreate(), mnWindowSpritePrepareForRedraw(), PerPush, PerRepeat, Sint32 and sySynch().
Referenced by BattleArenaCues.
Definition at line 1323 of file battle_arena.c.
scBattleArenaOpenSanctum
static Sint32 scBattleArenaOpenSanctum(Sint32 actorId)
Talking to the healer in the tall hat, in the room up the east stairs, offers
a Sanctum's services, the same as in any town (mnSanctumRun).
References fdScriptEnd(), fdScriptStart(), mnSanctumRun() and Sint32.
Referenced by BattleArenaCues.
Definition at line 1401 of file battle_arena.c.
scBattleArenaPartyContains
static Bool scBattleArenaPartyContains(Sint32 memberId)
Returns 1 when character memberId is among the first three party members
while a linked battle is arranged (FLAG_LINK_BATTLE_ARRANGED), or its first
four otherwise. Returns 0 when not.
References gmFlagGet(), gmPartyCountMembers(), MainRoutineStateWork and Sint32.
Referenced by scBattleArenaTalkByProgress() and scInit().
Definition at line 1414 of file battle_arena.c.
scBattleArenaEmpty
static void scBattleArenaEmpty(void)
Unused: does nothing.
Definition at line 1445 of file battle_arena.c.
scBattleArenaTalkByProgress
static Sint32 scBattleArenaTalkByProgress(Sint32 actorId)
Talking to Garet, Ivan, Mia or Jenna in the room up the east stairs gets a line about the coming battle that depends on who will fight it. Those in the party cheer ("I can't wait, Isaac! Let's go get 'em!"), one left out asks whether Isaac means to fight alone or to sit out, and after a linked battle each speaks of the win or the loss, whether they fought or watched.
The linked battle takes only the first three of the party
(scBattleArenaPartyContains). The line is the speaker's own in each list,
one message after the other for Garet, Ivan, Mia and Jenna.
References fdActorFaceActor(), fdScriptEnd(), fdScriptGetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), gmFlagGet(), MainRoutineStateWork, scBattleArenaPartyContains() and Sint32.
Referenced by BattleArenaCues.
Definition at line 1458 of file battle_arena.c.
scBattleArenaLeaveArena
static Sint32 scBattleArenaLeaveArena(void)
Walking south out of the hall, down the passage he came in by, metatile (13, 19), leaves the Battle Arena and goes back to the File Screen.
The link is stopped and the sound's normal echo restored first.
References fdScriptSetDestination(), Sint32, sySerialRemoveIRQHandlers() and sySoundLoadReverbCode().
Referenced by BattleArenaCues.
Definition at line 1509 of file battle_arena.c.
scBattleArenaTalkToVisitor
static Sint32 scBattleArenaTalkToVisitor(Sint32 actorId)
Talking to one of three visitors speaks of the Battle Arena: the swordsman in the room up the west stairs is a traveling warrior who warns not to underestimate the monsters, the old man with a cane there says up to three allies fight in the linked finals, and the old woman beside him wonders if this is the arena the old man dreamed of. After a linked battle each praises the win or consoles the loss.
References fdActorFaceActor(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptStart(), gmFlagGet(), MainRoutineStateWork and Sint32.
Referenced by BattleArenaCues.
Definition at line 1528 of file battle_arena.c.
scBattleArenaExplainPartyOrder
static Sint32 scBattleArenaExplainPartyOrder(Sint32 actorId)
Talking to the fair-haired boy on the west side of the hall gives two tips in turn. First, up to three allies can fight in the linked finals, so with four in the party the rightmost has to pass; then, the party's order can be changed in the status screen.
References fdActorFaceActor(), fdScriptEnd(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptStart(), gmFlagClear(), gmFlagSet(), gmPartyCountMembers(), MainRoutineStateWork and Sint32.
Referenced by BattleArenaCues.
Definition at line 1556 of file battle_arena.c.
scBattleArenaReportMonsterRecord
static Sint32 scBattleArenaReportMonsterRecord(Sint32 actorId)
Talking to the old man with a cane beside the gate gives the most monster battles won in a row ("You've won 3 consecutive Monster Battles."), or before any, that he will be counting the player's victories.
References fdActorFaceActor(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptStart(), MainRoutineStateWork, mnMessageArgumentPush() and Sint32.
Referenced by BattleArenaCues.
Definition at line 1587 of file battle_arena.c.
scGetCues
Uint8 *scGetCues(void)
References BattleArenaCues.
Definition at line 1609 of file battle_arena.c.
scBattleArenaSaveBattleResults
static Sint32 scBattleArenaSaveBattleResults(void)
Saves the file after a linked battle, between "Saving battle results." and "Battle results were saved.".
References mnMessageAllTyped(), mnMessageOpenWindow(), mnSaveWriteLinkTallies(), mnWindowClose(), Sint32, sySoundPlay() and sySynch().
Referenced by scInit().
Definition at line 1616 of file battle_arena.c.
scBattleArenaSaveMonsterBattleResults
static Sint32 scBattleArenaSaveMonsterBattleResults(void)
Saves the file after a series of monster battles that set a new record,
between "Saving Monster Battle results." and "Monster Battle results were
saved.". It is scBattleArenaSaveBattleResults with the Monster Battle's two
lines; the game keeps each save as a function of its own, with no parameter
for its messages.
References mnMessageAllTyped(), mnMessageOpenWindow(), mnSaveWriteLinkTallies(), mnWindowClose(), Sint32, sySoundPlay() and sySynch().
Referenced by scInit().
Definition at line 1643 of file battle_arena.c.
scBattleArenaDrawThreeDigitValue
static Sint32 scBattleArenaDrawThreeDigitValue(Sint32 value)
Shows value, at most WALL_BOARD_MAX, on the board over the gate, metatiles
(14, 8) to (16, 8). The digits' pictures stand in map column 27, digit d in
row d.
References fdMapGridCenterOnFollowedPoint(), fdMapGridCopyMetatilesTo() and Sint32.
Referenced by scInit().
Definition at line 1668 of file battle_arena.c.
Variables in detail
BattleArenaSlotColumns
extern Uint8 BattleArenaSlotColumns[]
Uint8 BattleArenaSlotColumns[]
The payload word each slot of BattleArenaSlotValues goes in: 0 the signature's and 1 the state's.
The last two entries have no slot.
Referenced by scBattleArenaPeerSlotMatches() and scBattleArenaWriteSlotValue().
Definition at lines 44 and 1944 of file battle_arena.c.
BattleArenaEntrances
extern SCENE_ENTRANCE BattleArenaEntrances[]
SCENE_ENTRANCE BattleArenaEntrances[]
Where the party appears: BATTLE_ARENA_FROM_FILE_SCREEN from the File Screen, and the
BATTLE_ARENA_AFTER_ ones after a battle (scBattleArenaEnterBattle).
Referenced by scGetEntrances().
Definition at lines 45 and 1950 of file battle_arena.c.
BattleArenaExits
extern Uint32 BattleArenaExits[]
Uint32 BattleArenaExits[]
Referenced by scGetExits().
Definition at lines 46 and 1965 of file battle_arena.c.
BattleArenaActorPlacements
extern ACTOR_PLACE BattleArenaActorPlacements[]
ACTOR_PLACE BattleArenaActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 47 and 1969 of file battle_arena.c.
BattleArenaBattleActorPlacements
extern ACTOR_PLACE BattleArenaBattleActorPlacements[]
ACTOR_PLACE BattleArenaBattleActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 48 and 2015 of file battle_arena.c.
BattleArenaCues
extern CUE BattleArenaCues[]
CUE BattleArenaCues[]
References scBattleArenaAskToParticipate(), scBattleArenaChooseBattleMode(), scBattleArenaChooseDebugParamSet(), scBattleArenaEnterBattle(), scBattleArenaExplainPartyOrder(), scBattleArenaLeaveArena(), scBattleArenaOpenSanctum(), scBattleArenaReportLinkDisconnected(), scBattleArenaReportMonsterRecord(), scBattleArenaTalkByProgress(), scBattleArenaTalkToVisitor() and scBattleArenaTellLinkedWins().
Referenced by scGetCues().
Definition at lines 49 and 2062 of file battle_arena.c.
BattleArenaSlotValues
const Sint32 BattleArenaSlotValues[]
The words the Battle Arena publishes in its link payload, by slot.
The opponent compares them with its own (scBattleArenaPeerSlotMatches), by BATTLE_ARENA_SLOT. The
signature is in the first column (BattleArenaSlotColumns), the states in the second.
In English and French BATTLE_ARENA_SLOT_ALONE equals the signature and changes nothing. Elsewhere
it is the signature's letters reversed, so while a console publishes it (no opponent answered, or
a monster series runs) an opponent's signature test fails, and the attendant does not offer that
console as an opponent. Each return to linking writes the signature back.
References Sint32.
Referenced by scBattleArenaPeerSlotMatches() and scBattleArenaWriteSlotValue().
Definition at line 224 of file battle_arena.c.
BattleArenaWaitTicks
static Sint32 BattleArenaWaitTicks
Ticks scBattleArenaWatchOpponent has gone without a link, 0 to
BATTLE_ARENA_PEER_WAIT_TICKS. It is 0 while linked.
References Sint32.
Referenced by scBattleArenaWatchOpponent() and scInit().
Definition at line 266 of file battle_arena.c.
BattleArenaAskCalls
Uint32 BattleArenaAskCalls
Calls of scBattleArenaAskToParticipate towards asking again, at
BATTLE_ARENA_ASK_AGAIN_CALLS. It is cleared on every arrival.
Referenced by scBattleArenaAskToParticipate() and scInit().
Definition at line 462 of file battle_arena.c.