Skip to Content
The Alchemy Project

src/scene/jupiter_lighthouse_aerie.c

Jupiter Lighthouse's aerie, the open top of the tower between its two archer statues, with the lid over the well guarded by two angels. More…

Structures

NameDescription
structBEAM_STATEAn archer's beam (scJupiterLighthouseStartBeam), in the menu's heap slot: the sparks' and the trident's pictures and sprites, the beam's path, and where its steps have reached.

Macros

NameDescription
#defineOWN_fdMapGridGetMetatileBehaviorThis unit declares its own form of fdMapGridGetMetatileBehavior, below.
#defineLEFT_GAP_METATILE_X 6The metatiles of the gaps at the ends of the archers' paths, which a path block fills.
#defineRIGHT_GAP_METATILE_X 57
#defineGAP_METATILE_Z 12
#defineLEDGE_HEIGHT (32 / 8)A path block's metatile heights, in 8-pixel steps: the ledge it stands on, and its top, 16 pixels higher, which keeps the leader from walking through it.
#definePATH_BLOCK_TOP_HEIGHT (48 / 8)
#definePATH_BLOCK_LANDING_TICKS 30The ticks a path block set down in its gap is given to land.
#definescJupiterLighthouseFillLeftGap ()A path block dropped into its gap: the gap's metatiles become the path's, in their pictures and as floor Felix can walk on.
#definescJupiterLighthouseFillRightGap ()
#definescJupiterLighthouseLightLeftPath ()The path to an archer lit, once its gap is filled.
#definescJupiterLighthouseLightRightPath ()
#defineSPARKLE_BYTES (4 * 8 * 8)The beam's pictures, at a byte a pixel: four 8 by 8 sparkles, and the 32 by 16 golden trident.
#defineTRIDENT_BYTES (32 * 16)
#defineLERP (from, to, t, n) ((from) + ((to) - (from)) * (t) / (n))The value t of n steps of the way from from to to.
#defineBEAM_CARRY_TICKS 96The ticks the trident takes to fly from the archer to the angel.
#defineBEAM_SPARK_TICKS 16The ticks a spark lives, as it fades through its four pictures.
#defineEFFECT_SET_MODE fdActorSelectAnimation
#defineEFFECT_SET_SCRIPT fdActorStartScript
#defineMETATILE_PUSH_SLOT_ENTRY syOAMAddSpriteAtDepthClamped

Enumerations

NameDescription
enumJUPITER_LIGHTHOUSE_AERIE_ACTOR_ID { ACTOR_LEFT_PATH_BLOCK, ACTOR_RIGHT_PATH_BLOCK, ACTOR_WEST_CH … }The placed actors between the archers and the lid (ACTOR_RIGHT_ARCHER and ACTOR_LID, scene/jupiter_lighthouse_aerie.h).
enumANGEL_RISE { RISE_LEFT_ANGEL, RISE_RIGHT_ANGEL, RISE_LEFT_ANGEL_AND_LID, … }What scJupiterLighthouseRaiseAngels raises: one angel, or the second of the two and then the lid with both angels.
enumBEAM_SIDE { BEAM_LEFT, BEAM_RIGHT }The archer an archer's beam comes from (scJupiterLighthouseStartBeam).
enumanonymous enum { GLOW_PATH_EAST_SOUTH, GLOW_PATH_WEST_SOUTH }The path blocks' glows, pictures of FieldPathGlowTiles: the lit channel of the path piece each block carries, from east round to south on the left block and from west round to south on the right.
enumBEAM_STEP { BEAM_GATHER, BEAM_GROW, BEAM_SPREAD, BEAM_CARRY, BEAM_SHRINK … }The steps of an archer's beam (BEAM_STATE.step).

Functions

