Alchemy
Loading...
Searching...
No Matches

mercury_lighthouse.c File Reference

Mercury Lighthouse, in four maps. More...

Go to the source code of this file.

Macros

#define MERCURY_LIGHTHOUSE_MOVE_LEADER_TO_ENTRY   Actor_MoveToAndWait
#define MERCURY_LIGHTHOUSE_ANIMATE_ACTOR_AND_WAIT   ((s32 (*)())Engine_ActorSetAnimationAndWait)
#define NULL   ((void *)0)
#define MERCURY_LIGHTHOUSE_OFFSET_FIXED(value)
#define DIRECTION_STEP(dx, dz)
 Pixel step by direction: X in the upper halfword, Z in the lower.

Enumerations

enum  MercuryLighthouse1Actor { ACTOR_STATUE_BLOCKING_MIA = ACTOR_FIRST_PLACED , ACTOR_CHANNEL_BLOCK_1 , ACTOR_CHANNEL_BLOCK_2 , ACTOR_CHANNEL_BLOCK_3 }
 The first map: Mia, the statue that blocks her and the channel blocks. More...
enum  MercuryLighthouse2Actor { ACTOR_STAIR_BLOCK = ACTOR_FIRST_PLACED , ACTOR_FOUNTAIN_BLOCK = ACTOR_FIRST_PLACED + 2 , ACTOR_GATE_STATUE , ACTOR_SLEET }
 The second map: the stair and fountain blocks, the statue for the gate's floor switch and Sleet, Mercury Djinni 1. More...
enum  MercuryLighthouse3Actor {
  ACTOR_FALLEN_STATUE = ACTOR_FIRST_PLACED , ACTOR_SLIDING_STATUE , ACTOR_DOOR_ROOM_BLOCK , ACTOR_DOOR_SWITCH_BLOCK ,
  ACTOR_FIRST_CROSSING_BLOCK = ACTOR_FIRST_PLACED + 7 , ACTOR_LAST_CROSSING_BLOCK = ACTOR_FIRST_CROSSING_BLOCK + 4 , ACTOR_GAP_BLOCK
}
 The third map: the sliding statue and where it lands below, the blocks of the stone-door room, the five blocks of the crossing and one more. More...
enum  MercuryLighthouse4Actor {
  ACTOR_DOOR_STATUE = ACTOR_FIRST_PLACED + 2 , ACTOR_PLY_TARGET , ACTOR_WATERFALL_STATUE , ACTOR_LIFT_STATUE ,
  ACTOR_FIRST_VISITOR
}
 The fourth map: Garet, Ivan and Mia in their own party slots, the statue at the door, the Ply target, the statue by the waterfall, the statue on the lift and the people at the fountain. More...
enum  {
  FLAG_STAIRS_RAISED = 0x302 , FLAG_FOUNTAIN_RUNNING = 0x306 , FLAG_FOUNTAIN_SHOWN = 0x307 , FLAG_CHANNEL_1_OPEN = 0x310 ,
  FLAG_CHANNEL_2_OPEN = 0x311 , FLAG_CHANNEL_3_OPEN = 0x312 , FLAG_CHANNEL_313 = 0x313 , FLAG_DOOR_ROOM_BLOCK_PUSHED = 0x318 ,
  FLAG_DOOR_SWITCH_BLOCK_AT_47 = 0x319 , FLAG_DOOR_SWITCH_BLOCK_AT_48 = 0x31a , FLAG_DOOR_SWITCH_BLOCK_AT_53 = 0x31b , FLAG_FIRST_CROSSING_BLOCK = 0x330 ,
  FLAG_LAST_CROSSING_BLOCK_WEST = 0x338 , FLAG_LAST_CROSSING_BLOCK_EAST = 0x339 , FLAG_GAP_BLOCK_PLACED = 0x348
}
 Puzzle states kept until the party leaves the lighthouse. More...
enum  { FLAG_HERMES_WATER_TAKEN = FLAG_SCENE_TEMP_00 , FLAG_LEADER_ON_FLOOR_SWITCH = FLAG_SCENE_TEMP_00 + 0x56 }
 Scene flags, kept while the party stays on the map. More...
enum  { FLAG_CHEST_SLEEP_BOMB = 0xf64 , FLAG_CHEST_PSY_CRYSTAL = 0xf66 , FLAG_CHEST_NUT = 0xf67 }
 The chests: a Sleep Bomb, a Psy Crystal and a Nut. More...

Functions

static void MercuryLighthouse_OpenGateWithMovedBlock (void)
 Move on the gate statue, or after a push: resting on the floor switch at (5, 13), it sinks two pixels and the gate opens for good.
static void MercuryLighthouse_OpenStairGateWithMovedBlock (void)
 Move on the fallen statue, or after a push: resting on the switch at (10, 23), it sinks two pixels and the stair gate opens for good.
static void MercuryLighthouse_SyncBlockFlags (void)
 Move on a crossing block, or after a push: each block's column is saved in its pair of flags, and the last opens the crossing at column 57 or 59.
static void SceneEffect_SpawnParticleRowsAndDrawTiles (void)
 Reveals the stair's map rows with particles along their edges.
static void MercuryLighthouse_OpenThreeStepStair (void)
 Restores the stair tiles in three particle-covered steps.
static void SceneEffect_SpawnParticleEveryFourthFrame (void)
 Emits particles around the leader once every four frames.
static void SceneEffect_SpawnRandomEveryFourFrames (s32 x, s32 y, s32 z)
 Emits particles at a fixed point once every four frames.
static void SceneEffect_SpawnWithRandomOffset (s32 x, s32 y, s32 z)
 Emits a stationary particle near the supplied position.
static void SceneEffect_SpawnRandomizedBurst (s32 x, s32 y, s32 z, s32 angle)
 Emits a short burst with velocities spreading along the supplied angle.
static void MercuryLighthouse_RideLift (void)
 Entrance 15 at the foot: the leader rides the lift up beside its statue, hops off onto the landing, and the lift goes back down.
static void MercuryLighthouse_MiaCastsPlyOnEntrance (void)
 Mia casts Ply on the Ply target, moved onto the door.
static void MercuryLighthouse_ReplaceInventoryItem (s32 oldItem, s32 newItem)
 Replaces one inventory item in the owner and slot that contain it.
static void MercuryLighthouse_StartDjinnBattle (void)
 Talking to Sleet: the Djinni battle (Djinni 21, Mercury Djinni 1).
const struct SceneEntrance * MercuryLighthouse_GetEntrances (void)
const struct SceneRegion * MercuryLighthouse_GetRegions (void)
const u32 * MercuryLighthouse_GetExits (void)
 Returns the packed exits shared by the lighthouse scenes.
const struct ScenePlacement * MercuryLighthouse_GetPlacements (void)
 Selects the actors and obstacles for the current lighthouse scene.
static void MercuryLighthouse_SpawnTimedRiseEffect (void)
 On the first map, as in the entrance hall, once Ply has worked there: touching trigger 21 keeps rising sparks appearing on the pillar.
static void MercuryLighthouse_ReleaseRaisedPillar (void)
 Touching trigger 31 or 32: the raised pillar is let go.
static void MercuryLighthouse_TryPillarStep (void)
 Walking into trigger 11, 21 or 31: one step across the water pillars.
static void MercuryLighthouse_RaiseTouchedPillar (void)
 Touching trigger 11: the pillar underfoot rises to its full height.
static void MercuryLighthouse_InspectBlockedPassage (void)
 Searching trigger 10 at the lighthouse's foot.
const struct SceneEvent * MercuryLighthouse_GetEvents (void)
 Selects the puzzle interactions and dialogue for the current scene.
static void MercuryLighthouse_ExitWithSparks (void)
 Walking north into trigger 53 on the third map: the leader rises through exit 3 (the trigger less 50), as the entrance hall's risers do.
static void MercuryLighthouse_ExitAfterSparkStep (void)
 Walking north into trigger 63 on the third map: the same, through exit 13.
static void MercuryLighthouse_LeaveWithSparkTrail (void)
 Walking north into trigger 55 at the foot: the same, through exit 5.
static void MercuryLighthouse_ExitWhenChannelsOpen (void)
 With all three channel blocks in place the floor shakes, the screen fades and the party is carried down to the entrance hall (exit 13); moving one out again clears the flag.
static void MercuryLighthouse_MoveChannelBlocks (void)
 Pushing a channel block (walking into trigger 25) on the first map: each block opens one channel when it reaches its place, and the water runs on through the ones before it.
static void MercuryLighthouse_WalkLeaderIn (void)
 Touching trigger 2, 3 or 4 once the stairs are raised, or 46: the leader is carried to the landing in a trail of sparkles.
static void MercuryLighthouse_PushGateSwitchBlock (void)
 Pushing the gate statue (walking into trigger 10) while the gate is shut: it moves a step, and may come to rest on the floor switch.
static void MercuryLighthouse_PressGateFloorSwitch (void)
 Touching trigger 12 while the gate is shut: standing on the floor switch sinks the leader two pixels and opens the gate.
static void MercuryLighthouse_CloseFloorSwitch (void)
 Touching trigger 10 or 13: stepping off the switch closes the gate again.
static void MercuryLighthouse_AnimateFountainTiles (s32 delayFrames, s32 firstStep, s32 endStep)
 Animates the fountain's map strips between the requested steps.
