Skip to Content
The Alchemy Project

src/scene/jupiter_lighthouse_central_room.c

Jupiter Lighthouse's central room, and north of it the room of the five grey blocks. More…

Macros

NameDescription
#defineOWN_fdMapGridGetMetatileBehaviorThis file declares fdMapGridGetMetatileBehavior its own way, below.
#defineFLAG_CENTRAL_ROOM_ENERGY_BLOCK_IN_GAP 0xa02The energy block lies in its gap, lighting the path.
#defineFLAG_CENTRAL_ROOM_SOCKET_BLOCK_RAISED 0xa03The fifth grey block, Moved onto the empty socket, has risen to hover over it.
#defineCENTRAL_ROOM_GAP_METATILE_X 20The gap at the head of the path below the east ledge, which the energy block fills.
#defineCENTRAL_ROOM_GAP_METATILE_Z 39
#defineCENTRAL_ROOM_EMPTY_SOCKET_METATILE_X 18The empty socket at the east end of the grey blocks' row.
#defineCENTRAL_ROOM_EMPTY_SOCKET_METATILE_Z 6
#defineBEAM_PARTICLES 22The pink sparks that circle the beam.
#defineBEAM_RIDE_STEPS 110The steps the beam lifts a leader, 3 pixels every other tick, before the room of locked doors takes over.
#defineEFFECT_SET_MODE fdActorSelectAnimation
#defineEFFECT_SET_SCRIPT fdActorStartScript
#defineMETATILE_PUSH_SLOT_ENTRY syOAMAddSpriteAtDepthClamped

Enumerations

NameDescription
enumJUPITER_LIGHTHOUSE_CENTRAL_ROOM_ACTOR_ID { ACTOR_FIRST_HOVERING_BLOCK, ACTOR_LAST_HOVERING_BLOCK, ACTOR … }The room's actors, numbering the rows of ActorPlacements.
enumanonymous enum { GLOW_PATH_NORTH_SOUTH }The energy block's glow, a picture of FieldPathGlowTiles: the lit channel of a straight north-south path piece.
enumJUPITER_LIGHTHOUSE_CENTRAL_ROOM_WAY { WAY_CENTRAL_ROOM_WEST_TO_NORTH_ROOM, WAY_NORTH_ROOM_TO_CENTR … }The ways between the central room and the room of the grey blocks north of it, by the arched doorways at the central room's west and east ends, metatiles (5, 37) and (21, 37), and the passages up into the north room's south-west and south-east corners, metatiles (6, 17) and (22, 17).
enumJUPITER_LIGHTHOUSE_CENTRAL_ROOM_METATILE_BEHAVIOR { METATILE_BEHAVIOR_BEAM }The room's own metatile behaviors.
enumanonymous enum { CUE_CYCLONE_UP_WEST, CUE_CYCLONE_UP_EAST, CUE_CYCLONE_DOWN_W … }The Cyclone pads' metatiles, which are also the cues their Psynergy raises (FIELD_STATE.raisedCue): the west pad at metatile (9, 36) and the east one at metatile (16, 35), with Felix below the ledge or (as copied in for the ledge's layer) on it.

Functions