NameDescription
static inline voidscPaletteCycleSetTick (Sint32 value)Sets the palette cycle's tick (PaletteCycleTick).
voidscLightSpritesSetPriority (Sint32 value)Sets the priority the lit actors' sprites are drawn at.
voidscJupiterLighthouseStartBeamFlicker (ACTOR *actor)Starts an actor's flicker (scJupiterLighthouseFlickerBeam).
voidscJupiterLighthouseStopBeamFlicker (ACTOR *actor)Stops an actor's flicker and leaves it in its beam's colours.
voidscJupiterLighthouseStartBeam (Sint32 archerId, Sint32 angelId, Sint32 side)An archer shoots its beam at an angel: loads the sparks and the trident into VRAM and holds the script until the beam's event has finished.
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.
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.
voidscJupiterLighthouseUpdateBeam (void)An event: one tick of an archer's beam, step by step: its sparks gather, the golden trident grows and is carried to the angel, and shrinks there as the angel starts to flicker.
voidscJupiterLighthousePlaceRaisedActors (void)Puts the aerie's two angels and the well's lid where the archers' arrows left them (FLAG_JUPITER_LIGHTHOUSE_LEFT_ANGEL_SHOT and its right twin): each shot angel and its archer glow, the angel rises and its side of the lid lifts; with both, the angels and the lid float over the well.
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 *state, METATILE_TARGET_ENTRY *entry)Cracks the tile under the leader, swapping in its cracked picture.
voidscCrackedTileFall (METATILE_TARGET *state, METATILE_TARGET_ENTRY *entry)A cracked tile gives way under Felix, who drops through it.
voidscCrackedTileDropIn (void)The leader lands from the cracked floor above in a ring of dust, as in shared/cracked_tile_drop_in.c.
voidsyImportEffectSpriteDraw (EFFECT_SPR *sprite)Draws an effect sprite (fdEffectSpriteDraw, through the overlay's import).
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.
voidscJupiterLighthouseRaiseAngels (Sint32 mode)A shot angel rises and tilts the lid away from its side; the second of the two then lifts both angels and the lid off the well, to the puzzle's jingle.
voidscJupiterLighthouseShootAtLeftAngel (void)The left archer shoots its beam at the left angel, which rises; the second angel of the two lifts the lid off.
voidscJupiterLighthouseShootAtRightAngel (void)The right archer shoots its beam at the right angel, which rises; the second angel of the two lifts the lid off.
voidscJupiterLighthouseLiftPathBlock (Sint32 unused, Sint32 actorId)Move (or a push) takes hold of the block on the ledge by an archer statue: the metatile it leaves drops back to the ledge's height.
voidscJupiterLighthousePlacePathBlock (Sint32 unused, Sint32 id)Move sets down the block on the ledge by the archer statue at the west or east end of the aerie.
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 aerie as the party enters: the window in, the palettes, the chains, the floating platforms the leader may step onto, and the angels and the lid as far as they have risen.
Sint32scPrepareMap (void)Lays out the path blocks: gone into their gaps, their paths lit, for each angel already shot, and glowing where they stand otherwise.
Sint32fdMapGridGetMetatileBehavior (Sint32 x, Sint32 z, Sint32 layer)The ROM's callers here are compiled against this form, which returns an Sint32 where the definition returns a Uint8.
voidscJupiterLighthouseFlickerBeam (ACTOR *actor)An actor's update: flickers its sprite between filled and its beam's colours, a step a tick.
voidscCrackedTilePlaceLanding (Sint32 dx, Sint32 dz, Sint32 transition)Unused here, where there is no cracked floor to fall through: in the rooms with one, it puts the leader who has fallen through on the metatile the flag bytes saved, offset by (dx, dz), and starts the screen transition.

Variables

NameDescription
extern Sint32PaletteCycleTickThe palette cycle's tick, -1 before it starts, and whether scripts hold it (fdPaletteCycleStep).
extern Sint32PaletteCyclePausesInScripts
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 colours; it is copied whole, with the unlit colours 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 Uint32FieldEffectMediumScript []The flash about the Tomegathericon: held 45 ticks, then put away and freed.
extern Uint32FieldEffectLongScript []
extern Sint32WhirlwindEndScript []
extern const Sint32 *FieldEffectDurationScripts []The field effects' three scripts by how long an effect lasts: short, medium and long.
extern Uint32FieldEffectShortScript []
SCENE_ENTRANCESceneEntrances []Besides the party's return to the pier after the ship is stolen, four unused spots about the mast: below the huge block, on the dock by its crate, on the deck, and at the top of the sail's east pole.
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 aerie, the open top of the tower between its two archer statues, with the lid over the well guarded by two angels. A block Move pushes into the gap at the end of each archer's path lights the path (scJupiterLighthousePlacePathBlock), the archer shoots a golden trident at its angel (scJupiterLighthouseStartBeam), and the angel rises and tilts the lid (scJupiterLighthouseRaiseAngels); with both, the lid is lifted off the well (FLAG_JUPITER_LIGHTHOUSE_LID_LIFTED).

Macros in detail

OWN_fdMapGridGetMetatileBehavior

#define OWN_fdMapGridGetMetatileBehavior

This unit declares its own form of fdMapGridGetMetatileBehavior, below.

Definition at line 10 of file jupiter_lighthouse_aerie.c.

LEFT_GAP_METATILE_X

#define LEFT_GAP_METATILE_X 6

The metatiles of the gaps at the ends of the archers' paths, which a path block fills.

Referenced by scJupiterLighthousePlacePathBlock().

Definition at line 73 of file jupiter_lighthouse_aerie.c.

RIGHT_GAP_METATILE_X

#define RIGHT_GAP_METATILE_X 57

Referenced by scJupiterLighthousePlacePathBlock().

Definition at line 74 of file jupiter_lighthouse_aerie.c.

GAP_METATILE_Z

#define GAP_METATILE_Z 12

Referenced by scJupiterLighthousePlacePathBlock().

Definition at line 75 of file jupiter_lighthouse_aerie.c.

LEDGE_HEIGHT

#define LEDGE_HEIGHT (32 / 8)

A path block's metatile heights, in 8-pixel steps: the ledge it stands on, and its top, 16 pixels higher, which keeps the leader from walking through it.

Referenced by scJupiterLighthouseLiftPathBlock().

Definition at line 80 of file jupiter_lighthouse_aerie.c.

PATH_BLOCK_TOP_HEIGHT

#define PATH_BLOCK_TOP_HEIGHT (48 / 8)

Referenced by scJupiterLighthousePlacePathBlock() and scPrepareMap().

Definition at line 81 of file jupiter_lighthouse_aerie.c.

PATH_BLOCK_LANDING_TICKS

#define PATH_BLOCK_LANDING_TICKS 30

The ticks a path block set down in its gap is given to land.

Referenced by scJupiterLighthousePlacePathBlock().

Definition at line 83 of file jupiter_lighthouse_aerie.c.

scJupiterLighthouseFillLeftGap

#define scJupiterLighthouseFillLeftGap()

A path block dropped into its gap: the gap's metatiles become the path's, in their pictures and as floor Felix can walk on.

Referenced by scJupiterLighthousePlacePathBlock() and scPrepareMap().

Definition at line 87 of file jupiter_lighthouse_aerie.c.

scJupiterLighthouseFillRightGap

#define scJupiterLighthouseFillRightGap()

Referenced by scJupiterLighthousePlacePathBlock() and scPrepareMap().

Definition at line 91 of file jupiter_lighthouse_aerie.c.

scJupiterLighthouseLightLeftPath

#define scJupiterLighthouseLightLeftPath()

The path to an archer lit, once its gap is filled.

Referenced by scJupiterLighthousePlacePathBlock() and scPrepareMap().

Definition at line 96 of file jupiter_lighthouse_aerie.c.

scJupiterLighthouseLightRightPath

#define scJupiterLighthouseLightRightPath()

Referenced by scJupiterLighthousePlacePathBlock() and scPrepareMap().

Definition at line 98 of file jupiter_lighthouse_aerie.c.

SPARKLE_BYTES

#define SPARKLE_BYTES (4 * 8 * 8)

The beam's pictures, at a byte a pixel: four 8 by 8 sparkles, and the 32 by 16 golden trident.

Referenced by scJupiterLighthouseStartBeam().

Definition at line 553 of file jupiter_lighthouse_aerie.c.

TRIDENT_BYTES

#define TRIDENT_BYTES (32 * 16)

Referenced by scJupiterLighthouseStartBeam().

Definition at line 554 of file jupiter_lighthouse_aerie.c.

LERP

#define LERP(from, to, t, n) ((from) + ((to) - (from)) * (t) / (n))

The value t of n steps of the way from from to to.

Referenced by scJupiterLighthouseUpdateBeam().

Definition at line 584 of file jupiter_lighthouse_aerie.c.

BEAM_CARRY_TICKS

#define BEAM_CARRY_TICKS 96

The ticks the trident takes to fly from the archer to the angel.

Referenced by scJupiterLighthouseUpdateBeam().

Definition at line 599 of file jupiter_lighthouse_aerie.c.

BEAM_SPARK_TICKS

#define BEAM_SPARK_TICKS 16

The ticks a spark lives, as it fades through its four pictures.

Referenced by scJupiterLighthouseUpdateBeam().

Definition at line 601 of file jupiter_lighthouse_aerie.c.

EFFECT_SET_MODE

#define EFFECT_SET_MODE fdActorSelectAnimation

Referenced by EFFECT_SPAWN.

Definition at line 896 of file jupiter_lighthouse_aerie.c.

EFFECT_SET_SCRIPT

#define EFFECT_SET_SCRIPT fdActorStartScript

Referenced by EFFECT_SPAWN.

Definition at line 897 of file jupiter_lighthouse_aerie.c.

METATILE_PUSH_SLOT_ENTRY

#define METATILE_PUSH_SLOT_ENTRY syOAMAddSpriteAtDepthClamped

Referenced by scCrackedTileUpdate().

Definition at line 900 of file jupiter_lighthouse_aerie.c.

Enumerations in detail

JUPITER_LIGHTHOUSE_AERIE_ACTOR_ID

enum JUPITER_LIGHTHOUSE_AERIE_ACTOR_ID

The placed actors between the archers and the lid (ACTOR_RIGHT_ARCHER and ACTOR_LID, scene/jupiter_lighthouse_aerie.h).

EnumeratorValueDescription
ACTOR_LEFT_PATH_BLOCKACTOR_RIGHT_ARCHER + 1The blocks Move pushes
ACTOR_RIGHT_PATH_BLOCKinto the gaps at the ends of the archers' paths.
ACTOR_WEST_CHAINThe chains hanging down
ACTOR_EAST_CHAINthe wall below the well (fdHangingVinePlace).
ACTOR_FLOATING_PLATFORM_AThe six platforms floating over the shafts either side of the well, west to east.
ACTOR_FLOATING_PLATFORM_B
ACTOR_FLOATING_PLATFORM_C
ACTOR_FLOATING_PLATFORM_D
ACTOR_FLOATING_PLATFORM_E
ACTOR_FLOATING_PLATFORM_F

Definition at line 25 of file jupiter_lighthouse_aerie.c.

ANGEL_RISE

enum ANGEL_RISE

What scJupiterLighthouseRaiseAngels raises: one angel, or the second of the two and then the lid with both angels.

EnumeratorValueDescription
RISE_LEFT_ANGEL
RISE_RIGHT_ANGEL
RISE_LEFT_ANGEL_AND_LID
RISE_RIGHT_ANGEL_AND_LID

Definition at line 47 of file jupiter_lighthouse_aerie.c.

BEAM_SIDE

enum BEAM_SIDE

The archer an archer's beam comes from (scJupiterLighthouseStartBeam).

EnumeratorValueDescription
BEAM_LEFT
BEAM_RIGHT

Definition at line 56 of file jupiter_lighthouse_aerie.c.

anonymous enum

enum { GLOW_PATH_EAST_SOUTH, GLOW_PATH_WEST_SOUTH }

The path blocks' glows, pictures of FieldPathGlowTiles: the lit channel of the path piece each block carries, from east round to south on the left block and from west round to south on the right.

EnumeratorValueDescription
GLOW_PATH_EAST_SOUTH3
GLOW_PATH_WEST_SOUTH5

Definition at line 65 of file jupiter_lighthouse_aerie.c.

BEAM_STEP

enum BEAM_STEP

The steps of an archer's beam (BEAM_STATE.step).

EnumeratorValueDescription
BEAM_GATHERthe sparks close in on the archer
BEAM_GROWthe trident grows there
BEAM_SPREADthe sparks spread out round it
BEAM_CARRYthe trident flies to the angel, the camera with it
BEAM_SHRINKit shrinks into the angel, which starts to flicker
BEAM_FADEthe last sparks die out
BEAM_DONE999

Definition at line 587 of file jupiter_lighthouse_aerie.c.

Functions in detail

scPaletteCycleSetTick

static inline void scPaletteCycleSetTick(Sint32 value)

Sets the palette cycle's tick (PaletteCycleTick).

References PaletteCycleTick and Sint32.

Referenced by scJupiterLighthouseLoadPalettes() and scTrialRoadStartPaletteCycle().

Definition at line 104 of file jupiter_lighthouse_aerie.c.

scLightSpritesSetPriority

void scLightSpritesSetPriority(Sint32 value)

Sets the priority the lit actors' sprites are drawn at.

References LightSpritePriority and Sint32.

Referenced by scInit().

Definition at lines 130 and 886 of file jupiter_lighthouse_aerie.c.

scJupiterLighthouseStartBeamFlicker

void scJupiterLighthouseStartBeamFlicker(ACTOR *actor)

Starts an actor's flicker (scJupiterLighthouseFlickerBeam).

References scJupiterLighthouseFlickerBeam().

Referenced by scJupiterLighthouseRaiseAngels(), scJupiterLighthouseStartBeam() and scJupiterLighthouseUpdateBeam().

Definition at lines 132 and 538 of file jupiter_lighthouse_aerie.c.

scJupiterLighthouseStopBeamFlicker

void scJupiterLighthouseStopBeamFlicker(ACTOR *actor)

Stops an actor's flicker and leaves it in its beam's colours.

References fdActorSetSpriteColorMode().

Referenced by scJupiterLighthouseShootAtLeftAngel() and scJupiterLighthouseShootAtRightAngel().

Definition at lines 133 and 545 of file jupiter_lighthouse_aerie.c.

scJupiterLighthouseStartBeam

void scJupiterLighthouseStartBeam(Sint32 archerId, Sint32 angelId, Sint32 side)

An archer shoots its beam at an angel: loads the sparks and the trident into VRAM and holds the script until the beam's event has finished.

References fdActorGet(), fdActorStartIdle(), fdEffectSpriteInit(), fdScriptPlaySound(), mnVRAMLoad(), scFieldActorSetMoveTargetFX(), scFieldCloseEvent(), scFieldEffectSpriteInit(), scFieldScriptWait(), scJupiterLighthouseStartBeamFlicker(), scJupiterLighthouseUpdateBeam(), Sint32, syDecompressTaggedLZ(), syHeapSlotAllocate(), syHeapSlotRelease(), syResourceGetTableEntry(), sySetTickEvent(), sySynch(), syVRAMCacheFindFreeEntry() and syVRAMCacheFreeEntry().

Referenced by scJupiterLighthouseShootAtLeftAngel() and scJupiterLighthouseShootAtRightAngel().

Definition at lines 135 and 791 of file jupiter_lighthouse_aerie.c.

scJupiterLighthouseUpdateBeam

void scJupiterLighthouseUpdateBeam(void)

An event: one tick of an archer's beam, step by step: its sparks gather, the golden trident grows and is carried to the angel, and shrinks there as the angel starts to flicker.

References fdActorSetPosAndResetMotion(), fdCameraWorldToScreen(), fdEffectSpriteDrawAtWorldPos(), scJupiterLighthouseStartBeamFlicker(), Sint32, syCos(), syImportEffectSpriteDraw(), syRandom(), sySin() and sySoundPlay().

Referenced by scJupiterLighthouseStartBeam().

Definition at lines 148 and 606 of file jupiter_lighthouse_aerie.c.

syImportEffectSpriteDraw

void syImportEffectSpriteDraw(EFFECT_SPR *sprite)

Draws an effect sprite (fdEffectSpriteDraw, through the overlay's import).

Referenced by scJupiterLighthouseUpdateBeam().

Definition at line 170 of file jupiter_lighthouse_aerie.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References SceneEntrances.

Definition at line 172 of file jupiter_lighthouse_aerie.c.

scGetExitRegions

const SCENE_REGION *scGetExitRegions(void)

Definition at line 177 of file jupiter_lighthouse_aerie.c.

scGetExits

const Uint32 *scGetExits(void)

References SceneExits.

Definition at line 182 of file jupiter_lighthouse_aerie.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

References ActorPlacements.

Definition at line 187 of file jupiter_lighthouse_aerie.c.

scJupiterLighthouseRaiseAngels

void scJupiterLighthouseRaiseAngels(Sint32 mode)

A shot angel rises and tilts the lid away from its side; the second of the two then lifts both angels and the lid off the well, to the puzzle's jingle.

References fdActorGet(), fdScriptPlaySound(), mnSoundWaitForJingle(), scFieldActorSetPosAndResetMotion(), scFieldScriptWait(), scJupiterLighthouseStartBeamFlicker(), Sint32 and sySynch().

Referenced by scJupiterLighthouseShootAtLeftAngel() and scJupiterLighthouseShootAtRightAngel().

Definition at line 194 of file jupiter_lighthouse_aerie.c.

scJupiterLighthouseShootAtLeftAngel

void scJupiterLighthouseShootAtLeftAngel(void)

The left archer shoots its beam at the left angel, which rises; the second angel of the two lifts the lid off.

References fdActorFaceDirection(), fdActorGet(), fdActorSetAnimation(), fdCameraWaitForArrival(), fdScriptEnd(), fdScriptGetFlag(), fdScriptSetFlag(), fdScriptStart(), MainRoutineStateWork, scFieldScriptEndLastingPsynergy(), scFieldScriptWait(), scJupiterLighthouseRaiseAngels(), scJupiterLighthouseStartBeam(), scJupiterLighthouseStopBeamFlicker() and scScriptCameraFollowActor().

Referenced by scJupiterLighthousePlacePathBlock().

Definition at line 253 of file jupiter_lighthouse_aerie.c.

scJupiterLighthouseShootAtRightAngel

void scJupiterLighthouseShootAtRightAngel(void)

The right archer shoots its beam at the right angel, which rises; the second angel of the two lifts the lid off.

References fdActorFaceDirection(), fdActorGet(), fdActorSetAnimation(), fdCameraWaitForArrival(), fdScriptEnd(), fdScriptGetFlag(), fdScriptSetFlag(), fdScriptStart(), MainRoutineStateWork, scFieldScriptEndLastingPsynergy(), scFieldScriptWait(), scJupiterLighthouseRaiseAngels(), scJupiterLighthouseStartBeam(), scJupiterLighthouseStopBeamFlicker() and scScriptCameraFollowActor().

Referenced by scJupiterLighthousePlacePathBlock().

Definition at line 284 of file jupiter_lighthouse_aerie.c.

scJupiterLighthouseLiftPathBlock

void scJupiterLighthouseLiftPathBlock(Sint32 unused, Sint32 actorId)

Move (or a push) takes hold of the block on the ledge by an archer statue: the metatile it leaves drops back to the ledge's height.

References fdActorGet(), fdMapGridSetMetatileHeight() and Sint32.

Referenced by SceneCues.

Definition at line 315 of file jupiter_lighthouse_aerie.c.

scJupiterLighthousePlacePathBlock

void scJupiterLighthousePlacePathBlock(Sint32 unused, Sint32 id)

Move sets down the block on the ledge by the archer statue at the west or east end of the aerie. Pushed into the gap at the end of the archer's path (metatile (6, 12) in the west, (57, 12) in the east), it drops in with a heavy thud, the path lights up, and the archer shoots at the angel on its side of the well, which rises and lifts its half of the lid; once both angels have risen the lid is off the well. Set down anywhere else, the block stands in Felix's way.

References fdActorGet(), fdMapGridSetMetatileHeight(), fdScriptGetFlag(), fdScriptPlaySound(), fdScriptSetFlag(), MainRoutineStateWork, scFieldActorStop(), scFieldScriptWait(), scJupiterLighthouseShootAtLeftAngel(), scJupiterLighthouseShootAtRightAngel(), Sint32 and sySynch().

Referenced by SceneCues.

Definition at line 329 of file jupiter_lighthouse_aerie.c.

scGetCues

const CUE *scGetCues(void)

References SceneCues.

Definition at line 413 of file jupiter_lighthouse_aerie.c.

scInit

Sint32 scInit(void)

Sets up the aerie as the party enters: the window in, the palettes, the chains, the floating platforms the leader may step onto, and the angels and the lid as far as they have risen. Returns 0.

References fdActorGet(), MainRoutineStateWork, scJupiterLighthouseLoadPalettes(), scJupiterLighthousePlaceRaisedActors(), Sint32 and syImportHangingVinePlace().

Definition at line 421 of file jupiter_lighthouse_aerie.c.

scPrepareMap

Sint32 scPrepareMap(void)

Lays out the path blocks: gone into their gaps, their paths lit, for each angel already shot, and glowing where they stand otherwise. Returns 0.

References fdActorGet(), fdMapGridSetMetatileHeight(), fdScriptGetFlag(), scLightSpritesAdd(), scLightSpritesInitPathGlows(), scSetArrivalFlags() and Sint32.

Definition at line 454 of file jupiter_lighthouse_aerie.c.

scJupiterLighthouseFlickerBeam

void scJupiterLighthouseFlickerBeam(ACTOR *actor)

An actor's update: flickers its sprite between filled and its beam's colours, a step a tick.

References DecodeFillByte, fdActorSetSpriteColorMode() and Sint32.

Referenced by scJupiterLighthouseStartBeamFlicker().

Definition at line 520 of file jupiter_lighthouse_aerie.c.

scCrackedTilePlaceLanding

void scCrackedTilePlaceLanding(Sint32 dx, Sint32 dz, Sint32 transition)

Unused here, where there is no cracked floor to fall through: in the rooms with one, it puts the leader who has fallen through on the metatile the flag bytes saved, offset by (dx, dz), and starts the screen transition.

References CrackedTiles, fdActorGet(), fdMapGridCenterOnFollowedPoint(), MainRoutineStateWork, scCrackedTileDropIn(), scFieldGameFlagGetByte(), Sint32 and syGameFlagSetByte().

Referenced by scInit().

Definition at line 916 of file jupiter_lighthouse_aerie.c.

Variables in detail

PaletteCycleTick

extern Sint32 PaletteCycleTick

Sint32 PaletteCycleTick

The palette cycle's tick, -1 before it starts, and whether scripts hold it (fdPaletteCycleStep).

References Sint32.

Referenced by fdPaletteCycleStep() and scPaletteCycleSetTick().

Definition at lines 101 and 1029 of file jupiter_lighthouse_aerie.c.

PaletteCyclePausesInScripts

extern Sint32 PaletteCyclePausesInScripts

Sint32 PaletteCyclePausesInScripts

References Sint32.

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

Definition at lines 109 and 1030 of file jupiter_lighthouse_aerie.c.

WhirlwindRiding

Sint32 WhirlwindRiding

References Sint32.

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

Definition at line 110 of file jupiter_lighthouse_aerie.c.

PaletteCycleColors

Uint16 PaletteCycleColors[16]

A copy of the room's cycling palette, BG palette CYCLE_PALETTE, which the cycle takes its colours from (scJupiterLighthouseLoadPalettes).

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

Definition at line 113 of file jupiter_lighthouse_aerie.c.

PaletteCycleUnlitPalette

Uint16 PaletteCycleUnlitPalette[2]

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

Referenced by scJupiterLighthouseLoadPalettes().

Definition at line 116 of file jupiter_lighthouse_aerie.c.

PaletteCycleUnlitColors

Uint16 PaletteCycleUnlitColors[14]

Referenced by scJupiterLighthouseLoadPalettes().

Definition at line 117 of file jupiter_lighthouse_aerie.c.

LightSpriteTile

Sint16 LightSpriteTile

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

Definition at line 118 of file jupiter_lighthouse_aerie.c.

LightSpriteCount

Sint16 LightSpriteCount

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

Definition at line 119 of file jupiter_lighthouse_aerie.c.

LightSpriteOams

LIGHT_OAM LightSpriteOams[16]

Referenced by scLightSpritesDraw().

Definition at line 121 of file jupiter_lighthouse_aerie.c.

LightSpritesLarge

Sint16 LightSpritesLarge

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

Definition at line 122 of file jupiter_lighthouse_aerie.c.

LightSpritePriority

Sint16 LightSpritePriority

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

Definition at line 123 of file jupiter_lighthouse_aerie.c.

CrackedTiles

METATILE_TARGET CrackedTiles

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

Definition at line 124 of file jupiter_lighthouse_aerie.c.

WhirlwindEndScript

extern Sint32 WhirlwindEndScript[]

Sint32 WhirlwindEndScript[]

References Sint32.

Referenced by scWhirlwindUpdate().

Definition at lines 508 and 1032 of file jupiter_lighthouse_aerie.c.

FieldEffectDurationScripts

extern const Sint32 *FieldEffectDurationScripts[]

const Sint32 *FieldEffectDurationScripts[]

References FieldEffectLongScript, FieldEffectMediumScript, FieldEffectShortScript and Sint32.

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

Definition at lines 894 and 1039 of file jupiter_lighthouse_aerie.c.

SceneEntrances

SCENE_ENTRANCE SceneEntrances[]

Referenced by scGetEntrances().

Definition at line 946 of file jupiter_lighthouse_aerie.c.

SceneExits

Uint32 SceneExits[]

Referenced by scGetExits().

Definition at line 951 of file jupiter_lighthouse_aerie.c.

ActorPlacements

ACTOR_PLACE ActorPlacements[]

Referenced by scGetActorPlacements().

Definition at line 968 of file jupiter_lighthouse_aerie.c.

SceneCues

CUE SceneCues[]

References scJupiterLighthouseLiftPathBlock() and scJupiterLighthousePlacePathBlock().

Referenced by scGetCues().

Definition at line 1006 of file jupiter_lighthouse_aerie.c.