static void MercuryLighthouse_RestoreFountainTiles (s32 delayFrames)
 Restores the fountain's map strips after moving its block away.
static void MercuryLighthouse_SprayAtFountain (void)
 Emits the scheduled spray at the fountain's fixed position.
static void MercuryLighthouse_OpenFountainWithSpray (s32 delayFrames)
 Opens the fountain row by row and starts its continuous spray.
static void MercuryLighthouse_StopFountainSpray (void)
 Restores the fountain tiles and stops its continuous spray.
static void MercuryLighthouse_MoveStairAndFountainBlocks (void)
 Pushing a block on the second map (walking into trigger 1 or 45): the stair block raises the stairs at column 11 and lowers them anywhere else; the fountain block starts the fountain at row 40, the first time with the camera watching, and stops it at row 42.
static void MercuryLighthouse_PushStairSwitchBlock (void)
 Pushing the fallen statue (walking into trigger 10 or 12) while the stair gate is shut: it moves a step and may come to rest on the floor switch.
static void MercuryLighthouse_PressStairFloorSwitch (void)
 Touching trigger 12 while the stair gate is shut: standing on its switch opens it.
static void MercuryLighthouse_ReleaseStairFloorSwitch (void)
 Touching trigger 10: stepping off the switch closes the stair gate.
static __inline__ s32 MercuryLighthouse_RandomDoorParticleSpeed (void)
 Chooses the random speed component used by stone-door particles.
static void MercuryLighthouse_OpenStoneDoor (s32 side)
 Opens the selected stone door with particles along its moving edge.
static void MercuryLighthouse_CloseStoneDoor (s32 side)
 Restores the selected stone door's tiles with trailing particles.
static s32 MercuryLighthouse_StartStatueSlide (void)
 The camera turns to the sliding statue, which moves on only for the door switch block positions recorded; returns 1 when it slides off its ledge.
static void MercuryLighthouse_SprayAboveStatue (void)
 Sparkles rise from the sliding statue as it moves.
static s32 MercuryLighthouse_StartStatueSpray (struct ScriptInterpreter *interpreter)
 The slide scripts start the sparkles as the statue sets off.
static s32 MercuryLighthouse_StopStatueSpray (void)
static void MercuryLighthouse_MoveStoneDoorBlocks (void)
 Pushing a block in the stone-door room (walking into trigger 40) on the third map: the door switch block opens a different stone door at each column, and at column 48, once the statue is in place, the statue slides out and falls to the floor below.
static void MercuryLighthouse_PushAndSaveBlockPositions (void)
 Pushing a crossing block (walking into trigger 47): it moves a step and where the blocks rest is saved.
static void MercuryLighthouse_OpenMovedBlockCrossing (void)
 Move on the gap block: at column 28 it fills the gap for good.
static void MercuryLighthouse_RotatePaletteRange (u16 *colors, u32 colorCount)
 Rotates the selected palette range once every eight frames.
static void MercuryLighthouse_CycleEntrancePalette (void)
 While the lighthouse door is shut its light shimmers: background palette 2, colors 8 to 15, rotates every eight frames.
static void MercuryLighthouse_MiaSensesSomeoneInside (void)
 Talking to Mia at the lighthouse's foot, or Mind Read on her, before the door is open: she senses someone.
static void MercuryLighthouse_MiaDiscussesBlockedEntrance (void)
 Talking to Mia again. "This statue is blocking the entrance.".
static void MercuryLighthouse_FadePaletteToWhite (void)
 The door's light brightens to white as it opens.
static void MercuryLighthouse_MiaOpensEntranceWithPly (void)
 Move on the door statue: once it stands at column 51 Mia asks whether the party did that, learns of Psynergy, and uses Ply to open the door; she goes in, and Garet and Ivan rejoin the leader.
static void MercuryLighthouse_CycleWaterfallPalette (void)
 The waterfall shimmers: background palette 6, colors 1 to 7, rotates every eight frames.
static void MercuryLighthouse_FadePaletteToBlack (void)
 The waterfall's colors fade to black as it stops.
static void MercuryLighthouse_RaiseActorWithSparks (s32 actorId)
 Raises an actor into the passage with sparks for 48 ticks, two frames each.
static void MercuryLighthouse_PlyOpensWaterfallPassage (void)
 Ply on the waterfall statue: the waterfall darkens and stops, sparkles rise and the way behind it opens.
static void MercuryLighthouse_ReadHermesFountainInscription (void)
 Searching trigger 42 at the foot shows the fountain's sign.
static void MercuryLighthouse_InspectLockedDoor (void)
 Searching trigger 20 on the second or third map: the door is locked tight.
static void MercuryLighthouse_InspectHealingFountain (void)
 Searching the fountain (trigger 5) before taking its water: it seems dry, or once Saturos is beaten flows with water; carrying an Empty Bottle, the item menu then opens.
static void MercuryLighthouse_FillHermesWaterBottle (void)
 Using the Empty Bottle at the fountain (event 0xb904: the bottle's item number and kind 4) once Saturos is beaten: the bottle becomes Hermes' Water, once a visit.
static void MercuryLighthouse_EnterRisingPassage (void)
 Walking south into trigger 15 on the first or second map: on the first the leader steps to the hole and drops into the entrance hall (exit 8, its entrance 6); on the second the motion runs alone.
s32 MercuryLighthouse_Initialize (void)
 Restores each lighthouse scene's puzzle state and entrance sequence.
static void MercuryLighthouse_MiaJoinsAfterRescue (void)
 Move on the statue blocking Mia, before she has joined: once it stands at column 48, Mia thanks the party, asks whether it has business in the lighthouse and presses until it says yes, then joins with Fizz.
static void OverlayObject_SpawnKind24AtObject (struct FieldActor *source)
 Creates the rising effect at the source actor and sets its sprite priority.

Variables

s32 gEffectScript0 []
s32 gEffectScript1 []
s32 gEffectScript2 []
s32 gStagedActor_DirectionSteps []
 Pixel step by direction: X in the upper halfword, Z in the lower.
u32 gStagedActor_FootprintKinds []
s32 gStagedActor_FootprintBounds []
s32 gMercuryLighthouse_RiseScript []
s32 gMercuryLighthouse_SparkScript []
s32 gMercuryLighthouse_RampScript []
s32 gMercuryLighthouse_ScaleCounterScript []
s32 gMercuryLighthouse_PillarScript []
u16 gMercuryLighthouse_MoveAngles []
const s32 * gEffectScripts []
s32 gMercuryLighthouse_SparkBurstScript []
s32 gMercuryLighthouse_PushScriptA []
s32 gMercuryLighthouse_PushScriptB []
s32 gMercuryLighthouse_PushScriptD []
s32 gMercuryLighthouse_PushScriptC []
s32 gPaletteCycleRed = 0
s32 gPaletteCycleGreen = 0
s32 gPaletteCycleBlue = 0
u16 gMercuryLighthouse_GateCells []
u16 gMercuryLighthouse_GateCloseCells []
u16 gMercuryLighthouse_FloorSwitchCells []
u16 gMercuryLighthouse_FloorSwitchCloseCells []
u16 gMercuryLighthouse_ColumnCells []
struct SceneEntrance gMercuryLighthouseEntrancesOther []
struct SceneEntrance gMercuryLighthouseEntrances2 []
struct SceneEntrance gMercuryLighthouseEntrances3 []
struct SceneEntrance gMercuryLighthouseEntrances4 []
u32 gMercuryLighthouse_Exits []
struct ScenePlacement gMercuryLighthousePlacementsOther []
struct ScenePlacement gMercuryLighthousePlacements1 []
struct ScenePlacement gMercuryLighthousePlacements2 []
struct ScenePlacement gMercuryLighthousePlacements3 []
struct ScenePlacement gMercuryLighthousePlacements4 []
struct SceneEvent gMercuryLighthouseEvents1 []
struct SceneEvent gMercuryLighthouseEvents2 []
struct SceneEvent gMercuryLighthouseEvents3 []
struct SceneEvent gMercuryLighthouseEventsOther []

Detailed Description

Mercury Lighthouse, in four maps.

The fourth is the lighthouse's foot, with the Hermes fountain, the lift and the door Mia opens; the others are floors inside, entered from the entrance hall (mercury_lighthouse_entrance.c). Sprite 0xe0 is a statue: Mia says "This statue wasn't here before" of the one blocking her on the first.

Definition in file mercury_lighthouse.c.

Macro Definition Documentation

◆ MERCURY_LIGHTHOUSE_MOVE_LEADER_TO_ENTRY

#define MERCURY_LIGHTHOUSE_MOVE_LEADER_TO_ENTRY   Actor_MoveToAndWait

Definition at line 68 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_WalkLeaderIn().

◆ MERCURY_LIGHTHOUSE_ANIMATE_ACTOR_AND_WAIT

#define MERCURY_LIGHTHOUSE_ANIMATE_ACTOR_AND_WAIT   ((s32 (*)())Engine_ActorSetAnimationAndWait)

Definition at line 77 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_MiaJoinsAfterRescue().

◆ NULL

#define NULL   ((void *)0)

Definition at line 94 of file mercury_lighthouse.c.

◆ MERCURY_LIGHTHOUSE_OFFSET_FIXED

#define MERCURY_LIGHTHOUSE_OFFSET_FIXED ( value)
Value:
((value) << 16)

Definition at line 175 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_OpenFountainWithSpray().

◆ DIRECTION_STEP

#define DIRECTION_STEP ( dx,
dz )
Value:
(((u32)(dx) << 16) | ((u32)(dz) & 0xffff))
unsigned int u32
Definition types.h:15

