Skip to Content
The Alchemy Project

src/scene/mercury_lighthouse_aerie.c

Lighthouse Aerie (SceneIdMercuryLighthouseAerie), the top of Mercury Lighthouse, where its beacon burns. More…

Macros

NameDescription
#defineLIFT_DOWN_TICKS 228How long the lift takes to sink, speeding up every fourth tick.
#defineLIFT_UP_TICKS 86How long the lift takes to rise, and the last ticks of it in which it slows every fourth tick.
#defineLIFT_SLOWING_TICKS 10
#defineSPARK_ORBIT_RADIUS 28A beacon spark circles the beacon this many pixels out, and up to SPARK_ORBIT_BULGE more the nearer it rose from the middle of the beacon's height, so the sparks outline a ball.
#defineSPARK_ORBIT_BULGE 24
#defineBEACON_SHOWN_VIEW_TOP 129The beacon is in sight, and drawn, while the view's top is at most this far down the map.

Enumerations

NameDescription
enumMERCURY_LIGHTHOUSE_AERIE_METATILE_BEHAVIOR { METATILE_BEHAVIOR_BEACON_STAIRS, METATILE_BEHAVIOR_LIFT_LAND … }The metatile behaviors the aerie's cues answer.
enumMERCURY_LIGHTHOUSE_AERIE_ACTOR_ID { ACTOR_BEACON, ACTOR_LIFT_STATUE, ACTOR_FIRST_BEACON_STATUE, … }The aerie's actors.
enumMERCURY_LIGHTHOUSE_AERIE_ANIMATION { ANIM_MIA_HEAD_BOWED }Animations of the aerie's sprites beyond ACTOR_ANIMATION, as their animation tables and ticks under graphics/sprite draw them.
enumanonymous enum { FLAG_ON_PLATFORM, FLAG_LIFT_UP, FLAG_HOSTAGES_GONE }Scene flags, kept while the party stays on the aerie.
enumanonymous enum { FLAG_PSYNERGY_STONE }The aerie's Psynergy Stone.

Functions

NameDescription
static voidscMercuryLighthouseAeriePartyArrives (void)The party arrives at the top: the aerie shakes, a white flash fills the screen, and Isaac, Garet, Ivan and Mia lie on the east tower top, then get up and gather round Isaac.
static voidscMercuryLighthouseAerieFloatPlatforms (void)Nothing visible happens when Isaac steps off the platforms onto the foot of the stairs either side of the beacon's tower, metatiles (12, 12) and (25, 12), or onto the east tower top at metatile (31, 10).
static voidscMercuryLighthouseAerieAlexAppears (void)Back from the battle, Saturos is beaten, but Alex appears, stalls until Saturos recovers and leaves with him on the lift.
static voidscMercuryLighthouseAerieSaturosAndAlexWarpOut (void)Saturos and Alex vanish in a column of sparkles.
static voidscMercuryLighthouseAerieSaturosAndAlexWarpIn (void)Saturos and Alex appear in a column of sparkles where they have been placed.
static voidscMercuryLighthouseAerieLowerLift (void)The lift sinks with everything standing on it, speeding up.
static voidscMercuryLighthouseAerieRaiseLift (void)The lift rises with everything standing on it, slowing at the top.
static voidscMercuryLighthouseAerieFlickerBeacon (void)Flickers the beacon and sheds its sparks, every tick.
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)Returns the one exit, the lift down to the ground before Mercury Lighthouse, by the Fountain of Healing (MERCURY_LIGHTHOUSE_EXTERIOR_FROM_MERCURY_LIGHTHOUSE_AERIE).
const ACTOR_PLACE *scGetActorPlacements (void)Returns the actors, with Jenna, Kraden, Felix and Menardi placed only on the first arrival (MERCURY_LIGHTHOUSE_AERIE_AFTER_BEACON_LIT).
const CUE *scGetCues (void)The first water beast's cave changes its cues once the first drain has lowered its water: the beast is gone and its two puddles can be frozen.
Sint32scInit (void)Sets up the Lighthouse Aerie, then plays the script of the entrance taken.
static voidscMercuryLighthouseAerieJumpToNextPlatform (void)Walking on from a platform, or from the tower edge beside one, makes Isaac crouch and leap two metatiles to the next platform or tower top, if there is ground there to land on.
static voidscMercuryLighthouseAerieLandOnPlatform (void)Landing on one of the floating platforms makes it dip under Isaac and spring back up.
static voidscMercuryLighthouseAerieConfrontSaturos (void)Climbing the wide stairs up to the beacon, at metatiles (20, 14) and (21, 14), the party finds it already lit, Menardi rides the lift down with Jenna, Kraden and Felix, and Saturos fights the party alone.
static voidscMercuryLighthouseAerieCallLift (void)Walking down the stairs on the west side of the beacon's tower, at metatile (12, 9), brings the lift back up while it is down.
static voidscMercuryLighthouseAerieRideLiftDown (void)Stepping onto the lift from the westmost platform, at metatile (6, 10), rides it down to the ground before Mercury Lighthouse, by the Fountain of Healing.
static voidscMercuryLighthouseAerieFindActorsOnLift (Sint32 *out, Sint32 y)Writes to out the ids of the actors standing on the lift, columns 4 to 8 and three rows from its top, while its map layer is scrolled y pixels down.
static voidscMercuryLighthouseAerieUnusedAlexCastsPly (void)Unused: Alex casts Ply on the lift's statue.
static voidscMercuryLighthouseAerieUpdateBeaconSpark (ACTOR *spark)A beacon spark's update, which swings it round the beacon it watches.