NameDescription
voidscActorRaiseFromMetatile (Sint32 id)Lifts an actor 32 pixels over its ground as a platform others may stand on, and raises the map metatile under it six height steps to match.
voidscLightSpritesInitPathGlows (void)Loads the path pieces' glows (FieldPathGlowTiles) into VRAM and starts drawing the lit actors (none yet), small, each at its own priority.
voidscLightSpritesAdd (Sint32 id, Sint32 value)Gives actor id a glow: glow is its tick, with LIGHT_SPRITE_MIRRORED to draw it mirrored.
BSS_DATAALIGNED (16)The blend of one turn of the two maps' alternation in the throne room, a step every four ticks: the first map fades up and down, then the second.
Sint32fdMapGridGetMetatileBehavior (Sint32 x, Sint32 z, Sint32 layer)These rooms read the metatile behavior back as a whole Sint32; the field defines it returning a Uint8.
Sint32scPosFlatDistance (FIXED *a, FIXED *b)The distance between two positions across the ground (x and z), in whole pixels.
voidscLeaderCenterInMetatile (void)Walks the leader to the middle of the metatile he stands on, as he does before dropping through a cracked tile, sets him there and lowers the camera's point 8 pixels.
voidscJupiterLighthouseCycloneUpOnWestPad (void)Felix casts Cyclone on the west pad below the ledge, metatile (9, 36).
voidscJupiterLighthouseCycloneUpOnEastPad (void)Felix casts Cyclone on the east pad below the ledge, metatile (16, 35); as on the west pad, the room's own whirlwind lifts him.
voidscJupiterLighthouseCycloneDownOnEastPad (void)Felix casts Cyclone on the east pad up on the ledge.
voidscJupiterLighthouseRideTheBeam (void)
voidscJupiterLighthouseStartHover (void)Nothing visible happens when Felix starts to Hover anywhere in the room; the central room's east doorway, metatile (21, 37), is walled off while he floats, so that he cannot drift out through it.
voidscJupiterLighthouseEndHover (void)Nothing visible happens when Felix's Hover ends; the central room's east doorway leads out again.
voidfdEffectSpriteInitWithFadeOverlayBlended (EFFECT_SPR *sprite, Sint32 pivotX, Sint32 pivotY, Uint32 attributes)As fdEffectSpriteInitWithFadeOverlay, semi-transparent and at priority 0.
const SCENE_ENTRANCE *scGetEntrances (void)Where the party can enter: the cave under the spring has its own entrances.
const SCENE_REGION *scGetExitRegions (void)The regions of the rooms whose exits are rectangles: the Chestbeaters' room and the stream room.
const Uint32 *scGetExits (void)The dock's ways lead back the way the party came into Lemuria, which the harbour and the shore of Ancient Lemuria note in FLAG_LEMURIA_OTHER_WAY_IN.
const ACTOR_PLACE *scGetActorPlacements (void)The scene's actor placements: a room of names for its entrance, else the debug room's.
voidscJupiterLighthouseSetCyclonePadsForLeader (void)Lets Cyclone on either pad take Felix the other way from where he stands: on the high ledge it carries him down, below it lifts him up.
voidscJupiterLighthouseDrawGlow (void)An event: draws the glow over the Cyclone pad in use.
voidscJupiterLighthouseCycloneDropsLeader (Sint32 kind)Felix casts Cyclone standing on a purple pad up on the high ledge north of the beam (kind says the west or east pad): he sinks, and a whirlwind spins him down to the pad on the floor below.
voidscJupiterLighthouseCycloneLiftsLeader (Sint32 kind)Felix casts Cyclone standing on a purple pad north of the beam's winged statues, the west one at metatile (9, 36) or the east one at metatile (16, 35) (kind says which): a whirlwind spins him up the wall, the camera rising with him, and he vanishes into it and reappears small on the pad on the high ledge 144 pixels above, growing back to his size.
voidscJupiterLighthouseCycloneDownOnWestPad (void)Felix casts Cyclone on the west pad up on the ledge.
voidscJupiterLighthousePushEnergyBlock (Sint32 unused, Sint32 id)Nothing visible happens as Felix starts to push the energy block on the east ledge, by walking into it or with Move.
voidscJupiterLighthouseDropEnergyBlock (Sint32 unused, Sint32 id)The energy block lands with a thump when Felix pushes it off the east ledge.
voidscJupiterLighthouseMoveSocketBlock (Sint32 unused, Sint32 id)Nothing visible happens as Move takes hold of the rightmost of the five grey blocks in the north room; its sprite's drawing order is set (fdActorSetSpritePriority) for the slide onto the empty socket.
voidscJupiterLighthouseRaiseSocketBlock (Sint32 unused, Sint32 id)The rightmost grey block in the north room, Moved one metatile west onto the empty socket at metatile (18, 6) once the lighthouse is activated, rises to hover in line with the other four, a bridge to the room's east side.
const CUE *scGetCues (void)The scene's cues: the rooms of names' for any entrance above ENTRANCE_NAMES_ABOVE, else the debug room's.
voidscJupiterLighthouseCircleTheBeam (ACTOR *actor)A spark's update: it circles the beam at its own speed, rising until it reaches the top and starts again from the floor, in front of the beam on the near half of the circle and behind it on the far half.
voidscJupiterLighthouseSpawnBeamParticles (void)Places the pink sparks round the beam, each circling it at a random speed and radius, each risen five ticks' climb above the one before.
Sint32scInit (void)Sets up the room: the beam and its sparks, the energy block (glowing until it lies in its gap, then gone into it with the path lit) and the grey blocks, hovering once the lighthouse is activated.
Sint32scPrepareMap (void)Sets the scene's arrival flags and loads the lighthouse's palettes before the map is built.
static inline voidscPaletteCycleSetTick (Sint32 value)Restarts the palette cycle at the given tick.
voidscFieldEffectSpawn (Sint32 x, Sint32 y, Sint32 z, Sint32 velocityX, Sint32 velocityY, Sint32 velocityZ, Uint32 flags, const EFFECT_OPTIONS *options)Spawns a field effect at x, y, z moving at the velocity given, its type, scale, palette, priority, script, rotation, spin and update chosen by the EFFECT_USE_ flags from the options.
voidscLightSpritesSetPriority (Sint32 priority)Unused: sets the priority the lit actors' sprites are drawn at.
voidscCrackedTileCrack ()Cracks the tile under the leader, swapping in its cracked picture.
voidscCrackedTileFall ()A cracked tile gives way under Felix, who drops through it.

Variables