Pixel step by direction: X in the upper halfword, Z in the lower.

Pack negative steps through unsigned words rather than left-shifting a negative.

Definition at line 2697 of file mercury_lighthouse.c.

Enumeration Type Documentation

◆ MercuryLighthouse1Actor

The first map: Mia, the statue that blocks her and the channel blocks.

Enumerator
ACTOR_STATUE_BLOCKING_MIA 
ACTOR_CHANNEL_BLOCK_1 
ACTOR_CHANNEL_BLOCK_2 
ACTOR_CHANNEL_BLOCK_3 

Definition at line 97 of file mercury_lighthouse.c.

◆ MercuryLighthouse2Actor

The second map: the stair and fountain blocks, the statue for the gate's floor switch and Sleet, Mercury Djinni 1.

Enumerator
ACTOR_STAIR_BLOCK 
ACTOR_FOUNTAIN_BLOCK 
ACTOR_GATE_STATUE 
ACTOR_SLEET 

Definition at line 106 of file mercury_lighthouse.c.

◆ MercuryLighthouse3Actor

The third map: the sliding statue and where it lands below, the blocks of the stone-door room, the five blocks of the crossing and one more.

Enumerator
ACTOR_FALLEN_STATUE 
ACTOR_SLIDING_STATUE 
ACTOR_DOOR_ROOM_BLOCK 
ACTOR_DOOR_SWITCH_BLOCK 
ACTOR_FIRST_CROSSING_BLOCK 
ACTOR_LAST_CROSSING_BLOCK 
ACTOR_GAP_BLOCK 

Definition at line 115 of file mercury_lighthouse.c.

◆ MercuryLighthouse4Actor

The fourth map: Garet, Ivan and Mia in their own party slots, the statue at the door, the Ply target, the statue by the waterfall, the statue on the lift and the people at the fountain.

Enumerator
ACTOR_DOOR_STATUE 
ACTOR_PLY_TARGET 
ACTOR_WATERFALL_STATUE 
ACTOR_LIFT_STATUE 
ACTOR_FIRST_VISITOR 

Definition at line 128 of file mercury_lighthouse.c.

◆ anonymous enum

anonymous enum

Puzzle states kept until the party leaves the lighthouse.

Enumerator
FLAG_STAIRS_RAISED 
FLAG_FOUNTAIN_RUNNING 
FLAG_FOUNTAIN_SHOWN 

the camera has shown it start once

FLAG_CHANNEL_1_OPEN 
FLAG_CHANNEL_2_OPEN 
FLAG_CHANNEL_3_OPEN 
FLAG_CHANNEL_313 

cleared with the three, never set here

FLAG_DOOR_ROOM_BLOCK_PUSHED 
FLAG_DOOR_SWITCH_BLOCK_AT_47 

The door switch block's column: each opens a different stone door.

FLAG_DOOR_SWITCH_BLOCK_AT_48 
FLAG_DOOR_SWITCH_BLOCK_AT_53 
FLAG_FIRST_CROSSING_BLOCK 

Two flags per crossing block for its two resting columns, then the last.

FLAG_LAST_CROSSING_BLOCK_WEST 
FLAG_LAST_CROSSING_BLOCK_EAST 
FLAG_GAP_BLOCK_PLACED 

Definition at line 137 of file mercury_lighthouse.c.

◆ anonymous enum

anonymous enum

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

Enumerator
FLAG_HERMES_WATER_TAKEN 
FLAG_LEADER_ON_FLOOR_SWITCH 

Definition at line 158 of file mercury_lighthouse.c.

◆ anonymous enum

anonymous enum

The chests: a Sleep Bomb, a Psy Crystal and a Nut.

Enumerator
FLAG_CHEST_SLEEP_BOMB 
FLAG_CHEST_PSY_CRYSTAL 
FLAG_CHEST_NUT 

Definition at line 164 of file mercury_lighthouse.c.

Function Documentation

◆ MercuryLighthouse_OpenGateWithMovedBlock()

void MercuryLighthouse_OpenGateWithMovedBlock ( void )
static

Move on the gate statue, or after a push: resting on the floor switch at (5, 13), it sinks two pixels and the gate opens for good.

Definition at line 446 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_OpenGateWithMovedBlock(), and MercuryLighthouse_PushGateSwitchBlock().

◆ MercuryLighthouse_OpenStairGateWithMovedBlock()

void MercuryLighthouse_OpenStairGateWithMovedBlock ( void )
static

Move on the fallen statue, or after a push: resting on the switch at (10, 23), it sinks two pixels and the stair gate opens for good.

Definition at line 768 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_OpenStairGateWithMovedBlock(), and MercuryLighthouse_PushStairSwitchBlock().

◆ MercuryLighthouse_SyncBlockFlags()

void MercuryLighthouse_SyncBlockFlags ( void )
static

Move on a crossing block, or after a push: each block's column is saved in its pair of flags, and the last opens the crossing at column 57 or 59.

Definition at line 1128 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_PushAndSaveBlockPositions(), and MercuryLighthouse_SyncBlockFlags().

◆ SceneEffect_SpawnParticleRowsAndDrawTiles()

void SceneEffect_SpawnParticleRowsAndDrawTiles ( void )
static

Reveals the stair's map rows with particles along their edges.

Definition at line 1867 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_MoveStairAndFountainBlocks(), and SceneEffect_SpawnParticleRowsAndDrawTiles().

◆ MercuryLighthouse_OpenThreeStepStair()

void MercuryLighthouse_OpenThreeStepStair ( void )
static

Restores the stair tiles in three particle-covered steps.

Definition at line 1895 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_MoveStairAndFountainBlocks(), and MercuryLighthouse_OpenThreeStepStair().

◆ SceneEffect_SpawnParticleEveryFourthFrame()

void SceneEffect_SpawnParticleEveryFourthFrame ( void )
static

Emits particles around the leader once every four frames.

Definition at line 1930 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_WalkLeaderIn(), and SceneEffect_SpawnParticleEveryFourthFrame().

◆ SceneEffect_SpawnRandomEveryFourFrames()

void SceneEffect_SpawnRandomEveryFourFrames ( s32 x,
s32 y,
s32 z )
static

◆ SceneEffect_SpawnWithRandomOffset()

void SceneEffect_SpawnWithRandomOffset ( s32 x,
s32 y,
s32 z )
static

Emits a stationary particle near the supplied position.

Definition at line 1978 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_RaiseActorWithSparks(), and SceneEffect_SpawnWithRandomOffset().

◆ SceneEffect_SpawnRandomizedBurst()

void SceneEffect_SpawnRandomizedBurst ( s32 x,
s32 y,
s32 z,
s32 angle )
static

Emits a short burst with velocities spreading along the supplied angle.

Definition at line 1996 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_MoveChannelBlocks(), and SceneEffect_SpawnRandomizedBurst().

◆ MercuryLighthouse_RideLift()

void MercuryLighthouse_RideLift ( void )
static

Entrance 15 at the foot: the leader rides the lift up beside its statue, hops off onto the landing, and the lift goes back down.

Definition at line 2535 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_Initialize(), and MercuryLighthouse_RideLift().

◆ MercuryLighthouse_MiaCastsPlyOnEntrance()

void MercuryLighthouse_MiaCastsPlyOnEntrance ( void )
static

Mia casts Ply on the Ply target, moved onto the door.

Definition at line 2623 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_MiaCastsPlyOnEntrance(), and MercuryLighthouse_MiaOpensEntranceWithPly().

◆ MercuryLighthouse_ReplaceInventoryItem()

void MercuryLighthouse_ReplaceInventoryItem ( s32 oldItem,
s32 newItem )
static

Replaces one inventory item in the owner and slot that contain it.

Definition at line 2639 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_FillHermesWaterBottle(), and MercuryLighthouse_ReplaceInventoryItem().

◆ MercuryLighthouse_StartDjinnBattle()

void MercuryLighthouse_StartDjinnBattle ( void )
static

Talking to Sleet: the Djinni battle (Djinni 21, Mercury Djinni 1).

Definition at line 183 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_StartDjinnBattle().

◆ MercuryLighthouse_GetEntrances()

const struct SceneEntrance * MercuryLighthouse_GetEntrances ( void )

Definition at line 212 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_GetEntrances().

◆ MercuryLighthouse_GetRegions()

const struct SceneRegion * MercuryLighthouse_GetRegions ( void )

Definition at line 227 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_GetRegions().

◆ MercuryLighthouse_GetExits()

const u32 * MercuryLighthouse_GetExits ( void )

Returns the packed exits shared by the lighthouse scenes.

Definition at line 230 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_GetExits().

◆ MercuryLighthouse_GetPlacements()

const struct ScenePlacement * MercuryLighthouse_GetPlacements ( void )

Selects the actors and obstacles for the current lighthouse scene.

Definition at line 233 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_GetPlacements().

◆ MercuryLighthouse_SpawnTimedRiseEffect()

void MercuryLighthouse_SpawnTimedRiseEffect ( void )
static