Variables

NameDescription
extern SCENE_ENTRANCEMercuryLighthouseAerieEntrances []
extern Uint32MercuryLighthouseAerieExits []
extern ACTOR_PLACEMercuryLighthouseAerieActorPlacements []
extern CUEMercuryLighthouseAerieCues []
extern Sint32MercuryLighthouseAerieLandedPlatformThe floating platform the leader has landed on, 0 when none.
extern Sint32BeaconSparkScript []A spark is drawn at seven fifths of its size for half a second, then gone.
const Sint32 *FieldEffectDurationScripts []The resident copy of the scripts EFFECT_SCRIPT_MASK picks, by enum EFFECT_DURATION.

Description

Lighthouse Aerie (SceneIdMercuryLighthouseAerie), the top of Mercury Lighthouse, where its beacon burns.

Isaac and Garet, with Ivan and Mia, have climbed the lighthouse after Saturos and Menardi, who hold Jenna and Kraden and carry the Elemental Stars. Ply on the statue below the rainbow turns the last waterfall to stream upward, and the party comes out at the top. They come too late to stop the beacon being lit.

The aerie is three tower tops in the sky. The party lands on the east one, where a Psynergy Stone lies. The beacon stands on the middle one, at the head of a wide flight of stairs, with two statues either side of it. The west one is a lift, a tower top with a statue on it that sinks to the ground and rises again. Three floating platforms bridge each gap, and the leader jumps from one to the next.

Every arrival sets FLAG_IN_MERCURY_LIGHTHOUSE, under which Mercury Adepts regain PP faster.

On the aerie Retreat is blocked, and the beacon flickers and sheds sparks (scMercuryLighthouseAerieFlickerBeacon).

Jenna, Kraden, Felix and Menardi are placed only on the first arrival. Every other entrance sets FLAG_HOSTAGES_GONE before the actor placements are read.

Unused: SceneIdUnusedMercuryLighthouseAerieCopy, which the area names call Mercury Lighthouse and the debug scene list labels MTO07NG, loads this overlay and the same map. The setup does nothing for it, and no exit, table or code leads there. Only the debug scene selector, which reaches every scene, can.

Macros in detail

LIFT_DOWN_TICKS

#define LIFT_DOWN_TICKS 228

How long the lift takes to sink, speeding up every fourth tick.

Referenced by scMercuryLighthouseAerieLowerLift().

Definition at line 1896 of file mercury_lighthouse_aerie.c.

LIFT_UP_TICKS

#define LIFT_UP_TICKS 86

How long the lift takes to rise, and the last ticks of it in which it slows every fourth tick.

Referenced by scMercuryLighthouseAerieRaiseLift().

Definition at line 1900 of file mercury_lighthouse_aerie.c.

LIFT_SLOWING_TICKS

#define LIFT_SLOWING_TICKS 10

Referenced by scMercuryLighthouseAerieRaiseLift().

Definition at line 1901 of file mercury_lighthouse_aerie.c.

SPARK_ORBIT_RADIUS

