Alchemy
Loading...
Searching...
No Matches

mercury_lighthouse_aerie.c File Reference

Mercury Lighthouse's aerie: the platforms the leader jumps between, the party's arrival and the confrontation with Saturos and Menardi, the battle with Saturos, and Alex's scene after it. More...

Go to the source code of this file.

Data Structures

struct  ActorTable
 The event work, seen for its table of the scene's 66 actor slots. More...
struct  BeaconSpark
 A spark the beacon flame throws off, swinging round the flame on its arc. More...

Macros

#define NULL   ((void *)0)

Enumerations

enum  MercuryLighthouseAerieActor {
  ACTOR_BEACON_FLAME = ACTOR_FIRST_PLACED , ACTOR_LIFT_STATUE , ACTOR_FIRST_PLATFORM = ACTOR_FIRST_PLACED + 6 , ACTOR_LIFT_PLATFORM_1 = ACTOR_FIRST_PLATFORM + 3 ,
  ACTOR_LIFT_PLATFORM_2 , ACTOR_KRADEN = ACTOR_FIRST_PLACED + 12 , ACTOR_FELIX , ACTOR_SATUROS ,
  ACTOR_MENARDI , ACTOR_ALEX
}
 The aerie's actors. More...
enum  { FLAG_ON_PLATFORM = FLAG_SCENE_TEMP_50 , FLAG_LIFT_UP = FLAG_SCENE_TEMP_00 + 0x51 , FLAG_HOSTAGES_GONE = FLAG_SCENE_TEMP_00 + 0x53 }
 Scene flags, kept while the party stays on the aerie. More...
enum  { FLAG_PSYNERGY_STONE = 0x350 }

Functions

static void MercuryLighthouseAerie_PartyArrives (void)
 Entrance 1, unless resuming: the Adepts of lit elements regain their PP; the aerie shakes, the camera pans across and in a flash the party stands at the top.
static void MercuryLighthouseAerie_SettlePlatforms (void)
 Touching trigger 11: the leader walks normally again and the platforms stop following.
static void MercuryLighthouseAerie_AlexAppears (void)
 Entrance 2, back from the battle, unless resuming: Saturos is beaten, but not for long.
static void MercuryLighthouseAerie_SaturosAndAlexWarpOut (void)
 Saturos and Alex warp out in a column of sparkles and vanish.
static void MercuryLighthouseAerie_SaturosAndAlexWarpIn (void)
 Saturos and Alex warp in where they have been placed.
static void MercuryLighthouseAerie_LowerLift (void)
 The lift sinks with everything standing on it, speeding up.
static void MercuryLighthouseAerie_RaiseLift (void)
 The lift rises with everything standing on it, slowing at the top.
static void MercuryLighthouseAerie_FlickerBeacon (void)
 Every frame: while the view is near the top the beacon flame flickers between two sizes, and every 16 frames it throws off a spark that swings round it.
const struct SceneEntrance * MercuryLighthouseAerie_GetEntrances (void)
const struct SceneRegion * MercuryLighthouseAerie_GetRegions (void)
const u32 * MercuryLighthouseAerie_GetExits (void)
 One exit: the lift down to the lighthouse's foot.
const struct ScenePlacement * MercuryLighthouseAerie_GetPlacements (void)
 The actors; only the first arrival places Jenna, Kraden, Felix and Menardi.
const struct SceneEvent * MercuryLighthouseAerie_GetEvents (void)
s32 MercuryLighthouseAerie_Initialize (void)
 On arriving: the beacon flickers and the six platforms sit 50 pixels down; the first arrival (entrance 1) plays the party's arrival, the return from the Saturos battle (entrance 2) Alex's scene, and arriving by the lift (entrance 5) leaves the lift up.
static void MercuryLighthouseAerie_JumpToPlatform (void)
 Walking into trigger 10 or 11: if nothing is in the way the leader jumps two cells ahead, off any platform and onto the next.