NameDescription
EFFECT_SPRJupiterLighthouseGlowSprite
Sint32JupiterLighthouseGlowPosition [3]Where the glow over the Cyclone pad in use stands.
Sint32WhirlwindRidingThe state of the code every Jupiter Lighthouse room's overlay keeps its own copy of: a whirlwind's ride (shared/whirlwind_*.c), the palette cycle (shared/palette_cycle_step.c), the lit actors' sprites (shared/light_sprites_*.c) and the cracked tiles (shared/cracked_tile_*.c).
Uint16PaletteCycleColors [16]A copy of the room's cycling palette, BG palette CYCLE_PALETTE, which the cycle takes its colours from (scJupiterLighthouseLoadPalettes).
Uint16PaletteCycleUnlitPalette [2]Palette 13's first two colors; it is copied whole, with the unlit colors after them.
Uint16PaletteCycleUnlitColors [14]
Sint16LightSpriteTileThe glows drawn over the symbol blocks (scLightSpritesDraw): the VRAM cache entry of their tiles, how many actors carry one and which, their sprites, the large mode, the priority (-1 for each actor's own) and the picture row.
Sint16LightSpriteCount
LIGHT_OAMLightSpriteOams [16]
Sint16LightSpritesLarge
Sint16LightSpritePriority
METATILE_TARGETCrackedTilesThe cracked floors' metatiles, found by shared/cracked_tile_find.c.
extern Uint32FieldEffectShortScript []
extern Uint32FieldEffectMediumScript []The flash about the Tomegathericon: held 45 ticks, then put away and freed.
extern Uint32FieldEffectLongScript []
extern Sint32PaletteCyclePausesInScripts
extern Sint32PaletteCycleTickThe palette cycle's tick, -1 before it starts, and whether scripts hold it (fdPaletteCycleStep).
extern Sint32WhirlwindEndScript []
extern const Sint32 *FieldEffectDurationScripts []The field effects' three scripts by how long an effect lasts: short, medium and long.
Uint32SceneExits []The room has no exits of its own.
ACTOR_PLACEActorPlacements []The room's people: the party's four rows, then PSYNERGY_TEST_ACTOR_ID's.
CUESceneCues []The room's scripts: talking to its people, Mind Read on them, the metatiles examined, and the field Psynergy each spot answers.

Description

Jupiter Lighthouse's central room, and north of it the room of the five grey blocks. In the middle of the central room a beam of light rises from a purple pedestal between four winged statues, pink sparks circling it. Felix comes back here from the east ledge: he pushes the energy block off the ledge, drops after it and pushes it into the gap at the head of the path at metatile (20, 39), and the path lights up to a purple Hover pad (scJupiterLighthouseDropEnergyBlock). Hovering from there, he floats west into the beam, which carries him up to the room of the locked doors (scJupiterLighthouseRideTheBeam). Two purple Cyclone pads by the doorway north of the beam whirl him up onto the high ledge, towards the stairs, or back down (scJupiterLighthouseCycloneLiftsLeader, scJupiterLighthouseCycloneDropsLeader). In the north room, once the lighthouse is activated, four of the five grey blocks hover over their sockets, and the rightmost, Moved one metatile west onto the empty socket, rises to join them as a bridge to the room's east side (scJupiterLighthouseRaiseSocketBlock).

Macros in detail

OWN_fdMapGridGetMetatileBehavior

#define OWN_fdMapGridGetMetatileBehavior

This file declares fdMapGridGetMetatileBehavior its own way, below.

Definition at line 19 of file jupiter_lighthouse_central_room.c.

FLAG_CENTRAL_ROOM_ENERGY_BLOCK_IN_GAP

#define FLAG_CENTRAL_ROOM_ENERGY_BLOCK_IN_GAP 0xa02

The energy block lies in its gap, lighting the path.

Referenced by scInit() and scJupiterLighthouseDropEnergyBlock().

Definition at line 33 of file jupiter_lighthouse_central_room.c.

FLAG_CENTRAL_ROOM_SOCKET_BLOCK_RAISED

#define FLAG_CENTRAL_ROOM_SOCKET_BLOCK_RAISED 0xa03

The fifth grey block, Moved onto the empty socket, has risen to hover over it.

Referenced by scInit() and scJupiterLighthouseRaiseSocketBlock().

Definition at line 36 of file jupiter_lighthouse_central_room.c.

CENTRAL_ROOM_GAP_METATILE_X

#define CENTRAL_ROOM_GAP_METATILE_X 20

The gap at the head of the path below the east ledge, which the energy block fills.

Referenced by scInit() and scJupiterLighthouseDropEnergyBlock().

Definition at line 60 of file jupiter_lighthouse_central_room.c.

CENTRAL_ROOM_GAP_METATILE_Z

#define CENTRAL_ROOM_GAP_METATILE_Z 39

Referenced by scInit() and scJupiterLighthouseDropEnergyBlock().

Definition at line 61 of file jupiter_lighthouse_central_room.c.

CENTRAL_ROOM_EMPTY_SOCKET_METATILE_X

#define CENTRAL_ROOM_EMPTY_SOCKET_METATILE_X 18

The empty socket at the east end of the grey blocks' row.

Referenced by scJupiterLighthouseRaiseSocketBlock().

Definition at line 71 of file jupiter_lighthouse_central_room.c.

CENTRAL_ROOM_EMPTY_SOCKET_METATILE_Z

#define CENTRAL_ROOM_EMPTY_SOCKET_METATILE_Z 6

Referenced by scJupiterLighthouseRaiseSocketBlock().

Definition at line 72 of file jupiter_lighthouse_central_room.c.

BEAM_PARTICLES

#define BEAM_PARTICLES 22

The pink sparks that circle the beam.

Referenced by scJupiterLighthouseSpawnBeamParticles().

Definition at line 96 of file jupiter_lighthouse_central_room.c.

BEAM_RIDE_STEPS

#define BEAM_RIDE_STEPS 110

The steps the beam lifts a leader, 3 pixels every other tick, before the room of locked doors takes over.

Referenced by scJupiterLighthouseRideTheBeam().

Definition at line 99 of file jupiter_lighthouse_central_room.c.

EFFECT_SET_MODE

#define EFFECT_SET_MODE fdActorSelectAnimation

Referenced by EFFECT_SPAWN.

Definition at line 774 of file jupiter_lighthouse_central_room.c.

EFFECT_SET_SCRIPT

#define EFFECT_SET_SCRIPT fdActorStartScript

Referenced by EFFECT_SPAWN.

Definition at line 775 of file jupiter_lighthouse_central_room.c.

METATILE_PUSH_SLOT_ENTRY

#define METATILE_PUSH_SLOT_ENTRY syOAMAddSpriteAtDepthClamped

Referenced by scCrackedTileUpdate().

Definition at line 778 of file jupiter_lighthouse_central_room.c.

Enumerations in detail

JUPITER_LIGHTHOUSE_CENTRAL_ROOM_ACTOR_ID

enum JUPITER_LIGHTHOUSE_CENTRAL_ROOM_ACTOR_ID

The room's actors, numbering the rows of ActorPlacements.

EnumeratorValueDescription
ACTOR_FIRST_HOVERING_BLOCKACTOR_FIRST_PLACEDThe four grey blocks
ACTOR_LAST_HOVERING_BLOCKACTOR_FIRST_HOVERING_BLOCK + 3that hover over their sockets once the lighthouse is activated, west to east.
ACTOR_SOCKET_BLOCKThe fifth, east of the row's empty socket.
ACTOR_NORTHWEST_STATUEThe four winged statues round the beam.
ACTOR_NORTHEAST_STATUE
ACTOR_SOUTHWEST_STATUE
ACTOR_SOUTHEAST_STATUE
ACTOR_ENERGY_BLOCKThe block on the east ledge, which lights the path from the gap below.

Definition at line 39 of file jupiter_lighthouse_central_room.c.

anonymous enum

enum { GLOW_PATH_NORTH_SOUTH }

The energy block's glow, a picture of FieldPathGlowTiles: the lit channel of a straight north-south path piece.

EnumeratorValueDescription
GLOW_PATH_NORTH_SOUTH0

Definition at line 65 of file jupiter_lighthouse_central_room.c.

JUPITER_LIGHTHOUSE_CENTRAL_ROOM_WAY

enum JUPITER_LIGHTHOUSE_CENTRAL_ROOM_WAY

The ways between the central room and the room of the grey blocks north of it, by the arched doorways at the central room's west and east ends, metatiles (5, 37) and (21, 37), and the passages up into the north room's south-west and south-east corners, metatiles (6, 17) and (22, 17). A way's exit, the metatile that takes it and the entrance at its mouth share its number, so the way back is the entrance the exit leads to.

EnumeratorValueDescription
WAY_CENTRAL_ROOM_WEST_TO_NORTH_ROOM2
WAY_NORTH_ROOM_TO_CENTRAL_ROOM_WEST
WAY_CENTRAL_ROOM_EAST_TO_NORTH_ROOM
WAY_NORTH_ROOM_TO_CENTRAL_ROOM_EAST

Definition at line 80 of file jupiter_lighthouse_central_room.c.

JUPITER_LIGHTHOUSE_CENTRAL_ROOM_METATILE_BEHAVIOR

enum JUPITER_LIGHTHOUSE_CENTRAL_ROOM_METATILE_BEHAVIOR

The room's own metatile behaviors.

EnumeratorValueDescription
METATILE_BEHAVIOR_BEAM20The beam's floor, metatiles (12, 40) to (14, 42).

Definition at line 89 of file jupiter_lighthouse_central_room.c.

anonymous enum

enum { CUE_CYCLONE_UP_WEST, CUE_CYCLONE_UP_EAST, CUE_CYCLONE_DOWN_WEST, CUE_CYCLONE_DOWN_EAST }

The Cyclone pads' metatiles, which are also the cues their Psynergy raises (FIELD_STATE.raisedCue): the west pad at metatile (9, 36) and the east one at metatile (16, 35), with Felix below the ledge or (as copied in for the ledge's layer) on it.

