Skip to Content
The Alchemy Project

src/scene/jupiter_lighthouse_upper_hall.c

The hall of Jupiter Lighthouse where the lighthouse is woken, between the room of locked doors below and the cracked floor's room and the terraces above. More…

Structures

NameDescription
structSPARKOne spark of the ring: its sideways and upward swing, in pixels, and its age along the way from one end to the other; it is drawn only while its age runs from 0 to its duration.
structSPARK_RING_STATEThe spark ring in its heap slot: the orbs' pictures, the sparks and their sprites, the ring's two ends and its VRAM entry.

Macros

NameDescription
#defineOWN_fdMapGridGetMetatileBehaviorThis file declares fdMapGridGetMetatileBehavior its own way, below.
#defineFLAG_VOICE_HEARD 0xa0eSet while the leader stands in the center of the hall, so the voice speaks once each time he steps in.
#defineFLAG_UPPER_HALL_SOCKET_BLOCK_RAISED 0xa09The grey block Moved onto the empty socket has risen to hover over it.
#defineFLAG_ALEX_WAITING 0xa22Set as Alex stops the party here; he stays in the hall until Isaac and Ivan have fallen.
#defineEMPTY_SOCKET_METATILE_X 13The empty socket between the west grey blocks.
#defineEMPTY_SOCKET_METATILE_Z 34
#defineACTIVATION_METATILE_X 42The metatile, just north of where the voice speaks, where Hover wakes the lighthouse.
#defineACTIVATION_METATILE_Z 41
#defineRING_PULSES 20The times the ring of sparks pulses, each pause shorter than the last.
#defineACTIVATION_SPARKS 96The sparks of the activation's ring, from the leader to the beam.
#defineEFFECT_SET_MODE fdActorSelectAnimation
#defineEFFECT_SET_SCRIPT fdActorStartScript
#defineMETATILE_PUSH_SLOT_ENTRY syOAMAddSpriteAtDepthClamped

Enumerations

NameDescription
enumJUPITER_LIGHTHOUSE_UPPER_HALL_ACTOR_ID { ACTOR_WEST_HOVERING_BLOCK, ACTOR_SOCKET_BLOCK, ACTOR_EAST_HO … }The hall's actors, numbering the rows of ActorPlacements.
enumanonymous enum { CUE_HALL_CENTER, CUE_OFF_HALL_CENTER, CUE_ALEX_STOPS_THE_PAR … }The step cues of the hall's center under the platform, of the metatiles round it, and of the way to the fight by the aerie where Alex stops the party.
enumJUPITER_LIGHTHOUSE_UPPER_HALL_WAY { WAY_NORTH_ROOM_UP_TO_SPIKE_ROOM, WAY_SPIKE_ROOM_DOWN_TO_NORT … }The ways between the rooms: stairs up from the north room's doorway, where the stairs from the room of locked doors come up, to the room of the grey blocks over the spikes at the hall's west end, and back down; and from the spike room's south-east corner into the hall's north-east doorway, and back.

Functions

