Skip to Content
The Alchemy Project

src/scene/sol_sanctum_eruption.c

Elemental Star Room (SceneIdSolSanctumEruption), the chamber of SceneIdSolSanctumElementalStarRoom (sol_sanctum_elemental_star_room.c) as it collapses once the Mars Star is taken. More…

Macros

NameDescription
#defineFLAG_SOL_SANCTUM_ERUPTION_SATUROS_LEAVING FLAG_SCENE_TEMP(0x46)Saturos's group has started to leave, and the shards fall without their sound.
#defineELEMENTAL_LIGHT_STRETCH_TICKS 8A light stretches for ELEMENTAL_LIGHT_STRETCH_TICKS, narrowing by nine tenths of its width, then is lifted out of view until it is done with at ELEMENTAL_LIGHT_TICKS.
#defineELEMENTAL_LIGHT_TICKS 14
#defineELEMENTAL_LIGHT_SCALE_X_DECREASE
#defineSHARD_EVERY (ticks) ((ticks) - 1)ShardMask for a shard every ticks ticks, a power of two: one is launched when the tick count has none of the mask's bits.
#defineSHARD_EMISSION_DISABLED 999ShardMask for no more shards.
#defineLIGHT_SCAN_STILL_ACTIVE 888Marks, in the scan of RisingLightTimers, that a light is still rising.

Enumerations

NameDescription
enumanonymous enum { SHARD_COUNT }The shards the eruption throws, one for each of the crystal actors they reuse once the crystals are gone.
enumanonymous enum { RISING_LIGHT_COUNT }The lights that rise at a corner of the chamber, one after another.
enumCOLLAPSE_ACTOR_ID { ACTOR_PLATFORM_SHADOW, ACTOR_KRADEN, ACTOR_SATUROS, ACTOR_ME … }The eruption's actors, numbered in the order of SolSanctumEruptionActorPlacements.
enumSOL_SANCTUM_ERUPTION_CORNER { CHAMBER_NORTHWEST, CHAMBER_SOUTHWEST, CHAMBER_NORTHEAST, CHA … }The four corners of the chamber where scSolSanctumEruptionRaiseElementalLights raises lights, in the order the Wise One's script visits them.
enumanonymous enum { ACTOR_WISE_ONE, ACTOR_FIRST_CRYSTAL, CRYSTAL_COUNT, ACTOR_FI … }The Wise One, and the crystals, which become the shards.
enumanonymous enum { BLUE_CRYSTAL_ANIMATION_GLINT, BLUE_CRYSTAL_ANIMATION_SHATTER }SPRITE_BLUE_CRYSTAL's animations (blue_crystal.tsv): the crystal glinting, and shattering into shards that vanish.
enumanonymous enum { WISE_ONE_ANIMATION_LOWER_EYE, WISE_ONE_ANIMATION_RAISE_EYE }SPRITE_WISE_ONE's animations (wise_one.tsv): its eye lowering and held low as it holds the floor with Psynergy, and lifting again into its blinking idle.
enumanonymous enum { SHARD_FREE, SHARD_FLYING, SHARD_LANDED, SHARD_PUT_AWAY, SHAR … }ShardState: free, in flight, then counting ticks from its landing, when it bursts, until it is put away and then freed.

Functions