static void MercuryLighthouseAerie_StepOntoPlatform (void)
 Touching trigger 10 when not already on one: the platform underfoot dips with the leader and bobs back up.
static void MercuryLighthouseAerie_ConfrontSaturos (void)
 Touching trigger 5 before the confrontation: Garet sees the lighthouse is lit.
static void MercuryLighthouseAerie_CallLift (void)
 Touching trigger 6 while the lift is down: the camera watches it rise with its statue.
static void MercuryLighthouseAerie_RideLiftDown (void)
 Touching trigger 12: the leader steps onto the lift and rides it down to the lighthouse's foot (exit 1).
static void MercuryLighthouseAerie_FindLiftRiders (s32 *out, s32 y)
 MercuryLighthouseAerie_LowerLift passes its lift as a third argument, which this function does not take.
static UNUSED void MercuryLighthouseAerie_AlexCastsPly (void)
 Alex casts Ply on the statue; nothing calls it.
static void SceneEffect_UpdateArcPosition (union FieldObject *fieldObject)
 A beacon spark's update: it swings round the flame, its angle stepping back each frame.

Variables

s32 gEffectScript0 []
s32 gEffectScript1 []
s32 gEffectScript2 []
const s32 * gEffectScripts []
struct SceneEntrance gMercuryLighthouseAerieEntrances []
u32 gMercuryLighthouseAerieExits []
struct ScenePlacement gMercuryLighthouseAeriePlacements []
struct SceneEvent gMercuryLighthouseAerieEvents []
s32 gMercuryLighthouseAerie_PlatformUnderfoot = 0
s32 gMercuryLighthouseAerie_SparkScript []

Detailed Description

Mercury Lighthouse's aerie: the platforms the leader jumps between, the party's arrival and the confrontation with Saturos and Menardi, the battle with Saturos, and Alex's scene after it.

Definition in file mercury_lighthouse_aerie.c.

Macro Definition Documentation

◆ NULL

#define NULL   ((void *)0)

Definition at line 81 of file mercury_lighthouse_aerie.c.

Enumeration Type Documentation

◆ MercuryLighthouseAerieActor

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 table 36, slot 2.

Enumerator
ACTOR_BEACON_FLAME 

flickers and sheds sparks

ACTOR_LIFT_STATUE 
ACTOR_FIRST_PLATFORM 

six, sprite 0xf2

ACTOR_LIFT_PLATFORM_1 

The two platforms that stand on the lift and go up and down with it.

ACTOR_LIFT_PLATFORM_2 
ACTOR_KRADEN 
ACTOR_FELIX 
ACTOR_SATUROS 
ACTOR_MENARDI 
ACTOR_ALEX 

Definition at line 46 of file mercury_lighthouse_aerie.c.

◆ anonymous enum

anonymous enum

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

Enumerator
FLAG_ON_PLATFORM 

The leader stands on a platform, which has dipped under the weight.

FLAG_LIFT_UP 
FLAG_HOSTAGES_GONE 

Set on every arrival but the first: Jenna, Kraden, Felix and Menardi are placed only before it.

Definition at line 61 of file mercury_lighthouse_aerie.c.

◆ anonymous enum

anonymous enum
Enumerator
FLAG_PSYNERGY_STONE 

Definition at line 70 of file mercury_lighthouse_aerie.c.

Function Documentation

◆ MercuryLighthouseAerie_PartyArrives()

void MercuryLighthouseAerie_PartyArrives ( void )
static

Entrance 1, unless resuming: the Adepts of lit elements regain their PP; the aerie shakes, the camera pans across and in a flash the party stands at the top.

Isaac shakes his head and the others gather on him.

Definition at line 195 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_Initialize(), and MercuryLighthouseAerie_PartyArrives().

◆ MercuryLighthouseAerie_SettlePlatforms()

void MercuryLighthouseAerie_SettlePlatforms ( void )
static

Touching trigger 11: the leader walks normally again and the platforms stop following.

Definition at line 367 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_JumpToPlatform(), and MercuryLighthouseAerie_SettlePlatforms().

