Skip to Content
The Alchemy Project

src/scene/shared/teleport_shimmer.c

The Teleport circles' shimmer, which every scene with a circle keeps a copy of (Contigo, the Anemos Inner Sanctum, the Islet Cave, the Yampi Desert's cave and three of Mars Lighthouse's rooms): the circle's colours run round it, a palette cycle, as Teleport is cast and as the party arrives on a circle.

Included by anemos_inner_sanctum.c, contigo.c, islet_cave.c, mars_lighthouse_aerie.c, mars_lighthouse_entrance.c, mars_lighthouse_hall.c and yampi_desert_cave.c.

Functions

NameDescription
voidscPaletteSetColorsFade (Uint16 *slots, Uint16 *colours, Uint16 *cycleColors, Uint16 *cycleSlots)Writes each listed background colour from its red, green and blue, keeps the lists for the shimmer, and saves the palettes as the fade's source; arriving by Teleport, the party then arrives on the circle.
voidscTeleportStartShimmer (void)Starts the shimmer at its slow pace, as Teleport is cast: the first step after 16 ticks, each after a tick less, down to two.
voidscTeleportStopShimmer (void)Stops the shimmer, leaving the next transition a backdrop fade.
voidscTeleportStartFastShimmer (void)Starts the shimmer at a step every two ticks, as the party arrives.
voidscTeleportArriveWhirling (void)The party arrives by Teleport on the circle: the room fades in grey while the circle shimmers and the whirl plays, then its colours come back.

Description

The Teleport circles' shimmer, which every scene with a circle keeps a copy of (Contigo, the Anemos Inner Sanctum, the Islet Cave, the Yampi Desert's cave and three of Mars Lighthouse's rooms): the circle's colours run round it, a palette cycle, as Teleport is cast and as the party arrives on a circle.

Functions in detail

scPaletteSetColorsFade

void scPaletteSetColorsFade(Uint16 *slots, Uint16 *colours, Uint16 *cycleColors, Uint16 *cycleSlots)

Writes each listed background colour from its red, green and blue, keeps the lists for the shimmer, and saves the palettes as the fade's source; arriving by Teleport, the party then arrives on the circle.

References fdPaletteFadeApplyTarget(), MainRoutineStateWork, PaletteCycleColors, scTeleportArriveWhirling() and syDMAXCopy().

Referenced by scContigoInitVillage(), scInit() and scMarsLighthouseAerieSetUpBeacon().

Definition at line 10 of file teleport_shimmer.c.

scTeleportStartShimmer

void scTeleportStartShimmer(void)

Starts the shimmer at its slow pace, as Teleport is cast: the first step after 16 ticks, each after a tick less, down to two.

References fdPaletteCycleFade(), PaletteCycleBright, PaletteCycleDelay, PaletteCycleTimer, scListCountEntries() and sySetTickEvent().

Referenced by scAnemosInnerSanctumTeleportOut(), scContigoTeleportOut(), scLeaveByExit(), scMarsLighthouseEntranceTeleportFromBalm(), scMarsLighthouseEntranceTeleportFromDragonFaceNorth(), scMarsLighthouseEntranceTeleportFromDragonFaceSouth(), scMarsLighthouseEntranceTeleportFromHiddenCircle(), scMarsLighthouseEntranceTeleportFromNorthCircle(), scMarsLighthouseEntranceTeleportFromSouthCircle() and scMarsLighthouseHallTeleportToAerie().

Definition at line 46 of file teleport_shimmer.c.

scTeleportStopShimmer

void scTeleportStopShimmer(void)

Stops the shimmer, leaving the next transition a backdrop fade.

References fdPaletteCycleFade() and scFieldCloseEvent().

Referenced by scAnemosInnerSanctumTeleportOut(), scContigoTeleportOut(), scIsletCaveFinishTeleport(), scLeaveByExit(), scMarsLighthouseEntranceTeleportFromBalm(), scMarsLighthouseEntranceTeleportFromDragonFaceNorth(), scMarsLighthouseEntranceTeleportFromDragonFaceSouth(), scMarsLighthouseEntranceTeleportFromHiddenCircle(), scMarsLighthouseEntranceTeleportFromNorthCircle(), scMarsLighthouseEntranceTeleportFromSouthCircle(), scMarsLighthouseHallTeleportToAerie() and scTeleportArriveWhirling().

Definition at line 57 of file teleport_shimmer.c.

scTeleportStartFastShimmer

void scTeleportStartFastShimmer(void)

Starts the shimmer at a step every two ticks, as the party arrives.

References fdPaletteCycleFade(), PaletteCycleBright, PaletteCycleDelay, PaletteCycleTimer, scListCountEntries() and sySetTickEvent().

Referenced by scIsletCaveFinishTeleport() and scTeleportArriveWhirling().

Definition at line 64 of file teleport_shimmer.c.

scTeleportArriveWhirling

void scTeleportArriveWhirling(void)

The party arrives by Teleport on the circle: the room fades in grey while the circle shimmers and the whirl plays, then its colours come back.

References fdPaletteFadeApplyTarget(), fdPaletteFadeInterpolate(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), fdTeleportPlayWhirl(), MainRoutineStateWork, scTeleportStartFastShimmer(), scTeleportStopShimmer(), Sint32 and sySynch().

Referenced by scPaletteSetColorsFade().

Definition at line 81 of file teleport_shimmer.c.