NameDescription
static voidscSolSanctumEruptionRaiseAndShrinkActor (Sint32 actorId)Lifts one departing actor and shrinks it together with its shadow on the platform (ACTOR_PLATFORM_SHADOW).
static voidscSolSanctumEruptionThrowEruptionRing (void)Sixteen blue crystals burst out of the Mars statue in a ring and fly 256 pixels outward; their actors are then put away, to be thrown again as shards.
static voidscSolSanctumEruptionResetShardEmission (void)Frees all sixteen shards and starts them at one every 64 ticks, for 120 ticks.
static voidscSolSanctumEruptionStepShards (void)An event: each shard flies in from far across the room to land near the Wise One, shatters, and is put away; a new one is thrown in whenever the tick count allows (ShardMask), each launch shaking the room for a moment.
static voidscSolSanctumEruptionUpdateShardFrequency (void)An event: every so often the shards change pace, from one every 4 ticks for a short burst to one every 128 ticks for a long lull, the level falling by one each time until it is drawn again at random.
static voidscSolSanctumEruptionPlayWiseOneRescue (void)Elemental Star Room, collapsing: the Wise One sends Isaac and Garet out.
static voidscSolSanctumEruptionPlaceBeforeStar (Sint32 actorId)Places an actor before the star, facing south, and draws it above the chamber floor.
static voidscSolSanctumEruptionDrawFirstCollapseTiles (Sint32 broken)Draws the patch of floor that breaks up first, by the Wise One, broken or whole.
static voidscSolSanctumEruptionDrawSecondCollapseTiles (Sint32 broken)Draws the patch of floor that breaks up second, broken or whole: the overhead layer's metatiles (9, 5) to (11, 7), north east of the first patch, again from the middle layer's metatiles at the same place or from the overhead layer's spare metatiles.
static voidscSolSanctumEruptionFlickerFirstCollapseTiles (void)The first patch of floor breaking up: every other tick it is drawn broken or whole at random.
static voidscSolSanctumEruptionFlickerSecondCollapseTiles (void)The second patch of floor breaking up, as the first.
static voidscSolSanctumEruptionRaiseElementalLights (Uint32 corner)Tints the chamber and raises ten lights, one after another, at one of its four corners, then waits until the last has risen out of view.
static voidscSolSanctumEruptionUpdateElementalLights (void)Stretches each active light for ELEMENTAL_LIGHT_STRETCH_TICKS, then lifts it out of view.
static voidscSolSanctumEruptionFadeCameraTo (Sint32 x, Sint32 z)Fades out, moves the camera and its focus actor, then fades back in.
static voidscSolSanctumEruptionClearStatueMetatiles (void)Makes the metatiles of the four statues at the chamber's corners plain floor, taking the metatile behavior and flags of the floor west of each, once the statues' metatile behaviors are saved in metatiles 10 to 13 of the map's top row, which nothing reads back.
static voidscSolSanctumEruptionSetPaleTint (Sint32 enabled, Sint32 ticks, Sint32 waitTicks)Fades the backgrounds into or out of the pale tint the room flashes.
static voidscSolSanctumEruptionFlashWiseOne (ACTOR *actor)Makes the Wise One flash white as it uses Psynergy, golden rings rising round it every sixteen ticks.
static voidscSolSanctumEruptionRaiseGoldenRings (ACTOR *parent)Sends golden rings up round the Wise One, to SE_ERUPTION_COLUMNS: two halves that rise together, one in front of it and one mirrored behind.
static voidscSolSanctumEruptionUpdateWiseOnePalette (void)Cycles the Wise One's palette while it glows.
const SCENE_ENTRANCE *scGetEntrances (void)The six rooms share one entrance table.
const SCENE_EXIT_REGION *scGetExitRegions (void)The scene has no exit regions: its regions entry returns none.
const Uint32 *scGetExits (void)Both scenes share one exit table.
const ACTOR_PLACE *scGetActorPlacements (void)Returns everyone the script moves, all placed off the map until it does.
const CUE *scGetCues (void)Returns the empty cue table, because the scene is one script.
static inline voidscSolSanctumEruptionPlaceHostageGroup (void)Stages Saturos, Menardi, Alex and Felix around Jenna and Kraden.
static voidscSolSanctumEruptionPlayHostageScript (void)Elemental Star Room, collapsing: Saturos's group leaves with its hostages.
static voidscSolSanctumEruptionUnusedNoOperationA (void)Unused: an empty function nothing refers to.
static voidscSolSanctumEruptionUnusedNoOperationB (void)Unused: an empty function nothing refers to.
Sint32scInit (void)Plays the collapse after the cut from the Elemental Star Room.
static Sint32scSolSanctumEruptionAlignShardToHeading (ACTOR *actor)Keeps a flying shard sprite rotated a quarter-turn from its facing.
static inline voidscSolSanctumEruptionStopWiseOnePalette (void)The Wise One lifts its eye again and stops glowing.
static voidscSolSanctumEruptionCycleActorPalette (ACTOR *actor)Cycles the actor through its colours swapped six ways as it glows, golden rings rising round it every sixteen ticks.

Variables

NameDescription
Uint8SolSanctumEruptionUnusedBeforeShardState [8]Unused: eight bytes before the shards' states that nothing reads.
Sint32ShardState [SHARD_COUNT]Each shard's state (SHARD_FREE and on).
Sint32ShardShakeThe shake the last shard's launch set going, in tenths of a pixel, three less each tick.
Uint8SolSanctumEruptionUnusedAfterShardShake [12]Unused: twelve bytes after the shard shake that nothing reads.
Uint8SolSanctumEruptionUnusedAfterRisingLights [8]Unused: eight bytes after the lights' actors that nothing reads.
Sint32RisingLightTimers [RISING_LIGHT_COUNT]Each light's age in ticks since it began to rise, 0 for one not yet rising or done.
Sint32ShardMaskA shard is launched on a tick with none of these bits set (SHARD_EVERY).
Sint32ShardLevelHow thick the shards fall, from 0 (one every 128 ticks) to 3 (one every 4).
Sint32ShardLevelTimerTicks until the shards next change pace.
extern Sint32EruptionRisingLightOrigins []Where each of the ten elemental lights springs from: its x from its corner's, and its height, in 16.16 fixed-point pixels.
extern Uint32SolSanctumEruptionExits []
extern ACTOR_PLACESolSanctumEruptionActorPlacements []
extern CUESolSanctumEruptionCues []
extern Sint32EruptionShardScript []
Sint32SolSanctumEruptionUnusedRiseAndGrowScript []Unused: an actor script nothing starts.

Description

Elemental Star Room (SceneIdSolSanctumEruption), the chamber of SceneIdSolSanctumElementalStarRoom (sol_sanctum_elemental_star_room.c) as it collapses once the Mars Star is taken.

The scene is one script, with no cues of its own. scInit plays it on arrival at SOL_SANCTUM_ERUPTION_FROM_SOL_SANCTUM_ELEMENTAL_STAR_ROOM, in two parts:

Sixteen blue crystals are thrown out in a ring (scSolSanctumEruptionThrowEruptionRing). They become shards launched from a pool at a varying rate. Two events do that, scSolSanctumEruptionStepShards and scSolSanctumEruptionUpdateShardFrequency, which the first part adds and the second removes. Once Saturos's group starts to leave (FLAG_SOL_SANCTUM_ERUPTION_SATUROS_LEAVING), the shards fall silently.

