src/scene/lobby.c
The Battle Arena's lobby, The Broken Seal's arena reworked, reached from the File Screen's Battle mode. More…
#include "battle/battle.h"#include "window/window.h"#include "field/field_state.h"#include "sound/sound_driver_symbols.h"#include "field/field_engine.h"#include "game/game.h"#include "macros.h"#include "field/script_inline.h"#include "text/msg_ids.h"#include "shop/shop.h"
Structures
| Name | Description | |
|---|---|---|
struct | LINK_PEER | One linked console's published words, as the link exchange last received them: its row of LinkPeerSignatures read as words. |
Macros
| Name | Description | |
|---|---|---|
#define | PARTY_SLOT_EMPTY 255 | A MainRoutineStateWork.party byte with no member in it, all ones. |
#define | SONG_REQUEST_SOUNDS 97 | The sounds the song request offers, numbered from 0 in its window. |
#define | LOBBY_PEER_WAIT_TICKS 25 | Ticks without a link (scLinkLobbyPollPeerReady) or without the partner's request (scLinkLobbyEnterBattle) before the lobby gives the partner up. |
#define | LOBBY_PROMPT_REPEAT_TICKS 300 | Ticks, five seconds, before the attendant asks the player again to step into the circle. |
#define | FLAG_LINK_LOBBY_ATTENDANT_ASKED FLAG_SCENE_TEMP(0x00) | The attendant has asked the player to take part. |
#define | FLAG_LINK_LOBBY_PARTNER_ASKED FLAG_SCENE_TEMP(0x01) | The linked partner has asked for a battle. |
#define | FLAG_LINK_LOBBY_PLAYER_APPLIED FLAG_SCENE_TEMP(0x02) | The player has applied for a battle ("Would you like to apply?"). |
#define | FLAG_LINK_LOBBY_ENTERING_BATTLE FLAG_SCENE_TEMP(0x03) | The party is on its way into the battle. |
#define | FLAG_LINK_LOBBY_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_LINK_LOBBY_LINK_LOST_UNREPORTED FLAG_SCENE_TEMP(0x05) | The link was lost and the attendant has yet to say so. |
#define | FLAG_LINK_LOBBY_VISITOR_SPOKE FLAG_SCENE_TEMP(0x06) | A visitor has spoken once this visit, so the rooting visitor goes on to "I'll be rooting..." (scLinkLobbyTalkToVisitor). |
#define | FLAG_LINK_LOBBY_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_LINK_LOBBY_ATTENDANT_EXPLAINED FLAG_AREA_TEMP(0x00) | The attendant has explained the Battle Arena once. |
#define | FLAG_LINK_LOBBY_LINK_CHILD FLAG_AREA_TEMP(0x02) | This console is the link's child (multiplayer id 1), which receives the parties first. |
#define | FLAG_LINK_LOBBY_LINK_UP FLAG_AREA_TEMP(0x03) | The link is up. |
#define | FLAG_LINK_LOBBY_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_LINK_LOBBY_LINK_BATTLE_WON FLAG_AREA_TEMP(0x05) | The last linked battle was won. |
#define | FLAG_LINK_LOBBY_MONSTER_VICTORIES FLAG_AREA_TEMP(0xe8) | The byte of eight flags counting a monster series' victories, 0 to 2, towards a stronger monster. |
#define | LOBBY_UNIT_RECORD_BYTES (17 * 20) | Both sizes are whole 20-byte blocks, since the serial runtime sends 20 bytes a block and ends a send only when its count reaches exactly 0. |
#define | LOBBY_RECOVERY_RECORD_BYTES (17 * 20) | The bytes received for the Djinn recovery table after the party members, 17 blocks of 20. |
#define | LOBBY_UNIT_RECORD_COUNT 3 | The party members a linked battle takes. |
#define | LOBBY_TRANSFER_RETRY_LIMIT 24 | A record fails on the 25th tick it waits without a link or past the timeout. |
#define | LOBBY_SEND_TIMEOUT_TICKS 600 | Ticks, about ten seconds, for the three party member records, and again for the recovery table. |
#define | LOBBY_RECEIVE_TIMEOUT_TICKS 900 | Ticks, about fifteen seconds, for all four records received. |
#define | WALL_BOARD_MAX 999 | The most the wall board's three digits show. |
#define | PEER_TAG (a, b, c, d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24)) | A word of four characters, the first in its lowest byte, as The Broken Seal's Battle Arena writes them. |
Enumerations
| Name | Description | |
|---|---|---|
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 { LINK_BATTLE_ENCOUNTER_SLOT } | The slot a linked battle is requested with, in ENCOUNTER_ZONE_VENUS_DJINN: Granite's; the battle takes its enemies from the opponent's units exchanged before it. |
enum | LINK_LOBBY_ACTOR_ID { ACTOR_ATTENDANT, ACTOR_LINKED_WINS_TELLER, ACTOR_HEALER, ACT … } | The lobby's people, by the rows of ActorPlacements, as The Broken Seal's Battle Arena keeps them where it has the same ones; the party's rows go to their party slots. |
enum | LOBBY_SLOT { LOBBY_SLOT_SIGNATURE, LOBBY_SLOT_ASKED, LOBBY_SLOT_IN_CIRCLE … } | The words of LinkLobbySlotValues, by slot, as The Broken Seal's Battle Arena numbers them. |
enum | LOBBY_METATILE_BEHAVIOR { METATILE_BEHAVIOR_WAY_OUT, METATILE_BEHAVIOR_ARENA_MARK } | The hall's metatile behaviors, as the map's grid_behavior.tsv has them. |
enum | LOBBY_RAISED_CUE { LOBBY_CUE_NONE, LOBBY_CUE_PROMPT, LOBBY_CUE_DISCONNECTED } | The lobby's raised cues (FIELD_STATE.raisedCue). |
enum | anonymous enum { LEVEL_BONUS_MAX } | The highest level bonus a monster series reaches (FLAG_MONSTER_BATTLE_WINS, raised by every third win in a row), which battle_formation.c adds to the next monster's level over the party's average. |
enum | anonymous enum { MONSTER_OFFER_UNBELIEVABLE } | The attendant's last offer of the next monster after a monster battle won, "Unbelievable!!! |
enum | anonymous enum { LOBBY_AFTER_MONSTER_WIN, LOBBY_AFTER_MONSTER_LOSS, LOBBY_AFT … } | The lobby's entrances after a battle, which no exit leads to: back from a monster battle won or lost, and from a linked battle won (or broken off) or lost. |
Functions
| Name | Description | |
|---|---|---|
const SCENE_ENTRANCE * | scGetEntrances (void) | Where the party can enter: the cave under the spring has its own entrances. |
const SCENE_REGION * | scGetExitRegions (void) | The regions of the rooms whose exits are rectangles: the Chestbeaters' room and the stream room. |
void | syGameFlagSetByte (Sint32 flag, Sint32 value) | Sets the whole byte flags is in. |
static inline void | scFieldGameFlagSetByte (Sint32 flag, Sint32 value) | Stores value in the eight game flags from flag, the lowest bit in flag itself. |
void | scLinkLobbyInitSerial (void) | Restarts the link with interrupts locked. |
const Uint32 * | scGetExits (void) | The dock's ways lead back the way the party came into Lemuria, which the harbour and the shore of Ancient Lemuria note in FLAG_LEMURIA_OTHER_WAY_IN. |
const ACTOR_PLACE * | scGetActorPlacements (void) | The scene's actor placements: a room of names for its entrance, else the debug room's. |
Bool | scLinkLobbyPeerSlotMatches (Sint32 slot) | Returns 1 when the partner's payload holds slot's word in slot's column, 0 when it does not or there is no link. |
void | scLinkLobbyWriteSlotValue (Sint32 slot) | Publishes slot's word in its column of this console's link payload, where the partner's scLinkLobbyPeerSlotMatches reads it. |
Sint32 | scLinkLobbyPollPeerReady (void) | The lobby's event each tick: counts ticks without the partner, forgets what the partner published after LOBBY_PEER_WAIT_TICKS of them, and raises the attendant's cue when both players have applied or the link is lost. |
Sint32 | scLinkLobbyPromptToParticipate (void) | Once both linked players have applied for a battle, the attendant behind the left counter says, "If you want to participate, please step into the circle!", and asks again if the player waits. |
Sint32 | scLinkLobbyReportLinkDisconnected (void) | The attendant behind the left counter says, "The link was disconnected." |
Sint32 | scLinkLobbyReceivePartyRecords (void) | Takes the other player's party over the link, as The Broken Seal's scBattleArenaReceivePartyRecords does: three member records into the enemy units from FIRST_ENEMY_UNIT, each name headed by "Enemy" (MsgEnemyLabel), then their Djinn recovery table. |
Sint32 | scLinkLobbyCopyPartyOwnerIds (Uint16 *out) | Writes the first three party members to out, ending the list with PARTY_SLOT_EMPTY, and returns how many there are. |
Sint32 | scLinkLobbySendPartyRecords (void) | Sends the party to the other player, as The Broken Seal's scBattleArenaSendPartyRecords does: the first three members' records, padded to three with absent ones, then the Djinn recovery table with each Djinni's owner renumbered as the partner will hold it. |
static __inline__ void | scLobbyResetTransferState (void) | Resets the transfer state, as syLinkBattleResetTransferState does. |
Sint32 | scLinkLobbyExchangePartyRecords (void) | Exchanges the two parties. |
Sint32 | scLinkLobbyEnterBattle (void) | Felix steps onto the diamond mark before the arched door to the arena, metatile (13, 12), once he has applied: "Awaiting your opponent..." shows until the other player steps on theirs, the attendant says "Good luck!", Felix walks to the door, the two parties are traded over the link and the battle starts. |
Sint32 | scLinkLobbyChooseBattleMode (void) | Felix talks to the attendant behind the counter left of the arched door: with no other player linked, "You do not have an opponent. |
Sint32 | scLinkLobbyReportWinTallies (Sint32 actor) | Felix talks to the man behind the counter right of the arched door: across the counter, from the south, he tells the linked battles won in all; from any other side, the most won in a row, which the board on the wall shows. |
Sint32 | scLinkLobbyChooseDebugParamSet (Sint32 actor) | A developer's leftover: the white-bearded man in green placed below the hall, where the player cannot walk, says "Choose your parameters here." and lets the player pick a debug parameter set by number with Left and Right. |
void | scLinkLobbyOpenSanctum (Sint32 actor) | Felix talks to the healer on the carpeted floor above the hall: she offers a Sanctum's services. |
Bool | scLinkLobbyPartyContains (Sint32 owner) | Whether owner is one of the first three party members, or the first four while FLAG_LINK_BATTLE_ARRANGED is clear; a PARTY_SLOT_EMPTY entry ends the list. |
void | scLinkLobbyNoOperation (void) | Unused: does nothing; nothing calls it. |
void | scLinkLobbyTakeSongRequest (Sint32 actor) | "You have a song request?": the player picks a piece of music or a sound by number with Left and Right and hears it with A, until B ends it with "Come back when you're ready to rock!" |
void | syImportScriptSetDestination (Sint32 scene, Sint32 entrance) | Leaves for an entrance of a scene (fdScriptSetDestination, through the overlay's own import row). |
Sint32 | scLinkLobbyTalkByProgress (Sint32 actor) | Felix talks to a member of his party waiting in the hall: what they say follows whether they will fight, and how the last linked battle went. |
Sint32 | scLinkLobbyLeaveArena (void) | Felix walks out of the hall's south doorway, metatile (13, 19): the link ends and the game returns to the File Screen. |
Sint32 | scLinkLobbyTalkToVisitor (Sint32 actor) | Felix talks to the woman in the striped top at the west of the hall, "You look a little scrawny, but guys like you are often surprisingly strong...", and the woman in red beside her turns to him: "Fighting a guy with a build like that would really wear me out! |
Sint32 | scLinkLobbyExplainPartyOrder (Sint32 actor) | Felix talks to the fair-haired boy on the raised floor at the west of the hall: he explains that up to three allies fight in a linked battle, in words that follow the party's size, and the next time, how to change the party's order on the status screen. |
Sint32 | scLinkLobbyReportMonsterRecord (Sint32 actor) | Felix talks to the old man with a cane right of the arched door: he tells the most Monster Battles won in a row, or before any, "I can't wait to see how many Monster Battles you win." |
const CUE * | scGetCues (void) | The scene's cues: the rooms of names' for any entrance above ENTRANCE_NAMES_ABOVE, else the debug room's. |
Sint32 | scLinkLobbySaveBattleResults (void) | Saves the Battle Arena's tallies: "Battle results were saved." |
Sint32 | scLinkLobbySaveMonsterBattleResults (void) | Saves the Battle Arena's tallies: "Monster Battle results were saved." |
void | scLinkLobbyDrawThreeDigitValue (Sint32 value) | Shows value, at most WALL_BOARD_MAX, on the wall board, as three digits from right to left. |
Sint32 | scInit (void) | Sets the lobby up, as battle_arena.c's scInit sets up The Broken Seal's Battle Arena. |
Sint32 | scPrepareMap (void) | Once Briggs is caught the pool has dried up: its colours take the dry ground's. |
Variables
| Name | Description | |
|---|---|---|
extern Uint8 | MsgLobbyYouHaveSongRequest [] | |
extern Uint8 | MsgLobbyComeBackWhenYoureReady [] | |
extern Uint16 | LinkLobbySongRequestSounds [SONG_REQUEST_SOUNDS] | The music and sounds the song request offers, numbered from 0 in its window. |
Sint32 | LinkLobbyWaitTicks | Ticks without the partner. |
Sint32 | LinkLobbyPromptTicks | Ticks since the attendant last asked the player to step into the circle. |
Sint32 | LinkLobbySlotValues [] | The words the lobby publishes in its link payload, by LOBBY_SLOT; the partner compares them with its own (scLinkLobbyPeerSlotMatches). |
Uint8 | LinkLobbySlotColumns [] | The column of LINK_PEER.values each LOBBY_SLOT's word is published in: the signature's, or the state's. |
SCENE_ENTRANCE | SceneEntrances [] | Besides the party's return to the pier after the ship is stolen, four unused spots about the mast: below the huge block, on the dock by its crate, on the deck, and at the top of the sail's east pole. |
Uint32 | SceneExits [] | The room has no exits of its own. |
ACTOR_PLACE | ActorPlacements [] | The room's people: the party's four rows, then PSYNERGY_TEST_ACTOR_ID's. |
ACTOR_PLACE | LinkLobbyUnusedPlacements [] | Unused: a placement table nothing reads. |
CUE | SceneCues [] | The room's scripts: talking to its people, Mind Read on them, the metatiles examined, and the field Psynergy each spot answers. |
Description
The Battle Arena's lobby, The Broken Seal's arena reworked, reached from the File Screen's Battle mode. The party waits in a stone hall: the attendant stands behind the counter left of the arched door to the arena, a strongman behind the counter right of it keeps the tally of linked wins, the board above the door shows in three digits the most won in a row, and a healer waits on the carpeted floor above. With a second Game Boy Advance linked, the two players step onto the diamond mark before the arched door, trade their parties and fight; alone, the attendant offers Monster Battles. Holding L or R while talking to the woman who likes her men macho opens a song request, and a few visitors stand below the hall, out of reach: among them a developer's helper who loads debug parameters.
Macros in detail
PARTY_SLOT_EMPTY
#define PARTY_SLOT_EMPTY 255
A MainRoutineStateWork.party byte with no member in it, all ones.
Referenced by scLinkLobbyCopyPartyOwnerIds() and scLinkLobbyPartyContains().
Definition at line 25 of file lobby.c.
SONG_REQUEST_SOUNDS
#define SONG_REQUEST_SOUNDS 97
The sounds the song request offers, numbered from 0 in its window.
Referenced by LinkLobbySongRequestSounds and scLinkLobbyTakeSongRequest().
Definition at line 30 of file lobby.c.
LOBBY_PEER_WAIT_TICKS
#define LOBBY_PEER_WAIT_TICKS 25
Ticks without a link (scLinkLobbyPollPeerReady) or without the partner's
request (scLinkLobbyEnterBattle) before the lobby gives the partner up.
Referenced by scLinkLobbyEnterBattle() and scLinkLobbyPollPeerReady().
Definition at line 174 of file lobby.c.
LOBBY_PROMPT_REPEAT_TICKS
#define LOBBY_PROMPT_REPEAT_TICKS 300
Ticks, five seconds, before the attendant asks the player again to step into the circle.
Referenced by scLinkLobbyPromptToParticipate().
Definition at line 178 of file lobby.c.
FLAG_LINK_LOBBY_ATTENDANT_ASKED
#define FLAG_LINK_LOBBY_ATTENDANT_ASKED FLAG_SCENE_TEMP(0x00)
The attendant has asked the player to take part. Every
LOBBY_PROMPT_REPEAT_TICKS calls of scLinkLobbyPromptToParticipate clear it so
she asks again.
Referenced by scLinkLobbyEnterBattle(), scLinkLobbyPollPeerReady(), scLinkLobbyPromptToParticipate() and scLinkLobbyReportLinkDisconnected().
Definition at line 183 of file lobby.c.
FLAG_LINK_LOBBY_PARTNER_ASKED
#define FLAG_LINK_LOBBY_PARTNER_ASKED FLAG_SCENE_TEMP(0x01)
The linked partner has asked for a battle. Its signature matches and it stands asked or in the circle.
Referenced by scLinkLobbyChooseBattleMode(), scLinkLobbyEnterBattle() and scLinkLobbyPollPeerReady().
Definition at line 186 of file lobby.c.
FLAG_LINK_LOBBY_PLAYER_APPLIED
#define FLAG_LINK_LOBBY_PLAYER_APPLIED FLAG_SCENE_TEMP(0x02)
The player has applied for a battle ("Would you like to apply?").
Referenced by scLinkLobbyChooseBattleMode(), scLinkLobbyEnterBattle() and scLinkLobbyPollPeerReady().
Definition at line 188 of file lobby.c.
FLAG_LINK_LOBBY_ENTERING_BATTLE
#define FLAG_LINK_LOBBY_ENTERING_BATTLE FLAG_SCENE_TEMP(0x03)
The party is on its way into the battle.
Referenced by scLinkLobbyEnterBattle(), scLinkLobbyPromptToParticipate() and scLinkLobbyReportLinkDisconnected().
Definition at line 190 of file lobby.c.
FLAG_LINK_LOBBY_PARTY_ORDER_NEXT
#define FLAG_LINK_LOBBY_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 scLinkLobbyExplainPartyOrder().
Definition at line 193 of file lobby.c.
FLAG_LINK_LOBBY_LINK_LOST_UNREPORTED
#define FLAG_LINK_LOBBY_LINK_LOST_UNREPORTED FLAG_SCENE_TEMP(0x05)
The link was lost and the attendant has yet to say so.
Referenced by scLinkLobbyChooseBattleMode(), scLinkLobbyEnterBattle(), scLinkLobbyPollPeerReady() and scLinkLobbyReportLinkDisconnected().
Definition at line 195 of file lobby.c.
FLAG_LINK_LOBBY_VISITOR_SPOKE
#define FLAG_LINK_LOBBY_VISITOR_SPOKE FLAG_SCENE_TEMP(0x06)
A visitor has spoken once this visit, so the rooting visitor goes on to "I'll
be rooting..." (scLinkLobbyTalkToVisitor).
Referenced by scLinkLobbyTalkToVisitor().
Definition at line 198 of file lobby.c.
FLAG_LINK_LOBBY_IN_PARTY_FIRST
#define FLAG_LINK_LOBBY_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 scInit() and scLinkLobbyTalkByProgress().
Definition at line 201 of file lobby.c.
FLAG_LINK_LOBBY_ATTENDANT_EXPLAINED
#define FLAG_LINK_LOBBY_ATTENDANT_EXPLAINED FLAG_AREA_TEMP(0x00)
The attendant has explained the Battle Arena once. Talking to her again offers to apply.
Referenced by scLinkLobbyChooseBattleMode().
Definition at line 204 of file lobby.c.
FLAG_LINK_LOBBY_LINK_CHILD
#define FLAG_LINK_LOBBY_LINK_CHILD FLAG_AREA_TEMP(0x02)
This console is the link's child (multiplayer id 1), which receives the parties first.
Referenced by scLinkLobbyExchangePartyRecords() and scLinkLobbyPeerSlotMatches().
Definition at line 207 of file lobby.c.
FLAG_LINK_LOBBY_LINK_UP
#define FLAG_LINK_LOBBY_LINK_UP FLAG_AREA_TEMP(0x03)
The link is up. Both consoles were heard (LINK_STATUS_HEARD_BOTH).
Referenced by scLinkLobbyEnterBattle(), scLinkLobbyPeerSlotMatches() and scLinkLobbyPollPeerReady().
Definition at line 209 of file lobby.c.
FLAG_LINK_LOBBY_LINK_BATTLE_ENDED
#define FLAG_LINK_LOBBY_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 scInit(), scLinkLobbyPollPeerReady() and scLinkLobbyTalkByProgress().
Definition at line 212 of file lobby.c.
FLAG_LINK_LOBBY_LINK_BATTLE_WON
#define FLAG_LINK_LOBBY_LINK_BATTLE_WON FLAG_AREA_TEMP(0x05)
The last linked battle was won.
Referenced by scInit() and scLinkLobbyTalkByProgress().
Definition at line 214 of file lobby.c.
FLAG_LINK_LOBBY_MONSTER_VICTORIES
#define FLAG_LINK_LOBBY_MONSTER_VICTORIES FLAG_AREA_TEMP(0xe8)
The byte of eight flags counting a monster series' victories, 0 to 2, towards
a stronger monster. Its lowest bit is FLAG_LINK_BATTLE_BROKE.
Referenced by scInit() and scLinkLobbyChooseBattleMode().
Definition at line 217 of file lobby.c.
LOBBY_UNIT_RECORD_BYTES
#define LOBBY_UNIT_RECORD_BYTES (17 * 20)
Both sizes are whole 20-byte blocks, since the serial runtime sends 20 bytes a block and ends a send only when its count reaches exactly 0. The bytes sent for each party member: a Unit (332 bytes) and the eight bytes after it, 17 blocks of 20.
Referenced by scLinkLobbyReceivePartyRecords() and scLinkLobbySendPartyRecords().
Definition at line 430 of file lobby.c.
LOBBY_RECOVERY_RECORD_BYTES
#define LOBBY_RECOVERY_RECORD_BYTES (17 * 20)
The bytes received for the Djinn recovery table after the party members, 17 blocks of 20.
Referenced by scLinkLobbyReceivePartyRecords() and scLinkLobbySendPartyRecords().
Definition at line 433 of file lobby.c.
LOBBY_UNIT_RECORD_COUNT
#define LOBBY_UNIT_RECORD_COUNT 3
The party members a linked battle takes. A smaller party sends absent records.
Referenced by scLinkLobbyCopyPartyOwnerIds(), scLinkLobbyExplainPartyOrder(), scLinkLobbyPartyContains(), scLinkLobbyReceivePartyRecords() and scLinkLobbySendPartyRecords().
Definition at line 436 of file lobby.c.
LOBBY_TRANSFER_RETRY_LIMIT
#define LOBBY_TRANSFER_RETRY_LIMIT 24
A record fails on the 25th tick it waits without a link or past the timeout.
Referenced by scLinkLobbyReceivePartyRecords() and scLinkLobbySendPartyRecords().
Definition at line 438 of file lobby.c.
LOBBY_SEND_TIMEOUT_TICKS
#define LOBBY_SEND_TIMEOUT_TICKS 600
Ticks, about ten seconds, for the three party member records, and again for the recovery table.
Referenced by scLinkLobbySendPartyRecords().
Definition at line 441 of file lobby.c.
LOBBY_RECEIVE_TIMEOUT_TICKS
#define LOBBY_RECEIVE_TIMEOUT_TICKS 900
Ticks, about fifteen seconds, for all four records received.
Referenced by scLinkLobbyReceivePartyRecords().
Definition at line 443 of file lobby.c.
WALL_BOARD_MAX
#define WALL_BOARD_MAX 999
The most the wall board's three digits show.
Referenced by scLinkLobbyDrawThreeDigitValue().
Definition at line 1580 of file lobby.c.
PEER_TAG
#define PEER_TAG(a, b, c, d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
A word of four characters, the first in its lowest byte, as The Broken Seal's Battle Arena writes them.
Referenced by LinkLobbySlotValues.
Definition at line 1849 of file lobby.c.
Enumerations in detail
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 35 of file lobby.c.
anonymous enum
enum { LINK_BATTLE_ENCOUNTER_SLOT }
The slot a linked battle is requested with, in ENCOUNTER_ZONE_VENUS_DJINN:
Granite's; the battle takes its enemies from the opponent's units exchanged
before it.
| Enumerator | Value | Description |
|---|---|---|
LINK_BATTLE_ENCOUNTER_SLOT | 1 |
Definition at line 43 of file lobby.c.
LINK_LOBBY_ACTOR_ID
enum LINK_LOBBY_ACTOR_ID
The lobby's people, by the rows of ActorPlacements, as The Broken Seal's
Battle Arena keeps them where it has the same ones; the party's rows go to
their party slots. The practicing visitor, the debug helper, the visitor who
wins and loses, the one who tells the Monster Battle rules and the song
request taker stand at z 376 to 384, below the hall's south wall and past the
camera's box, where the player can neither walk nor see them.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_ATTENDANT | ACTOR_FIRST_PLACED | Arranges every battle. |
ACTOR_LINKED_WINS_TELLER | Reports the linked battles won. | |
ACTOR_HEALER | Opens a Sanctum's services. | |
ACTOR_GREETER | "Welcome to the Battle Arena, where..." | |
ACTOR_PRACTICING_VISITOR | "Hm... It comes in like this... Then you do this, and... Whoa, that's not right..." | |
ACTOR_ROOTING_VISITOR | "You look a little scrawny...", then "I'll be rooting..." | |
ACTOR_MACHO_LOVING_VISITOR | "I like my men macho"; with L or R held, takes a song request. | |
ACTOR_DEBUG_HELPER | Loads a debug parameter set. | |
ACTOR_PARTY_ORDER_VISITOR | Explains the linked finals' limit of three allies, then the party order. | |
ACTOR_COMMAND_TIME_VISITOR | "In the linked finals, you can't delay after your opponent selects a move." | |
ACTOR_WIN_AND_LOSE_VISITOR | "So you win against one guy, and then you lose against the next." | |
ACTOR_STRATEGY_VISITOR | "You could use Psynergy, Djinn, even summons and items!" | |
ACTOR_WARY_VISITOR | "Should I enter or not? I'm so stressed..." | |
ACTOR_MONSTER_RULES_VISITOR | "Monster Battle rules say you all must fight as a team against a monster." | |
ACTOR_MONSTER_WINS_TELLER | Reports the most Monster Battles won in a row. | |
ACTOR_CLASS_CHANGE_VISITOR | "Sometimes, your class changes when you unleash a Djinni." | |
ACTOR_SONG_REQUEST_VISITOR | "You have a song request?" | |
ACTOR_GUTLESS_VISITOR | "I don't have the guts to fight in the battle arena." |
Definition at line 89 of file lobby.c.
LOBBY_SLOT
enum LOBBY_SLOT
The words of LinkLobbySlotValues, by slot, as The Broken Seal's Battle Arena
numbers them. They are the signature, then the state a console publishes.
| Enumerator | Value | Description |
|---|---|---|
LOBBY_SLOT_SIGNATURE | 0 | |
LOBBY_SLOT_ASKED | 1 | has asked for a battle |
LOBBY_SLOT_IN_CIRCLE | 2 | stands in the circle |
LOBBY_SLOT_UNUSED | 3 | never published |
LOBBY_SLOT_IDLE | 4 | has neither asked nor stepped into the circle |
LOBBY_SLOT_ALONE | 5 | replaces signature when no partner answers, or in a monster series |
Definition at line 144 of file lobby.c.
LOBBY_METATILE_BEHAVIOR
enum LOBBY_METATILE_BEHAVIOR
The hall's metatile behaviors, as the map's grid_behavior.tsv has them.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_WAY_OUT | 1 | The hall's south doorway, metatile (13, 19): the way out. |
METATILE_BEHAVIOR_ARENA_MARK | 10 | The diamond mark before the arched door to the arena, metatile (13, 12). |
Definition at line 156 of file lobby.c.
LOBBY_RAISED_CUE
enum LOBBY_RAISED_CUE
The lobby's raised cues (FIELD_STATE.raisedCue).
| Enumerator | Value | Description |
|---|---|---|
LOBBY_CUE_NONE | 0 | |
LOBBY_CUE_PROMPT | 1 | scLinkLobbyPromptToParticipate |
LOBBY_CUE_DISCONNECTED | 2 | scLinkLobbyReportLinkDisconnected |
Definition at line 165 of file lobby.c.
anonymous enum
enum { LEVEL_BONUS_MAX }
The highest level bonus a monster series reaches (FLAG_MONSTER_BATTLE_WINS,
raised by every third win in a row), which battle_formation.c adds to the
next monster's level over the party's average.
| Enumerator | Value | Description |
|---|---|---|
LEVEL_BONUS_MAX | 90 |
Definition at line 222 of file lobby.c.
anonymous enum
enum { MONSTER_OFFER_UNBELIEVABLE }
The attendant's last offer of the next monster after a monster battle won,
"Unbelievable!!! Would you like to fight the next monster?"
(MsgLobbyNotBadWouldYouLike + 14); each line before it praises less, and the
one after it offers a stronger monster.
| Enumerator | Value | Description |
|---|---|---|
MONSTER_OFFER_UNBELIEVABLE | 14 |
Definition at line 231 of file lobby.c.
anonymous enum
enum { LOBBY_AFTER_MONSTER_WIN, LOBBY_AFTER_MONSTER_LOSS, LOBBY_AFTER_LINK_WIN, LOBBY_AFTER_LINK_LOSS }
The lobby's entrances after a battle, which no exit leads to: back from a monster battle won or lost, and from a linked battle won (or broken off) or lost.
| Enumerator | Value | Description |
|---|---|---|
LOBBY_AFTER_MONSTER_WIN | 8 | |
LOBBY_AFTER_MONSTER_LOSS | 9 | |
LOBBY_AFTER_LINK_WIN | 10 | |
LOBBY_AFTER_LINK_LOSS | 11 |
Definition at line 239 of file lobby.c.
Functions in detail
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References SceneEntrances.
Definition at line 48 of file lobby.c.
scGetExitRegions
const SCENE_REGION *scGetExitRegions(void)
Definition at line 53 of file lobby.c.
scFieldGameFlagSetByte
static inline void scFieldGameFlagSetByte(Sint32 flag, Sint32 value)
Stores value in the eight game flags from flag, the lowest bit in flag itself.
References Sint32 and syGameFlagSetByte().
Referenced by scInit(), scLinkLobbyChooseBattleMode() and scLinkLobbyExchangePartyRecords().
Definition at line 62 of file lobby.c.
scLinkLobbyInitSerial
void scLinkLobbyInitSerial(void)
Restarts the link with interrupts locked.
References sySerialInit() and sySerialRemoveIRQHandlers().
Referenced by scInit() and scLinkLobbyChooseBattleMode().
Definition at line 68 of file lobby.c.
scGetExits
const Uint32 *scGetExits(void)
References SceneExits.
Definition at line 78 of file lobby.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
References ActorPlacements.
Definition at line 128 of file lobby.c.
scLinkLobbyPeerSlotMatches
Bool scLinkLobbyPeerSlotMatches(Sint32 slot)
Returns 1 when the partner's payload holds slot's word in slot's column, 0 when it does not or there is no link.
References fdScriptClearFlag(), fdScriptGetFlag(), fdScriptSetFlag(), LinkLobbySlotColumns, LinkLobbySlotValues, LinkPeerSignatures, LinkStatusWork and Sint32.
Referenced by scLinkLobbyChooseBattleMode(), scLinkLobbyEnterBattle() and scLinkLobbyPollPeerReady().
Definition at line 249 of file lobby.c.
scLinkLobbyWriteSlotValue
void scLinkLobbyWriteSlotValue(Sint32 slot)
Publishes slot's word in its column of this console's link payload, where the
partner's scLinkLobbyPeerSlotMatches reads it.
References LinkLobbySlotColumns, LinkLobbySlotValues, SerialTransfer and Sint32.
Referenced by scInit(), scLinkLobbyChooseBattleMode(), scLinkLobbyEnterBattle(), scLinkLobbyPollPeerReady() and scLinkLobbyReportLinkDisconnected().
Definition at line 287 of file lobby.c.
scLinkLobbyPollPeerReady
Sint32 scLinkLobbyPollPeerReady(void)
The lobby's event each tick: counts ticks without the partner, forgets what
the partner published after LOBBY_PEER_WAIT_TICKS of them, and raises the
attendant's cue when both players have applied or the link is lost. Returns
whether the partner has asked for a battle.
References fdActorGetById(), fdScriptClearFlag(), fdScriptGetFlag(), fdScriptSetFlag(), LinkLobbyWaitTicks, LinkPeerSignatures, result, scLinkLobbyPeerSlotMatches(), scLinkLobbyWriteSlotValue(), SerialTransfer and Sint32.
Referenced by scInit() and scLinkLobbyEnterBattle().
Definition at line 303 of file lobby.c.
scLinkLobbyPromptToParticipate
Sint32 scLinkLobbyPromptToParticipate(void)
Once both linked players have applied for a battle, the attendant behind the left counter says, "If you want to participate, please step into the circle!", and asks again if the player waits.
References fdScriptClearFlag(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptSetMessageId(), fdScriptStart(), LinkLobbyPromptTicks, Sint32 and sySynch().
Referenced by SceneCues.
Definition at line 379 of file lobby.c.
scLinkLobbyReportLinkDisconnected
Sint32 scLinkLobbyReportLinkDisconnected(void)
The attendant behind the left counter says, "The link was disconnected."
References fdScriptClearFlag(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptStart(), scLinkLobbyWriteSlotValue() and Sint32.
Referenced by SceneCues.
Definition at line 409 of file lobby.c.
scLinkLobbyReceivePartyRecords
Sint32 scLinkLobbyReceivePartyRecords(void)
Takes the other player's party over the link, as The Broken Seal's
scBattleArenaReceivePartyRecords does: three member records into the enemy
units from FIRST_ENEMY_UNIT, each name headed by "Enemy" (MsgEnemyLabel),
then their Djinn recovery table. Returns how many members came, not counting
records marked absent, or a negative result when a record fails.
References fdMessageDecodeRawUnbounded(), gmDjinnGetRecoveryTable(), gmUnitGet(), LinkStatusWork, result, SerialReceivedSize, Sint32, syHeapAllocateEWRAM(), syHeapRelease(), sySerialGetActiveTransfers(), sySerialStartReceive() and sySynch().
Referenced by scLinkLobbyExchangePartyRecords().
Definition at line 450 of file lobby.c.
scLinkLobbyCopyPartyOwnerIds
Sint32 scLinkLobbyCopyPartyOwnerIds(Uint16 *out)
Writes the first three party members to out, ending the list with
PARTY_SLOT_EMPTY, and returns how many there are.
References gmPartyCountMembers(), MainRoutineStateWork and Sint32.
Referenced by scLinkLobbySendPartyRecords().
Definition at line 571 of file lobby.c.
scLinkLobbySendPartyRecords
Sint32 scLinkLobbySendPartyRecords(void)
Sends the party to the other player, as The Broken Seal's
scBattleArenaSendPartyRecords does: the first three members' records, padded
to three with absent ones, then the Djinn recovery table with each Djinni's
owner renumbered as the partner will hold it. Returns 0, or a negative result
when a record fails.
References gmDjinnGetRecoveryTable(), gmUnitGet(), LinkStatusWork, result, scLinkLobbyCopyPartyOwnerIds(), Sint32, syHeapAllocateEWRAM(), syHeapRelease(), sySerialGetActiveTransfers(), sySerialStartSend() and sySynch().
Referenced by scLinkLobbyExchangePartyRecords().
Definition at line 595 of file lobby.c.
scLobbyResetTransferState
static __inline__ void scLobbyResetTransferState(void)
Resets the transfer state, as syLinkBattleResetTransferState does.
References SerialReceiveDestination, SerialReceivedSize, SerialSendSize, SerialSendSource and SerialTransfer.
Referenced by scLinkLobbyExchangePartyRecords().
Definition at line 733 of file lobby.c.
scLinkLobbyExchangePartyRecords
Sint32 scLinkLobbyExchangePartyRecords(void)
Exchanges the two parties. The parent sends first, and the child
(FLAG_LINK_LOBBY_LINK_CHILD) receives first.
On success stores the partner's party member count in FLAG_LINK_PARTY_COUNT
and returns it. On failure resets the transfer state and returns a negative
result.
References fdScriptGetFlag(), LinkExchangeState, result, scFieldGameFlagSetByte(), scLinkLobbyReceivePartyRecords(), scLinkLobbySendPartyRecords(), scLobbyResetTransferState(), Sint32 and sySynch().
Referenced by scLinkLobbyEnterBattle().
Definition at line 756 of file lobby.c.
scLinkLobbyEnterBattle
Sint32 scLinkLobbyEnterBattle(void)
Felix steps onto the diamond mark before the arched door to the arena, metatile (13, 12), once he has applied: "Awaiting your opponent..." shows until the other player steps on theirs, the attendant says "Good luck!", Felix walks to the door, the two parties are traded over the link and the battle starts. After choosing a Monster Battle, the mark starts it at once.
References fdActorFaceActor(), fdActorWaitForMoveById(), fdActorWalkTo(), fdRequestBattleFromEncounterTable(), fdScriptClearFlag(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetAfterBattleDestination(), fdScriptSetDefeatDestination(), fdScriptSetFlag(), fdScriptSetMessageId(), fdScriptStart(), fdTilesetAnimationPause(), fdTilesetAnimationResume(), MainRoutineStateWork, mnMessageOpenWindow(), mnWindowClose(), scLinkLobbyExchangePartyRecords(), scLinkLobbyPeerSlotMatches(), scLinkLobbyPollPeerReady(), scLinkLobbyWriteSlotValue(), SerialTransfer, Sint32, syCloseEvent(), syHeapSlotAllocateEWRAM(), syHeapSlotRelease(), sySetEvent(), sySetEventFlags() and sySynch().
Referenced by SceneCues.
Definition at line 806 of file lobby.c.
scLinkLobbyChooseBattleMode
Sint32 scLinkLobbyChooseBattleMode(void)
Felix talks to the attendant behind the counter left of the arched door: with no other player linked, "You do not have an opponent. Would you like to battle a monster?"; with one, she explains the Battle Arena the first time and then asks, "Would you like to apply?"
References fdActorFaceActor(), fdScriptAskYesNoWithActorAnimation(), fdScriptClearFlag(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptSetMessageId(), fdScriptStart(), MainRoutineStateWork, scFieldGameFlagSetByte(), scLinkLobbyInitSerial(), scLinkLobbyPeerSlotMatches(), scLinkLobbyWriteSlotValue(), Sint32 and sySynch().
Referenced by SceneCues.
Definition at line 970 of file lobby.c.
scLinkLobbyReportWinTallies
Sint32 scLinkLobbyReportWinTallies(Sint32 actor)
Felix talks to the man behind the counter right of the arched door: across the counter, from the south, he tells the linked battles won in all; from any other side, the most won in a row, which the board on the wall shows.
References fdActorFaceActor(), fdActorGetById(), fdScriptEndLastingPsynergy(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), MainRoutineStateWork, mnMessageArgumentClearAll(), mnMessageArgumentPush() and Sint32.
Referenced by SceneCues.
Definition at line 1098 of file lobby.c.
scLinkLobbyChooseDebugParamSet
Sint32 scLinkLobbyChooseDebugParamSet(Sint32 actor)
A developer's leftover: the white-bearded man in green placed below the hall, where the player cannot walk, says "Choose your parameters here." and lets the player pick a debug parameter set by number with Left and Right. The man at the right counter answers, "The settings are made. The rest is up to you.", or for a set that does not exist, "There's no such parameter. Ask Mr. Sugimoto."
References btDebugParamSetLoad(), fdActorFaceActor(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), MainRoutineStateWork, mnTextDrawNumber(), mnWindowClose(), mnWindowCreate(), mnWindowSpritePrepareForRedraw(), PerWork, Sint32 and sySynch().
Referenced by SceneCues.
Definition at line 1157 of file lobby.c.
scLinkLobbyOpenSanctum
void scLinkLobbyOpenSanctum(Sint32 actor)
Felix talks to the healer on the carpeted floor above the hall: she offers a Sanctum's services.
References fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptStart(), mnSanctumRun() and Sint32.
Referenced by SceneCues.
Definition at line 1236 of file lobby.c.
scLinkLobbyPartyContains
Bool scLinkLobbyPartyContains(Sint32 owner)
Whether owner is one of the first three party members, or the first four
while FLAG_LINK_BATTLE_ARRANGED is clear; a PARTY_SLOT_EMPTY entry ends the
list.
References fdScriptGetFlag(), gmPartyCountMembers(), MainRoutineStateWork and Sint32.
Referenced by scInit() and scLinkLobbyTalkByProgress().
Definition at line 1247 of file lobby.c.
scLinkLobbyNoOperation
void scLinkLobbyNoOperation(void)
Unused: does nothing; nothing calls it.
Definition at line 1268 of file lobby.c.
scLinkLobbyTakeSongRequest
void scLinkLobbyTakeSongRequest(Sint32 actor)
"You have a song request?": the player picks a piece of music or a sound by number with Left and Right and hears it with A, until B ends it with "Come back when you're ready to rock!"
Only the ones already heard in the game can be picked, unless Start, Up and L
are held as the request opens, or this game or a file on the cartridge has
been cleared. The woman in red takes requests while L or R is held
(scLinkLobbyTalkToVisitor); ACTOR_SONG_REQUEST_VISITOR, a strongman, stands
below the hall where the player cannot walk.
References AnyFileCleared, fdActorFaceActor(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptPlaySound(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), LinkLobbySongRequestSounds, MainRoutineStateWork, mnTextDrawNumber(), mnWindowClose(), mnWindowCreate(), mnWindowSpritePrepareForRedraw(), MsgLobbyComeBackWhenYoureReady, MsgLobbyYouHaveSongRequest, PerWork, Sint32, sySoundFlagTest() and sySynch().
Referenced by SceneCues and scLinkLobbyTalkToVisitor().
Definition at line 1281 of file lobby.c.
syImportScriptSetDestination
void syImportScriptSetDestination(Sint32 scene, Sint32 entrance)
Leaves for an entrance of a scene (fdScriptSetDestination, through the
overlay's own import row).
Referenced by scLinkLobbyLeaveArena().
Definition at line 1362 of file lobby.c.
scLinkLobbyTalkByProgress
Sint32 scLinkLobbyTalkByProgress(Sint32 actor)
Felix talks to a member of his party waiting in the hall: what they say follows whether they will fight, and how the last linked battle went.
References fdActorFaceActor(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptGetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), MainRoutineStateWork, scFieldActorShowEmote(), scLinkLobbyPartyContains() and Sint32.
Referenced by SceneCues.
Definition at line 1366 of file lobby.c.
scLinkLobbyLeaveArena
Sint32 scLinkLobbyLeaveArena(void)
Felix walks out of the hall's south doorway, metatile (13, 19): the link ends and the game returns to the File Screen.
The serial handlers come off and the sound's normal reverb is loaded again
before the scene leaves for SCENE_CLEAR's entrance 1.
References Sint32, syImportScriptSetDestination(), sySerialRemoveIRQHandlers() and sySoundLoadReverbCode().
Referenced by SceneCues.
Definition at line 1419 of file lobby.c.
scLinkLobbyTalkToVisitor
Sint32 scLinkLobbyTalkToVisitor(Sint32 actor)
Felix talks to the woman in the striped top at the west of the hall, "You look a little scrawny, but guys like you are often surprisingly strong...", and the woman in red beside her turns to him: "Fighting a guy with a build like that would really wear me out! Whew!" Once a visitor has spoken this visit, she says "I'll be rooting..." instead. Talking to the woman in red gives "I like my men macho", or with L or R held, a song request.
References fdActorFaceActor(), fdActorSetAnimation(), fdActorStartRepeatedMotion(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptSetMessageId(), fdScriptStart(), fdScriptWait(), MainRoutineStateWork, PerWork, scLinkLobbyTakeSongRequest() and Sint32.
Referenced by SceneCues.
Definition at line 1435 of file lobby.c.
scLinkLobbyExplainPartyOrder
Sint32 scLinkLobbyExplainPartyOrder(Sint32 actor)
Felix talks to the fair-haired boy on the raised floor at the west of the hall: he explains that up to three allies fight in a linked battle, in words that follow the party's size, and the next time, how to change the party's order on the status screen.
References fdActorFaceActor(), fdScriptClearFlag(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptSetMessageId(), fdScriptStart(), gmPartyCountMembers(), MainRoutineStateWork and Sint32.
Referenced by SceneCues.
Definition at line 1498 of file lobby.c.
scLinkLobbyReportMonsterRecord
Sint32 scLinkLobbyReportMonsterRecord(Sint32 actor)
Felix talks to the old man with a cane right of the arched door: he tells the most Monster Battles won in a row, or before any, "I can't wait to see how many Monster Battles you win."
References fdActorFaceActor(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptStart(), MainRoutineStateWork, mnMessageArgumentPush() and Sint32.
Referenced by SceneCues.
Definition at line 1534 of file lobby.c.
scGetCues
const CUE *scGetCues(void)
References SceneCues.
Definition at line 1560 of file lobby.c.
scLinkLobbySaveBattleResults
Sint32 scLinkLobbySaveBattleResults(void)
Saves the Battle Arena's tallies: "Battle results were saved."
References mnFieldMessageShow(), mnSaveWriteLinkTallies() and Sint32.
Referenced by scInit().
Definition at line 1566 of file lobby.c.
scLinkLobbySaveMonsterBattleResults
Sint32 scLinkLobbySaveMonsterBattleResults(void)
Saves the Battle Arena's tallies: "Monster Battle results were saved."
References mnFieldMessageShow(), mnSaveWriteLinkTallies() and Sint32.
Referenced by scInit().
Definition at line 1573 of file lobby.c.
scLinkLobbyDrawThreeDigitValue
void scLinkLobbyDrawThreeDigitValue(Sint32 value)
Shows value, at most WALL_BOARD_MAX, on the wall board, as three digits from
right to left.
References fdMapGridCenterOnFollowedPoint(), fdMapGridCopyMetatilesTo() and Sint32.
Referenced by scInit().
Definition at line 1584 of file lobby.c.
scInit
Sint32 scInit(void)
Sets the lobby up, as battle_arena.c's scInit sets up The Broken Seal's
Battle Arena.
References btDjinnRecoverAll(), fdActorFaceActor(), fdMapGridCopyMetatileAttributes(), fdScriptAskYesNoWithActorAnimation(), fdScriptClearFlag(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), fdTilesetAnimationPause(), gmPartyRestoreHpPp(), IdleSleepEnabled, LinkLobbyPromptTicks, LinkLobbyWaitTicks, MainRoutineStateWork, mnMessageArgumentPush(), scFieldGameFlagGetByte(), scFieldGameFlagSetByte(), scLinkLobbyDrawThreeDigitValue(), scLinkLobbyInitSerial(), scLinkLobbyPartyContains(), scLinkLobbyPollPeerReady(), scLinkLobbySaveBattleResults(), scLinkLobbySaveMonsterBattleResults(), scLinkLobbyWriteSlotValue(), SerialTransfer, Sint32, syGameFlagGetByte(), sySerialInit(), sySetEvent(), sySetEventFlags(), sySoundLoadReverbCode() and sySynch().
Definition at line 1600 of file lobby.c.
scPrepareMap
Sint32 scPrepareMap(void)
References Sint32.
Definition at line 1842 of file lobby.c.
Variables in detail
MsgLobbyYouHaveSongRequest
extern Uint8 MsgLobbyYouHaveSongRequest[]
Referenced by scLinkLobbyTakeSongRequest().
Definition at line 27 of file lobby.c.
MsgLobbyComeBackWhenYoureReady
extern Uint8 MsgLobbyComeBackWhenYoureReady[]
Referenced by scLinkLobbyTakeSongRequest().
Definition at line 28 of file lobby.c.
LinkLobbySongRequestSounds
extern Uint16 LinkLobbySongRequestSounds[SONG_REQUEST_SOUNDS]
Uint16 LinkLobbySongRequestSounds[]
The music and sounds the song request offers, numbered from 0 in its window.
Referenced by scLinkLobbyTakeSongRequest().
Definition at lines 31 and 1889 of file lobby.c.
LinkLobbyWaitTicks
Sint32 LinkLobbyWaitTicks
Ticks without the partner.
References Sint32.
Referenced by scInit() and scLinkLobbyPollPeerReady().
Definition at line 295 of file lobby.c.
LinkLobbyPromptTicks
Sint32 LinkLobbyPromptTicks
Ticks since the attendant last asked the player to step into the circle.
References Sint32.
Referenced by scInit() and scLinkLobbyPromptToParticipate().
Definition at line 297 of file lobby.c.
LinkLobbySlotValues
Sint32 LinkLobbySlotValues[]
The words the lobby publishes in its link payload, by LOBBY_SLOT; the partner
compares them with its own (scLinkLobbyPeerSlotMatches).
References Sint32.
Referenced by scLinkLobbyPeerSlotMatches() and scLinkLobbyWriteSlotValue().
Definition at line 1854 of file lobby.c.
LinkLobbySlotColumns
Uint8 LinkLobbySlotColumns[]
The column of LINK_PEER.values each LOBBY_SLOT's word is published in: the signature's, or the
state's.
Referenced by scLinkLobbyPeerSlotMatches() and scLinkLobbyWriteSlotValue().
Definition at line 1884 of file lobby.c.
SceneEntrances
SCENE_ENTRANCE SceneEntrances[]
Referenced by scGetEntrances().
Definition at line 1989 of file lobby.c.
SceneExits
Uint32 SceneExits[]
Referenced by scGetExits().
Definition at line 1999 of file lobby.c.
ActorPlacements
ACTOR_PLACE ActorPlacements[]
Referenced by scGetActorPlacements().
Definition at line 2003 of file lobby.c.
LinkLobbyUnusedPlacements
ACTOR_PLACE LinkLobbyUnusedPlacements[]
Unused: a placement table nothing reads.
Definition at line 2058 of file lobby.c.
SceneCues
CUE SceneCues[]
References scLinkLobbyChooseBattleMode(), scLinkLobbyChooseDebugParamSet(), scLinkLobbyEnterBattle(), scLinkLobbyExplainPartyOrder(), scLinkLobbyLeaveArena(), scLinkLobbyOpenSanctum(), scLinkLobbyPromptToParticipate(), scLinkLobbyReportLinkDisconnected(), scLinkLobbyReportMonsterRecord(), scLinkLobbyReportWinTallies(), scLinkLobbyTakeSongRequest(), scLinkLobbyTalkByProgress() and scLinkLobbyTalkToVisitor().
Referenced by scGetCues().
Definition at line 2113 of file lobby.c.