NameDescription
voidscJupiterLighthouseStartSparkRing (const Sint32 *from, const Sint32 *to)Starts the spark ring between two points: loads the colored orbs' pictures, readies the sparks' sprites at the leader's priority and just in front of him, and starts the update event.
voidscJupiterLighthouseUpdateSparkRing (void)A tick event: moves each live spark along the way between the ring's ends, swinging out and back on a half sine, and draws it.
voidscJupiterLighthouseInitSparkSprite (EFFECT_SPR *sprite, Sint32 pivotX, Sint32 pivotY, Uint32 attributes, Sint32 tile)Fills an effect sprite: its OAM attributes, its tiles and its size from its shape, pivoted at (pivotX, pivotY) (fdEffectSpriteInit, through the overlay's own import row).
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.
voidscCrackedTileCrack (METATILE_TARGET *table, METATILE_TARGET_ENTRY *entry)Cracks the tile under the leader, swapping in its cracked picture.
voidscJupiterLighthouseHearTheVoice (void)Stepping into the hall's center: the screen warms and a voice asks for the power of Anemos, once until the party leaves the center.
voidscJupiterLighthouseLeaveTheCenter (void)Stepping out of the center: the voice speaks again next time.
voidscJupiterLighthouseAlexHealsTheParty (void)On the way to the fight by the aerie, Alex's voice stops Felix, who looks about; Alex appears before him, asks whether he will light the beacon, tells him to save his friends and heals the party.
voidscJupiterLighthouseDrawSparkSprite (EFFECT_SPR *sprite)Queues an effect sprite for this tick at its depth, turned and scaled about its pivot (fdEffectSpriteDraw, through the overlay's own import row).
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.
voidscJupiterLighthouseLiftPushedBlock (void)As one of the hall's blocks is pushed or Moved: lifts it off its metatiles.
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.
voidscJupiterLighthousePlacePushedBlock (Sint32 unused, Sint32 id)As a block is set down: the middle grey block, once the lighthouse is activated and it sits on the empty socket, rises 32 pixels and hovers for good; any other block is set on its metatiles.
voidscJupiterLighthouseFlashColors (ACTOR *actor)An actor's update while the lighthouse wakes: every other tick its sprite steps through six color modes.
voidscOrbUpdate (ACTOR *self)A rising orb's update: it circles the beam of light.
voidscOrbSpawnRising (void)Every third tick, starts a particle circling the beam of light, up to 63 pixels over a point 28 below the beam's foot; with FLAG_SCENE_TEMP(0x01), which nothing in the hall sets, every tick and up to 255 pixels.
voidscJupiterLighthouseAddSparks (Sint32 count)Sends count new sparks along the ring, each swinging up to 64 pixels out to a random side (never straight down) and taking 16 to 31 ticks to arrive.
voidscJupiterLighthouseFeedSparkRing (void)A tick event while the lighthouse wakes: adds this tick's sparks to the ring, with the rising sound until the tower starts to shake.
voidscJupiterLighthouseEndSparkRing (void)Stops the spark ring and frees its pictures and state.
static __inline__ voidscJupiterLighthouseBringInBeam (Sint32 id)Shows one half of the beam of light, white and drawn under the actors standing in it, a tenth of its width and upside down at first, and starts the script that widens it.
voidscJupiterLighthouseActivateTheLighthouse (void)Hover cast at the ladder's foot wakes the lighthouse: the leader faces north and flashes in shifting colors, a ring of sparks pulses faster and faster toward the hall's far end as the tower shakes, the beam of light rises there with particles circling it, the hall's floor changes and its lights cycle, and the four grey blocks over the spikes beside the ladder rise to hover.
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.
voidscJupiterLighthouseAlexAppears (void)Alex appears out of a shower of rising sparks.
voidscJupiterLighthouseHealTarget (Sint32 healer, Sint32 target)The healer raises arcs of light over the target, which spins and flashes for two seconds to the revival jingle and then stands facing north.
const CUE *scGetCues (void)The scene's cues: the rooms of names' for any entrance above ENTRANCE_NAMES_ABOVE, else the debug room's.
Sint32scInit (void)Sets up the hall: Alex while he waits for the party, the beam of light hidden until the lighthouse is activated, then shown with its particles.
Sint32scPrepareMap (void)Sets the scene's arrival flags and loads the lighthouse's palettes.
static inline voidscPaletteCycleSetTick (Sint32 value)Restarts the palette cycle at the given tick.
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.
voidscLightSpritesSetPriority (Sint32 value)Unused: sets the priority the lit actors' sprites are drawn at.
voidsyGameFlagSetByte (Sint32 flag, Sint32 value)Sets the whole byte flags is in.

Variables

NameDescription
extern Uint32OrbRisingScript []A rising orb's script, which the Jupiter and Mars Lighthouses keep a copy of for the particles that rise in their beams: at 0.8 of its size, it rises a pixel a tick for 16 ticks and is gone.
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 Sint16JupiterLighthousePushedBlocks []The three blocks Move pushes, ended by -1.
extern Sint32JupiterLighthouseSparksPerTickHow many sparks the ring takes each tick, and whether the rising sound plays with them.
extern Sint32JupiterLighthouseSparkSoundOn
extern Uint32JupiterLighthouseBringInScript []The beam of light widens over 32 ticks.
extern Sint32JupiterLighthouseNarrowBeamScript []The beam of light narrows away over 140 ticks.
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

The hall of Jupiter Lighthouse where the lighthouse is woken, between the room of locked doors below and the cracked floor's room and the terraces above. Below the platform in its center a voice asks the holder of the star to show the power of Anemos (scJupiterLighthouseHearTheVoice), and Hover cast at the foot of the ladder up to it activates the lighthouse (scJupiterLighthouseActivateTheLighthouse): its grey blocks rise to hover in every room and a beam of light stands in the hall. Later, on the way to the fight by the aerie, Alex stops the party here and heals it (scJupiterLighthouseAlexHealsTheParty).

Macros in detail

OWN_fdMapGridGetMetatileBehavior

#define OWN_fdMapGridGetMetatileBehavior

This file declares fdMapGridGetMetatileBehavior its own way, below.

Definition at line 12 of file jupiter_lighthouse_upper_hall.c.

FLAG_VOICE_HEARD

#define FLAG_VOICE_HEARD 0xa0e

Set while the leader stands in the center of the hall, so the voice speaks once each time he steps in.

Referenced by scJupiterLighthouseHearTheVoice() and scJupiterLighthouseLeaveTheCenter().

Definition at line 31 of file jupiter_lighthouse_upper_hall.c.

FLAG_UPPER_HALL_SOCKET_BLOCK_RAISED

#define FLAG_UPPER_HALL_SOCKET_BLOCK_RAISED 0xa09

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

Referenced by scJupiterLighthousePlacePushedBlock() and scPrepareMap().

Definition at line 33 of file jupiter_lighthouse_upper_hall.c.

FLAG_ALEX_WAITING

#define FLAG_ALEX_WAITING 0xa22

Set as Alex stops the party here; he stays in the hall until Isaac and Ivan have fallen.

Referenced by scInit() and scJupiterLighthouseAlexHealsTheParty().

Definition at line 36 of file jupiter_lighthouse_upper_hall.c.

EMPTY_SOCKET_METATILE_X

#define EMPTY_SOCKET_METATILE_X 13

The empty socket between the west grey blocks.

Referenced by scJupiterLighthousePlacePushedBlock().

Definition at line 83 of file jupiter_lighthouse_upper_hall.c.

EMPTY_SOCKET_METATILE_Z

#define EMPTY_SOCKET_METATILE_Z 34

Referenced by scJupiterLighthousePlacePushedBlock().

Definition at line 84 of file jupiter_lighthouse_upper_hall.c.

ACTIVATION_METATILE_X

#define ACTIVATION_METATILE_X 42

The metatile, just north of where the voice speaks, where Hover wakes the lighthouse.

Referenced by scJupiterLighthouseActivateTheLighthouse().

Definition at line 87 of file jupiter_lighthouse_upper_hall.c.

ACTIVATION_METATILE_Z

#define ACTIVATION_METATILE_Z 41

Referenced by scJupiterLighthouseActivateTheLighthouse().

Definition at line 88 of file jupiter_lighthouse_upper_hall.c.

RING_PULSES

#define RING_PULSES 20

The times the ring of sparks pulses, each pause shorter than the last.

Referenced by scJupiterLighthouseActivateTheLighthouse().

Definition at line 90 of file jupiter_lighthouse_upper_hall.c.

ACTIVATION_SPARKS

#define ACTIVATION_SPARKS 96

The sparks of the activation's ring, from the leader to the beam.

Referenced by scJupiterLighthouseAddSparks(), scJupiterLighthouseStartSparkRing() and scJupiterLighthouseUpdateSparkRing().

Definition at line 92 of file jupiter_lighthouse_upper_hall.c.

EFFECT_SET_MODE

#define EFFECT_SET_MODE fdActorSelectAnimation

Referenced by EFFECT_SPAWN.

Definition at line 937 of file jupiter_lighthouse_upper_hall.c.

EFFECT_SET_SCRIPT

#define EFFECT_SET_SCRIPT fdActorStartScript

Referenced by EFFECT_SPAWN.

Definition at line 938 of file jupiter_lighthouse_upper_hall.c.

METATILE_PUSH_SLOT_ENTRY

#define METATILE_PUSH_SLOT_ENTRY syOAMAddSpriteAtDepthClamped

Referenced by scCrackedTileUpdate().

Definition at line 944 of file jupiter_lighthouse_upper_hall.c.

Enumerations in detail

JUPITER_LIGHTHOUSE_UPPER_HALL_ACTOR_ID

enum JUPITER_LIGHTHOUSE_UPPER_HALL_ACTOR_ID

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

EnumeratorValueDescription
ACTOR_WEST_HOVERING_BLOCKACTOR_FIRST_PLACED + 2The three grey blocks over the spikes at the west end, which hover once the lighthouse is activated; the middle one is Moved onto the empty socket between the others to rise with them.
ACTOR_SOCKET_BLOCK
ACTOR_EAST_HOVERING_BLOCK
ACTOR_FIRST_RISING_BLOCKThe four grey blocks the activation raises
ACTOR_LAST_RISING_BLOCKACTOR_FIRST_RISING_BLOCK + 3before the party's eyes.
ACTOR_FIRST_PUSHED_BLOCKThe three yellow blocks pushed or Moved about the floor.
ACTOR_LAST_PUSHED_BLOCKACTOR_FIRST_PUSHED_BLOCK + 2
ACTOR_ALEXACTOR_LAST_PUSHED_BLOCK + 3
ACTOR_LOWER_BEAMThe two halves of the beam of light the activation
ACTOR_UPPER_BEAMraises.

Definition at line 39 of file jupiter_lighthouse_upper_hall.c.

anonymous enum

enum { CUE_HALL_CENTER, CUE_OFF_HALL_CENTER, CUE_ALEX_STOPS_THE_PARTY }

The step cues of the hall's center under the platform, of the metatiles round it, and of the way to the fight by the aerie where Alex stops the party.

EnumeratorValueDescription
CUE_HALL_CENTER21
CUE_OFF_HALL_CENTER22
CUE_ALEX_STOPS_THE_PARTY100

Definition at line 61 of file jupiter_lighthouse_upper_hall.c.

JUPITER_LIGHTHOUSE_UPPER_HALL_WAY

enum JUPITER_LIGHTHOUSE_UPPER_HALL_WAY

The ways between the rooms: stairs up from the north room's doorway, where the stairs from the room of locked doors come up, to the room of the grey blocks over the spikes at the hall's west end, and back down; and from the spike room's south-east corner into the hall's north-east doorway, and back. 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_NORTH_ROOM_UP_TO_SPIKE_ROOM2
WAY_SPIKE_ROOM_DOWN_TO_NORTH_ROOM
WAY_SPIKE_ROOM_TO_HALL7
WAY_HALL_TO_SPIKE_ROOM

Definition at line 74 of file jupiter_lighthouse_upper_hall.c.

Functions in detail

scJupiterLighthouseStartSparkRing

void scJupiterLighthouseStartSparkRing(const Sint32 *from, const Sint32 *to)

Starts the spark ring between two points: loads the colored orbs' pictures, readies the sparks' sprites at the leader's priority and just in front of him, and starts the update event.

References fdActorGet(), fdActorGetSpriteDepth(), fdActorGetSpritePriority(), MainRoutineStateWork, mnVRAMLoad(), scJupiterLighthouseInitSparkSprite(), scJupiterLighthouseUpdateSparkRing(), Sint32, syDecompressTaggedLZ(), syHeapSlotAllocate(), syResourceGetTableEntry(), sySetTickEvent() and syVRAMCacheFindFreeEntry().

Referenced by scJupiterLighthouseActivateTheLighthouse().

Definition at lines 100 and 865 of file jupiter_lighthouse_upper_hall.c.

scJupiterLighthouseUpdateSparkRing

void scJupiterLighthouseUpdateSparkRing(void)

A tick event: moves each live spark along the way between the ring's ends, swinging out and back on a half sine, and draws it.

References fdCameraWorldToScreen(), scJupiterLighthouseDrawSparkSprite(), Sint32 and sySin().

Referenced by scJupiterLighthouseEndSparkRing() and scJupiterLighthouseStartSparkRing().

Definition at lines 102 and 800 of file jupiter_lighthouse_upper_hall.c.

scJupiterLighthouseInitSparkSprite

void scJupiterLighthouseInitSparkSprite(EFFECT_SPR *sprite, Sint32 pivotX, Sint32 pivotY, Uint32 attributes, Sint32 tile)

Fills an effect sprite: its OAM attributes, its tiles and its size from its shape, pivoted at (pivotX, pivotY) (fdEffectSpriteInit, through the overlay's own import row).

Referenced by scJupiterLighthouseStartSparkRing().

Definition at line 107 of file jupiter_lighthouse_upper_hall.c.

scJupiterLighthouseHearTheVoice

void scJupiterLighthouseHearTheVoice(void)

Stepping into the hall's center: the screen warms and a voice asks for the power of Anemos, once until the party leaves the center.

References fdActorSetAnimation(), fdPaletteFadeApplySource(), fdPaletteFadeApplyTarget(), fdPaletteFadeInterpolate(), fdScriptEnd(), fdScriptGetFlag(), fdScriptSetFlag(), fdScriptStart(), fdScriptWaitTransitionTicks(), mnFieldMessageShowCentered(), scFieldScriptEndLastingPsynergy(), scFieldScriptWait() and Sint32.

Referenced by SceneCues.

Definition at lines 137 and 471 of file jupiter_lighthouse_upper_hall.c.

scJupiterLighthouseLeaveTheCenter

void scJupiterLighthouseLeaveTheCenter(void)

Stepping out of the center: the voice speaks again next time.

References syGameFlagClear().

Referenced by SceneCues.

Definition at lines 139 and 493 of file jupiter_lighthouse_upper_hall.c.

scJupiterLighthouseAlexHealsTheParty

void scJupiterLighthouseAlexHealsTheParty(void)

On the way to the fight by the aerie, Alex's voice stops Felix, who looks about; Alex appears before him, asks whether he will light the beacon, tells him to save his friends and heals the party. From then on there are no encounters and Retreat is blocked.

References fdActorFaceDirectionAndWait(), fdActorGet(), fdActorSetAnimationAndWait(), fdActorSetPosAndFacing(), fdActorSetSpriteFlags(), fdActorShowEmote(), fdActorWalkByAndWait(), fdActorWalkToAndWait(), fdScriptEnd(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptStart(), gmPartyRestoreHpPp(), mnMessageShowCentered(), scFieldActorSetSpriteColor(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptWait(), scJupiterLighthouseAlexAppears(), scJupiterLighthouseHealTarget() and Sint32.

Referenced by SceneCues.

Definition at lines 141 and 583 of file jupiter_lighthouse_upper_hall.c.

scJupiterLighthouseDrawSparkSprite

void scJupiterLighthouseDrawSparkSprite(EFFECT_SPR *sprite)

Queues an effect sprite for this tick at its depth, turned and scaled about its pivot (fdEffectSpriteDraw, through the overlay's own import row).

Referenced by scJupiterLighthouseUpdateSparkRing().

Definition at line 151 of file jupiter_lighthouse_upper_hall.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References SceneEntrances.

Definition at line 153 of file jupiter_lighthouse_upper_hall.c.

scGetExitRegions

const SCENE_REGION *scGetExitRegions(void)

Definition at line 158 of file jupiter_lighthouse_upper_hall.c.

scGetExits

const Uint32 *scGetExits(void)

References SceneExits.

Definition at line 163 of file jupiter_lighthouse_upper_hall.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

References ActorPlacements.

Definition at line 168 of file jupiter_lighthouse_upper_hall.c.

scJupiterLighthouseLiftPushedBlock

void scJupiterLighthouseLiftPushedBlock(void)

As one of the hall's blocks is pushed or Moved: lifts it off its metatiles.

References fdActorLiftTargetBlock() and JupiterLighthousePushedBlocks.

Referenced by SceneCues.

Definition at lines 176 and 969 of file jupiter_lighthouse_upper_hall.c.

scJupiterLighthousePlacePushedBlock

void scJupiterLighthousePlacePushedBlock(Sint32 unused, Sint32 id)

As a block is set down: the middle grey block, once the lighthouse is activated and it sits on the empty socket, rises 32 pixels and hovers for good; any other block is set on its metatiles.

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

Referenced by SceneCues.

Definition at line 186 of file jupiter_lighthouse_upper_hall.c.

scJupiterLighthouseFlashColors

void scJupiterLighthouseFlashColors(ACTOR *actor)

An actor's update while the lighthouse wakes: every other tick its sprite steps through six color modes.

References fdActorSetSpriteColorMode() and TickCount.

Referenced by scJupiterLighthouseActivateTheLighthouse().

Definition at line 217 of file jupiter_lighthouse_upper_hall.c.

scOrbUpdate

void scOrbUpdate(ACTOR *self)

A rising orb's update: it circles the beam of light.

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

Referenced by scOrbSpawnRising().

Definition at line 226 of file jupiter_lighthouse_upper_hall.c.

scOrbSpawnRising

void scOrbSpawnRising(void)

Every third tick, starts a particle circling the beam of light, up to 63 pixels over a point 28 below the beam's foot; with FLAG_SCENE_TEMP(0x01), which nothing in the hall sets, every tick and up to 255 pixels.

References fdActorGet(), fdActorStartScript(), fdScriptGetFlag(), OrbRisingScript, scFieldActorCreate(), scFieldActorSetSpriteColor(), scOrbUpdate(), Sint32, syRandom(), sySin() and TickCount.

Referenced by scInit(), scJupiterLighthouseActivateTheLighthouse() and scMarsLighthouseAerieLightBeacon().

Definition at line 248 of file jupiter_lighthouse_upper_hall.c.

scJupiterLighthouseAddSparks

void scJupiterLighthouseAddSparks(Sint32 count)

Sends count new sparks along the ring, each swinging up to 64 pixels out to a random side (never straight down) and taking 16 to 31 ticks to arrive.

References Sint32, syCos(), syRandom() and sySin().

Referenced by scJupiterLighthouseFeedSparkRing().

Definition at lines 302 and 834 of file jupiter_lighthouse_upper_hall.c.

scJupiterLighthouseFeedSparkRing

void scJupiterLighthouseFeedSparkRing(void)

A tick event while the lighthouse wakes: adds this tick's sparks to the ring, with the rising sound until the tower starts to shake.

References fdScriptPlaySound(), JupiterLighthouseSparkSoundOn, JupiterLighthouseSparksPerTick and scJupiterLighthouseAddSparks().

Referenced by scJupiterLighthouseActivateTheLighthouse().

Definition at line 306 of file jupiter_lighthouse_upper_hall.c.

scJupiterLighthouseEndSparkRing

void scJupiterLighthouseEndSparkRing(void)

Stops the spark ring and frees its pictures and state.

References scFieldCloseEvent(), scJupiterLighthouseUpdateSparkRing(), syHeapSlotRelease() and syVRAMCacheFreeEntry().

Referenced by scJupiterLighthouseActivateTheLighthouse().

Definition at lines 316 and 911 of file jupiter_lighthouse_upper_hall.c.

scJupiterLighthouseBringInBeam

static __inline__ void scJupiterLighthouseBringInBeam(Sint32 id)

Shows one half of the beam of light, white and drawn under the actors standing in it, a tenth of its width and upside down at first, and starts the script that widens it.

References fdActorGetById(), fdActorSetMovementTypeById(), fdActorSetSpriteColor(), fdActorSetSpritePriority(), JupiterLighthouseBringInScript and Sint32.

Referenced by scJupiterLighthouseActivateTheLighthouse().

Definition at line 321 of file jupiter_lighthouse_upper_hall.c.

scJupiterLighthouseActivateTheLighthouse

void scJupiterLighthouseActivateTheLighthouse(void)

Hover cast at the ladder's foot wakes the lighthouse: the leader faces north and flashes in shifting colors, a ring of sparks pulses faster and faster toward the hall's far end as the tower shakes, the beam of light rises there with particles circling it, the hall's floor changes and its lights cycle, and the four grey blocks over the spikes beside the ladder rise to hover.

References fdActorFaceDirectionAndWait(), fdActorGetById(), fdActorSetAnimationSpeed(), fdActorSetScript(), fdActorSetSpriteFlags(), fdMapGridCopyMetatilesLayered(), fdPaletteFadeApplySource(), fdPaletteFadeApplyTarget(), fdPaletteFadeInterpolate(), fdScriptPlaySound(), fdScriptSetFlag(), JupiterLighthouseNarrowBeamScript, JupiterLighthouseSparkSoundOn, JupiterLighthouseSparksPerTick, MainRoutineStateWork, mnSoundWaitForJingle(), scActorCyclePictures(), scActorRaiseFromMetatile(), scFieldActorWaitForScriptEndById(), scFieldCloseEvent(), scFieldScriptEndLastingPsynergy(), scFieldScriptWait(), scJupiterLighthouseBringInBeam(), scJupiterLighthouseEndSparkRing(), scJupiterLighthouseFeedSparkRing(), scJupiterLighthouseFlashColors(), scJupiterLighthouseLoadPalettes(), scJupiterLighthouseStartSparkRing(), scOrbSpawnRising(), Sint32, sySetTickEvent() and sySynch().

Referenced by SceneCues.

Definition at lines 340 and 970 of file jupiter_lighthouse_upper_hall.c.

scJupiterLighthouseAlexAppears

void scJupiterLighthouseAlexAppears(void)

Alex appears out of a shower of rising sparks.

References fdActorGet(), fdActorSetSpriteColorById(), fdActorSetSpriteFlags(), fdScriptPlaySound(), scFieldEffectSpawn(), scFieldScriptWait(), Sint32 and syRandom().

Referenced by scJupiterLighthouseAlexHealsTheParty().

Definition at line 499 of file jupiter_lighthouse_upper_hall.c.

scJupiterLighthouseHealTarget

void scJupiterLighthouseHealTarget(Sint32 healer, Sint32 target)

The healer raises arcs of light over the target, which spins and flashes for two seconds to the revival jingle and then stands facing north.

References fdActorGet(), fdActorSetAnimation(), fdBattleEffectEndArcEffect(), fdBattleEffectSetObjectUpdateMode(), fdBattleEffectStartArcEffect(), fdBattleEffectWaitForArcGroups(), fdScriptPlaySound(), scFieldActorSetSpriteColor(), Sint32 and sySynch().

Referenced by scJupiterLighthouseAlexHealsTheParty().

Definition at line 548 of file jupiter_lighthouse_upper_hall.c.

scGetCues

const CUE *scGetCues(void)

References SceneCues.

Definition at line 667 of file jupiter_lighthouse_upper_hall.c.

scInit

Sint32 scInit(void)

Sets up the hall: Alex while he waits for the party, the beam of light hidden until the lighthouse is activated, then shown with its particles.

References fdActorGet(), fdActorPlaceBlocks(), fdActorSetMovementType(), fdActorSetPosAndFacing(), fdActorSetSpriteFlags(), fdMapGridCopyMetatilesLayered(), fdScriptClearFlag(), fdScriptGetFlag(), JupiterLighthousePushedBlocks, scOrbSpawnRising(), Sint32 and sySetTickEvent().

Definition at line 674 of file jupiter_lighthouse_upper_hall.c.

scPrepareMap

Sint32 scPrepareMap(void)

Sets the scene's arrival flags and loads the lighthouse's palettes. Once the lighthouse is activated, metatile (13, 42) takes Hover and the grey blocks hover, the Moved one once it is on its socket.

References fdActorGet(), fdMapGridSetMetatileBehavior(), fdScriptGetFlag(), MainRoutineStateWork, scActorRaiseFromMetatile(), scJupiterLighthouseLoadPalettes(), scSetArrivalFlags() and Sint32.

Definition at line 714 of file jupiter_lighthouse_upper_hall.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 749 of file jupiter_lighthouse_upper_hall.c.

scLightSpritesSetPriority

void scLightSpritesSetPriority(Sint32 value)

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

References LightSpritePriority and Sint32.

Referenced by scInit().

Definition at line 927 of file jupiter_lighthouse_upper_hall.c.

Variables in detail

WhirlwindRiding

Sint32 WhirlwindRiding

The 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). This hall has neither whirlwind nor cracked tile, but its copies of that code keep their state here all the same.

References Sint32.

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

Definition at line 119 of file jupiter_lighthouse_upper_hall.c.

PaletteCycleColors

Uint16 PaletteCycleColors[16]

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

Definition at line 120 of file jupiter_lighthouse_upper_hall.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 123 of file jupiter_lighthouse_upper_hall.c.

PaletteCycleUnlitColors

Uint16 PaletteCycleUnlitColors[14]

Referenced by scJupiterLighthouseLoadPalettes().

Definition at line 124 of file jupiter_lighthouse_upper_hall.c.

LightSpriteTile

Sint16 LightSpriteTile

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

Definition at line 125 of file jupiter_lighthouse_upper_hall.c.

LightSpriteCount

Sint16 LightSpriteCount

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

Definition at line 126 of file jupiter_lighthouse_upper_hall.c.

LightSpriteOams

LIGHT_OAM LightSpriteOams[16]

Referenced by scLightSpritesDraw().

Definition at line 128 of file jupiter_lighthouse_upper_hall.c.

LightSpritesLarge

Sint16 LightSpritesLarge

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

Definition at line 129 of file jupiter_lighthouse_upper_hall.c.

LightSpritePriority

Sint16 LightSpritePriority

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

Definition at line 130 of file jupiter_lighthouse_upper_hall.c.

CrackedTiles

METATILE_TARGET CrackedTiles

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

Definition at line 131 of file jupiter_lighthouse_upper_hall.c.

JupiterLighthousePushedBlocks

extern Sint16 JupiterLighthousePushedBlocks[]

Sint16 JupiterLighthousePushedBlocks[]

The three blocks Move pushes, ended by -1.

Referenced by scInit() and scJupiterLighthouseLiftPushedBlock().

Definition at lines 173 and 992 of file jupiter_lighthouse_upper_hall.c.

JupiterLighthouseSparksPerTick

extern Sint32 JupiterLighthouseSparksPerTick

Sint32 JupiterLighthouseSparksPerTick

How many sparks the ring takes each tick, and whether the rising sound plays with them.

References Sint32.

Referenced by scJupiterLighthouseActivateTheLighthouse() and scJupiterLighthouseFeedSparkRing().

Definition at lines 299 and 1073 of file jupiter_lighthouse_upper_hall.c.

JupiterLighthouseSparkSoundOn

extern Sint32 JupiterLighthouseSparkSoundOn

Sint32 JupiterLighthouseSparkSoundOn

References Sint32.

Referenced by scJupiterLighthouseActivateTheLighthouse() and scJupiterLighthouseFeedSparkRing().

Definition at lines 300 and 1074 of file jupiter_lighthouse_upper_hall.c.

JupiterLighthouseBringInScript

extern Uint32 JupiterLighthouseBringInScript[]

Uint32 JupiterLighthouseBringInScript[]

The beam of light widens over 32 ticks.

Referenced by scJupiterLighthouseBringInBeam().

Definition at lines 313 and 976 of file jupiter_lighthouse_upper_hall.c.

JupiterLighthouseNarrowBeamScript

extern Sint32 JupiterLighthouseNarrowBeamScript[]

Sint32 JupiterLighthouseNarrowBeamScript[]

The beam of light narrows away over 140 ticks.

References Sint32.

Referenced by scJupiterLighthouseActivateTheLighthouse().

Definition at lines 314 and 984 of file jupiter_lighthouse_upper_hall.c.

PaletteCyclePausesInScripts

extern Sint32 PaletteCyclePausesInScripts

Sint32 PaletteCyclePausesInScripts

References Sint32.

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

Definition at lines 458 and 1138 of file jupiter_lighthouse_upper_hall.c.

PaletteCycleTick

extern Sint32 PaletteCycleTick

Sint32 PaletteCycleTick

References Sint32.

Referenced by fdPaletteCycleStep() and scPaletteCycleSetTick().

Definition at lines 746 and 1136 of file jupiter_lighthouse_upper_hall.c.

WhirlwindEndScript

extern Sint32 WhirlwindEndScript[]

Sint32 WhirlwindEndScript[]

References Sint32.

Referenced by scWhirlwindUpdate().

Definition at lines 760 and 1140 of file jupiter_lighthouse_upper_hall.c.

FieldEffectDurationScripts

extern const Sint32 *FieldEffectDurationScripts[]

const Sint32 *FieldEffectDurationScripts[]

References FieldEffectLongScript, FieldEffectMediumScript, FieldEffectShortScript and Sint32.

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

Definition at lines 935 and 1147 of file jupiter_lighthouse_upper_hall.c.

SceneExits

Uint32 SceneExits[]

Referenced by scGetExits().

Definition at line 998 of file jupiter_lighthouse_upper_hall.c.

ActorPlacements

ACTOR_PLACE ActorPlacements[]

Referenced by scGetActorPlacements().

Definition at line 1026 of file jupiter_lighthouse_upper_hall.c.

SceneCues

CUE SceneCues[]

References scJupiterLighthouseActivateTheLighthouse(), scJupiterLighthouseAlexHealsTheParty(), scJupiterLighthouseHearTheVoice(), scJupiterLighthouseLeaveTheCenter(), scJupiterLighthouseLiftPushedBlock() and scJupiterLighthousePlacePushedBlock().

Referenced by scGetCues().

Definition at line 1076 of file jupiter_lighthouse_upper_hall.c.

On this page

StructuresMacrosEnumerationsFunctionsVariablesDescriptionMacros in detailOWN_fdMapGridGetMetatileBehaviorFLAG_VOICE_HEARDFLAG_UPPER_HALL_SOCKET_BLOCK_RAISEDFLAG_ALEX_WAITINGEMPTY_SOCKET_METATILE_XEMPTY_SOCKET_METATILE_ZACTIVATION_METATILE_XACTIVATION_METATILE_ZRING_PULSESACTIVATION_SPARKSEFFECT_SET_MODEEFFECT_SET_SCRIPTMETATILE_PUSH_SLOT_ENTRYEnumerations in detailJUPITER_LIGHTHOUSE_UPPER_HALL_ACTOR_IDanonymous enumJUPITER_LIGHTHOUSE_UPPER_HALL_WAYFunctions in detailscJupiterLighthouseStartSparkRingscJupiterLighthouseUpdateSparkRingscJupiterLighthouseInitSparkSpritescJupiterLighthouseHearTheVoicescJupiterLighthouseLeaveTheCenterscJupiterLighthouseAlexHealsThePartyscJupiterLighthouseDrawSparkSpritescGetEntrancesscGetExitRegionsscGetExitsscGetActorPlacementsscJupiterLighthouseLiftPushedBlockscJupiterLighthousePlacePushedBlockscJupiterLighthouseFlashColorsscOrbUpdatescOrbSpawnRisingscJupiterLighthouseAddSparksscJupiterLighthouseFeedSparkRingscJupiterLighthouseEndSparkRingscJupiterLighthouseBringInBeamscJupiterLighthouseActivateTheLighthousescJupiterLighthouseAlexAppearsscJupiterLighthouseHealTargetscGetCuesscInitscPrepareMapscPaletteCycleSetTickscLightSpritesSetPriorityVariables in detailWhirlwindRidingPaletteCycleColorsPaletteCycleUnlitPalettePaletteCycleUnlitColorsLightSpriteTileLightSpriteCountLightSpriteOamsLightSpritesLargeLightSpritePriorityCrackedTilesJupiterLighthousePushedBlocksJupiterLighthouseSparksPerTickJupiterLighthouseSparkSoundOnJupiterLighthouseBringInScriptJupiterLighthouseNarrowBeamScriptPaletteCyclePausesInScriptsPaletteCycleTickWhirlwindEndScriptFieldEffectDurationScriptsSceneExitsActorPlacementsSceneCues