The breaking floor's metatiles flicker by event until the Wise One holds them. Ten lights rise at each of the chamber's four corners as the Wise One tells of the stars (scSolSanctumEruptionRaiseElementalLights). The Wise One glows through a cycle of palettes.

Saturos's group and their hostages leave one by one from the platform where the party arrived (scSolSanctumEruptionRaiseAndShrinkActor). Each walks onto it and rises 30 pixels at full size. Then he rises on as he shrinks away, over a shadow that shrinks with him. The platform's actor, ACTOR_PLATFORM_SHADOW, draws that shadow.

Macros in detail

FLAG_SOL_SANCTUM_ERUPTION_SATUROS_LEAVING

#define FLAG_SOL_SANCTUM_ERUPTION_SATUROS_LEAVING FLAG_SCENE_TEMP(0x46)

Saturos's group has started to leave, and the shards fall without their sound.

Referenced by scSolSanctumEruptionPlayHostageScript() and scSolSanctumEruptionStepShards().

Definition at line 111 of file sol_sanctum_eruption.c.

ELEMENTAL_LIGHT_STRETCH_TICKS

#define ELEMENTAL_LIGHT_STRETCH_TICKS 8

A light stretches for ELEMENTAL_LIGHT_STRETCH_TICKS, narrowing by nine tenths of its width, then is lifted out of view until it is done with at ELEMENTAL_LIGHT_TICKS.

Referenced by scSolSanctumEruptionUpdateElementalLights().

Definition at line 175 of file sol_sanctum_eruption.c.

ELEMENTAL_LIGHT_TICKS

#define ELEMENTAL_LIGHT_TICKS 14

Referenced by scSolSanctumEruptionUpdateElementalLights().

Definition at line 176 of file sol_sanctum_eruption.c.

ELEMENTAL_LIGHT_SCALE_X_DECREASE

#define ELEMENTAL_LIGHT_SCALE_X_DECREASE

Referenced by scSolSanctumEruptionUpdateElementalLights().

Definition at line 177 of file sol_sanctum_eruption.c.

SHARD_EVERY

#define SHARD_EVERY(ticks) ((ticks) - 1)

ShardMask for a shard every ticks ticks, a power of two: one is launched when the tick count has none of the mask's bits.

Referenced by scSolSanctumEruptionPlayWiseOneRescue(), scSolSanctumEruptionResetShardEmission() and scSolSanctumEruptionUpdateShardFrequency().

Definition at line 193 of file sol_sanctum_eruption.c.

SHARD_EMISSION_DISABLED

#define SHARD_EMISSION_DISABLED 999

ShardMask for no more shards. Nothing sets it: the shards stop only when their event is removed.

Referenced by scSolSanctumEruptionStepShards().

Definition at line 196 of file sol_sanctum_eruption.c.

LIGHT_SCAN_STILL_ACTIVE

#define LIGHT_SCAN_STILL_ACTIVE 888

Marks, in the scan of RisingLightTimers, that a light is still rising.

Referenced by scSolSanctumEruptionRaiseElementalLights().

Definition at line 198 of file sol_sanctum_eruption.c.

Enumerations in detail

anonymous enum

enum { SHARD_COUNT }

The shards the eruption throws, one for each of the crystal actors they reuse once the crystals are gone.

EnumeratorValueDescription
SHARD_COUNT16

Definition at line 51 of file sol_sanctum_eruption.c.

anonymous enum

enum { RISING_LIGHT_COUNT }

The lights that rise at a corner of the chamber, one after another.

EnumeratorValueDescription
RISING_LIGHT_COUNT10

Definition at line 57 of file sol_sanctum_eruption.c.

COLLAPSE_ACTOR_ID

enum COLLAPSE_ACTOR_ID

The eruption's actors, numbered in the order of SolSanctumEruptionActorPlacements.

EnumeratorValueDescription
ACTOR_PLATFORM_SHADOWACTOR_FIRST_PLACEDThe shadow on the platform under each who leaves with Saturos: a blank actor, whose sprite draws only its shadow, shrunk with the departing actor, whose own shadow is turned off (scSolSanctumEruptionRaiseAndShrinkActor).
ACTOR_KRADEN
ACTOR_SATUROS
ACTOR_MENARDI
ACTOR_FELIX_MASKEDFelix in his mask, before the star room unmasks him.
ACTOR_FELIX
ACTOR_ALEX

Definition at line 93 of file sol_sanctum_eruption.c.

SOL_SANCTUM_ERUPTION_CORNER

enum SOL_SANCTUM_ERUPTION_CORNER

The four corners of the chamber where scSolSanctumEruptionRaiseElementalLights raises lights, in the order the Wise One's script visits them.

EnumeratorValueDescription
CHAMBER_NORTHWEST0
CHAMBER_SOUTHWEST1
CHAMBER_NORTHEAST2
CHAMBER_SOUTHEAST3

Definition at line 137 of file sol_sanctum_eruption.c.

anonymous enum

enum { ACTOR_WISE_ONE, ACTOR_FIRST_CRYSTAL, CRYSTAL_COUNT, ACTOR_FIRST_SHARD }

The Wise One, and the crystals, which become the shards.