EnumeratorValueDescription
CUE_CYCLONE_UP_WEST30
CUE_CYCLONE_UP_EAST
CUE_CYCLONE_DOWN_WEST
CUE_CYCLONE_DOWN_EAST

Definition at line 136 of file jupiter_lighthouse_central_room.c.

Functions in detail

scJupiterLighthouseCycloneUpOnWestPad

void scJupiterLighthouseCycloneUpOnWestPad(void)

Felix casts Cyclone on the west pad below the ledge, metatile (9, 36). Nothing is seen yet: Cyclone is told to leave him on the pad (sceneVariant 1) rather than sweep him up itself, and the room's own whirlwind lifts him to the ledge (scJupiterLighthouseCycloneLiftsLeader).

Referenced by SceneCues.

Definition at lines 144 and 381 of file jupiter_lighthouse_central_room.c.

scJupiterLighthouseCycloneUpOnEastPad

void scJupiterLighthouseCycloneUpOnEastPad(void)

Felix casts Cyclone on the east pad below the ledge, metatile (16, 35); as on the west pad, the room's own whirlwind lifts him.

Referenced by SceneCues.

Definition at lines 145 and 392 of file jupiter_lighthouse_central_room.c.

scJupiterLighthouseCycloneDownOnEastPad

void scJupiterLighthouseCycloneDownOnEastPad(void)