◆ MercuryLighthouseAerie_AlexAppears()

void MercuryLighthouseAerie_AlexAppears ( void )
static

Entrance 2, back from the battle, unless resuming: Saturos is beaten, but not for long.

"Isaac, we got him!" Alex appears and explains that the lighthouse bound Saturos' fire Psynergy and lent Mia endless power. Saturos stands again; the two warp over to the lift and ride it down, and the party regroups on the leader.

Definition at line 816 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_AlexAppears(), and MercuryLighthouseAerie_Initialize().

◆ MercuryLighthouseAerie_SaturosAndAlexWarpOut()

void MercuryLighthouseAerie_SaturosAndAlexWarpOut ( void )
static

Saturos and Alex warp out in a column of sparkles and vanish.

Definition at line 1404 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_AlexAppears(), and MercuryLighthouseAerie_SaturosAndAlexWarpOut().

◆ MercuryLighthouseAerie_SaturosAndAlexWarpIn()

void MercuryLighthouseAerie_SaturosAndAlexWarpIn ( void )
static

Saturos and Alex warp in where they have been placed.

Definition at line 1461 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_AlexAppears(), and MercuryLighthouseAerie_SaturosAndAlexWarpIn().

◆ MercuryLighthouseAerie_LowerLift()

void MercuryLighthouseAerie_LowerLift ( void )
static

◆ MercuryLighthouseAerie_RaiseLift()

void MercuryLighthouseAerie_RaiseLift ( void )
static

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

Definition at line 1584 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_AlexAppears(), MercuryLighthouseAerie_CallLift(), and MercuryLighthouseAerie_RaiseLift().

◆ MercuryLighthouseAerie_FlickerBeacon()

void MercuryLighthouseAerie_FlickerBeacon ( void )
static

Every frame: while the view is near the top the beacon flame flickers between two sizes, and every 16 frames it throws off a spark that swings round it.

Definition at line 1669 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_FlickerBeacon(), and MercuryLighthouseAerie_Initialize().

◆ MercuryLighthouseAerie_GetEntrances()

const struct SceneEntrance * MercuryLighthouseAerie_GetEntrances ( void )

Definition at line 94 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_GetEntrances().

◆ MercuryLighthouseAerie_GetRegions()

const struct SceneRegion * MercuryLighthouseAerie_GetRegions ( void )

Definition at line 98 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_GetRegions().

◆ MercuryLighthouseAerie_GetExits()

const u32 * MercuryLighthouseAerie_GetExits ( void )

One exit: the lift down to the lighthouse's foot.

Definition at line 101 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_GetExits().

◆ MercuryLighthouseAerie_GetPlacements()

const struct ScenePlacement * MercuryLighthouseAerie_GetPlacements ( void )

The actors; only the first arrival places Jenna, Kraden, Felix and Menardi.

Definition at line 106 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_GetPlacements().

◆ MercuryLighthouseAerie_GetEvents()

const struct SceneEvent * MercuryLighthouseAerie_GetEvents ( void )

Definition at line 113 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_GetEvents().

◆ MercuryLighthouseAerie_Initialize()

s32 MercuryLighthouseAerie_Initialize ( void )

On arriving: the beacon flickers and the six platforms sit 50 pixels down; the first arrival (entrance 1) plays the party's arrival, the return from the Saturos battle (entrance 2) Alex's scene, and arriving by the lift (entrance 5) leaves the lift up.

Definition at line 121 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_Initialize().

◆ MercuryLighthouseAerie_JumpToPlatform()

void MercuryLighthouseAerie_JumpToPlatform ( void )
static

Walking into trigger 10 or 11: if nothing is in the way the leader jumps two cells ahead, off any platform and onto the next.

Definition at line 294 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_JumpToPlatform().

◆ MercuryLighthouseAerie_StepOntoPlatform()

void MercuryLighthouseAerie_StepOntoPlatform ( void )
static