EnumeratorValueDescription
ACTOR_WISE_ONEACTOR_ALEX + 1
ACTOR_FIRST_CRYSTALACTOR_WISE_ONE + 1The sixteen crystals thrown out
CRYSTAL_COUNTSHARD_COUNTin a ring.
ACTOR_FIRST_SHARDACTOR_FIRST_CRYSTALThe same actors, reused as the shards once the crystals are gone.

Definition at line 146 of file sol_sanctum_eruption.c.

anonymous enum

enum { BLUE_CRYSTAL_ANIMATION_GLINT, BLUE_CRYSTAL_ANIMATION_SHATTER }

SPRITE_BLUE_CRYSTAL's animations (blue_crystal.tsv): the crystal glinting, and shattering into shards that vanish.

EnumeratorValueDescription
BLUE_CRYSTAL_ANIMATION_GLINT2
BLUE_CRYSTAL_ANIMATION_SHATTER3

Definition at line 158 of file sol_sanctum_eruption.c.

anonymous enum

enum { WISE_ONE_ANIMATION_LOWER_EYE, WISE_ONE_ANIMATION_RAISE_EYE }

SPRITE_WISE_ONE's animations (wise_one.tsv): its eye lowering and held low as it holds the floor with Psynergy, and lifting again into its blinking idle.

EnumeratorValueDescription
WISE_ONE_ANIMATION_LOWER_EYE2
WISE_ONE_ANIMATION_RAISE_EYE3

Definition at line 166 of file sol_sanctum_eruption.c.

anonymous enum

enum { SHARD_FREE, SHARD_FLYING, SHARD_LANDED, SHARD_PUT_AWAY, … }

ShardState: free, in flight, then counting ticks from its landing, when it bursts, until it is put away and then freed.

EnumeratorValueDescription
SHARD_FREE0
SHARD_FLYING1
SHARD_LANDED2
SHARD_PUT_AWAY19
SHARD_DONE20

Definition at line 182 of file sol_sanctum_eruption.c.

Functions in detail

scSolSanctumEruptionRaiseAndShrinkActor

static void scSolSanctumEruptionRaiseAndShrinkActor(Sint32 actorId)

Lifts one departing actor and shrinks it together with its shadow on the platform (ACTOR_PLATFORM_SHADOW).

References fdActorFaceDirection(), fdActorGet(), fdActorSetSpriteColorById(), fdActorSetSpriteFlags(), fdActorWalkToAndWait(), fdScriptWait(), Sint32 and sySoundPlay().

Referenced by scSolSanctumEruptionPlayHostageScript().

Definition at lines 113 and 649 of file sol_sanctum_eruption.c.

scSolSanctumEruptionThrowEruptionRing

static void scSolSanctumEruptionThrowEruptionRing(void)

Sixteen blue crystals burst out of the Mars statue in a ring and fly 256 pixels outward; their actors are then put away, to be thrown again as shards.

References fdActorGet(), fdActorSelectAnimation(), fdActorSetSpriteFlags(), fdActorStop(), fdActorWaitForMoveById(), fdScriptWait(), scFieldActorSetMoveTargetFX(), Sint32, syCos(), syMulFX(), sySin() and sySoundPlay().

Referenced by scSolSanctumEruptionPlayHostageScript().

Definition at lines 114 and 717 of file sol_sanctum_eruption.c.

scSolSanctumEruptionResetShardEmission

static void scSolSanctumEruptionResetShardEmission(void)

Frees all sixteen shards and starts them at one every 64 ticks, for 120 ticks.

References ShardLevel, ShardLevelTimer, ShardMask, ShardShake and ShardState.

Referenced by scSolSanctumEruptionPlayHostageScript().

Definition at lines 115 and 781 of file sol_sanctum_eruption.c.

scSolSanctumEruptionStepShards

static void scSolSanctumEruptionStepShards(void)

An event: each shard flies in from far across the room to land near the Wise One, shatters, and is put away; a new one is thrown in whenever the tick count allows (ShardMask), each launch shaking the room for a moment.

References EruptionShardScript, fdActorGet(), fdActorSelectAnimation(), fdActorSetSpriteColor(), fdActorSetSpriteFlags(), fdActorStartScript(), fdMapGridSetShakeFX(), gmFlagGet(), scFieldActorSetMoveTargetFX(), ShardMask, ShardShake, ShardState, Sint32, syCos(), syMathRemainderUnsigned(), syMulFX(), syRandomNext(), sySin(), sySoundPlay() and TickCount.

Referenced by scSolSanctumEruptionPlayHostageScript() and scSolSanctumEruptionPlayWiseOneRescue().

Definition at lines 116 and 798 of file sol_sanctum_eruption.c.

scSolSanctumEruptionUpdateShardFrequency

static void scSolSanctumEruptionUpdateShardFrequency(void)

An event: every so often the shards change pace, from one every 4 ticks for a short burst to one every 128 ticks for a long lull, the level falling by one each time until it is drawn again at random.

References ShardLevel, ShardLevelTimer and ShardMask.

Referenced by scSolSanctumEruptionPlayHostageScript() and scSolSanctumEruptionPlayWiseOneRescue().

Definition at lines 117 and 899 of file sol_sanctum_eruption.c.

scSolSanctumEruptionPlayWiseOneRescue

static void scSolSanctumEruptionPlayWiseOneRescue(void)

Elemental Star Room, collapsing: the Wise One sends Isaac and Garet out.