Felix casts Cyclone on the east pad up on the ledge. Nothing is seen yet; the whirlwind that takes him down follows.

Referenced by SceneCues.

Definition at lines 147 and 411 of file jupiter_lighthouse_central_room.c.

scJupiterLighthouseRideTheBeam

void scJupiterLighthouseRideTheBeam(void)

Felix floats into the beam of light in the middle of the room while Hovering,
over metatiles (12,
40) to (14, 42): he is drawn to its center and rises up it, spinning, to the
    room of the locked
doors. Walking onto the beam's floor without Hover (less than 32 pixels up)
does nothing.

References fdActorGet(), fdActorSetAnimationSpeed(), fdActorWalkTo(), MainRoutineStateWork, scFieldActorSetSpritePriority(), scFieldScriptSetExitRequest(), Sint32 and sySynch().

Referenced by SceneCues.

Definition at lines 149 and 422 of file jupiter_lighthouse_central_room.c.

scJupiterLighthouseStartHover

void scJupiterLighthouseStartHover(void)

Nothing visible happens when Felix starts to Hover anywhere in the room; the central room's east doorway, metatile (21, 37), is walled off while he floats, so that he cannot drift out through it.

References MainRoutineStateWork and scFieldMapGridSetMetatileBehavior().

Referenced by SceneCues.

Definition at lines 151 and 565 of file jupiter_lighthouse_central_room.c.

scJupiterLighthouseEndHover

void scJupiterLighthouseEndHover(void)

Nothing visible happens when Felix's Hover ends; the central room's east doorway leads out again.

References fdMapGridSetMetatileBehavior().

Referenced by SceneCues.

Definition at lines 153 and 578 of file jupiter_lighthouse_central_room.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References SceneEntrances.

Definition at line 164 of file jupiter_lighthouse_central_room.c.

scGetExitRegions

const SCENE_REGION *scGetExitRegions(void)

Definition at line 169 of file jupiter_lighthouse_central_room.c.

scGetExits

const Uint32 *scGetExits(void)

References SceneExits.

Definition at line 174 of file jupiter_lighthouse_central_room.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

References ActorPlacements.

Definition at line 179 of file jupiter_lighthouse_central_room.c.

scJupiterLighthouseSetCyclonePadsForLeader

void scJupiterLighthouseSetCyclonePadsForLeader(void)

Lets Cyclone on either pad take Felix the other way from where he stands: on the high ledge it carries him down, below it lifts him up.

References fdActorGet(), MainRoutineStateWork and scFieldMapGridSetMetatileBehavior().

Referenced by scInit(), scJupiterLighthouseCycloneDropsLeader() and scJupiterLighthouseCycloneLiftsLeader().

Definition at line 186 of file jupiter_lighthouse_central_room.c.

scJupiterLighthouseDrawGlow

void scJupiterLighthouseDrawGlow(void)

An event: draws the glow over the Cyclone pad in use.

References fdEffectSpriteDrawAtWorldXYZ(), JupiterLighthouseGlowPosition, JupiterLighthouseGlowSprite and Sint32.

Referenced by scJupiterLighthouseCycloneDropsLeader() and scJupiterLighthouseCycloneLiftsLeader().

Definition at line 216 of file jupiter_lighthouse_central_room.c.

scJupiterLighthouseCycloneDropsLeader

void scJupiterLighthouseCycloneDropsLeader(Sint32 kind)

Felix casts Cyclone standing on a purple pad up on the high ledge north of the beam (kind says the west or east pad): he sinks, and a whirlwind spins him down to the pad on the floor below.

References fdActorGet(), fdActorRelease(), fdActorSelectAnimation(), fdActorSetSpriteFlags(), fdActorSpawn(), fdScriptEnd(), fdScriptStart(), JupiterLighthouseGlowPosition, MainRoutineStateWork, scFieldCloseEvent(), scFieldScriptEndLastingPsynergy(), scJupiterLighthouseDrawGlow(), scJupiterLighthouseSetCyclonePadsForLeader(), scScriptCameraFollowActor(), Sint32, sySetTickEvent() and sySynch().

Referenced by SceneCues.

Definition at line 227 of file jupiter_lighthouse_central_room.c.

scJupiterLighthouseCycloneLiftsLeader

void scJupiterLighthouseCycloneLiftsLeader(Sint32 kind)

Felix casts Cyclone standing on a purple pad north of the beam's winged statues, the west one at metatile (9, 36) or the east one at metatile (16, 35) (kind says which): a whirlwind spins him up the wall, the camera rising with him, and he vanishes into it and reappears small on the pad on the high ledge 144 pixels above, growing back to his size.