Touching trigger 10 when not already on one: the platform underfoot dips with the leader and bobs back up.

Definition at line 328 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_StepOntoPlatform().

◆ MercuryLighthouseAerie_ConfrontSaturos()

void MercuryLighthouseAerie_ConfrontSaturos ( void )
static

Touching trigger 5 before the confrontation: Garet sees the lighthouse is lit.

"It's too late! The lighthouse has already been lit!" Mia learns the party is from Vale; Jenna calls out, and Felix, Menardi and Saturos face the party. Menardi leaves with Jenna, Kraden and Felix for the next lighthouse, and Saturos fights alone (encounter table 36, slot 2).

Definition at line 382 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_ConfrontSaturos().

◆ MercuryLighthouseAerie_CallLift()

void MercuryLighthouseAerie_CallLift ( void )
static

Touching trigger 6 while the lift is down: the camera watches it rise with its statue.

Definition at line 1360 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_CallLift().

◆ MercuryLighthouseAerie_RideLiftDown()

void MercuryLighthouseAerie_RideLiftDown ( void )
static

Touching trigger 12: the leader steps onto the lift and rides it down to the lighthouse's foot (exit 1).

Definition at line 1390 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_RideLiftDown().

◆ MercuryLighthouseAerie_FindLiftRiders()

void MercuryLighthouseAerie_FindLiftRiders ( s32 * out,
s32 y )
static

MercuryLighthouseAerie_LowerLift passes its lift as a third argument, which this function does not take.

Definition at line 1523 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_FindLiftRiders(), MercuryLighthouseAerie_LowerLift(), and MercuryLighthouseAerie_RaiseLift().

◆ MercuryLighthouseAerie_AlexCastsPly()

UNUSED void MercuryLighthouseAerie_AlexCastsPly ( void )
static

Alex casts Ply on the statue; nothing calls it.

Definition at line 1625 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_AlexCastsPly().

◆ SceneEffect_UpdateArcPosition()

void SceneEffect_UpdateArcPosition ( union FieldObject * fieldObject)
static

A beacon spark's update: it swings round the flame, its angle stepping back each frame.

Definition at line 1636 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_FlickerBeacon(), and SceneEffect_UpdateArcPosition().

Variable Documentation

◆ gEffectScript0

s32 gEffectScript0[]
Initial value:
= {
SC_WAIT(1), SC_LOOP(22, SC_TOP), SC_WAIT(1),
SC_POS(0, 0, 0), SC_WAIT(1), SC_FREE,
}
#define SC_LOOP(n, to)
Repeat up to n times.
Definition objcmd.h:28
#define SC_POS(x, y, z)
Set position.
Definition objcmd.h:18
#define SC_FREE
Release.
Definition objcmd.h:43
#define SC_WAIT(n)
Wait n frames.
Definition objcmd.h:16
#define SC_TOP
Script start.
Definition objcmd.h:13

Definition at line 1729 of file mercury_lighthouse_aerie.c.

◆ gEffectScript1

s32 gEffectScript1[]
Initial value:
= {
SC_WAIT(1), SC_LOOP(44, SC_TOP), SC_WAIT(1),
SC_POS(0, 0, 0), SC_WAIT(1), SC_FREE,
}

Definition at line 1734 of file mercury_lighthouse_aerie.c.

◆ gEffectScript2

s32 gEffectScript2[]
Initial value:
= {
SC_WAIT(1), SC_LOOP(126, SC_TOP), SC_WAIT(1),
SC_POS(0, 0, 0), SC_WAIT(1), SC_FREE,
}

Definition at line 1739 of file mercury_lighthouse_aerie.c.

◆ gEffectScripts

const s32* gEffectScripts[]
Initial value:
= {
}
s32 gEffectScript0[]
s32 gEffectScript1[]
s32 gEffectScript2[]

Definition at line 1744 of file mercury_lighthouse_aerie.c.

◆ gMercuryLighthouseAerieEntrances