#define SPARK_ORBIT_RADIUS 28

A beacon spark circles the beacon this many pixels out, and up to SPARK_ORBIT_BULGE more the nearer it rose from the middle of the beacon's height, so the sparks outline a ball.

Referenced by scMercuryLighthouseAerieUpdateBeaconSpark().

Definition at line 2006 of file mercury_lighthouse_aerie.c.

SPARK_ORBIT_BULGE

#define SPARK_ORBIT_BULGE 24

Referenced by scMercuryLighthouseAerieFlickerBeacon().

Definition at line 2007 of file mercury_lighthouse_aerie.c.

BEACON_SHOWN_VIEW_TOP

#define BEACON_SHOWN_VIEW_TOP 129

The beacon is in sight, and drawn, while the view's top is at most this far down the map.

Referenced by scMercuryLighthouseAerieFlickerBeacon().

Definition at line 2011 of file mercury_lighthouse_aerie.c.

Enumerations in detail

MERCURY_LIGHTHOUSE_AERIE_METATILE_BEHAVIOR

enum MERCURY_LIGHTHOUSE_AERIE_METATILE_BEHAVIOR

The metatile behaviors the aerie's cues answer.

EnumeratorValueDescription
METATILE_BEHAVIOR_BEACON_STAIRS5The stairs up to the beacon, metatiles (20, 14) and (21, 14).
METATILE_BEHAVIOR_LIFT_LANDING6The stairs on the west side of the beacon's tower, metatile (12, 9), from which the lift is called up.
METATILE_BEHAVIOR_PLATFORM10The six floating platforms.
METATILE_BEHAVIOR_PLATFORM_EDGE11The ground beside the platforms: the foot of the stairs either side of the beacon's tower and the east tower top.
METATILE_BEHAVIOR_LIFT12The lift's floor, metatile (6, 10), stepped onto from the westmost platform.
METATILE_BEHAVIOR_PSYNERGY_STONE100Where the Psynergy Stone lies on the east tower top, metatile (31, 8).

Definition at line 78 of file mercury_lighthouse_aerie.c.

MERCURY_LIGHTHOUSE_AERIE_ACTOR_ID

enum MERCURY_LIGHTHOUSE_AERIE_ACTOR_ID

The aerie's actors.

The party and Jenna stand in their own slots. The speakers are known from the text: Kraden ("It's all right, Jenna."), Felix ("Jenna, please... Just do as she says"), Saturos (Menardi: "Oh, Saturos..."), Menardi (Saturos: "Menardi... Wait!") and Alex (Mia: "Alex!"). Saturos is fought as ENCOUNTER_ZONE_SCRIPTED_TRET_MERCURY, slot 2.

EnumeratorValueDescription
ACTOR_BEACONACTOR_FIRST_PLACEDFlickers between two sizes and sheds sparks while in view (scMercuryLighthouseAerieFlickerBeacon).
ACTOR_LIFT_STATUEThe statue on the lift, the west tower top. It rides up and down with it.
ACTOR_FIRST_BEACON_STATUEFour more statues flank the beacon, two on each side of it. The two east of it, ACTOR_FIRST_BEACON_STATUE + 2 and + 3, are drawn mirrored.
ACTOR_FIRST_PLATFORMACTOR_FIRST_PLACED + 6The six floating platforms, three in each gap between the towers.
ACTOR_FIRST_LIFT_PLATFORMACTOR_FIRST_PLATFORM + 3The two platforms that stand on the lift and go up and down with it.
ACTOR_SECOND_LIFT_PLATFORM
ACTOR_KRADENACTOR_FIRST_PLACED + 12
ACTOR_FELIX
ACTOR_SATUROS
ACTOR_MENARDI
ACTOR_ALEX

Definition at line 111 of file mercury_lighthouse_aerie.c.

MERCURY_LIGHTHOUSE_AERIE_ANIMATION

enum MERCURY_LIGHTHOUSE_AERIE_ANIMATION

Animations of the aerie's sprites beyond ACTOR_ANIMATION, as their animation tables and ticks under graphics/sprite draw them.

EnumeratorValueDescription
ANIM_MIA_HEAD_BOWED16Mia seen side-on, her head bowed and her hands clasped at her chest (mia.png).

Definition at line 139 of file mercury_lighthouse_aerie.c.