References fdActorGet(), fdActorRelease(), fdActorSelectAnimation(), fdActorSetSpriteFlags(), fdActorSpawn(), fdScriptEnd(), fdScriptStart(), JupiterLighthouseGlowPosition, MainRoutineStateWork, scFieldCloseEvent(), scFieldScriptEndLastingPsynergy(), scJupiterLighthouseDrawGlow(), scJupiterLighthouseSetCyclonePadsForLeader(), scScriptCameraFollowActor(), Sint32, sySetTickEvent() and sySynch().

Referenced by SceneCues.

Definition at line 295 of file jupiter_lighthouse_central_room.c.

scJupiterLighthouseCycloneDownOnWestPad

void scJupiterLighthouseCycloneDownOnWestPad(void)

Felix casts Cyclone on the west pad up on the ledge. Nothing is seen yet; the whirlwind that takes him down follows (scJupiterLighthouseCycloneDropsLeader).

Referenced by SceneCues.

Definition at line 404 of file jupiter_lighthouse_central_room.c.

scJupiterLighthousePushEnergyBlock

void scJupiterLighthousePushEnergyBlock(Sint32 unused, Sint32 id)

Nothing visible happens as Felix starts to push the energy block on the east ledge, by walking into it or with Move. The block stops following the ground while it slides, and it and Felix are raised a step in the sprites' drawing order (scFieldActorSetSpritePriority) for the push.

References fdActorGet(), MainRoutineStateWork, scFieldActorSetSpritePriority() and Sint32.

Referenced by SceneCues.

Definition at line 454 of file jupiter_lighthouse_central_room.c.

scJupiterLighthouseDropEnergyBlock

void scJupiterLighthouseDropEnergyBlock(Sint32 unused, Sint32 id)

The energy block lands with a thump when Felix pushes it off the east ledge. Pushed on into the gap at the head of the path below, metatile (20, 39), it fills the gap and the path lights up a stretch at a time, with a sound each, down to the purple Hover pad at its end, metatile (21, 41).