On the first map, as in the entrance hall, once Ply has worked there: touching trigger 21 keeps rising sparks appearing on the pillar.

Definition at line 253 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_SpawnTimedRiseEffect().

◆ MercuryLighthouse_ReleaseRaisedPillar()

void MercuryLighthouse_ReleaseRaisedPillar ( void )
static

Touching trigger 31 or 32: the raised pillar is let go.

Definition at line 258 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_ReleaseRaisedPillar().

◆ MercuryLighthouse_TryPillarStep()

void MercuryLighthouse_TryPillarStep ( void )
static

Walking into trigger 11, 21 or 31: one step across the water pillars.

Definition at line 263 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_TryPillarStep().

◆ MercuryLighthouse_RaiseTouchedPillar()

void MercuryLighthouse_RaiseTouchedPillar ( void )
static

Touching trigger 11: the pillar underfoot rises to its full height.

Definition at line 268 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_RaiseTouchedPillar().

◆ MercuryLighthouse_InspectBlockedPassage()

void MercuryLighthouse_InspectBlockedPassage ( void )
static

Searching trigger 10 at the lighthouse's foot.

"Strange forces are at work..."

Definition at line 274 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_InspectBlockedPassage().

◆ MercuryLighthouse_GetEvents()

const struct SceneEvent * MercuryLighthouse_GetEvents ( void )

Selects the puzzle interactions and dialogue for the current scene.

Definition at line 281 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_GetEvents().

◆ MercuryLighthouse_ExitWithSparks()

void MercuryLighthouse_ExitWithSparks ( void )
static

Walking north into trigger 53 on the third map: the leader rises through exit 3 (the trigger less 50), as the entrance hall's risers do.

Definition at line 300 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_ExitWithSparks().

◆ MercuryLighthouse_ExitAfterSparkStep()

void MercuryLighthouse_ExitAfterSparkStep ( void )
static

Walking north into trigger 63 on the third map: the same, through exit 13.

Definition at line 305 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_ExitAfterSparkStep().

◆ MercuryLighthouse_LeaveWithSparkTrail()

void MercuryLighthouse_LeaveWithSparkTrail ( void )
static

Walking north into trigger 55 at the foot: the same, through exit 5.

Definition at line 310 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_LeaveWithSparkTrail().

◆ MercuryLighthouse_ExitWhenChannelsOpen()

void MercuryLighthouse_ExitWhenChannelsOpen ( void )
static

With all three channel blocks in place the floor shakes, the screen fades and the party is carried down to the entrance hall (exit 13); moving one out again clears the flag.

Definition at line 317 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_ExitWhenChannelsOpen(), and MercuryLighthouse_MoveChannelBlocks().

◆ MercuryLighthouse_MoveChannelBlocks()

void MercuryLighthouse_MoveChannelBlocks ( void )
static

Pushing a channel block (walking into trigger 25) on the first map: each block opens one channel when it reaches its place, and the water runs on through the ones before it.

Definition at line 341 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_MoveChannelBlocks().

◆ MercuryLighthouse_WalkLeaderIn()

void MercuryLighthouse_WalkLeaderIn ( void )
static

Touching trigger 2, 3 or 4 once the stairs are raised, or 46: the leader is carried to the landing in a trail of sparkles.

Definition at line 405 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_WalkLeaderIn().

◆ MercuryLighthouse_PushGateSwitchBlock()

void MercuryLighthouse_PushGateSwitchBlock ( void )
static

Pushing the gate statue (walking into trigger 10) while the gate is shut: it moves a step, and may come to rest on the floor switch.

Definition at line 437 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_PushGateSwitchBlock().

◆ MercuryLighthouse_PressGateFloorSwitch()

void MercuryLighthouse_PressGateFloorSwitch ( void )
static

Touching trigger 12 while the gate is shut: standing on the floor switch sinks the leader two pixels and opens the gate.

Definition at line 473 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_PressGateFloorSwitch().

◆ MercuryLighthouse_CloseFloorSwitch()

void MercuryLighthouse_CloseFloorSwitch ( void )
static

Touching trigger 10 or 13: stepping off the switch closes the gate again.

Definition at line 497 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_CloseFloorSwitch().

◆ MercuryLighthouse_AnimateFountainTiles()

void MercuryLighthouse_AnimateFountainTiles ( s32 delayFrames,
s32 firstStep,
s32 endStep )
static

Animates the fountain's map strips between the requested steps.

Definition at line 515 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_AnimateFountainTiles(), and MercuryLighthouse_OpenFountainWithSpray().

◆ MercuryLighthouse_RestoreFountainTiles()

void MercuryLighthouse_RestoreFountainTiles ( s32 delayFrames)
static

Restores the fountain's map strips after moving its block away.

Definition at line 544 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_MoveStairAndFountainBlocks(), and MercuryLighthouse_RestoreFountainTiles().

◆ MercuryLighthouse_SprayAtFountain()

void MercuryLighthouse_SprayAtFountain ( void )
static

Emits the scheduled spray at the fountain's fixed position.

Definition at line 583 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_OpenFountainWithSpray(), MercuryLighthouse_SprayAtFountain(), and MercuryLighthouse_StopFountainSpray().

◆ MercuryLighthouse_OpenFountainWithSpray()

void MercuryLighthouse_OpenFountainWithSpray ( s32 delayFrames)
static

Opens the fountain row by row and starts its continuous spray.

Definition at line 588 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_Initialize(), MercuryLighthouse_MoveStairAndFountainBlocks(), and MercuryLighthouse_OpenFountainWithSpray().

◆ MercuryLighthouse_StopFountainSpray()

void MercuryLighthouse_StopFountainSpray ( void )
static

Restores the fountain tiles and stops its continuous spray.

Definition at line 654 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_MoveStairAndFountainBlocks(), and MercuryLighthouse_StopFountainSpray().

◆ MercuryLighthouse_MoveStairAndFountainBlocks()

void MercuryLighthouse_MoveStairAndFountainBlocks ( void )
static

Pushing a block on the second map (walking into trigger 1 or 45): the stair block raises the stairs at column 11 and lowers them anywhere else; the fountain block starts the fountain at row 40, the first time with the camera watching, and stops it at row 42.

Definition at line 696 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_MoveStairAndFountainBlocks().

◆ MercuryLighthouse_PushStairSwitchBlock()

void MercuryLighthouse_PushStairSwitchBlock ( void )
static

Pushing the fallen statue (walking into trigger 10 or 12) while the stair gate is shut: it moves a step and may come to rest on the floor switch.

Definition at line 759 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_PushStairSwitchBlock().

◆ MercuryLighthouse_PressStairFloorSwitch()

void MercuryLighthouse_PressStairFloorSwitch ( void )
static

Touching trigger 12 while the stair gate is shut: standing on its switch opens it.

Definition at line 789 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_PressStairFloorSwitch().

◆ MercuryLighthouse_ReleaseStairFloorSwitch()

void MercuryLighthouse_ReleaseStairFloorSwitch ( void )
static

Touching trigger 10: stepping off the switch closes the stair gate.

Definition at line 816 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_ReleaseStairFloorSwitch().

◆ MercuryLighthouse_RandomDoorParticleSpeed()

__inline__ s32 MercuryLighthouse_RandomDoorParticleSpeed ( void )
static

Chooses the random speed component used by stone-door particles.

Definition at line 834 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_OpenStoneDoor(), and MercuryLighthouse_RandomDoorParticleSpeed().

◆ MercuryLighthouse_OpenStoneDoor()

void MercuryLighthouse_OpenStoneDoor ( s32 side)
static

Opens the selected stone door with particles along its moving edge.

Definition at line 844 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_Initialize(), MercuryLighthouse_MoveStoneDoorBlocks(), and MercuryLighthouse_OpenStoneDoor().

◆ MercuryLighthouse_CloseStoneDoor()

void MercuryLighthouse_CloseStoneDoor ( s32 side)
static

Restores the selected stone door's tiles with trailing particles.

Definition at line 904 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_CloseStoneDoor(), MercuryLighthouse_Initialize(), and MercuryLighthouse_MoveStoneDoorBlocks().

◆ MercuryLighthouse_StartStatueSlide()

s32 MercuryLighthouse_StartStatueSlide ( void )
static

The camera turns to the sliding statue, which moves on only for the door switch block positions recorded; returns 1 when it slides off its ledge.

Definition at line 947 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_MoveStoneDoorBlocks(), and MercuryLighthouse_StartStatueSlide().

◆ MercuryLighthouse_SprayAboveStatue()

void MercuryLighthouse_SprayAboveStatue ( void )
static

Sparkles rise from the sliding statue as it moves.

Definition at line 985 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_Initialize(), MercuryLighthouse_SprayAboveStatue(), MercuryLighthouse_StartStatueSpray(), and MercuryLighthouse_StopStatueSpray().

◆ MercuryLighthouse_StartStatueSpray()

s32 MercuryLighthouse_StartStatueSpray ( struct ScriptInterpreter * interpreter)
static

The slide scripts start the sparkles as the statue sets off.

Definition at line 997 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_StartStatueSpray().

◆ MercuryLighthouse_StopStatueSpray()

s32 MercuryLighthouse_StopStatueSpray ( void )
static

◆ MercuryLighthouse_MoveStoneDoorBlocks()

void MercuryLighthouse_MoveStoneDoorBlocks ( void )
static

