Alchemy
Loading...
Searching...
No Matches

requests.c File Reference

Battles and destinations an event requests, and the queued sound. More...

Go to the source code of this file.

Macros

#define AERIE   98
 encounter table fought before the Aerie's storm

Functions

void Field_RequestBattleFromEncounterTable (s32 zoneNo, s32 slotNo)
 Sets up a battle with enemy group slot of encounter table zone.
void Field_RequestDjinnBattle (s32 flag, s32 no)
 Sets up the battle with Djinni number no.
void Event_SetNextDestination (s32 scene, s32 entrance)
 Sets the scene and entrance that the field goes to next (gGameState.nextScene and nextEntrance).
void Event_SetDefeatDestination (s32 scene, s32 entrance)
 Sets where the party wakes up after losing a battle (gGameState.defeatScene and defeatEntrance).
void Event_RequestDestination (u16 scene, u16 entrance)
 Makes the event leave for entrance entrance of scene scene: sets gGameState.scene and entrance and raises the exit request EXIT_NONE (999), so the scene loop leaves on its next pass.
void BattleFx_SetQueuedSoundAndPlay (s32 soundId)
 Plays SE_298, then soundId (SE_289 for -1), and remembers soundId for BattleFx_PlayQueuedSound in the field work's queuedSound.
void BattleFx_PlayQueuedSound (void)
 Plays the sound BattleFx_SetQueuedSoundAndPlay remembered, if any.

Detailed Description

Battles and destinations an event requests, and the queued sound.

Part of psynergy_effects.c, compiled only through it.

Definition in file requests.c.

Macro Definition Documentation

◆ AERIE

#define AERIE   98

encounter table fought before the Aerie's storm

Definition at line 7 of file requests.c.

Referenced by Field_RequestBattleFromEncounterTable().

Function Documentation

◆ Field_RequestBattleFromEncounterTable()

void Field_RequestBattleFromEncounterTable ( s32 zoneNo,
s32 slotNo )

◆ Field_RequestDjinnBattle()

void Field_RequestDjinnBattle ( s32 flag,
s32 no )

Sets up the battle with Djinni number no.

The low 8 bits of flag are the Djinni's actor, which hops first unless DJINN_NO_HOP is set. Djinn are numbered 20 to an element (Djinn_ResolvePendingEvent). Sets gGameState.pendingDjinnEvent and the field work's battle request. About 20 scenes reach it through Field_RequestDjinnBattleFar.

Definition at line 35 of file requests.c.

Referenced by AltinPeak_TalkToDjinni(), AltmillerCave_StartDjinnBattle(), BabiLighthouse_StartDjinnBattle(), Event_FightDjinni(), Event_FightDjinni(), Event_FightForge(), Event_MeetCorona(), Event_MeetHail(), Event_MeetVine(), Event_TalkToBreeze(), Field_RequestDjinnBattle(), Fuchin_StartDjinnBattle(), MercuryLighthouse_StartDjinnBattle(), and MogallForest_StartDjinnBattle().

◆ Event_SetNextDestination()

◆ Event_SetDefeatDestination()

void Event_SetDefeatDestination ( s32 scene,
s32 entrance )

Sets where the party wakes up after losing a battle (gGameState.defeatScene and defeatEntrance).

The scenes before scripted battles (Colosso, the Vault, Vale, the Aerie) and the lobby reach it through Event_SetDefeatDestinationFar.

Definition at line 70 of file requests.c.

Referenced by Event_ConfrontSaturosAndMenardi(), Event_FreeRooferAndConfrontThieves(), Event_ReachArena(), Event_ReachArena(), Event_ReachArena(), Event_SetDefeatDestination(), LinkLobby_EnterBattle(), ValeHome_FightTravelers(), VaultInteriors_ConfrontThievesAgain(), and VenusLighthouseAerie_CombineSaturosAndMenardi().

◆ Event_RequestDestination()

void Event_RequestDestination ( u16 scene,
u16 entrance )

Makes the event leave for entrance entrance of scene scene: sets gGameState.scene and entrance and raises the exit request EXIT_NONE (999), so the scene loop leaves on its next pass.

Only Tolbi's spring reaches it, through Event_RequestDestinationFar.

Definition at line 79 of file requests.c.

Referenced by Event_RequestDestination(), TolbiSpring_OfferLuckyDice(), and TolbiSpring_OfferLuckyWheels().

◆ BattleFx_SetQueuedSoundAndPlay()

◆ BattleFx_PlayQueuedSound()