struct SceneEntrance gMercuryLighthouseAerieEntrances[]
Initial value:
= {
{0, CONDITION_ALWAYS, 172, 0, 149, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{1, CONDITION_ALWAYS, 8, 0, 8, FACING_SOUTH, 0, 0, 0, 608, 424, 0},
{2, CONDITION_ALWAYS, 8, 0, 8, FACING_SOUTH, 0, 0, 0, 608, 424, 0},
{5, CONDITION_ALWAYS, 504, 0, 152, FACING_SOUTH, 0, 0, 0, 608, 424, 0},
{51, CONDITION_ALWAYS, 504, 0, 168, FACING_SOUTH, 0, 0, 0, 608, 424, 0},
}
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44
@ FACING_SOUTH
Definition field_scene.h:28

Definition at line 1750 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_GetEntrances().

◆ gMercuryLighthouseAerieExits

u32 gMercuryLighthouseAerieExits[]
Initial value:
= {
SCENE_EXIT(1, 57, 15),
}
#define SCENE_EXITS(scene)
Definition field_scene.h:72
#define SCENE_EXIT(exit, scene, entrance)
Definition field_scene.h:73
#define SCENE_EXITS_END
Definition field_scene.h:77

Definition at line 1759 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_GetExits().

◆ gMercuryLighthouseAeriePlacements

struct ScenePlacement gMercuryLighthouseAeriePlacements[]

Definition at line 1766 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_GetPlacements().

◆ gMercuryLighthouseAerieEvents

struct SceneEvent gMercuryLighthouseAerieEvents[]
Initial value:
= {
}
#define SCENE_EVENTS_END
@ EVENT_TOUCH
#define FIND_PSYNERGY_STONE
#define EVENT_SCRIPT(script)
#define SEARCH(target)
#define TOUCH_WALKING
@ SEARCH_UNNAMED
#define FLAG_MERCURY_AERIE_CONFRONTATION_DONE
The aerie's confrontation with Saturos, the battle and Alex's visit are over; set with FLAG_SATUROS_B...
Definition flags.h:355
static void MercuryLighthouseAerie_ConfrontSaturos(void)
Touching trigger 5 before the confrontation: Garet sees the lighthouse is lit.
@ FLAG_ON_PLATFORM
The leader stands on a platform, which has dipped under the weight.
static void MercuryLighthouseAerie_RideLiftDown(void)
Touching trigger 12: the leader steps onto the lift and rides it down to the lighthouse's foot (exit ...
@ FLAG_PSYNERGY_STONE
static void MercuryLighthouseAerie_SettlePlatforms(void)
Touching trigger 11: the leader walks normally again and the platforms stop following.
static void MercuryLighthouseAerie_JumpToPlatform(void)
Walking into trigger 10 or 11: if nothing is in the way the leader jumps two cells ahead,...
static void MercuryLighthouseAerie_CallLift(void)
Touching trigger 6 while the lift is down: the camera watches it rise with its statue.
static void MercuryLighthouseAerie_StepOntoPlatform(void)
Touching trigger 10 when not already on one: the platform underfoot dips with the leader and bobs bac...

Definition at line 1813 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_GetEvents().

◆ gMercuryLighthouseAerie_PlatformUnderfoot

s32 gMercuryLighthouseAerie_PlatformUnderfoot = 0

◆ gMercuryLighthouseAerie_SparkScript

s32 gMercuryLighthouseAerie_SparkScript[]
Initial value:
= {
SC_SET(SW_SCALE_Y, 0x16666),
SC_SET(SW_SCALE_X, 0x16666),
SC_ARG(4),
SC_WAIT(30),
}
#define SC_SET(w, v)
Write a work value.
Definition objcmd.h:37
#define SC_ARG(v)
Definition objcmd.h:44
@ SW_SCALE_Y
Definition objcmd.h:63
@ SW_SCALE_X
Definition objcmd.h:62

Definition at line 1834 of file mercury_lighthouse_aerie.c.

Referenced by MercuryLighthouseAerie_FlickerBeacon().