Pushing a block in the stone-door room (walking into trigger 40) on the third map: the door switch block opens a different stone door at each column, and at column 48, once the statue is in place, the statue slides out and falls to the floor below.

Definition at line 1021 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_MoveStoneDoorBlocks().

◆ MercuryLighthouse_PushAndSaveBlockPositions()

void MercuryLighthouse_PushAndSaveBlockPositions ( void )
static

Pushing a crossing block (walking into trigger 47): it moves a step and where the blocks rest is saved.

Definition at line 1119 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_PushAndSaveBlockPositions().

◆ MercuryLighthouse_OpenMovedBlockCrossing()

void MercuryLighthouse_OpenMovedBlockCrossing ( void )
static

Move on the gap block: at column 28 it fills the gap for good.

Definition at line 1169 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_OpenMovedBlockCrossing().

◆ MercuryLighthouse_RotatePaletteRange()

void MercuryLighthouse_RotatePaletteRange ( u16 * colors,
u32 colorCount )
inlinestatic

Rotates the selected palette range once every eight frames.

It writes the saved first color at the end before shifting, preserving the palette access order.

Definition at line 1189 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_CycleEntrancePalette(), MercuryLighthouse_CycleWaterfallPalette(), and MercuryLighthouse_RotatePaletteRange().

◆ MercuryLighthouse_CycleEntrancePalette()

void MercuryLighthouse_CycleEntrancePalette ( void )
static

While the lighthouse door is shut its light shimmers: background palette 2, colors 8 to 15, rotates every eight frames.

Definition at line 1214 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_CycleEntrancePalette(), MercuryLighthouse_Initialize(), and MercuryLighthouse_MiaOpensEntranceWithPly().

◆ MercuryLighthouse_MiaSensesSomeoneInside()

void MercuryLighthouse_MiaSensesSomeoneInside ( void )
static

Talking to Mia at the lighthouse's foot, or Mind Read on her, before the door is open: she senses someone.

"Somebody...is here." She asks whether the party hears it, says only Alex can enter besides her, and that the statue blocks her way.

Definition at line 1222 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_MiaSensesSomeoneInside().

◆ MercuryLighthouse_MiaDiscussesBlockedEntrance()

void MercuryLighthouse_MiaDiscussesBlockedEntrance ( void )
static

Talking to Mia again. "This statue is blocking the entrance.".

Definition at line 1272 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_MiaDiscussesBlockedEntrance().

◆ MercuryLighthouse_FadePaletteToWhite()

void MercuryLighthouse_FadePaletteToWhite ( void )
static

The door's light brightens to white as it opens.

Definition at line 1282 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_FadePaletteToWhite(), and MercuryLighthouse_MiaOpensEntranceWithPly().

◆ MercuryLighthouse_MiaOpensEntranceWithPly()

void MercuryLighthouse_MiaOpensEntranceWithPly ( void )
static

Move on the door statue: once it stands at column 51 Mia asks whether the party did that, learns of Psynergy, and uses Ply to open the door; she goes in, and Garet and Ivan rejoin the leader.

Definition at line 1321 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_MiaOpensEntranceWithPly().

◆ MercuryLighthouse_CycleWaterfallPalette()

void MercuryLighthouse_CycleWaterfallPalette ( void )
static

The waterfall shimmers: background palette 6, colors 1 to 7, rotates every eight frames.

Definition at line 1484 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_CycleWaterfallPalette(), MercuryLighthouse_Initialize(), and MercuryLighthouse_PlyOpensWaterfallPassage().

◆ MercuryLighthouse_FadePaletteToBlack()

void MercuryLighthouse_FadePaletteToBlack ( void )
static

The waterfall's colors fade to black as it stops.

Definition at line 1489 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_FadePaletteToBlack(), and MercuryLighthouse_PlyOpensWaterfallPassage().

◆ MercuryLighthouse_RaiseActorWithSparks()

void MercuryLighthouse_RaiseActorWithSparks ( s32 actorId)
static

Raises an actor into the passage with sparks for 48 ticks, two frames each.

Its upward displacement accelerates by about 0.1 pixel per tick.

Definition at line 1526 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_PlyOpensWaterfallPassage(), and MercuryLighthouse_RaiseActorWithSparks().

◆ MercuryLighthouse_PlyOpensWaterfallPassage()

void MercuryLighthouse_PlyOpensWaterfallPassage ( void )
static

Ply on the waterfall statue: the waterfall darkens and stops, sparkles rise and the way behind it opens.

Once Saturos is beaten the leader rises through it alone to the aerie (exit 9); before that Mia rises first and the party follows, out to the world map (exit 8).

Definition at line 1569 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_PlyOpensWaterfallPassage().

◆ MercuryLighthouse_ReadHermesFountainInscription()

void MercuryLighthouse_ReadHermesFountainInscription ( void )
static

Searching trigger 42 at the foot shows the fountain's sign.

"Fountain of Healing / Water of Hermes: It brings rejuvenation to all that lives."

Definition at line 1787 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_ReadHermesFountainInscription().

◆ MercuryLighthouse_InspectLockedDoor()

void MercuryLighthouse_InspectLockedDoor ( void )
static

Searching trigger 20 on the second or third map: the door is locked tight.

Definition at line 1795 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_InspectLockedDoor().

◆ MercuryLighthouse_InspectHealingFountain()

void MercuryLighthouse_InspectHealingFountain ( void )
static

Searching the fountain (trigger 5) before taking its water: it seems dry, or once Saturos is beaten flows with water; carrying an Empty Bottle, the item menu then opens.

Definition at line 1805 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_InspectHealingFountain().

◆ MercuryLighthouse_FillHermesWaterBottle()

void MercuryLighthouse_FillHermesWaterBottle ( void )
static