anonymous enum

enum { FLAG_ON_PLATFORM, FLAG_LIFT_UP, FLAG_HOSTAGES_GONE }

Scene flags, kept while the party stays on the aerie.

EnumeratorValueDescription
FLAG_ON_PLATFORMFLAG_SCENE_TEMP(0x50)The leader stands on a
FLAG_LIFT_UPFLAG_SCENE_TEMP(0x51)platform, which has dipped under the weight.
FLAG_HOSTAGES_GONEFLAG_SCENE_TEMP(0x53)Set on every arrival but the first, because Jenna, Kraden, Felix and Menardi are placed only before it.

Definition at line 147 of file mercury_lighthouse_aerie.c.

anonymous enum

enum { FLAG_PSYNERGY_STONE }

The aerie's Psynergy Stone. It is an area temp flag, so it refills once the party has been to another area.

EnumeratorValueDescription
FLAG_PSYNERGY_STONEFLAG_AREA_TEMP(0x50)

Definition at line 160 of file mercury_lighthouse_aerie.c.

Functions in detail

scMercuryLighthouseAeriePartyArrives

static void scMercuryLighthouseAeriePartyArrives(void)

The party arrives at the top: the aerie shakes, a white flash fills the screen, and Isaac, Garet, Ivan and Mia lie on the east tower top, then get up and gather round Isaac.

It plays at MERCURY_LIGHTHOUSE_AERIE_AFTER_BEACON_LIT, the entrance the world map sends the party to after the waterfall below turns to stream upward, but not on a return from a battle there.