References fdActorFaceDirection(), fdActorGet(), fdActorJump(), fdActorMoveToAndWait(), fdActorRelease(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorSetDestination(), fdActorSetSpriteColorById(), fdActorSetSpriteFlags(), fdActorSetSpritePriority(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorStop(), fdActorWaitForMoveById(), fdActorWalkTo(), fdActorWalkToAndWait(), fdCameraGetActor(), fdCameraWaitForMove(), fdItemDisplayShowPicture(), fdMapGridCenterOnFollowedPoint(), fdMapGridWaitForShakeToSettle(), fdPaletteFadeApplyTarget(), fdPaletteFadeStartInterpolation(), fdScriptAskYesNoWithActorAnimation(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptShowMessageThenWait(), fdScriptWait(), glyph, gmFlagSet(), mnFieldMessageShow(), mnIconDrawItem(), scEndScriptPsynergy(), scFieldActorCreate(), scSolSanctumEruptionClearStatueMetatiles(), scSolSanctumEruptionDrawFirstCollapseTiles(), scSolSanctumEruptionDrawSecondCollapseTiles(), scSolSanctumEruptionFadeCameraTo(), scSolSanctumEruptionFlashWiseOne(), scSolSanctumEruptionFlickerFirstCollapseTiles(), scSolSanctumEruptionFlickerSecondCollapseTiles(), scSolSanctumEruptionPlaceBeforeStar(), scSolSanctumEruptionRaiseElementalLights(), scSolSanctumEruptionSetPaleTint(), scSolSanctumEruptionStepShards(), scSolSanctumEruptionStopWiseOnePalette() and 13 more.

Referenced by scSolSanctumEruptionPlayHostageScript().

Definition at lines 118 and 948 of file sol_sanctum_eruption.c.

scSolSanctumEruptionPlaceBeforeStar

static void scSolSanctumEruptionPlaceBeforeStar(Sint32 actorId)

Places an actor before the star, facing south, and draws it above the chamber floor.

References fdActorGet(), fdActorSetSpritePriority() and Sint32.

Referenced by scSolSanctumEruptionPlayWiseOneRescue().

Definition at lines 119 and 1647 of file sol_sanctum_eruption.c.

scSolSanctumEruptionDrawFirstCollapseTiles

static void scSolSanctumEruptionDrawFirstCollapseTiles(Sint32 broken)

Draws the patch of floor that breaks up first, by the Wise One, broken or whole. The patch is on the overhead layer, whose metatiles start at the map's (56, 0): its metatiles (7, 7) to (8, 9), under where the Wise One floats. Broken takes the metatiles the middle layer keeps at the same place (from the map's (0, 40)); whole takes the overhead layer's own spare metatiles.

References fdMapGridCenterOnFollowedPoint(), fdMapGridCopyMetatilesTo() and Sint32.

Referenced by scSolSanctumEruptionFlickerFirstCollapseTiles() and scSolSanctumEruptionPlayWiseOneRescue().

Definition at lines 120 and 1662 of file sol_sanctum_eruption.c.

scSolSanctumEruptionDrawSecondCollapseTiles

static void scSolSanctumEruptionDrawSecondCollapseTiles(Sint32 broken)

Draws the patch of floor that breaks up second, broken or whole: the overhead layer's metatiles (9, 5) to (11, 7), north east of the first patch, again from the middle layer's metatiles at the same place or from the overhead layer's spare metatiles.

References fdMapGridCenterOnFollowedPoint(), fdMapGridCopyMetatilesTo() and Sint32.

Referenced by scSolSanctumEruptionFlickerSecondCollapseTiles() and scSolSanctumEruptionPlayWiseOneRescue().

Definition at lines 121 and 1684 of file sol_sanctum_eruption.c.

scSolSanctumEruptionFlickerFirstCollapseTiles

static void scSolSanctumEruptionFlickerFirstCollapseTiles(void)

The first patch of floor breaking up: every other tick it is drawn broken or whole at random.

References scSolSanctumEruptionDrawFirstCollapseTiles(), syMathRemainderUnsigned(), syRandomNext() and TickCount.

Referenced by scSolSanctumEruptionPlayWiseOneRescue().

Definition at lines 122 and 1701 of file sol_sanctum_eruption.c.

scSolSanctumEruptionFlickerSecondCollapseTiles

static void scSolSanctumEruptionFlickerSecondCollapseTiles(void)

The second patch of floor breaking up, as the first.

References scSolSanctumEruptionDrawSecondCollapseTiles(), syMathRemainderUnsigned(), syRandomNext() and TickCount.

Referenced by scSolSanctumEruptionPlayWiseOneRescue().

Definition at lines 123 and 1717 of file sol_sanctum_eruption.c.

scSolSanctumEruptionRaiseElementalLights

static void scSolSanctumEruptionRaiseElementalLights(Uint32 corner)

Tints the chamber and raises ten lights, one after another, at one of its four corners, then waits until the last has risen out of view.

References EruptionRisingLightOrigins, fdActorReleaseById(), fdActorSelectAnimation(), fdActorShowEmote(), fdPaletteFadeApplyTarget(), fdPaletteFadeStartInterpolation(), RisingLightTimers, scFieldActorCreate(), scSolSanctumEruptionUpdateElementalLights(), Sint32, syCloseEvent(), sySetTickEvent(), sySoundPlay() and sySynch().

Referenced by scSolSanctumEruptionPlayWiseOneRescue().

Definition at lines 124 and 1734 of file sol_sanctum_eruption.c.

scSolSanctumEruptionUpdateElementalLights

static void scSolSanctumEruptionUpdateElementalLights(void)

Stretches each active light for ELEMENTAL_LIGHT_STRETCH_TICKS, then lifts it out of view.

References RisingLightTimers.

Referenced by scSolSanctumEruptionRaiseElementalLights().

Definition at lines 125 and 1859 of file sol_sanctum_eruption.c.

scSolSanctumEruptionFadeCameraTo

static void scSolSanctumEruptionFadeCameraTo(Sint32 x, Sint32 z)

Fades out, moves the camera and its focus actor, then fades back in.

References fdCameraGetActor(), fdCameraMoveWithinMapBounds(), fdMapGridCenterOnFollowedPoint(), fdPaletteFadeApplyTarget(), fdPaletteFadeStartInterpolation(), Sint32 and sySynch().

Referenced by scSolSanctumEruptionPlayWiseOneRescue().

Definition at lines 126 and 1894 of file sol_sanctum_eruption.c.

scSolSanctumEruptionClearStatueMetatiles

static void scSolSanctumEruptionClearStatueMetatiles(void)

Makes the metatiles of the four statues at the chamber's corners plain floor, taking the metatile behavior and flags of the floor west of each, once the statues' metatile behaviors are saved in metatiles 10 to 13 of the map's top row, which nothing reads back.

References fdMapGridCopyMetatileAttributes().

Referenced by scSolSanctumEruptionPlayWiseOneRescue().

Definition at lines 127 and 1923 of file sol_sanctum_eruption.c.

scSolSanctumEruptionSetPaleTint

static void scSolSanctumEruptionSetPaleTint(Sint32 enabled, Sint32 ticks, Sint32 waitTicks)

Fades the backgrounds into or out of the pale tint the room flashes.

References fdPaletteFadeApplyTarget(), fdPaletteFadeStartInterpolation(), fdScriptWait(), Sint32 and sySoundPlay().

Referenced by scSolSanctumEruptionPlayHostageScript() and scSolSanctumEruptionPlayWiseOneRescue().

Definition at lines 128 and 1938 of file sol_sanctum_eruption.c.

scSolSanctumEruptionFlashWiseOne

static void scSolSanctumEruptionFlashWiseOne(ACTOR *actor)

Makes the Wise One flash white as it uses Psynergy, golden rings rising round it every sixteen ticks.

References fdActorSetColorMode(), scSolSanctumEruptionRaiseGoldenRings() and TickCount.

Referenced by scSolSanctumEruptionPlayWiseOneRescue().

Definition at lines 130 and 1961 of file sol_sanctum_eruption.c.

scSolSanctumEruptionRaiseGoldenRings

static void scSolSanctumEruptionRaiseGoldenRings(ACTOR *parent)

Sends golden rings up round the Wise One, to SE_ERUPTION_COLUMNS: two halves that rise together, one in front of it and one mirrored behind.

References fdActorGet(), fdSpriteStartAnimation(), scFieldActorCreate(), scFieldEffectRiseRingBackHalf(), scFieldEffectRiseRingFrontHalf(), Sint32, sySoundPlay(), syVRAMCacheFreeEntry() and VramCacheEntries.

Referenced by scSolSanctumEruptionCycleActorPalette() and scSolSanctumEruptionFlashWiseOne().

Definition at lines 131 and 1995 of file sol_sanctum_eruption.c.

scSolSanctumEruptionUpdateWiseOnePalette

static void scSolSanctumEruptionUpdateWiseOnePalette(void)

Cycles the Wise One's palette while it glows.

References fdActorGet() and scSolSanctumEruptionCycleActorPalette().

Referenced by scSolSanctumEruptionPlayWiseOneRescue() and scSolSanctumEruptionStopWiseOnePalette().

Definition at lines 132 and 2051 of file sol_sanctum_eruption.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References SolSanctumStarRoomEntrances.

Definition at line 200 of file sol_sanctum_eruption.c.

scGetExitRegions

const SCENE_EXIT_REGION *scGetExitRegions(void)

Definition at line 205 of file sol_sanctum_eruption.c.

scGetExits

const Uint32 *scGetExits(void)

References SolSanctumEruptionExits.

Definition at line 210 of file sol_sanctum_eruption.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

Returns everyone the script moves, all placed off the map until it does.

References SolSanctumEruptionActorPlacements.

Definition at line 216 of file sol_sanctum_eruption.c.

scGetCues

const CUE *scGetCues(void)

Returns the empty cue table, because the scene is one script.

References SolSanctumEruptionCues.

Definition at line 222 of file sol_sanctum_eruption.c.

scSolSanctumEruptionPlaceHostageGroup

static inline void scSolSanctumEruptionPlaceHostageGroup(void)

Stages Saturos, Menardi, Alex and Felix around Jenna and Kraden.

Referenced by scSolSanctumEruptionPlayHostageScript().

Definition at line 228 of file sol_sanctum_eruption.c.

scSolSanctumEruptionPlayHostageScript

static void scSolSanctumEruptionPlayHostageScript(void)

Elemental Star Room, collapsing: Saturos's group leaves with its hostages.

References fdActorFaceDirection(), fdActorFaceEachOther(), fdActorGet(), fdActorJump(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetSpriteFlags(), fdActorSetSpritePriority(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorWaitForMoveById(), fdActorWalkTo(), fdActorWalkToAndWait(), fdCameraMoveToFX(), fdCameraWaitForMove(), fdMapGridCenterOnFollowedPoint(), fdMapGridWaitForShakeToSettle(), fdPaletteFadeApplyTarget(), fdPaletteFadeStartInterpolation(), fdPartyRemoveMemberRestored(), fdScriptAskYesNoWithActorAnimation(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), gmFlagSet(), scFieldScriptShowMessageThenWait(), scSolSanctumEruptionPlaceHostageGroup(), scSolSanctumEruptionPlayWiseOneRescue(), scSolSanctumEruptionRaiseAndShrinkActor(), scSolSanctumEruptionResetShardEmission(), scSolSanctumEruptionSetPaleTint(), scSolSanctumEruptionStepShards(), scSolSanctumEruptionThrowEruptionRing(), scSolSanctumEruptionUpdateShardFrequency(), sySetTickEvent(), sySoundPlay() and sySynch().

Referenced by scInit().

Definition at line 239 of file sol_sanctum_eruption.c.

scSolSanctumEruptionUnusedNoOperationA

static void scSolSanctumEruptionUnusedNoOperationA(void)

Unused: an empty function nothing refers to.

Definition at line 687 of file sol_sanctum_eruption.c.

scSolSanctumEruptionUnusedNoOperationB

static void scSolSanctumEruptionUnusedNoOperationB(void)

Unused: an empty function nothing refers to.

Definition at line 692 of file sol_sanctum_eruption.c.

scInit

Sint32 scInit(void)

Plays the collapse after the cut from the Elemental Star Room.

References fdEffectInitSparkles(), MainRoutineStateWork, scSolSanctumEruptionPlayHostageScript() and Sint32.

Definition at line 697 of file sol_sanctum_eruption.c.

scSolSanctumEruptionAlignShardToHeading

static Sint32 scSolSanctumEruptionAlignShardToHeading(ACTOR *actor)

Keeps a flying shard sprite rotated a quarter-turn from its facing.

References Sint32.

Referenced by EruptionShardScript.

Definition at line 709 of file sol_sanctum_eruption.c.

scSolSanctumEruptionStopWiseOnePalette

static inline void scSolSanctumEruptionStopWiseOnePalette(void)

The Wise One lifts its eye again and stops glowing.

References fdActorSetAnimationAndWait(), fdActorSetSpriteColorById(), scSolSanctumEruptionUpdateWiseOnePalette(), syCloseEvent() and sySynch().

Referenced by scSolSanctumEruptionPlayWiseOneRescue().

Definition at line 939 of file sol_sanctum_eruption.c.

scSolSanctumEruptionCycleActorPalette

static void scSolSanctumEruptionCycleActorPalette(ACTOR *actor)

Cycles the actor through its colours swapped six ways as it glows, golden rings rising round it every sixteen ticks.

References fdActorSetColorMode(), scSolSanctumEruptionRaiseGoldenRings(), syMathRemainderUnsigned() and TickCount.

Referenced by scSolSanctumEruptionUpdateWiseOnePalette().

Definition at line 1979 of file sol_sanctum_eruption.c.

Variables in detail

SolSanctumEruptionUnusedBeforeShardState

Uint8 SolSanctumEruptionUnusedBeforeShardState[8]

Unused: eight bytes before the shards' states that nothing reads.

Definition at line 63 of file sol_sanctum_eruption.c.

ShardState

Sint32 ShardState[SHARD_COUNT]

Each shard's state (SHARD_FREE and on).

References Sint32.

Referenced by scSolSanctumEruptionResetShardEmission() and scSolSanctumEruptionStepShards().

Definition at line 65 of file sol_sanctum_eruption.c.

ShardShake

Sint32 ShardShake

The shake the last shard's launch set going, in tenths of a pixel, three less each tick.

References Sint32.

Referenced by scSolSanctumEruptionResetShardEmission() and scSolSanctumEruptionStepShards().

Definition at line 68 of file sol_sanctum_eruption.c.

SolSanctumEruptionUnusedAfterShardShake

Uint8 SolSanctumEruptionUnusedAfterShardShake[12]

Unused: twelve bytes after the shard shake that nothing reads.

Definition at line 70 of file sol_sanctum_eruption.c.

SolSanctumEruptionUnusedAfterRisingLights

Uint8 SolSanctumEruptionUnusedAfterRisingLights[8]

Unused: eight bytes after the lights' actors that nothing reads.

Definition at line 74 of file sol_sanctum_eruption.c.

RisingLightTimers

Sint32 RisingLightTimers[RISING_LIGHT_COUNT]

Each light's age in ticks since it began to rise, 0 for one not yet rising or done.

References Sint32.

Referenced by scSolSanctumEruptionRaiseElementalLights() and scSolSanctumEruptionUpdateElementalLights().

Definition at line 77 of file sol_sanctum_eruption.c.

ShardMask

Sint32 ShardMask

A shard is launched on a tick with none of these bits set (SHARD_EVERY).

References Sint32.

Referenced by scSolSanctumEruptionPlayWiseOneRescue(), scSolSanctumEruptionResetShardEmission(), scSolSanctumEruptionStepShards() and scSolSanctumEruptionUpdateShardFrequency().

Definition at line 79 of file sol_sanctum_eruption.c.

ShardLevel

Sint32 ShardLevel

How thick the shards fall, from 0 (one every 128 ticks) to 3 (one every 4).

References Sint32.

Referenced by scSolSanctumEruptionResetShardEmission() and scSolSanctumEruptionUpdateShardFrequency().

Definition at line 81 of file sol_sanctum_eruption.c.

ShardLevelTimer

Sint32 ShardLevelTimer

Ticks until the shards next change pace.

References Sint32.

Referenced by scSolSanctumEruptionResetShardEmission() and scSolSanctumEruptionUpdateShardFrequency().

Definition at line 83 of file sol_sanctum_eruption.c.

EruptionRisingLightOrigins

extern Sint32 EruptionRisingLightOrigins[]

Sint32 EruptionRisingLightOrigins[]

Where each of the ten elemental lights springs from: its x from its corner's, and its height, in 16.16 fixed-point pixels.

References Sint32.

Referenced by scSolSanctumEruptionRaiseElementalLights().

Definition at lines 85 and 2076 of file sol_sanctum_eruption.c.

SolSanctumEruptionExits

extern Uint32 SolSanctumEruptionExits[]

Uint32 SolSanctumEruptionExits[]

Referenced by scGetExits().

Definition at lines 86 and 2091 of file sol_sanctum_eruption.c.

SolSanctumEruptionActorPlacements

extern ACTOR_PLACE SolSanctumEruptionActorPlacements[]

ACTOR_PLACE SolSanctumEruptionActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 87 and 2098 of file sol_sanctum_eruption.c.

SolSanctumEruptionCues

extern CUE SolSanctumEruptionCues[]

CUE SolSanctumEruptionCues[]

Referenced by scGetCues().

Definition at lines 88 and 2154 of file sol_sanctum_eruption.c.

EruptionShardScript

extern Sint32 EruptionShardScript[]

Sint32 EruptionShardScript[]

References scSolSanctumEruptionAlignShardToHeading() and Sint32.

Referenced by scSolSanctumEruptionStepShards().

Definition at lines 89 and 2160 of file sol_sanctum_eruption.c.

SolSanctumEruptionUnusedRiseAndGrowScript

Sint32 SolSanctumEruptionUnusedRiseAndGrowScript[]

Unused: an actor script nothing starts. It sends an actor up at 6 pixels a tick, growing it by a 25th each tick of its loop, then sets it back to full size.

References Sint32.

Definition at line 2061 of file sol_sanctum_eruption.c.

On this page

MacrosEnumerationsFunctionsVariablesDescriptionMacros in detailFLAG_SOL_SANCTUM_ERUPTION_SATUROS_LEAVINGELEMENTAL_LIGHT_STRETCH_TICKSELEMENTAL_LIGHT_TICKSELEMENTAL_LIGHT_SCALE_X_DECREASESHARD_EVERYSHARD_EMISSION_DISABLEDLIGHT_SCAN_STILL_ACTIVEEnumerations in detailanonymous enumanonymous enumCOLLAPSE_ACTOR_IDSOL_SANCTUM_ERUPTION_CORNERanonymous enumanonymous enumanonymous enumanonymous enumFunctions in detailscSolSanctumEruptionRaiseAndShrinkActorscSolSanctumEruptionThrowEruptionRingscSolSanctumEruptionResetShardEmissionscSolSanctumEruptionStepShardsscSolSanctumEruptionUpdateShardFrequencyscSolSanctumEruptionPlayWiseOneRescuescSolSanctumEruptionPlaceBeforeStarscSolSanctumEruptionDrawFirstCollapseTilesscSolSanctumEruptionDrawSecondCollapseTilesscSolSanctumEruptionFlickerFirstCollapseTilesscSolSanctumEruptionFlickerSecondCollapseTilesscSolSanctumEruptionRaiseElementalLightsscSolSanctumEruptionUpdateElementalLightsscSolSanctumEruptionFadeCameraToscSolSanctumEruptionClearStatueMetatilesscSolSanctumEruptionSetPaleTintscSolSanctumEruptionFlashWiseOnescSolSanctumEruptionRaiseGoldenRingsscSolSanctumEruptionUpdateWiseOnePalettescGetEntrancesscGetExitRegionsscGetExitsscGetActorPlacementsscGetCuesscSolSanctumEruptionPlaceHostageGroupscSolSanctumEruptionPlayHostageScriptscSolSanctumEruptionUnusedNoOperationAscSolSanctumEruptionUnusedNoOperationBscInitscSolSanctumEruptionAlignShardToHeadingscSolSanctumEruptionStopWiseOnePalettescSolSanctumEruptionCycleActorPaletteVariables in detailSolSanctumEruptionUnusedBeforeShardStateShardStateShardShakeSolSanctumEruptionUnusedAfterShardShakeSolSanctumEruptionUnusedAfterRisingLightsRisingLightTimersShardMaskShardLevelShardLevelTimerEruptionRisingLightOriginsSolSanctumEruptionExitsSolSanctumEruptionActorPlacementsSolSanctumEruptionCuesEruptionShardScriptSolSanctumEruptionUnusedRiseAndGrowScript