Using the Empty Bottle at the fountain (event 0xb904: the bottle's item number and kind 4) once Saturos is beaten: the bottle becomes Hermes' Water, once a visit.

Definition at line 1827 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_FillHermesWaterBottle().

◆ MercuryLighthouse_EnterRisingPassage()

void MercuryLighthouse_EnterRisingPassage ( void )
static

Walking south into trigger 15 on the first or second map: on the first the leader steps to the hole and drops into the entrance hall (exit 8, its entrance 6); on the second the motion runs alone.

Definition at line 1842 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_EnterRisingPassage().

◆ MercuryLighthouse_Initialize()

s32 MercuryLighthouse_Initialize ( void )

Restores each lighthouse scene's puzzle state and entrance sequence.

Definition at line 2029 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_Initialize().

◆ MercuryLighthouse_MiaJoinsAfterRescue()

void MercuryLighthouse_MiaJoinsAfterRescue ( void )
static

Move on the statue blocking Mia, before she has joined: once it stands at column 48, Mia thanks the party, asks whether it has business in the lighthouse and presses until it says yes, then joins with Fizz.

"You've saved me again, haven't you!"

Definition at line 2436 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_MiaJoinsAfterRescue().

◆ OverlayObject_SpawnKind24AtObject()

void OverlayObject_SpawnKind24AtObject ( struct FieldActor * source)
static

Creates the rising effect at the source actor and sets its sprite priority.

Definition at line 2654 of file mercury_lighthouse.c.

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 2680 of file mercury_lighthouse.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 2685 of file mercury_lighthouse.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 2690 of file mercury_lighthouse.c.

◆ gStagedActor_DirectionSteps

s32 gStagedActor_DirectionSteps[]
Initial value:
= {
DIRECTION_STEP(0, 16), DIRECTION_STEP(-16, 0), DIRECTION_STEP(-16, 0),
DIRECTION_STEP(-16, 0), DIRECTION_STEP(-16, 0), DIRECTION_STEP(0, -16),
DIRECTION_STEP(0, -16), DIRECTION_STEP(0, -16), DIRECTION_STEP(0, -16),
}
#define DIRECTION_STEP(dx, dz)
Pixel step by direction: X in the upper halfword, Z in the lower.

Pixel step by direction: X in the upper halfword, Z in the lower.

Definition at line 2699 of file mercury_lighthouse.c.

◆ gStagedActor_FootprintKinds

u32 gStagedActor_FootprintKinds[]
Initial value:
= {
207, 205, 228, 229, 298, 297,
}

Definition at line 2709 of file mercury_lighthouse.c.

◆ gStagedActor_FootprintBounds

s32 gStagedActor_FootprintBounds[]
Initial value:
= {
-32, -8, 32, 8,
-8, -32, 8, 32,
-32, -16, 32, 0,
-8, -32, 8, 32,
-32, -8, 32, 8,
-8, -32, 8, 32,
}

Definition at line 2713 of file mercury_lighthouse.c.

◆ gMercuryLighthouse_RiseScript

s32 gMercuryLighthouse_RiseScript[]
Initial value:
= {
SC_WAIT(30),
}

Definition at line 2722 of file mercury_lighthouse.c.

Referenced by OverlayObject_SpawnKind24AtObject().

◆ gMercuryLighthouse_SparkScript

s32 gMercuryLighthouse_SparkScript[]
Initial value:
= {
SC_CALL(SceneEffect_AdvanceAnchoredRiseFrame),
}
#define SC_CALL(fn)
Definition objcmd.h:50

Definition at line 2727 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_SpawnSparkPair().

◆ gMercuryLighthouse_RampScript

s32 gMercuryLighthouse_RampScript[]
Initial value:
= {
SC_CALL(OverlayObject_RampWords24And28Over16Frames),
}
#define SC_END
Return to the main script.
Definition objcmd.h:32

Definition at line 2732 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_HopAcrossPool(), and MercuryLighthouse_RestoreLights().

◆ gMercuryLighthouse_ScaleCounterScript

s32 gMercuryLighthouse_ScaleCounterScript[]
Initial value:
= {
SC_CALL(OverlayObject_AdvanceScaleCounter),
}

Definition at line 2737 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_HopAcrossPool(), and MercuryLighthouse_LoseLights().

◆ gMercuryLighthouse_PillarScript

s32 gMercuryLighthouse_PillarScript[]
Initial value:
= {
SC_CALL(MercuryLighthouse_FollowLeader),
}

Definition at line 2742 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_ChargeLights(), and MercuryLighthouse_RestoreLights().

◆ gMercuryLighthouse_MoveAngles

u16 gMercuryLighthouse_MoveAngles[]
Initial value:
= {
0xffff, FACING_EAST, FACING_WEST, 0xffff, FACING_NORTH, 0xffff, 0xffff, FACING_NORTH,
FACING_SOUTH, 0xffff, 0xffff, FACING_SOUTH, 0xffff, FACING_EAST, FACING_WEST, 0xffff,
}
@ FACING_EAST
Definition field_scene.h:26
@ FACING_NORTH
Definition field_scene.h:32
@ FACING_SOUTH
Definition field_scene.h:28
@ FACING_WEST
Definition field_scene.h:30

Definition at line 2747 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_HopAcrossPool().

◆ gEffectScripts

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

Definition at line 2752 of file mercury_lighthouse.c.

◆ gMercuryLighthouse_SparkBurstScript

s32 gMercuryLighthouse_SparkBurstScript[]
Initial value:
= {
SC_SET(SW_SCALE_Y, 0x10000),
SC_SET(SW_SCALE_X, 0x10000),
SC_WAIT(6),
SC_SET(SW_SCALE_Y, 0xa000),
SC_SET(SW_SCALE_X, 0xa000),
SC_WAIT(6),
SC_SET(SW_SCALE_Y, 0x4000),
SC_SET(SW_SCALE_X, 0x4000),
SC_WAIT(6),
SC_SET(SW_SCALE_Y, 0xa000),
SC_SET(SW_SCALE_X, 0xa000),
SC_WAIT(6),
SC_WAIT(1),
SC_POS(0, 0, 0),
SC_WAIT(1),
}
#define SC_SET(w, v)
Write a work value.
Definition objcmd.h:37
@ SW_SCALE_Y
Definition objcmd.h:63
@ SW_SCALE_X
Definition objcmd.h:62

Definition at line 2758 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_PlyOpensWaterfallPassage(), and MercuryLighthouse_RaiseActorWithSparks().

◆ gMercuryLighthouse_PushScriptA

s32 gMercuryLighthouse_PushScriptA[]
Initial value:
= {
SC_WAIT(45),
SC_SET(SW_SPEED, 0xcccc),
SC_SET(SW_ACCEL, 0x3333),
SC_MOVE(PIXELS(792), 0, PIXELS(712)),
}
#define PIXELS(value)
static s32 MercuryLighthouse_StartStatueSpray(struct ScriptInterpreter *interpreter)
The slide scripts start the sparkles as the statue sets off.
#define SC_SYNC
Wait for arrival.
Definition objcmd.h:17
#define SC_MOVE(x, y, z)
Move toward the target.
Definition objcmd.h:19
@ SW_ACCEL
Definition objcmd.h:68
@ SW_SPEED
Definition objcmd.h:67

Definition at line 2778 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_StartStatueSlide().

◆ gMercuryLighthouse_PushScriptB

s32 gMercuryLighthouse_PushScriptB[]
Initial value:

Definition at line 2788 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_StartStatueSlide().

◆ gMercuryLighthouse_PushScriptD

s32 gMercuryLighthouse_PushScriptD[]

◆ gMercuryLighthouse_PushScriptC

s32 gMercuryLighthouse_PushScriptC[]
Initial value:

Definition at line 2810 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_StartStatueSlide().

◆ gPaletteCycleRed

s32 gPaletteCycleRed = 0

Definition at line 2816 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_CyclePalette().

◆ gPaletteCycleGreen

s32 gPaletteCycleGreen = 0

Definition at line 2818 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_CyclePalette().

◆ gPaletteCycleBlue

s32 gPaletteCycleBlue = 0

Definition at line 2820 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_CyclePalette().

◆ gMercuryLighthouse_GateCells

u16 gMercuryLighthouse_GateCells[]
Initial value:
= {
MAP_CELL_STEP(15, 1, 1, 2, 10), MAP_CELL_STEP(13, 1, 1, 2, 6), MAP_CELL_STEP(11, 1, 1, 2, 6), MAP_CELL_STEP(9, 1, 1, 2, 6), MAP_CELL_STEPS_END,
}
#define MAP_CELL_STEP(srcX, srcY, width, height, frames)
Definition field_event.h:59
#define MAP_CELL_STEPS_END
Definition field_event.h:61

Definition at line 2822 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_OpenGateWithMovedBlock(), and MercuryLighthouse_PressGateFloorSwitch().

◆ gMercuryLighthouse_GateCloseCells

u16 gMercuryLighthouse_GateCloseCells[]
Initial value:
= {
MAP_CELL_STEP(9, 1, 1, 2, 10), MAP_CELL_STEP(11, 1, 1, 2, 6), MAP_CELL_STEP(13, 1, 1, 2, 6), MAP_CELL_STEP(15, 1, 1, 2, 6), MAP_CELL_STEPS_END,
}

Definition at line 2826 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_CloseFloorSwitch().

◆ gMercuryLighthouse_FloorSwitchCells

u16 gMercuryLighthouse_FloorSwitchCells[]
Initial value:
= {
MAP_CELL_STEP(16, 28, 1, 2, 10), MAP_CELL_STEP(14, 28, 1, 2, 6), MAP_CELL_STEP(12, 28, 1, 2, 6), MAP_CELL_STEP(10, 28, 1, 2, 6), MAP_CELL_STEPS_END,
}

Definition at line 2830 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_OpenStairGateWithMovedBlock(), and MercuryLighthouse_PressStairFloorSwitch().

◆ gMercuryLighthouse_FloorSwitchCloseCells

u16 gMercuryLighthouse_FloorSwitchCloseCells[]
Initial value:
= {
MAP_CELL_STEP(10, 28, 1, 2, 10), MAP_CELL_STEP(12, 28, 1, 2, 6), MAP_CELL_STEP(14, 28, 1, 2, 6), MAP_CELL_STEP(16, 28, 1, 2, 6), MAP_CELL_STEPS_END,
}

Definition at line 2834 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_ReleaseStairFloorSwitch().

◆ gMercuryLighthouse_ColumnCells

u16 gMercuryLighthouse_ColumnCells[]
Initial value:
= {
MAP_CELL_STEP(126, 35, 1, 2, 2), MAP_CELL_STEP(126, 38, 1, 2, 2), MAP_CELL_STEP(126, 41, 1, 2, 2), MAP_CELL_STEP(126, 44, 1, 2, 2), MAP_CELL_STEP(126, 47, 1, 2, 2), MAP_CELL_STEPS_END,
}

Definition at line 2838 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_MiaOpensEntranceWithPly().

◆ gMercuryLighthouseEntrancesOther

struct SceneEntrance gMercuryLighthouseEntrancesOther[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 248, 0, 344, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 1, CONDITION_ALWAYS, 56, 0, 440, FACING_NORTH, 0, 16, 16, 496, 448, 0 },
{ 2, CONDITION_ALWAYS, 248, 0, 440, FACING_NORTH, 0, 16, 16, 496, 448, 0 },
{ 3, CONDITION_ALWAYS, 248, 0, 344, FACING_SOUTH, 0, 16, 16, 496, 448, 0 },
{ 4, CONDITION_ALWAYS, 760, 0, 344, FACING_NORTH, 0, 544, 16, 816, 352, 0 },
{ 5, CONDITION_ALWAYS, 120, 0, 936, FACING_NORTH, 0, 64, 784, 384, 944, 0 },
{ 6, CONDITION_ALWAYS, 344, 0, 936, FACING_NORTH, 0, 64, 784, 384, 944, 0 },
{ 7, CONDITION_ALWAYS, 120, 0, 584, FACING_SOUTH, 0, 80, 528, 320, 688, 0 },
{ 8, CONDITION_ALWAYS, 280, 0, 584, FACING_SOUTH, 0, 80, 528, 320, 688, 0 },
{ 9, CONDITION_ALWAYS, 776, 0, 472, FACING_SOUTH, 0, 640, 416, 896, 704, 0 },
{ 10, CONDITION_ALWAYS, 856, 0, 520, FACING_SOUTH, 0, 640, 416, 896, 704, 0 },
{ 11, CONDITION_ALWAYS, 472, 0, 696, FACING_NORTH, 0, 352, 512, 592, 720, 0 },
{ 15, CONDITION_ALWAYS, 712, 0, 264, FACING_SOUTH, 0, 544, 16, 816, 352, 0 },
}
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44

Definition at line 2842 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_GetEntrances().

◆ gMercuryLighthouseEntrances2