References fdActorGet(), fdActorSetSpriteFlags(), fdMapGetTerrainHeight(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesLayered(), fdScriptPlaySound(), fdScriptSetFlag(), MainRoutineStateWork, scFieldActorSetSpritePriority(), scFieldMapGridSetMetatileBehavior(), scFieldScriptWait(), Sint32 and sySynch().

Referenced by SceneCues.

Definition at line 465 of file jupiter_lighthouse_central_room.c.

scJupiterLighthouseMoveSocketBlock

void scJupiterLighthouseMoveSocketBlock(Sint32 unused, Sint32 id)

Nothing visible happens as Move takes hold of the rightmost of the five grey blocks in the north room; its sprite's drawing order is set (fdActorSetSpritePriority) for the slide onto the empty socket.

References fdActorSetSpritePriority() and Sint32.

Referenced by SceneCues.

Definition at line 532 of file jupiter_lighthouse_central_room.c.

scJupiterLighthouseRaiseSocketBlock

void scJupiterLighthouseRaiseSocketBlock(Sint32 unused, Sint32 id)

The rightmost grey block in the north room, Moved one metatile west onto the empty socket at metatile (18, 6) once the lighthouse is activated, rises to hover in line with the other four, a bridge to the room's east side.

References fdActorGet(), fdScriptGetFlag(), fdScriptSetFlag(), scActorRaiseFromMetatile(), Sint32 and sySynch().

Referenced by SceneCues.

Definition at line 540 of file jupiter_lighthouse_central_room.c.

scGetCues

const CUE *scGetCues(void)

References SceneCues.

Definition at line 586 of file jupiter_lighthouse_central_room.c.

scJupiterLighthouseCircleTheBeam

void scJupiterLighthouseCircleTheBeam(ACTOR *actor)

A spark's update: it circles the beam at its own speed, rising until it reaches the top and starts again from the floor, in front of the beam on the near half of the circle and behind it on the far half.

References fdActorSelectAnimation(), syCos() and sySin().

Referenced by scJupiterLighthouseSpawnBeamParticles().

Definition at line 594 of file jupiter_lighthouse_central_room.c.

scJupiterLighthouseSpawnBeamParticles

void scJupiterLighthouseSpawnBeamParticles(void)

Places the pink sparks round the beam, each circling it at a random speed and radius, each risen five ticks' climb above the one before.

References fdActorSetSpriteFlags(), scFieldActorCreate(), scFieldActorSetSpriteColor(), scJupiterLighthouseCircleTheBeam(), Sint32 and syRandom().

Referenced by scInit().

Definition at line 619 of file jupiter_lighthouse_central_room.c.

scInit

Sint32 scInit(void)

Sets up the room: the beam and its sparks, the energy block (glowing until it lies in its gap, then gone into it with the path lit) and the grey blocks, hovering once the lighthouse is activated.

References Call4(), fdActorGet(), fdEffectSpriteInitWithFadeOverlayBlended(), fdFadeOverlayFillTiles(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesLayered(), fdScriptGetFlag(), JupiterLighthouseGlowSprite, MainRoutineStateWork, scActorRaiseFromMetatile(), scFieldActorSetSpritePriority(), scFieldMapGridSetMetatileBehavior(), scJupiterLighthouseSetCyclonePadsForLeader(), scJupiterLighthouseSpawnBeamParticles(), scLightSpritesAdd(), scLightSpritesInitPathGlows() and Sint32.

Definition at line 644 of file jupiter_lighthouse_central_room.c.

scPrepareMap

Sint32 scPrepareMap(void)

Sets the scene's arrival flags and loads the lighthouse's palettes before the map is built. Returns 0.

References scJupiterLighthouseLoadPalettes(), scSetArrivalFlags() and Sint32.

Definition at line 714 of file jupiter_lighthouse_central_room.c.

scPaletteCycleSetTick

static inline void scPaletteCycleSetTick(Sint32 value)

Restarts the palette cycle at the given tick.

References PaletteCycleTick and Sint32.

Referenced by scJupiterLighthouseLoadPalettes() and scTrialRoadStartPaletteCycle().

Definition at line 730 of file jupiter_lighthouse_central_room.c.

scLightSpritesSetPriority

void scLightSpritesSetPriority(Sint32 priority)

Unused: sets the priority the lit actors' sprites are drawn at.

References LightSpritePriority and Sint32.

Referenced by scInit().

Definition at line 764 of file jupiter_lighthouse_central_room.c.

Variables in detail

JupiterLighthouseGlowSprite

EFFECT_SPR JupiterLighthouseGlowSprite

Referenced by scInit() and scJupiterLighthouseDrawGlow().

Definition at line 107 of file jupiter_lighthouse_central_room.c.

JupiterLighthouseGlowPosition

Sint32 JupiterLighthouseGlowPosition[3]

Where the glow over the Cyclone pad in use stands.

References Sint32.

Referenced by scJupiterLighthouseCycloneDropsLeader(), scJupiterLighthouseCycloneLiftsLeader() and scJupiterLighthouseDrawGlow().

Definition at line 109 of file jupiter_lighthouse_central_room.c.

WhirlwindRiding

Sint32 WhirlwindRiding

References Sint32.

Referenced by scInit(), scJupiterLighthouseRaiseUpperWhirlwind(), scJupiterLighthouseRaiseWhirlwind(), scJupiterLighthouseRideUpperWhirlwind(), scJupiterLighthouseRideWhirlwind() and scWhirlwindUpdate().

Definition at line 111 of file jupiter_lighthouse_central_room.c.

PaletteCycleColors

Uint16 PaletteCycleColors[16]

Referenced by fdPaletteCycleFade(), fdPaletteCycleStep(), scJupiterLighthouseLoadPalettes() and scPaletteSetColorsFade().

Definition at line 112 of file jupiter_lighthouse_central_room.c.

PaletteCycleUnlitPalette

Uint16 PaletteCycleUnlitPalette[2]

Palette 13's first two colors; it is copied whole, with the unlit colors after them.

Referenced by scJupiterLighthouseLoadPalettes().

Definition at line 115 of file jupiter_lighthouse_central_room.c.

PaletteCycleUnlitColors

Uint16 PaletteCycleUnlitColors[14]

Referenced by scJupiterLighthouseLoadPalettes().

Definition at line 116 of file jupiter_lighthouse_central_room.c.

LightSpriteTile

Sint16 LightSpriteTile

Referenced by scAnemosInnerSanctumDullahanStartLightSprites(), scLightSpritesDraw(), scLightSpritesInitChannelPieces(), scLightSpritesInitEnergyBlockGlow() and scLightSpritesInitPathGlows().

Definition at line 117 of file jupiter_lighthouse_central_room.c.

LightSpriteCount

Sint16 LightSpriteCount

Referenced by scAnemosInnerSanctumDullahanStartLightSprites(), scLightSpritesAdd(), scLightSpritesAddCounted(), scLightSpritesDraw(), scLightSpritesInitChannelPieces(), scLightSpritesInitEnergyBlockGlow() and scLightSpritesInitPathGlows().

Definition at line 118 of file jupiter_lighthouse_central_room.c.

LightSpriteOams

LIGHT_OAM LightSpriteOams[16]

Referenced by scLightSpritesDraw().

Definition at line 120 of file jupiter_lighthouse_central_room.c.

LightSpritesLarge

Sint16 LightSpritesLarge

Referenced by scAnemosInnerSanctumDullahanStartLightSprites(), scLightSpritesDraw(), scLightSpritesInitChannelPieces(), scLightSpritesInitEnergyBlockGlow() and scLightSpritesInitPathGlows().

Definition at line 121 of file jupiter_lighthouse_central_room.c.

LightSpritePriority

Sint16 LightSpritePriority

Referenced by scAnemosInnerSanctumDullahanSetLightPriority(), scAnemosInnerSanctumDullahanStartLightSprites(), scLightSpritesDraw(), scLightSpritesInitChannelPieces(), scLightSpritesInitEnergyBlockGlow(), scLightSpritesInitPathGlows() and scLightSpritesSetPriority().

Definition at line 122 of file jupiter_lighthouse_central_room.c.

CrackedTiles

METATILE_TARGET CrackedTiles

Referenced by scCrackedTileFind(), scCrackedTilePlaceLanding(), scCrackedTileStep() and scCrackedTileUpdate().

Definition at line 123 of file jupiter_lighthouse_central_room.c.

PaletteCyclePausesInScripts

extern Sint32 PaletteCyclePausesInScripts

Sint32 PaletteCyclePausesInScripts

References Sint32.

Referenced by fdPaletteCycleStep(), scJupiterLighthouseLoadPalettes() and scPaletteCycleSetPausesInScripts().

Definition at lines 723 and 961 of file jupiter_lighthouse_central_room.c.

PaletteCycleTick

extern Sint32 PaletteCycleTick

Sint32 PaletteCycleTick

References Sint32.

Referenced by fdPaletteCycleStep() and scPaletteCycleSetTick().

Definition at lines 727 and 959 of file jupiter_lighthouse_central_room.c.

WhirlwindEndScript

extern Sint32 WhirlwindEndScript[]

Sint32 WhirlwindEndScript[]

References Sint32.

Referenced by scWhirlwindUpdate().

Definition at lines 741 and 963 of file jupiter_lighthouse_central_room.c.

FieldEffectDurationScripts

extern const Sint32 *FieldEffectDurationScripts[]

const Sint32 *FieldEffectDurationScripts[]

References FieldEffectLongScript, FieldEffectMediumScript, FieldEffectShortScript and Sint32.

Referenced by fdEffectSpawnResident(), scFieldEffectSpawn() and scFieldEffectSpawnLocal().

Definition at lines 772 and 970 of file jupiter_lighthouse_central_room.c.

SceneExits

Uint32 SceneExits[]

Referenced by scGetExits().

Definition at line 803 of file jupiter_lighthouse_central_room.c.

ActorPlacements

ACTOR_PLACE ActorPlacements[]

Referenced by scGetActorPlacements().

Definition at line 840 of file jupiter_lighthouse_central_room.c.

SceneCues

CUE SceneCues[]

References scJupiterLighthouseCycloneDownOnEastPad(), scJupiterLighthouseCycloneDownOnWestPad(), scJupiterLighthouseCycloneDropsLeader(), scJupiterLighthouseCycloneLiftsLeader(), scJupiterLighthouseCycloneUpOnEastPad(), scJupiterLighthouseCycloneUpOnWestPad(), scJupiterLighthouseDropEnergyBlock(), scJupiterLighthouseEndHover(), scJupiterLighthouseMoveSocketBlock(), scJupiterLighthousePushEnergyBlock(), scJupiterLighthouseRaiseSocketBlock(), scJupiterLighthouseRideTheBeam() and scJupiterLighthouseStartHover().

Referenced by scGetCues().

Definition at line 871 of file jupiter_lighthouse_central_room.c.

On this page

MacrosEnumerationsFunctionsVariablesDescriptionMacros in detailOWN_fdMapGridGetMetatileBehaviorFLAG_CENTRAL_ROOM_ENERGY_BLOCK_IN_GAPFLAG_CENTRAL_ROOM_SOCKET_BLOCK_RAISEDCENTRAL_ROOM_GAP_METATILE_XCENTRAL_ROOM_GAP_METATILE_ZCENTRAL_ROOM_EMPTY_SOCKET_METATILE_XCENTRAL_ROOM_EMPTY_SOCKET_METATILE_ZBEAM_PARTICLESBEAM_RIDE_STEPSEFFECT_SET_MODEEFFECT_SET_SCRIPTMETATILE_PUSH_SLOT_ENTRYEnumerations in detailJUPITER_LIGHTHOUSE_CENTRAL_ROOM_ACTOR_IDanonymous enumJUPITER_LIGHTHOUSE_CENTRAL_ROOM_WAYJUPITER_LIGHTHOUSE_CENTRAL_ROOM_METATILE_BEHAVIORanonymous enumFunctions in detailscJupiterLighthouseCycloneUpOnWestPadscJupiterLighthouseCycloneUpOnEastPadscJupiterLighthouseCycloneDownOnEastPadscJupiterLighthouseRideTheBeamscJupiterLighthouseStartHoverscJupiterLighthouseEndHoverscGetEntrancesscGetExitRegionsscGetExitsscGetActorPlacementsscJupiterLighthouseSetCyclonePadsForLeaderscJupiterLighthouseDrawGlowscJupiterLighthouseCycloneDropsLeaderscJupiterLighthouseCycloneLiftsLeaderscJupiterLighthouseCycloneDownOnWestPadscJupiterLighthousePushEnergyBlockscJupiterLighthouseDropEnergyBlockscJupiterLighthouseMoveSocketBlockscJupiterLighthouseRaiseSocketBlockscGetCuesscJupiterLighthouseCircleTheBeamscJupiterLighthouseSpawnBeamParticlesscInitscPrepareMapscPaletteCycleSetTickscLightSpritesSetPriorityVariables in detailJupiterLighthouseGlowSpriteJupiterLighthouseGlowPositionWhirlwindRidingPaletteCycleColorsPaletteCycleUnlitPalettePaletteCycleUnlitColorsLightSpriteTileLightSpriteCountLightSpriteOamsLightSpritesLargeLightSpritePriorityCrackedTilesPaletteCyclePausesInScriptsPaletteCycleTickWhirlwindEndScriptFieldEffectDurationScriptsSceneExitsActorPlacementsSceneCues