References fdActorFaceDirection(), fdActorGet(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetDestination(), fdActorSetSpriteFlags(), fdActorStartRepeatedMotion(), fdActorWaitForMoveById(), fdCameraGetActor(), fdCameraWaitForArrival(), fdMapGridCenterOnFollowedPoint(), fdMapGridWaitForShakeToSettle(), fdPaletteFadeApplySource(), fdPaletteFadeApplyTarget(), fdPaletteFadeStartInterpolation(), fdScriptEnd(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), gmPartyRestorePpInLighthouse(), sySoundPlay() and sySynch().

Referenced by scInit().

Definition at lines 165 and 308 of file mercury_lighthouse_aerie.c.

scMercuryLighthouseAerieFloatPlatforms

static void scMercuryLighthouseAerieFloatPlatforms(void)

Nothing visible happens when Isaac steps off the platforms onto the foot of the stairs either side of the beacon's tower, metatiles (12, 12) and (25, 12), or onto the east tower top at metatile (31, 10). The game sets every platform floating again, the one he left included, which stopped under him when he landed.

The leap from one platform to the next calls it too.

References fdActorGet().

Referenced by MercuryLighthouseAerieCues and scMercuryLighthouseAerieJumpToNextPlatform().

Definition at lines 166 and 506 of file mercury_lighthouse_aerie.c.

scMercuryLighthouseAerieAlexAppears

static void scMercuryLighthouseAerieAlexAppears(void)

Back from the battle, Saturos is beaten, but Alex appears, stalls until Saturos recovers and leaves with him on the lift.

It plays at MERCURY_LIGHTHOUSE_AERIE_AFTER_SATUROS_BATTLE, unless the party returns there after another battle. If the lift is down it is raised for them first.

References fdActorFaceDirection(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorSetSpriteColorById(), fdActorSetSpriteFlags(), fdActorSetSpritePriority(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorTurnToFaceEachOther(), fdActorWaitForMoveById(), fdActorWalkTo(), fdActorWalkToAndWait(), fdCameraGetActor(), fdCameraWaitForArrival(), fdMapGridCenterOnFollowedPoint(), fdMapGridCopyMetatilesTo(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), gmFlagSet(), gmPlayMusic(), scMercuryLighthouseAerieLowerLift(), scMercuryLighthouseAerieRaiseLift(), scMercuryLighthouseAerieSaturosAndAlexWarpIn(), scMercuryLighthouseAerieSaturosAndAlexWarpOut(), sySoundPlay() and sySynch().

Referenced by scInit().

Definition at lines 167 and 1033 of file mercury_lighthouse_aerie.c.

scMercuryLighthouseAerieSaturosAndAlexWarpOut

static void scMercuryLighthouseAerieSaturosAndAlexWarpOut(void)

Saturos and Alex vanish in a column of sparkles.

References fdActorGet(), fdActorSetSpriteColorById(), fdActorSetSpriteFlags(), fdScriptWait() and sySoundPlay().

Referenced by scMercuryLighthouseAerieAlexAppears().

Definition at lines 168 and 1738 of file mercury_lighthouse_aerie.c.

scMercuryLighthouseAerieSaturosAndAlexWarpIn

static void scMercuryLighthouseAerieSaturosAndAlexWarpIn(void)

Saturos and Alex appear in a column of sparkles where they have been placed.

References fdActorGet(), fdActorSetSpriteColorById(), fdActorSetSpriteFlags(), fdScriptWait() and sySoundPlay().

Referenced by scMercuryLighthouseAerieAlexAppears().

Definition at lines 169 and 1802 of file mercury_lighthouse_aerie.c.

scMercuryLighthouseAerieLowerLift

static void scMercuryLighthouseAerieLowerLift(void)

The lift sinks with everything standing on it, speeding up.

References fdActorGet(), scMercuryLighthouseAerieFindActorsOnLift(), Sint32, sySoundPlay() and sySynch().

Referenced by scMercuryLighthouseAerieAlexAppears(), scMercuryLighthouseAerieConfrontSaturos() and scMercuryLighthouseAerieRideLiftDown().

Definition at lines 170 and 1904 of file mercury_lighthouse_aerie.c.

scMercuryLighthouseAerieRaiseLift

static void scMercuryLighthouseAerieRaiseLift(void)

The lift rises with everything standing on it, slowing at the top.

References fdActorGet(), fdMapGridCenterOnFollowedPoint(), scMercuryLighthouseAerieFindActorsOnLift(), Sint32, sySoundPlay() and sySynch().

Referenced by scMercuryLighthouseAerieAlexAppears() and scMercuryLighthouseAerieCallLift().

Definition at lines 171 and 1946 of file mercury_lighthouse_aerie.c.

scMercuryLighthouseAerieFlickerBeacon

static void scMercuryLighthouseAerieFlickerBeacon(void)

Flickers the beacon and sheds its sparks, every tick.

References BeaconSparkScript, fdActorGet(), fdActorSetSpriteColor(), fdActorStartScript(), scFieldActorCreate(), scMercuryLighthouseAerieUpdateBeaconSpark(), Sint32, syImportActorSetPos(), syRandomNext(), sySin() and TickCount.

Referenced by scInit().

Definition at lines 172 and 2030 of file mercury_lighthouse_aerie.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References MercuryLighthouseAerieEntrances.

Definition at line 178 of file mercury_lighthouse_aerie.c.

scGetExitRegions

const SCENE_EXIT_REGION *scGetExitRegions(void)

Definition at line 183 of file mercury_lighthouse_aerie.c.

scGetExits

const Uint32 *scGetExits(void)

Returns the one exit, the lift down to the ground before Mercury Lighthouse, by the Fountain of Healing (MERCURY_LIGHTHOUSE_EXTERIOR_FROM_MERCURY_LIGHTHOUSE_AERIE).

References MercuryLighthouseAerieExits.

Definition at line 191 of file mercury_lighthouse_aerie.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

Returns the actors, with Jenna, Kraden, Felix and Menardi placed only on the first arrival (MERCURY_LIGHTHOUSE_AERIE_AFTER_BEACON_LIT).

References gmFlagSet(), MainRoutineStateWork and MercuryLighthouseAerieActorPlacements.

Definition at line 198 of file mercury_lighthouse_aerie.c.

scGetCues

const CUE *scGetCues(void)

References MercuryLighthouseAerieCues.

Definition at line 208 of file mercury_lighthouse_aerie.c.

scInit

Sint32 scInit(void)

Sets up the Lighthouse Aerie, then plays the script of the entrance taken.

References fdActorGet(), fdActorSetSpriteFlags(), fdActorSetSpritePriority(), fdMapGridCenterOnFollowedPoint(), fdMapGridCopyMetatilesTo(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork, scActorFindNearestFloatingPlatform(), scMercuryLighthouseAerieAlexAppears(), scMercuryLighthouseAerieFlickerBeacon(), scMercuryLighthouseAeriePartyArrives(), Sint32, sySetTickEvent() and sySynch().

Definition at line 214 of file mercury_lighthouse_aerie.c.

scMercuryLighthouseAerieJumpToNextPlatform

static void scMercuryLighthouseAerieJumpToNextPlatform(void)

Walking on from a platform, or from the tower edge beside one, makes Isaac crouch and leap two metatiles to the next platform or tower top, if there is ground there to land on.

The metatiles are the platforms in the gaps west and east of the beacon's tower, metatiles (6, 12), (8, 12), (10, 12), (27, 12), (29, 12) and (31, 12), and the ground beside them: the foot of the stairs either side of the beacon's tower, (12, 12) and (25, 12), and the east tower top, (31, 10). Before the leap every platform is set floating again.

References fdActorGet(), fdActorMoveToAndWait(), fdActorSelectAnimation(), fdActorSetSpriteFlags(), gmFlagClear(), scFieldActorCheckMovementCollision(), scMercuryLighthouseAerieFloatPlatforms(), Sint32, sySoundPlay(), sySynch() and syVectorAddPolarOffset().

Referenced by MercuryLighthouseAerieCues.

Definition at line 418 of file mercury_lighthouse_aerie.c.

scMercuryLighthouseAerieLandOnPlatform

static void scMercuryLighthouseAerieLandOnPlatform(void)

Landing on one of the floating platforms makes it dip under Isaac and spring back up.

The platforms are metatiles (6, 12), (8, 12) and (10, 12) west of the beacon's tower and (27, 12), (29, 12) and (31, 12) east of it. The one under him stops floating and holds still while he stands on it (FLAG_ON_PLATFORM).

References fdActorGet(), fdScriptEnd(), fdScriptStart(), gmFlagSet(), MercuryLighthouseAerieLandedPlatform, scActorFindNearestFloatingPlatform(), Sint32 and sySynch().

Referenced by MercuryLighthouseAerieCues.

Definition at line 460 of file mercury_lighthouse_aerie.c.

scMercuryLighthouseAerieConfrontSaturos

static void scMercuryLighthouseAerieConfrontSaturos(void)

Climbing the wide stairs up to the beacon, at metatiles (20, 14) and (21, 14), the party finds it already lit, Menardi rides the lift down with Jenna, Kraden and Felix, and Saturos fights the party alone.

Garet sees It's too late! The lighthouse has already been lit! The party gathers on the stairs and talks it over with Mia before Jenna calls out from the west tower top. It plays until Saturos is beaten (FLAG_MERCURY_LIGHTHOUSE_AERIE_ALEX_APPEARED).

References fdActorFaceDirection(), fdActorGet(), fdActorMoveToAndWait(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorSetPosFX(), fdActorSetSpriteFlags(), fdActorSetSpritePriority(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorTurnToFaceEachOther(), fdActorWaitForMoveById(), fdActorWalkTo(), fdActorWalkToAndWait(), fdCameraGetActor(), fdCameraWaitForArrival(), fdRequestBattleFromEncounterTable(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetAfterBattleDestination(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptWait(), scMercuryLighthouseAerieLowerLift(), sySoundPlay() and sySynch().

Referenced by MercuryLighthouseAerieCues.

Definition at line 526 of file mercury_lighthouse_aerie.c.

scMercuryLighthouseAerieCallLift

static void scMercuryLighthouseAerieCallLift(void)

Walking down the stairs on the west side of the beacon's tower, at metatile (12, 9), brings the lift back up while it is down.

The camera pans west to the empty space, the lift rises into it with its statue and the two platforms it carries, and the camera comes back to Isaac. It stays up (FLAG_LIFT_UP).

References fdActorGet(), fdActorSetSpritePriority(), fdCameraGetActor(), fdCameraWaitForArrival(), fdMapGridCenterOnFollowedPoint(), fdMapGridCopyMetatilesTo(), fdScriptEnd(), fdScriptStart(), fdScriptWait(), gmFlagSet(), scMercuryLighthouseAerieRaiseLift() and sySynch().

Referenced by MercuryLighthouseAerieCues.

Definition at line 1687 of file mercury_lighthouse_aerie.c.

scMercuryLighthouseAerieRideLiftDown

static void scMercuryLighthouseAerieRideLiftDown(void)

Stepping onto the lift from the westmost platform, at metatile (6, 10), rides it down to the ground before Mercury Lighthouse, by the Fountain of Healing.

Isaac walks to the middle of the lift and turns to face south, and the lift sinks with him before the party leaves by MERCURY_LIGHTHOUSE_AERIE_TO_MERCURY_LIGHTHOUSE_EXTERIOR.

References fdActorFaceDirection(), fdActorSetSpritePriority(), fdActorWalkToAndWait(), fdScriptEnd(), fdScriptStart(), scMercuryLighthouseAerieLowerLift() and syImportScriptSetExitRequest().

Referenced by MercuryLighthouseAerieCues.

Definition at line 1722 of file mercury_lighthouse_aerie.c.

scMercuryLighthouseAerieFindActorsOnLift

static void scMercuryLighthouseAerieFindActorsOnLift(Sint32 *out, Sint32 y)

Writes to out the ids of the actors standing on the lift, columns 4 to 8 and three rows from its top, while its map layer is scrolled y pixels down.

References Sint32 and state.

Referenced by scMercuryLighthouseAerieLowerLift() and scMercuryLighthouseAerieRaiseLift().

Definition at line 1872 of file mercury_lighthouse_aerie.c.

scMercuryLighthouseAerieUnusedAlexCastsPly

static void scMercuryLighthouseAerieUnusedAlexCastsPly(void)

Unused: Alex casts Ply on the lift's statue.

Nothing calls it. In the game, Alex and Saturos vanish, appear on the lift and ride it down without it (scMercuryLighthouseAerieAlexAppears).

References fdPsynergyEnd(), fdPsynergyLoadResources(), fdPsynergyRunHandler(), fdPsynergySetupActorPair(), fdPsynergyStartCast() and fdPsynergyStopCasterUpdate().

Definition at line 1992 of file mercury_lighthouse_aerie.c.

scMercuryLighthouseAerieUpdateBeaconSpark

static void scMercuryLighthouseAerieUpdateBeaconSpark(ACTOR *spark)

A beacon spark's update, which swings it round the beacon it watches.

References syCos() and sySin().

Referenced by scMercuryLighthouseAerieFlickerBeacon().

Definition at line 2014 of file mercury_lighthouse_aerie.c.

Variables in detail

MercuryLighthouseAerieEntrances

extern SCENE_ENTRANCE MercuryLighthouseAerieEntrances[]

SCENE_ENTRANCE MercuryLighthouseAerieEntrances[]

Referenced by scGetEntrances().

Definition at lines 97 and 2106 of file mercury_lighthouse_aerie.c.

MercuryLighthouseAerieExits

extern Uint32 MercuryLighthouseAerieExits[]

Uint32 MercuryLighthouseAerieExits[]

Referenced by scGetExits().

Definition at lines 98 and 2141 of file mercury_lighthouse_aerie.c.

MercuryLighthouseAerieActorPlacements

extern ACTOR_PLACE MercuryLighthouseAerieActorPlacements[]

ACTOR_PLACE MercuryLighthouseAerieActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 99 and 2150 of file mercury_lighthouse_aerie.c.

MercuryLighthouseAerieCues

extern CUE MercuryLighthouseAerieCues[]

CUE MercuryLighthouseAerieCues[]

References scMercuryLighthouseAerieCallLift(), scMercuryLighthouseAerieConfrontSaturos(), scMercuryLighthouseAerieFloatPlatforms(), scMercuryLighthouseAerieJumpToNextPlatform(), scMercuryLighthouseAerieLandOnPlatform() and scMercuryLighthouseAerieRideLiftDown().

Referenced by scGetCues().

Definition at lines 100 and 2197 of file mercury_lighthouse_aerie.c.

MercuryLighthouseAerieLandedPlatform

extern Sint32 MercuryLighthouseAerieLandedPlatform

Sint32 MercuryLighthouseAerieLandedPlatform

The floating platform the leader has landed on, 0 when none.

References Sint32.

Referenced by scMercuryLighthouseAerieLandOnPlatform().

Definition at lines 101 and 2226 of file mercury_lighthouse_aerie.c.

FieldEffectDurationScripts

const Sint32 *FieldEffectDurationScripts[]

References FieldEffectLongScript, FieldEffectMediumScript, FieldEffectShortScript and Sint32.

Definition at line 2100 of file mercury_lighthouse_aerie.c.