struct SceneEntrance gMercuryLighthouseEntrances2[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 248, 0, 344, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 1, CONDITION_ALWAYS, 120, 0, 472, FACING_SOUTH, 0, 32, 400, 480, 848, 0 },
{ 2, CONDITION_ALWAYS, 152, 0, 824, FACING_NORTH, 0, 32, 400, 480, 848, 0 },
{ 3, CONDITION_ALWAYS, 152, 0, 184, FACING_SOUTH, 0, 48, 16, 592, 416, 0 },
{ 4, CONDITION_ALWAYS, 488, 0, 136, FACING_SOUTH, 0, 48, 16, 592, 416, 0 },
{ 5, CONDITION_ALWAYS, 728, 0, 88, FACING_SOUTH, 0, 656, 16, 896, 272, 0 },
{ 6, CONDITION_ALWAYS, 728, 0, 216, FACING_SOUTH, 0, 656, 16, 896, 272, 0 },
{ 7, CONDITION_ALWAYS, 632, 0, 712, FACING_NORTH, 0, 576, 480, 832, 736, 0 },
{ 8, CONDITION_ALWAYS, 792, 0, 712, FACING_NORTH, 0, 576, 480, 832, 736, 0 },
{ 9, CONDITION_ALWAYS, 712, 0, 568, FACING_SOUTH, 0, 576, 480, 832, 736, 0 },
{ 10, CONDITION_ALWAYS, 888, 0, 440, FACING_NORTH, 0, 760, 304, 1040, 464, 0 },
}

Definition at line 2859 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_GetEntrances().

◆ gMercuryLighthouseEntrances3

struct SceneEntrance gMercuryLighthouseEntrances3[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 248, 0, 344, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 1, CONDITION_ALWAYS, 88, 0, 184, FACING_NORTH, 0, 32, 32, 544, 208, 0 },
{ 2, CONDITION_ALWAYS, 504, 0, 184, FACING_NORTH, 0, 32, 32, 544, 208, 0 },
{ 3, CONDITION_ALWAYS, 264, 0, 120, FACING_SOUTH, 0, 32, 32, 544, 208, 0 },
{ 4, CONDITION_ALWAYS, 648, 0, 168, FACING_NORTH, 0, 592, 16, 992, 320, 0 },
{ 5, CONDITION_ALWAYS, 776, 0, 88, FACING_SOUTH, 0, 592, 16, 992, 320, 0 },
{ 6, CONDITION_ALWAYS, 936, 0, 88, FACING_SOUTH, 0, 592, 16, 992, 320, 0 },
{ 7, CONDITION_ALWAYS, 88, 0, 328, FACING_SOUTH, 0, 48, 272, 288, 432, 0 },
{ 8, CONDITION_ALWAYS, 168, 0, 328, FACING_SOUTH, 0, 48, 272, 288, 432, 0 },
{ 9, CONDITION_ALWAYS, 248, 0, 328, FACING_SOUTH, 0, 48, 272, 288, 432, 0 },
{ 10, CONDITION_ALWAYS, 472, 0, 328, FACING_SOUTH, 0, 352, 272, 592, 432, 0 },
{ 11, CONDITION_ALWAYS, 424, 0, 408, FACING_NORTH, 0, 352, 272, 592, 432, 0 },
{ 12, CONDITION_ALWAYS, 88, 0, 600, FACING_SOUTH, 0, 48, 512, 544, 672, 0 },
{ 13, CONDITION_ALWAYS, 456, 0, 600, FACING_SOUTH, 0, 48, 512, 544, 672, 0 },
{ 14, CONDITION_ALWAYS, 888, 0, 712, FACING_SOUTH, 0, 688, 384, 928, 816, 0 },
{ 15, CONDITION_ALWAYS, 168, 0, 368, FACING_SOUTH, 0, 40, 256, 296, 448, 0 },
{ 16, CONDITION_ALWAYS, 760, 0, 584, FACING_SOUTH, 0, 688, 384, 928, 816, 0 },
}

Definition at line 2874 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_GetEntrances().

◆ gMercuryLighthouseEntrances4

struct SceneEntrance gMercuryLighthouseEntrances4[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 248, 0, 344, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 1, CONDITION_ALWAYS, 232, 0, 104, FACING_SOUTH, 0, 64, 32, 288, 504, 0 },
{ 2, CONDITION_ALWAYS, 232, 0, 488, FACING_NORTH, 0, 64, 32, 288, 504, 0 },
{ 3, CONDITION_ALWAYS, 408, 0, 104, FACING_SOUTH, 0, 352, 32, 592, 328, 0 },
{ 4, CONDITION_ALWAYS, 408, 0, 312, FACING_NORTH, 0, 352, 32, 592, 328, 0 },
{ 10, CONDITION_ALWAYS, 792, 0, 216, FACING_SOUTH, 0, 664, 124, 920, 292, 0 },
{ 11, CONDITION_ALWAYS, 840, 0, 856, FACING_NORTH, 0, 576, 328, 960, 912, 0 },
{ 12, CONDITION_ALWAYS, 840, 0, 600, FACING_SOUTH, 0, 576, 328, 960, 912, 0 },
{ 13, CONDITION_ALWAYS, 872, 0, 600, FACING_SOUTH, 0, 720, 544, 960, 912, 0 },
{ 15, CONDITION_ALWAYS, 680, 0, 584, FACING_SOUTH, 0, 576, 328, 960, 912, 0 },
}

Definition at line 2895 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_GetEntrances().

◆ gMercuryLighthouse_Exits

u32 gMercuryLighthouse_Exits[]

Definition at line 2909 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_GetExits().

◆ gMercuryLighthousePlacementsOther

struct ScenePlacement gMercuryLighthousePlacementsOther[]
Initial value:
= {
}

Definition at line 2965 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_GetPlacements().

◆ gMercuryLighthousePlacements1

