src/scene/mercury_lighthouse_aerie.c
Lighthouse Aerie (SceneIdMercuryLighthouseAerie), the top of Mercury Lighthouse, where its beacon burns. More…
#include "ability_ids.h"#include "flags.h"#include "macros.h"#include "battle/battle.h"#include "debug/debug.h"#include "field/script.h"#include "field/map_grid.h"#include "graphics/graphics.h"#include "scene/sparkle_warp.h"#include "game/system_call.h"#include "text/msg_ids.h"#include "shared/field_effect_create.c"#include "shared/field_effect_spawn.c"#include "shared/position_distance.c"#include "shared/floating_platform.c"#include "shared/field_effect_duration_scripts.c"#include "shared/beacon_spark_script.c"
Macros
| Name | Description | |
|---|---|---|
#define | LIFT_DOWN_TICKS 228 | How long the lift takes to sink, speeding up every fourth tick. |
#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. |
#define | LIFT_SLOWING_TICKS 10 | |
#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. |
#define | SPARK_ORBIT_BULGE 24 | |
#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. |
Enumerations
| Name | Description | |
|---|---|---|
enum | MERCURY_LIGHTHOUSE_AERIE_METATILE_BEHAVIOR { METATILE_BEHAVIOR_BEACON_STAIRS, METATILE_BEHAVIOR_LIFT_LAND … } | The metatile behaviors the aerie's cues answer. |
enum | MERCURY_LIGHTHOUSE_AERIE_ACTOR_ID { ACTOR_BEACON, ACTOR_LIFT_STATUE, ACTOR_FIRST_BEACON_STATUE, … } | The aerie's actors. |
enum | MERCURY_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. |
enum | anonymous enum { FLAG_ON_PLATFORM, FLAG_LIFT_UP, FLAG_HOSTAGES_GONE } | Scene flags, kept while the party stays on the aerie. |
enum | anonymous enum { FLAG_PSYNERGY_STONE } | The aerie's Psynergy Stone. |
Functions
| Name | Description | |
|---|---|---|
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. |
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). |
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. |
static void | scMercuryLighthouseAerieSaturosAndAlexWarpOut (void) | Saturos and Alex vanish in a column of sparkles. |
static void | scMercuryLighthouseAerieSaturosAndAlexWarpIn (void) | Saturos and Alex appear in a column of sparkles where they have been placed. |
static void | scMercuryLighthouseAerieLowerLift (void) | The lift sinks with everything standing on it, speeding up. |
static void | scMercuryLighthouseAerieRaiseLift (void) | The lift rises with everything standing on it, slowing at the top. |
static void | scMercuryLighthouseAerieFlickerBeacon (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. |
Sint32 | scInit (void) | Sets up the Lighthouse Aerie, then plays the script of the entrance taken. |
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. |
static void | scMercuryLighthouseAerieLandOnPlatform (void) | Landing on one of the floating platforms makes it dip under Isaac and spring back up. |
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. |
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. |
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. |
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. |
static void | scMercuryLighthouseAerieUnusedAlexCastsPly (void) | Unused: Alex casts Ply on the lift's statue. |
static void | scMercuryLighthouseAerieUpdateBeaconSpark (ACTOR *spark) | A beacon spark's update, which swings it round the beacon it watches. |
Variables
| Name | Description | |
|---|---|---|
extern SCENE_ENTRANCE | MercuryLighthouseAerieEntrances [] | |
extern Uint32 | MercuryLighthouseAerieExits [] | |
extern ACTOR_PLACE | MercuryLighthouseAerieActorPlacements [] | |
extern CUE | MercuryLighthouseAerieCues [] | |
extern Sint32 | MercuryLighthouseAerieLandedPlatform | The floating platform the leader has landed on, 0 when none. |
extern Sint32 | BeaconSparkScript [] | 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.
- The arrival (
MERCURY_LIGHTHOUSE_AERIE_AFTER_BEACON_LIT,scMercuryLighthouseAeriePartyArrives). The Adepts of the lit element regain their PP, the aerie shakes, and in a white flash the party lies on the east tower top. They get up and gather round Isaac. - The beacon (
scMercuryLighthouseAerieConfrontSaturos). Climbing the stairs to it, Garet seesIt's too late! The lighthouse has already been lit!Mia learns that the party came from Vale to recover the Elemental Stars, and that Vale protected Sol Sanctum as her clan protects the lighthouse. Jenna calls out from the west tower top, where Kraden, Felix and Menardi hold her. Saturos sends Menardi on to the next lighthouse with the others, and Menardi leaps onto the lift, which sinks with them. Saturos fights the party alone (ENCOUNTER_ZONE_SCRIPTED_TRET_MERCURY, slot 2), the light of Mercury weakening his Psynergy. - Back from the battle (
MERCURY_LIGHTHOUSE_AERIE_AFTER_SATUROS_BATTLE,scMercuryLighthouseAerieAlexAppears):Isaac, we got him!Alex, the apprentice Mia lost, appears. He explains that Saturos, aligned with Mars, the clan of fire, had his power bound by the lighthouse's water, which lent Mia, of the Mercury Clan like Alex, endless Psynergy. Alex was only stalling until Saturos recovered. Saturos rises, Alex asks whether the party still holds the Mars Star, and the two vanish in sparkles, reappear on the lift and ride it down. Mia means to go with the party, since with the lighthouse lit the fountain will run over with healing water again (FLAG_MERCURY_LIGHTHOUSE_AERIE_ALEX_APPEARED, andFLAG_SATUROS_BEATEN_AT_MERCURY, which Imil, Bilibin and the lighthouse test). - Leaving. The stairs on the west side of the beacon's tower bring the
lift back up if it is down, and stepping onto it from the
westmost platform rides it down to the ground before Mercury
Lighthouse, by the Fountain of Healing (
SceneIdMercuryLighthouseExterior,mercury_lighthouse.c). Coming up that way (MERCURY_LIGHTHOUSE_AERIE_FROM_MERCURY_LIGHTHOUSE_EXTERIOR) leaves the lift up.
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.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_BEACON_STAIRS | 5 | The stairs up to the beacon, metatiles (20, 14) and (21, 14). |
METATILE_BEHAVIOR_LIFT_LANDING | 6 | The stairs on the west side of the beacon's tower, metatile (12, 9), from which the lift is called up. |
METATILE_BEHAVIOR_PLATFORM | 10 | The six floating platforms. |
METATILE_BEHAVIOR_PLATFORM_EDGE | 11 | The ground beside the platforms: the foot of the stairs either side of the beacon's tower and the east tower top. |
METATILE_BEHAVIOR_LIFT | 12 | The lift's floor, metatile (6, 10), stepped onto from the westmost platform. |
METATILE_BEHAVIOR_PSYNERGY_STONE | 100 | Where 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.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_BEACON | ACTOR_FIRST_PLACED | Flickers between two sizes and sheds sparks while in view (scMercuryLighthouseAerieFlickerBeacon). |
ACTOR_LIFT_STATUE | The statue on the lift, the west tower top. It rides up and down with it. | |
ACTOR_FIRST_BEACON_STATUE | Four 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_PLATFORM | ACTOR_FIRST_PLACED + 6 | The six floating platforms, three in each gap between the towers. |
ACTOR_FIRST_LIFT_PLATFORM | ACTOR_FIRST_PLATFORM + 3 | The two platforms that stand on the lift and go up and down with it. |
ACTOR_SECOND_LIFT_PLATFORM | ||
ACTOR_KRADEN | ACTOR_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.
| Enumerator | Value | Description |
|---|---|---|
ANIM_MIA_HEAD_BOWED | 16 | Mia 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.
| Enumerator | Value | Description |
|---|---|---|
FLAG_ON_PLATFORM | FLAG_SCENE_TEMP(0x50) | The leader stands on a |
FLAG_LIFT_UP | FLAG_SCENE_TEMP(0x51) | platform, which has dipped under the weight. |
FLAG_HOSTAGES_GONE | FLAG_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.
| Enumerator | Value | Description |
|---|---|---|
FLAG_PSYNERGY_STONE | FLAG_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.
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.