struct ScenePlacement gMercuryLighthousePlacements1[]
Initial value:
= {
{ 0xe4, CONDITION_ALWAYS, 7,
{ 0xe4, CONDITION_ALWAYS, 7,
{ 0xe5, CONDITION_ALWAYS, 7,
{ 0xe6, CONDITION_ALWAYS, 7,
}
#define MIA
Mary.
@ TALK_KEEP_FACING
@ ACTOR_STAND

Definition at line 2969 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_GetPlacements().

◆ gMercuryLighthousePlacements2

struct ScenePlacement gMercuryLighthousePlacements2[]
Initial value:
= {
{ 0xe5, CONDITION_ALWAYS, 7,
{ 0xe6, CONDITION_ALWAYS, 7,
{ 0xe4, CONDITION_ALWAYS, 7,
PIXELS(888), 0, PIXELS(392), FACING_SOUTH, TALK_FACE_PARTY, 0 },
}
@ ELEMENT_MERCURY
Definition battle_unit.h:37
@ TALK_FACE_PARTY
#define FLAG_DJINNI_0
the flag of Djinni 0, set once it is caught
Definition flags.h:15

Definition at line 2985 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_GetPlacements().

◆ gMercuryLighthousePlacements3

struct ScenePlacement gMercuryLighthousePlacements3[]
Initial value:
= {
{ 0xe4, CONDITION_ALWAYS, 7,
{ 0xe5, CONDITION_ALWAYS, 7,
{ 0xe6, CONDITION_ALWAYS, 7,
{ 0xe6, CONDITION_ALWAYS, 7,
{ 0xe6, CONDITION_ALWAYS, 7,
}
#define IF_FLAG_SET(flag)
Definition field_scene.h:48
#define FLAG_MERCURY_LIGHTHOUSE_STATUE_FELL
The sliding statue has fallen through to the floor below.
Definition flags.h:350

Definition at line 2999 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_GetPlacements().

◆ gMercuryLighthousePlacements4

struct ScenePlacement gMercuryLighthousePlacements4[]
Initial value:
= {
{ 0x16, CONDITION_ALWAYS, 7,
PIXELS(760), 0, PIXELS(744), FACING_SOUTH, TALK_FACE_PARTY, 0 },
PIXELS(920), 0, PIXELS(744), FACING_SOUTH, TALK_FACE_PARTY, 0 },
}
#define GARET
Jerald.
#define IVAN
Ivan.
@ FACING_STEP
Definition field_scene.h:36
@ TALK_FACE_PARTY_AND_BACK
@ ACTOR_WANDER
#define PLACEMENT_SHARE_PREVIOUS_SPRITE
@ FACING_NORTHWEST
Definition field_scene.h:31
#define FLAG_SATUROS_BEATEN_AT_MERCURY
Saturos is beaten at Mercury Lighthouse: the Hermes fountain at its foot flows again.
Definition flags.h:358

Definition at line 3029 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_GetPlacements().

◆ gMercuryLighthouseEvents1

struct SceneEvent gMercuryLighthouseEvents1[]
Initial value:
= {
{ 0x21, 53, CONDITION_ALWAYS, 3 },
{ 0x31, 59, CONDITION_ALWAYS, 9 },
{ 0x31, 55, CONDITION_ALWAYS, 5 },
{ 0x21, 56, CONDITION_ALWAYS, 6 },
{ EVENT_TALK, MIA, FLAG_MIA_JOINED_PARTY, MSGNO(MsgMercuryLighthouseThePathIsBlockedAgainWhat) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), MIA, FLAG_MIA_JOINED_PARTY, MSGNO(MsgMercuryLighthouseThisStatueWasntHereBeforeI) },
{ PSYNERGY_IN_AREA(0x95, 1), 0, CONDITION_ALWAYS, EVENT_SCRIPT(MercuryLighthouse_RemoveColumnOnRetreat) },
}
@ ABILITY_MIND_READ
Definition ability_ids.h:16
@ ABILITY_MOVE
Definition ability_ids.h:15
#define SCENE_EVENTS_END
#define FIND_ITEM(item)
@ EVENT_TOUCH
@ EVENT_EXIT
@ EVENT_TALK
#define PSYNERGY_IN_AREA(ability, phase)
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define SEARCH(target)
#define TOUCH_WALKING_INTO(facing)
#define TOUCH_WALKING
@ SEARCH_CHEST
#define FLAG_MIA_JOINED_PARTY
rescued again, Mia joins with Fizz
Definition flags.h:342
#define FLAG_MERCURY_LIGHTHOUSE_PLY_ACTIVATED
Ply in the entrance hall: the lights cycle and the pillar routes open.
Definition flags.h:346
@ ITEM_SLEEP_BOMB
Definition item_ids.h:68
static void MercuryLighthouse_MoveChannelBlocks(void)
Pushing a channel block (walking into trigger 25) on the first map: each block opens one channel when...
static void MercuryLighthouse_TryPillarStep(void)
Walking into trigger 11, 21 or 31: one step across the water pillars.
static void MercuryLighthouse_EnterRisingPassage(void)
Walking south into trigger 15 on the first or second map: on the first the leader steps to the hole a...
@ ACTOR_STATUE_BLOCKING_MIA
static void MercuryLighthouse_MiaJoinsAfterRescue(void)
Move on the statue blocking Mia, before she has joined: once it stands at column 48,...
static void MercuryLighthouse_ReleaseRaisedPillar(void)
Touching trigger 31 or 32: the raised pillar is let go.
static void MercuryLighthouse_RaiseTouchedPillar(void)
Touching trigger 11: the pillar underfoot rises to its full height.
static void MercuryLighthouse_SpawnTimedRiseEffect(void)
On the first map, as in the entrance hall, once Ply has worked there: touching trigger 21 keeps risin...
@ FLAG_CHEST_SLEEP_BOMB

Definition at line 3059 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_GetEvents().

◆ gMercuryLighthouseEvents2

struct SceneEvent gMercuryLighthouseEvents2[]
Initial value:
= {
{ 0x21, 54, CONDITION_ALWAYS, 4 },
{ PSYNERGY_IN_AREA(0x95, 1), 0, CONDITION_ALWAYS, EVENT_SCRIPT(MercuryLighthouse_RemoveColumnOnRetreat) },
}
@ SEARCH_UNNAMED
#define FLAG_MERCURY_LIGHTHOUSE_GATE_HELD_OPEN
The block rests on the floor switch and holds the gate open.
Definition flags.h:344
@ ITEM_NUT
Definition item_ids.h:41
@ ITEM_PSY_CRYSTAL
Definition item_ids.h:46
@ FLAG_STAIRS_RAISED
static void MercuryLighthouse_StartDjinnBattle(void)
Talking to Sleet: the Djinni battle (Djinni 21, Mercury Djinni 1).
static void MercuryLighthouse_OpenGateWithMovedBlock(void)
Move on the gate statue, or after a push: resting on the floor switch at (5, 13), it sinks two pixels...
static void MercuryLighthouse_WalkLeaderIn(void)
Touching trigger 2, 3 or 4 once the stairs are raised, or 46: the leader is carried to the landing in...
static void MercuryLighthouse_InspectLockedDoor(void)
Searching trigger 20 on the second or third map: the door is locked tight.
static void MercuryLighthouse_PressGateFloorSwitch(void)
Touching trigger 12 while the gate is shut: standing on the floor switch sinks the leader two pixels ...
static void MercuryLighthouse_CloseFloorSwitch(void)
Touching trigger 10 or 13: stepping off the switch closes the gate again.
static void MercuryLighthouse_PushGateSwitchBlock(void)
Pushing the gate statue (walking into trigger 10) while the gate is shut: it moves a step,...
@ ACTOR_GATE_STATUE
@ ACTOR_SLEET
static void MercuryLighthouse_MoveStairAndFountainBlocks(void)
Pushing a block on the second map (walking into trigger 1 or 45): the stair block raises the stairs a...
@ FLAG_CHEST_NUT
@ FLAG_CHEST_PSY_CRYSTAL

Definition at line 3088 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_GetEvents().

◆ gMercuryLighthouseEvents3

struct SceneEvent gMercuryLighthouseEvents3[]

Definition at line 3119 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_GetEvents().

◆ gMercuryLighthouseEventsOther

struct SceneEvent gMercuryLighthouseEventsOther[]
Initial value:
= {
{ 0x31, 51, CONDITION_ALWAYS, 1 },
{ 0x31, 53, CONDITION_ALWAYS, 3 },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), MIA, FLAG_MIA_OPENED_MERCURY_LIGHTHOUSE, MSGNO(MsgMercuryLighthouseSomeoneDoesntWantMeToGet) },
{ EVENT_TALK, ACTOR_FIRST_VISITOR, IF_FLAG_SET(FLAG_SATUROS_BEATEN_AT_MERCURY), MSGNO(MsgMercuryLighthouseTheLegendsSaidThatIfThe) },
{ EVENT_TALK, ACTOR_FIRST_VISITOR + 1, IF_FLAG_SET(FLAG_SATUROS_BEATEN_AT_MERCURY), MSGNO(MsgMercuryLighthouseOurFountainIsBackTheySay) },
{ EVENT_TALK, ACTOR_FIRST_VISITOR + 2, IF_FLAG_SET(FLAG_SATUROS_BEATEN_AT_MERCURY), MSGNO(MsgMercuryLighthouseIDrankTheHealingWaterAnd) },
{ EVENT_TALK, ACTOR_FIRST_VISITOR + 3, IF_FLAG_SET(FLAG_SATUROS_BEATEN_AT_MERCURY), MSGNO(MsgMercuryLighthouseWeDontHaveToFearAny) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_FIRST_VISITOR, IF_FLAG_SET(FLAG_SATUROS_BEATEN_AT_MERCURY), MSGNO(MsgMercuryLighthouseHowDidTheFountainKnowThat) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_FIRST_VISITOR + 1, IF_FLAG_SET(FLAG_SATUROS_BEATEN_AT_MERCURY), MSGNO(MsgMercuryLighthouseAllThatLivesThatMeansIt) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_FIRST_VISITOR + 2, IF_FLAG_SET(FLAG_SATUROS_BEATEN_AT_MERCURY), MSGNO(MsgMercuryLighthouseIKnewItWouldWorkBut) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_FIRST_VISITOR + 3, IF_FLAG_SET(FLAG_SATUROS_BEATEN_AT_MERCURY), MSGNO(MsgMercuryLighthouseINeverBelievedThoseStoriesBut) },
{ PSYNERGY_IN_AREA(0x95, 1), 0, CONDITION_ALWAYS, EVENT_SCRIPT(MercuryLighthouse_RemoveColumnOnRetreat) },
}
@ ABILITY_PLY
Definition ability_ids.h:14
#define USE_ITEM(item)
#define FLAG_MIA_SENSED_SOMEONE_INSIDE
Mia has told the party she senses someone inside the lighthouse.
Definition flags.h:337
#define FLAG_MIA_OPENED_MERCURY_LIGHTHOUSE
The statue is moved and Mia's Ply has opened the lighthouse door.
Definition flags.h:339
@ ITEM_EMPTY_BOTTLE
Definition item_ids.h:45
static void MercuryLighthouse_FillHermesWaterBottle(void)
Using the Empty Bottle at the fountain (event 0xb904: the bottle's item number and kind 4) once Satur...
static void MercuryLighthouse_MiaOpensEntranceWithPly(void)
Move on the door statue: once it stands at column 51 Mia asks whether the party did that,...
@ ACTOR_WATERFALL_STATUE
@ ACTOR_FIRST_VISITOR
@ ACTOR_DOOR_STATUE
static void MercuryLighthouse_ReadHermesFountainInscription(void)
Searching trigger 42 at the foot shows the fountain's sign.
static void MercuryLighthouse_MiaDiscussesBlockedEntrance(void)
Talking to Mia again. "This statue is blocking the entrance.".
static void MercuryLighthouse_InspectHealingFountain(void)
Searching the fountain (trigger 5) before taking its water: it seems dry, or once Saturos is beaten f...
static void MercuryLighthouse_PlyOpensWaterfallPassage(void)
Ply on the waterfall statue: the waterfall darkens and stops, sparkles rise and the way behind it ope...
static void MercuryLighthouse_MiaSensesSomeoneInside(void)
Talking to Mia at the lighthouse's foot, or Mind Read on her, before the door is open: she senses som...
@ FLAG_HERMES_WATER_TAKEN
static void MercuryLighthouse_LeaveWithSparkTrail(void)
Walking north into trigger 55 at the foot: the same, through exit 5.
static void MercuryLighthouse_InspectBlockedPassage(void)
Searching trigger 10 at the lighthouse's foot.

Definition at line 3152 of file mercury_lighthouse.c.

Referenced by MercuryLighthouse_GetEvents().