Skip to Content
The Alchemy Project

src/scene/mars_lighthouse_star_room.c

The Mars Lighthouse's dragon hall, high in the frozen lighthouse, where two Flame Dragons sleep in a block of ice below a great dragon's head carved in the north wall, with the corridor and the small room that lead to it. More…

Macros

NameDescription
#defineFLAG_MARS_STAR_TAKEN 0xa3aFelix has taken the Mars Star from the floor by Agatio.
#defineFLAG_ADEPTS_WOKE 0xa3bAgatio and Karst have woken after the battle and asked Felix to light the beacon.
#defineFLAG_DRAGON_ICE_CRACKED 0xa4aThe east fireball cracked the ice.
#defineFLAG_FLAME_DRAGONS_BEATEN 0xa4bSet on coming back from the Flame Dragons' battle.
#defineFLAG_MARS_STAR_SET 0xa9eIn every edition but the Japanese: the Mars Star was set in the statue once, and the lighthouse thawed; set again, it only rises and falls back.
#defineFLAG_BURST_CAN_BREAK_DRAGON_ICE FLAG_SCENE_TEMP(0x33)Both fireballs have reached the ice: Burst can break it.
#defineFLAG_DRAGON_ICE_BURST FLAG_SCENE_TEMP(0x38)In every edition but the Japanese: the ice is burst, and fireballs still on their way no longer crack it.
#defineDRAGON_WAKE_CUE 20Raised by Burst once the ice is gone: the dragons wake.
#defineMETATILE_DRAGON_ICE 20The metatiles of the ice the dragons sleep in, which Burst breaks.
#defineMETATILE_STATUE_FACE 21The metatile before the great dragon head on the north wall, which asks for something to be placed in it, and on which the Mars Star is used.
#defineRISING_SPARK_TICKS 60a spark's life
#defineRISING_SPARK_TICKS_LEFT (actor) (*(Sint32 *)&(actor)->watchedActor)The ticks a rising spark has left, kept where an actor keeps its watched actor.
#defineWEST_SPARKS_X 620The two strips of the hall's floor the sparks rise from, each 28 pixels wide and 120 deep: their west edges and their north edge.
#defineEAST_SPARKS_X 712
#defineSPARKS_Z 460
#defineEFFECT_SET_MODE fdActorSelectAnimation
#defineEFFECT_SET_SCRIPT fdActorStartScript
#defineMETATILE_PUSH_SLOT_ENTRY syOAMAddSpriteAtDepth

Enumerations

NameDescription
enumanonymous enum { ENTRANCE_HALL_SOUTH_END, ENTRANCE_CORRIDOR_WEST_DOORWAY, ENT … }The room's own ways between its parts: the dragon hall's south end and the west doorway of a long corridor lead to each other, and the corridor's east doorway to the south end of a small room, whose north doorway leads out.
enumanonymous enum { EXIT_TO_CORRIDOR_WEST_DOORWAY, EXIT_TO_HALL_SOUTH_END, EXIT_ … }The exits, each to the entrance of the same name.
enumanonymous enum { ACTOR_EAST_TORCH, ACTOR_WEST_TORCH, ACTOR_ICE_CRACK, ACTOR_A … }

Functions

NameDescription
Sint32scMarsLighthouseStarRoomSetUpTorch (ACTOR *actor)A torch's script call: the torches stand without a shadow.
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.
voidscMarsLighthouseStarRoomStartBlazeOnEastTorch (void)Felix casts Blaze at the burning torch on the east stand before the frozen dragons, and its jet of flame comes out long and fast.
voidscMarsLighthouseStarRoomBlazeWestTorch (void)Blaze's flame reaches the unlit torch on the west stand before the frozen dragons, which sends out the two sparkles that launch the fireballs.
voidscMarsLighthouseStarRoomEndBlazeOnWestTorch (void)Nothing happens when Blaze ends at the west torch; the sparkles and fireballs go on alone.
voidscActorSetupScriptedPart (ACTOR *actor, Sint32 priority)Stops an actor and starts its script, its sprite drawn at priority.
static __inline__ ACTOR *scMarsLighthouseStarRoomCreateActor (Sint32 kind, Sint32 x, Sint32 y, Sint32 z)Creates one of the dragon hall's effects at a point in the room.
voidscMarsLighthouseStarRoomScatterIceChips (Sint32 id)Six chips of ice burst from an actor and bounce away: the wind stone's sprite, tinted to ice.
voidscMarsLighthouseStarRoomWestFireballCracksIce (void)The west fireball reaches the ice: a small crack shows, unless the east one came first.
voidscMarsLighthouseStarRoomEastFireballCracksIce (void)The east fireball reaches the ice: the whole crack shows, and Burst can break it.
voidscMarsLighthouseStarRoomClearDragonIce (void)The block of ice the dragons slept in is gone from the floor.
voidscMarsLighthouseStarRoomBurstIce (Sint32 phase, Sint32 frame)Felix casts Burst on the cracked ice the Flame Dragons sleep in, metatiles (41, 14) to (43, 14): a flash, the ice gone, chips flying, and the dragons wake.
const CUE *scGetCues (void)The scene's cues: the rooms of names' for any entrance above ENTRANCE_NAMES_ABOVE, else the debug room's.
voidscMarsLighthouseStarRoomWakeAfterBattle (void)After the battle the dragons shrink into two lights that sink to the floor, and Agatio and Karst lie there: lost in the frozen lighthouse, its eye took their will, and they ask Felix to light the beacon with the Mars Star.
voidscMarsLighthouseStarRoomCreateMarsStar (Sint32 rise)The Mars Star as an actor on the floor by Agatio, rising first when asked.
voidscMarsLighthouseStarRoomLayDownAdept (Sint32 actor)Agatio or Karst lies on the floor where the dragon fell.
voidscFlameThrowersCreate (void)Clears the flame throwers' state (unless the party keeps its place) and makes the flame whose sprite the crumbs share, keeping its VRAM entry.
voidscCrackedTileDropIn (void)The leader lands from the cracked floor above in a ring of dust, as in shared/cracked_tile_drop_in.c.
Sint32scPrepareMap (void)Once Briggs is caught the pool has dried up: its colours take the dry ground's.
voidscMarsLighthouseStarRoomWakeFlameDragons (void)Free of the ice, the Flame Dragons rise and roar, and the battle begins.
voidscMarsLighthouseStarRoomDrawStarWithLeader (ACTOR *actor)The Mars Star's update: drawn at the leader's sprite priority.
static __inline__ voidscMarsLighthouseStarRoomLoadMarsStarIcon (FIELD_SPR *sprite)Loads the Mars Star's item icon into the sprite's tiles, for an actor that shows the star.
voidscMarsLighthouseStarRoomHoldWarmHand (void)Felix talks to Karst, lying on the floor of the dragon hall where her dragon fell: "Your hand...so warm...
voidscMarsLighthouseStarRoomTakeMarsStar (void)Felix talks to Agatio, lying on the floor of the dragon hall: "It's too late for us now...
voidscMarsLighthouseStarRoomExamineStatue (void)Felix examines the great dragon head on the north wall of the dragon hall, metatile (42, 8): "There's a space for you to place something." Then the field menu opens, for the party to choose what to place.
voidscMarsLighthouseStarRoomSpawnRisingSparks (void)While the lighthouse thaws, sparks rise from the floor every other tick.
voidscMarsLighthouseStarRoomUseMarsStar (void)Felix uses the Mars Star on the great dragon head on the north wall of the dragon hall and sets it in the head's face: the room shakes, sparks rise, the ice melts into lava and the lighthouse turns back to fire; the star falls back out.
voidscMarsLighthouseStarRoomUpdateRisingSpark (ACTOR *actor)A spark rises and grows for a second, then is gone.
voidscMarsLighthouseStarRoomShootFireballs (void)The west torch sends its two sparkles round the hall, west and east; each launches its fireball at the ice, the west one rolling east and the east one west.
BoolfdActorIsTouching (ACTOR *a, ACTOR *b)1 when two actors touch.
BoolfdActorIsBeside (ACTOR *a, ACTOR *b)1 when two actors stand side by side.
voidscFlameThrowerUpdateSpark ()A flame thrower's spark in flight: it drifts on, slowing, growing and spinning; just over the leader's head it stops going on and rises away.
voidscFlameThrowerSendSpark (Sint32 *pos, Sint32 speed, Sint32 offScreen)A flame thrower's spark (FLAME_SPARK): a dust cloud thrown from pos, a little east or west, up by chance and south at speed and more, spinning, blended over the room (scFlameThrowerUpdateSpark).
voidscFlameThrowersSetMode (Sint16 runsDuringPsynergy)Sets whether the flames keep going while Psynergy is being cast.
Sint32scFlameThrowersGetCounter (void)The flame throwers' counter, which scFlameThrowersAdvanceCounter steps.
voidscMarsLighthouseStarRoomKnockBackIfHit (void)Hit by the flames, the leader is knocked back.
Sint32scFireballCarryLeader (void)A rolling fireball hits Felix in the dragon hall once the Flame Dragons are beaten: he is hurt, sits down blinking, and is carried along with the fireball until it stops.
Sint32scMarsLighthouseStarRoomIsLeaderHit (void)Whether a flame or fireball has hit the leader (FLAME_HIT_STATE.active).
Sint32fdMapGetTerrainHeight (Sint32 layer, Sint32 x, Sint32 z)The ground height of a layer at (x, z), 16.16 pixels (fdMapGridGetTerrainHeight, through the overlay's own import row).
voidscLeaderSetSlideStopped (Sint32 value)Stops the leader's slide on the ice where it is (nonzero), or lets it run.
voidsyGameFlagSetByte (Sint32 flag, Sint32 value)Sets the whole byte flags is in.

Variables

NameDescription
extern Sint16SlideOnIceSteerAngles []The heading fdActorSteerByPad turns toward, diagonals included; a second row of sixteen keeps only the four straight headings.
extern Uint32DebrisScript []A piece of debris flies for 40 ticks, then blinks ten times and is gone.
extern Uint8MsgMarsLighthouseStarRoomWhyWhyAmILying []
extern Sint32MarsLighthouseStarRoomLightRiseScript []A light rises from a shrinking dragon, growing, for 40 ticks.
extern Sint32MarsLighthouseStarRoomLightSinkScript []The light sinks to the floor, shrinking, and is put away.
extern Sint32MarsLighthouseStarRoomAgatioDragonShrinkScript []The dragons shrink to nothing over 40 ticks and are put away; Karst's, which faces the other way, mirrored.
extern Sint32MarsLighthouseStarRoomKarstDragonShrinkScript []
extern Sint32MarsLighthouseStarRoomWestSparkleRoute []The west sparkle's way from the west torch round the west side of the hall and up to the ice, where it leaves its fireball to roll in.
extern Sint32MarsLighthouseStarRoomEastSparkleRoute []The east sparkle's longer way round the east side of the hall to the ice.
extern Sint32ScriptedPartScript []A scripted part waits half a second, is placed at 0, 0, 0 and released.
extern Uint32CrumbsScript []A crumb (scActorScatterCrumbs) waits 20 ticks, flickers for ten pairs of ticks and is released.
extern Uint32IceChipsScript []An ice chip (scIceChipsSpawn) does the same.
extern Sint16SlideOnIceAnglesByKey []The heading a slide sets off in: a diagonal goes the way of its left or right key.
volatile Sint16SlideOnIceStopped
METATILE_TARGETCrackedTilesThe cracked floors' metatiles, found by shared/cracked_tile_find.c.
extern const Sint32 *FieldEffectDurationScripts []The field effects' three scripts by how long an effect lasts: short, medium and long.
extern Sint32MarsLighthouseStarRoomTorchScript []
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

The Mars Lighthouse's dragon hall, high in the frozen lighthouse, where two Flame Dragons sleep in a block of ice below a great dragon's head carved in the north wall, with the corridor and the small room that lead to it.

Two torches stand on stands before the frozen dragons, the east one burning. Blaze from the burning torch lights the other, which sends two sparkles round the hall, each launching a fireball into the ice, which cracks; Burst on the crack frees the dragons, which wake and fight. Beaten, they are Agatio and Karst, too weak and cold to go on: they ask Felix to light the beacon and leave him the Mars Star. Taken up into the Mythril Bag and set in the dragon head's face, the star turns the lighthouse back to fire and its ice is gone, here and in every room below.

Macros in detail

FLAG_MARS_STAR_TAKEN

#define FLAG_MARS_STAR_TAKEN 0xa3a

Felix has taken the Mars Star from the floor by Agatio.

Referenced by scMarsLighthouseStarRoomTakeMarsStar().

Definition at line 34 of file mars_lighthouse_star_room.c.

FLAG_ADEPTS_WOKE

#define FLAG_ADEPTS_WOKE 0xa3b

Agatio and Karst have woken after the battle and asked Felix to light the beacon.

Referenced by scMarsLighthouseStarRoomWakeAfterBattle().

Definition at line 37 of file mars_lighthouse_star_room.c.

FLAG_DRAGON_ICE_CRACKED

#define FLAG_DRAGON_ICE_CRACKED 0xa4a

The east fireball cracked the ice.

Referenced by scMarsLighthouseStarRoomEastFireballCracksIce() and scMarsLighthouseStarRoomWestFireballCracksIce().

Definition at line 39 of file mars_lighthouse_star_room.c.

FLAG_FLAME_DRAGONS_BEATEN

#define FLAG_FLAME_DRAGONS_BEATEN 0xa4b

Set on coming back from the Flame Dragons' battle.

Referenced by SceneCues, scMarsLighthouseStarRoomEastFireballCracksIce(), scMarsLighthouseStarRoomWestFireballCracksIce() and scPrepareMap().

Definition at line 41 of file mars_lighthouse_star_room.c.

FLAG_MARS_STAR_SET

#define FLAG_MARS_STAR_SET 0xa9e

In every edition but the Japanese: the Mars Star was set in the statue once, and the lighthouse thawed; set again, it only rises and falls back.

Referenced by scMarsLighthouseStarRoomUseMarsStar().

Definition at line 44 of file mars_lighthouse_star_room.c.

FLAG_BURST_CAN_BREAK_DRAGON_ICE

#define FLAG_BURST_CAN_BREAK_DRAGON_ICE FLAG_SCENE_TEMP(0x33)

Both fireballs have reached the ice: Burst can break it.

Referenced by SceneCues and scMarsLighthouseStarRoomEastFireballCracksIce().

Definition at line 46 of file mars_lighthouse_star_room.c.

FLAG_DRAGON_ICE_BURST

#define FLAG_DRAGON_ICE_BURST FLAG_SCENE_TEMP(0x38)

In every edition but the Japanese: the ice is burst, and fireballs still on their way no longer crack it.

Referenced by scMarsLighthouseStarRoomBurstIce().

Definition at line 49 of file mars_lighthouse_star_room.c.

DRAGON_WAKE_CUE

#define DRAGON_WAKE_CUE 20

Raised by Burst once the ice is gone: the dragons wake.

Referenced by SceneCues and scMarsLighthouseStarRoomBurstIce().

Definition at line 73 of file mars_lighthouse_star_room.c.

METATILE_DRAGON_ICE

#define METATILE_DRAGON_ICE 20

The metatiles of the ice the dragons sleep in, which Burst breaks.

Referenced by SceneCues.

Definition at line 75 of file mars_lighthouse_star_room.c.

METATILE_STATUE_FACE

#define METATILE_STATUE_FACE 21

The metatile before the great dragon head on the north wall, which asks for something to be placed in it, and on which the Mars Star is used.

Referenced by SceneCues.

Definition at line 78 of file mars_lighthouse_star_room.c.

RISING_SPARK_TICKS

#define RISING_SPARK_TICKS 60

a spark's life

Referenced by scMarsLighthouseStarRoomSpawnRisingSparks().

Definition at line 1162 of file mars_lighthouse_star_room.c.

RISING_SPARK_TICKS_LEFT

#define RISING_SPARK_TICKS_LEFT(actor) (*(Sint32 *)&(actor)->watchedActor)

The ticks a rising spark has left, kept where an actor keeps its watched actor.

Referenced by scMarsLighthouseStarRoomSpawnRisingSparks() and scMarsLighthouseStarRoomUpdateRisingSpark().

Definition at line 1165 of file mars_lighthouse_star_room.c.

WEST_SPARKS_X

#define WEST_SPARKS_X 620

The two strips of the hall's floor the sparks rise from, each 28 pixels wide and 120 deep: their west edges and their north edge.

Referenced by scMarsLighthouseStarRoomSpawnRisingSparks().

Definition at line 1185 of file mars_lighthouse_star_room.c.

EAST_SPARKS_X

#define EAST_SPARKS_X 712

Referenced by scMarsLighthouseStarRoomSpawnRisingSparks().

Definition at line 1186 of file mars_lighthouse_star_room.c.

SPARKS_Z

#define SPARKS_Z 460

Referenced by scMarsLighthouseStarRoomSpawnRisingSparks().

Definition at line 1187 of file mars_lighthouse_star_room.c.

EFFECT_SET_MODE

#define EFFECT_SET_MODE fdActorSelectAnimation

Referenced by EFFECT_SPAWN.

Definition at line 1491 of file mars_lighthouse_star_room.c.

EFFECT_SET_SCRIPT

#define EFFECT_SET_SCRIPT fdActorStartScript

Referenced by EFFECT_SPAWN.

Definition at line 1492 of file mars_lighthouse_star_room.c.

METATILE_PUSH_SLOT_ENTRY

#define METATILE_PUSH_SLOT_ENTRY syOAMAddSpriteAtDepth

Referenced by scCrackedTileUpdate().

Definition at line 1498 of file mars_lighthouse_star_room.c.

Enumerations in detail

anonymous enum

enum { ENTRANCE_HALL_SOUTH_END, ENTRANCE_CORRIDOR_WEST_DOORWAY, ENTRANCE_CORRIDOR_EAST_DOORWAY, ENTRANCE_SMALL_ROOM_SOUTH_END }

The room's own ways between its parts: the dragon hall's south end and the west doorway of a long corridor lead to each other, and the corridor's east doorway to the south end of a small room, whose north doorway leads out. Each exit leads to the entrance of the same name.

EnumeratorValueDescription
ENTRANCE_HALL_SOUTH_END1
ENTRANCE_CORRIDOR_WEST_DOORWAY
ENTRANCE_CORRIDOR_EAST_DOORWAY
ENTRANCE_SMALL_ROOM_SOUTH_END

Definition at line 55 of file mars_lighthouse_star_room.c.

anonymous enum

enum { EXIT_TO_CORRIDOR_WEST_DOORWAY, EXIT_TO_HALL_SOUTH_END, EXIT_TO_SMALL_ROOM_SOUTH_END, EXIT_TO_CORRIDOR_EAST_DOORWAY }

The exits, each to the entrance of the same name.

EnumeratorValueDescription
EXIT_TO_CORRIDOR_WEST_DOORWAY1
EXIT_TO_HALL_SOUTH_END
EXIT_TO_SMALL_ROOM_SOUTH_END
EXIT_TO_CORRIDOR_EAST_DOORWAY

Definition at line 64 of file mars_lighthouse_star_room.c.

anonymous enum

enum { ACTOR_EAST_TORCH, ACTOR_WEST_TORCH, ACTOR_ICE_CRACK, ACTOR_AGATIO_DRAGON, … }

EnumeratorValueDescription
ACTOR_EAST_TORCH8The two torches on stands before the frozen
ACTOR_WEST_TORCH9dragons: the east one burns, the west one is unlit. Blaze's cast starts at the east one and hits the west one, which sends out the sparkles.
ACTOR_ICE_CRACK10The crack the fireballs leave in the ice the dragons sleep in.
ACTOR_AGATIO_DRAGON11The Flame Dragon that was Agatio.
ACTOR_KARST_DRAGON12The Flame Dragon that was Karst.
ACTOR_AGATIO13
ACTOR_KARST14
ACTOR_AGATIO_LIGHT15The lights that rise from the dragons as they
ACTOR_KARST_LIGHT16turn back into Adepts.
ACTOR_EAST_SPARKLE17The sparkles Blaze sends from the west torch round each side of the hall; at the end of its way each launches its fireball, which rolls into the ice and cracks it.
ACTOR_WEST_SPARKLE18
ACTOR_EAST_FIREBALL19
ACTOR_WEST_FIREBALL20

Definition at line 80 of file mars_lighthouse_star_room.c.

Functions in detail

scMarsLighthouseStarRoomSetUpTorch

Sint32 scMarsLighthouseStarRoomSetUpTorch(ACTOR *actor)

A torch's script call: the torches stand without a shadow.

References fdActorSetSpriteFlags() and Sint32.

Referenced by MarsLighthouseStarRoomTorchScript.

Definition at line 108 of file mars_lighthouse_star_room.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References SceneEntrances.

Definition at line 114 of file mars_lighthouse_star_room.c.

scGetExitRegions

const SCENE_REGION *scGetExitRegions(void)

Definition at line 119 of file mars_lighthouse_star_room.c.

scGetExits

const Uint32 *scGetExits(void)

References SceneExits.

Definition at line 124 of file mars_lighthouse_star_room.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

References ActorPlacements.

Definition at line 129 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomStartBlazeOnEastTorch

void scMarsLighthouseStarRoomStartBlazeOnEastTorch(void)

Felix casts Blaze at the burning torch on the east stand before the frozen dragons, and its jet of flame comes out long and fast. Cast westward from beside it, the jet runs through the torch and on across the floor to the unlit torch on the west stand, which flashes white and gives off sparks.

The cast sets blazeLongSpray, which gives Blaze its long jet in place of the short one; every cast clears it again as it starts.

Referenced by SceneCues.

Definition at line 141 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomBlazeWestTorch

void scMarsLighthouseStarRoomBlazeWestTorch(void)

Blaze's flame reaches the unlit torch on the west stand before the frozen dragons, which sends out the two sparkles that launch the fireballs.

References scMarsLighthouseStarRoomShootFireballs().

Referenced by SceneCues.

Definition at line 150 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomEndBlazeOnWestTorch

void scMarsLighthouseStarRoomEndBlazeOnWestTorch(void)

Nothing happens when Blaze ends at the west torch; the sparkles and fireballs go on alone.

Referenced by SceneCues.

Definition at line 157 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomCreateActor

static __inline__ ACTOR * scMarsLighthouseStarRoomCreateActor(Sint32 kind, Sint32 x, Sint32 y, Sint32 z)

Creates one of the dragon hall's effects at a point in the room.

References Sint32 and syImportActorCreate().

Referenced by scFlameThrowerSendSpark(), scMarsLighthouseStarRoomScatterIceChips() and scMarsLighthouseStarRoomSpawnRisingSparks().

Definition at line 164 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomScatterIceChips

void scMarsLighthouseStarRoomScatterIceChips(Sint32 id)

Six chips of ice burst from an actor and bounce away: the wind stone's sprite, tinted to ice. Each flies off on a random heading at up to 8 pixels a tick, and rises at 2 to 6, higher the further round its heading is.

References DebrisScript, fdActorGet(), fdActorSetSpriteColorMode(), fdActorSetSpriteFlags(), fdActorStartScript(), scMarsLighthouseStarRoomCreateActor(), Sint32, syCos(), syRandom() and sySin().

Referenced by scMarsLighthouseStarRoomBurstIce().

Definition at line 177 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomWestFireballCracksIce

void scMarsLighthouseStarRoomWestFireballCracksIce(void)

The west fireball reaches the ice: a small crack shows, unless the east one came first.

References fdActorGet(), fdScriptGetFlag() and fdScriptPlaySound().

Referenced by MarsLighthouseStarRoomWestSparkleRoute.

Definition at line 217 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomEastFireballCracksIce

void scMarsLighthouseStarRoomEastFireballCracksIce(void)

The east fireball reaches the ice: the whole crack shows, and Burst can break it.

References fdActorGet(), fdScriptGetFlag(), fdScriptPlaySound() and fdScriptSetFlag().

Referenced by MarsLighthouseStarRoomEastSparkleRoute.

Definition at line 246 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomClearDragonIce

void scMarsLighthouseStarRoomClearDragonIce(void)

The block of ice the dragons slept in is gone from the floor.

References fdMapGridCopyMetatileAttributes() and fdMapGridCopyMetatilesTo().

Referenced by scMarsLighthouseStarRoomBurstIce(), scMarsLighthouseStarRoomWakeAfterBattle() and scMarsLighthouseStarRoomWakeFlameDragons().

Definition at lines 272 and 801 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomBurstIce

void scMarsLighthouseStarRoomBurstIce(Sint32 phase, Sint32 frame)

Felix casts Burst on the cracked ice the Flame Dragons sleep in, metatiles (41, 14) to (43, 14): a flash, the ice gone, chips flying, and the dragons wake.

References fdPaletteFadeApplyTarget(), fdPaletteFadeInterpolate(), fdScriptPlaySound(), fdScriptSetFlag(), scMarsLighthouseStarRoomClearDragonIce(), scMarsLighthouseStarRoomScatterIceChips() and Sint32.

Referenced by SceneCues.

Definition at line 277 of file mars_lighthouse_star_room.c.

scGetCues

const CUE *scGetCues(void)

References SceneCues.

Definition at line 301 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomWakeAfterBattle

void scMarsLighthouseStarRoomWakeAfterBattle(void)

After the battle the dragons shrink into two lights that sink to the floor, and Agatio and Karst lie there: lost in the frozen lighthouse, its eye took their will, and they ask Felix to light the beacon with the Mars Star.

References fdActorGet(), fdActorPlaceOnActor(), fdActorRunRepeatedMotion(), fdActorRunScriptAndWait(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetScript(), fdActorSetSpriteFlags(), fdActorShowEmote(), fdActorWaitForAnimationChange(), fdMapGridCenterOnFollowedPoint(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptPlaySound(), fdScriptSetFlag(), fdScriptShowMessage(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), gmPlayMusic(), MainRoutineStateWork, MarsLighthouseStarRoomAgatioDragonShrinkScript, MarsLighthouseStarRoomKarstDragonShrinkScript, MarsLighthouseStarRoomLightRiseScript, MarsLighthouseStarRoomLightSinkScript, MsgMarsLighthouseStarRoomWhyWhyAmILying, scFieldActorSetPosAndResetMotion(), scFieldActorSetSpriteColor(), scFieldActorShowEmote(), scFieldActorStartRepeatedMotion(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptWait(), scMarsLighthouseStarRoomClearDragonIce(), scMarsLighthouseStarRoomCreateMarsStar(), scMarsLighthouseStarRoomLayDownAdept(), Sint32 and sySynch().

Definition at lines 308 and 491 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomCreateMarsStar

void scMarsLighthouseStarRoomCreateMarsStar(Sint32 rise)

The Mars Star as an actor on the floor by Agatio, rising first when asked.

References fdScriptPlaySound(), gmItemLoadIcon(), mnVRAMLoad(), scFieldActorCreate(), scMarsLighthouseStarRoomDrawStarWithLeader(), Sint32, syHeapSlotAllocate(), syHeapSlotRelease() and sySynch().

Referenced by scMarsLighthouseStarRoomWakeAfterBattle().

Definition at lines 309 and 668 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomLayDownAdept

void scMarsLighthouseStarRoomLayDownAdept(Sint32 actor)

void scMarsLighthouseStarRoomLayDownAdept(Sint32 id)

Agatio or Karst lies on the floor where the dragon fell.

References fdActorGet(), fdActorSetAnimation(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes(), scFieldActorSetSpritePriority() and Sint32.

Referenced by scMarsLighthouseStarRoomWakeAfterBattle().

Definition at lines 310 and 808 of file mars_lighthouse_star_room.c.

scPrepareMap

Sint32 scPrepareMap(void)

References fdMapCopyPalette(), fdScriptGetFlag(), fdScriptSetFlag(), MainRoutineStateWork and Sint32.

Definition at line 425 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomWakeFlameDragons

void scMarsLighthouseStarRoomWakeFlameDragons(void)

Free of the ice, the Flame Dragons rise and roar, and the battle begins.

References fdActorGet(), fdActorSetAnimation(), fdActorSetAttachedEffect(), fdActorSetDestinationOffset(), fdRequestBattleFromEncounterTable(), fdScriptPlaySound(), fdScriptStart(), MainRoutineStateWork, SceneIdMarsLighthouseStarRoom, scFieldActorJump(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetAfterBattleDestination(), scFieldScriptWait(), scMarsLighthouseStarRoomClearDragonIce() and Sint32.

Referenced by SceneCues.

Definition at line 438 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomDrawStarWithLeader

void scMarsLighthouseStarRoomDrawStarWithLeader(ACTOR *actor)

The Mars Star's update: drawn at the leader's sprite priority.

References fdActorGet() and MainRoutineStateWork.

Referenced by scMarsLighthouseStarRoomCreateMarsStar().

Definition at line 646 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomLoadMarsStarIcon

static __inline__ void scMarsLighthouseStarRoomLoadMarsStarIcon(FIELD_SPR *sprite)

Loads the Mars Star's item icon into the sprite's tiles, for an actor that shows the star.

References gmItemLoadIcon(), mnVRAMLoad(), syHeapSlotAllocate() and syHeapSlotRelease().

Referenced by scMarsLighthouseStarRoomUseMarsStar().

Definition at line 656 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomHoldWarmHand

void scMarsLighthouseStarRoomHoldWarmHand(void)

Felix talks to Karst, lying on the floor of the dragon hall where her dragon fell: "Your hand...so warm... People have such warm hands..."

References fdActorSetAnimation(), fdScriptEnd(), fdScriptShowMessage(), fdScriptStart(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId() and Sint32.

Referenced by SceneCues.

Definition at line 711 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomTakeMarsStar

void scMarsLighthouseStarRoomTakeMarsStar(void)

Felix talks to Agatio, lying on the floor of the dragon hall: "It's too late for us now... Hurry, light the beacon." The first time, the Mars Star flies up from the floor to Felix and goes into the Mythril Bag, and the view turns to the great dragon head on the north wall, which glows and speaks: "You who hold the star, open your heart..."

References fdActorFaceDirectionAndWait(), fdActorGet(), fdActorRelease(), fdActorSetAnimation(), fdCameraWaitForArrival(), fdPaletteFadeApplySource(), fdPaletteFadeApplyTarget(), fdPaletteFadeInterpolate(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptGetFlag(), fdScriptPlaySound(), fdScriptSetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), gmInventoryAddItem(), gmInventoryEquip(), gmPartyInventoryRemove(), gmUnitGet(), MainRoutineStateWork, mnFieldMessageShowCentered(), mnMessageShowCentered(), scFieldActorSetMoveTargetFX(), scFieldActorSetPosAndResetMotion(), scFieldActorWaitForMove(), Sint32 and sySynch().

Referenced by SceneCues.

Definition at line 730 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomExamineStatue

void scMarsLighthouseStarRoomExamineStatue(void)

Felix examines the great dragon head on the north wall of the dragon hall, metatile (42, 8): "There's a space for you to place something." Then the field menu opens, for the party to choose what to place.

References fdScriptEnd(), fdScriptStart(), mnMessageShowCentered(), scFieldScriptEndLastingPsynergy() and Sint32.

Referenced by SceneCues.

Definition at line 834 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomSpawnRisingSparks

void scMarsLighthouseStarRoomSpawnRisingSparks(void)

While the lighthouse thaws, sparks rise from the floor every other tick.

References fdActorSelectAnimation(), fdActorSetBlendMode(), fdActorSetSpriteFlags(), scMarsLighthouseStarRoomCreateActor(), scMarsLighthouseStarRoomUpdateRisingSpark(), Sint32, syRandom() and TickCount.

Referenced by scMarsLighthouseStarRoomUseMarsStar().

Definition at lines 846 and 1190 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomUseMarsStar

void scMarsLighthouseStarRoomUseMarsStar(void)

Felix uses the Mars Star on the great dragon head on the north wall of the dragon hall and sets it in the head's face: the room shakes, sparks rise, the ice melts into lava and the lighthouse turns back to fire; the star falls back out.

Felix uses the Mars Star on the great dragon head on the north wall of the dragon hall and sets it in the head's face: the room shakes, sparks rise, the ice melts into lava and the lighthouse turns back to fire; the star falls back out. Used again once the lighthouse has thawed, the star only falls back out while Felix wonders.

References fdActorFaceDirection(), fdActorFaceDirectionAndWait(), fdActorGet(), fdActorRelease(), fdActorSetAttachedEffect(), fdActorShowEmote(), fdActorWalkToAndWait(), fdCameraWaitForArrival(), fdMapCopyPalette(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesLayered(), fdPaletteFadeApplySource(), fdPaletteFadeApplyTarget(), fdPaletteFadeInterpolate(), fdScriptEnd(), fdScriptGetFlag(), fdScriptPlaySound(), fdScriptSetFlag(), fdScriptStart(), gmPlayMusic(), MainRoutineStateWork, mnMessageShowCentered(), scFieldActorCreate(), scFieldActorWaitForMove(), scFieldCloseEvent(), scFieldScriptEndLastingPsynergy(), scFieldScriptWait(), scMarsLighthouseStarRoomLoadMarsStarIcon(), scMarsLighthouseStarRoomSpawnRisingSparks(), Sint32, sySetTickEvent() and sySynch().

Referenced by SceneCues.

Definition at lines 854 and 977 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomUpdateRisingSpark

void scMarsLighthouseStarRoomUpdateRisingSpark(ACTOR *actor)

A spark rises and grows for a second, then is gone.

References fdActorRelease(), scFieldActorSetPosAndResetMotion() and Sint32.

Referenced by scMarsLighthouseStarRoomSpawnRisingSparks().

Definition at line 1168 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomShootFireballs

void scMarsLighthouseStarRoomShootFireballs(void)

The west torch sends its two sparkles round the hall, west and east; each launches its fireball at the ice, the west one rolling east and the east one west.

References MarsLighthouseStarRoomEastSparkleRoute, MarsLighthouseStarRoomWestSparkleRoute and scActorAttach().

Referenced by scMarsLighthouseStarRoomBlazeWestTorch().

Definition at line 1265 of file mars_lighthouse_star_room.c.

scFlameThrowerSendSpark

void scFlameThrowerSendSpark(Sint32 *pos, Sint32 speed, Sint32 offScreen)

A flame thrower's spark (FLAME_SPARK): a dust cloud thrown from pos, a little east or west, up by chance and south at speed and more, spinning, blended over the room (scFlameThrowerUpdateSpark). It ignores offScreen: unlike a flame's, a spark's picture is never kept loaded out of sight.

References fdActorSetBlendMode(), scActorSetupScriptedFor(), scFlameThrowerUpdateSpark(), scMarsLighthouseStarRoomCreateActor(), Sint32, syCos() and syRandom().

Referenced by scFlameThrowersPuff().

Definition at line 1307 of file mars_lighthouse_star_room.c.

scFlameThrowersSetMode

void scFlameThrowersSetMode(Sint16 runsDuringPsynergy)

Sets whether the flames keep going while Psynergy is being cast.

Referenced by scInit().

Definition at line 1334 of file mars_lighthouse_star_room.c.

scFlameThrowersGetCounter

Sint32 scFlameThrowersGetCounter(void)

References Sint32.

Definition at line 1344 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomKnockBackIfHit

void scMarsLighthouseStarRoomKnockBackIfHit(void)

Hit by the flames, the leader is knocked back.

References fdLeaderKnockBack().

Definition at line 1362 of file mars_lighthouse_star_room.c.

scFireballCarryLeader

Sint32 scFireballCarryLeader(void)

A rolling fireball hits Felix in the dragon hall once the Flame Dragons are beaten: he is hurt, sits down blinking, and is carried along with the fireball until it stops.

The fireball is the hit state's car; Felix moves by its step each tick, stopping at the centre of a metatile where the floor ends.

References fdActorBlink(), fdActorGet(), fdActorSelectAnimation(), fdActorSetSpriteColorMode(), fdMapGridGetTerrainKindOrBumpAt(), fdScreenTransitionStart(), fdScriptClearFlag(), fdScriptSetFlag(), fdScriptStart(), gmPartyTakeFallDamage(), MainRoutineStateWork, scFieldScriptEndLastingPsynergy(), scFieldScriptWait(), Sint32 and sySynch().

Referenced by MarsLighthouseTowersJupiterTowerCues, SceneCues and scFireballCarryLeaderIfHit().

Definition at line 1374 of file mars_lighthouse_star_room.c.

scMarsLighthouseStarRoomIsLeaderHit

Sint32 scMarsLighthouseStarRoomIsLeaderHit(void)

Whether a flame or fireball has hit the leader (FLAME_HIT_STATE.active).

References Sint32.

Definition at line 1443 of file mars_lighthouse_star_room.c.

scLeaderSetSlideStopped

void scLeaderSetSlideStopped(Sint32 value)

Stops the leader's slide on the ice where it is (nonzero), or lets it run.

References Sint32 and SlideOnIceStopped.

Referenced by scMarsLighthouseEntranceStopSlideWhileRiding() and scMarsLighthouseTowersStopSlideWhileHit().

Definition at line 1481 of file mars_lighthouse_star_room.c.

Variables in detail

MsgMarsLighthouseStarRoomWhyWhyAmILying

extern Uint8 MsgMarsLighthouseStarRoomWhyWhyAmILying[]

Referenced by scMarsLighthouseStarRoomWakeAfterBattle().

Definition at line 482 of file mars_lighthouse_star_room.c.

MarsLighthouseStarRoomLightRiseScript

extern Sint32 MarsLighthouseStarRoomLightRiseScript[]

Sint32 MarsLighthouseStarRoomLightRiseScript[]

A light rises from a shrinking dragon, growing, for 40 ticks.

References Sint32.

Referenced by scMarsLighthouseStarRoomWakeAfterBattle().

Definition at lines 483 and 1611 of file mars_lighthouse_star_room.c.

MarsLighthouseStarRoomLightSinkScript

extern Sint32 MarsLighthouseStarRoomLightSinkScript[]

Sint32 MarsLighthouseStarRoomLightSinkScript[]

The light sinks to the floor, shrinking, and is put away.

References Sint32.

Referenced by scMarsLighthouseStarRoomWakeAfterBattle().

Definition at lines 484 and 1621 of file mars_lighthouse_star_room.c.

MarsLighthouseStarRoomAgatioDragonShrinkScript

extern Sint32 MarsLighthouseStarRoomAgatioDragonShrinkScript[]

Sint32 MarsLighthouseStarRoomAgatioDragonShrinkScript[]

The dragons shrink to nothing over 40 ticks and are put away; Karst's, which faces the other way, mirrored.

References Sint32.

Referenced by scMarsLighthouseStarRoomWakeAfterBattle().

Definition at lines 485 and 1634 of file mars_lighthouse_star_room.c.

MarsLighthouseStarRoomKarstDragonShrinkScript

extern Sint32 MarsLighthouseStarRoomKarstDragonShrinkScript[]

Sint32 MarsLighthouseStarRoomKarstDragonShrinkScript[]

References Sint32.

Referenced by scMarsLighthouseStarRoomWakeAfterBattle().

Definition at lines 486 and 1644 of file mars_lighthouse_star_room.c.

MarsLighthouseStarRoomWestSparkleRoute

extern Sint32 MarsLighthouseStarRoomWestSparkleRoute[]

Sint32 MarsLighthouseStarRoomWestSparkleRoute[]

The west sparkle's way from the west torch round the west side of the hall and up to the ice, where it leaves its fireball to roll in.

References scActorPark(), scActorPopUp(), scMarsLighthouseStarRoomWestFireballCracksIce() and Sint32.

Referenced by scMarsLighthouseStarRoomShootFireballs().

Definition at lines 1259 and 1521 of file mars_lighthouse_star_room.c.

MarsLighthouseStarRoomEastSparkleRoute

extern Sint32 MarsLighthouseStarRoomEastSparkleRoute[]

Sint32 MarsLighthouseStarRoomEastSparkleRoute[]

The east sparkle's longer way round the east side of the hall to the ice.

References scActorPark(), scActorPopUp(), scMarsLighthouseStarRoomEastFireballCracksIce() and Sint32.

Referenced by scMarsLighthouseStarRoomShootFireballs().

Definition at lines 1260 and 1553 of file mars_lighthouse_star_room.c.

SlideOnIceStopped

volatile Sint16 SlideOnIceStopped

Referenced by scLeaderSetSlideStopped() and scLeaderSlideOnIceFromEdge().

Definition at line 1475 of file mars_lighthouse_star_room.c.

CrackedTiles

METATILE_TARGET CrackedTiles

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

Definition at line 1476 of file mars_lighthouse_star_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 1490 and 1880 of file mars_lighthouse_star_room.c.

MarsLighthouseStarRoomTorchScript

extern Sint32 MarsLighthouseStarRoomTorchScript[]

Sint32 MarsLighthouseStarRoomTorchScript[]

References scMarsLighthouseStarRoomSetUpTorch() and Sint32.

Referenced by ActorPlacements.

Definition at lines 1514 and 1605 of file mars_lighthouse_star_room.c.

SceneEntrances

SCENE_ENTRANCE SceneEntrances[]

Referenced by scGetEntrances().

Definition at line 1655 of file mars_lighthouse_star_room.c.

SceneExits

Uint32 SceneExits[]

Referenced by scGetExits().

Definition at line 1660 of file mars_lighthouse_star_room.c.

ActorPlacements

ACTOR_PLACE ActorPlacements[]

References MarsLighthouseStarRoomTorchScript and Sint32.

Referenced by scGetActorPlacements().

Definition at line 1690 of file mars_lighthouse_star_room.c.

SceneCues

CUE SceneCues[]

References scFireballCarryLeader(), scMarsLighthouseStarRoomBlazeWestTorch(), scMarsLighthouseStarRoomBurstIce(), scMarsLighthouseStarRoomEndBlazeOnWestTorch(), scMarsLighthouseStarRoomExamineStatue(), scMarsLighthouseStarRoomHoldWarmHand(), scMarsLighthouseStarRoomStartBlazeOnEastTorch(), scMarsLighthouseStarRoomTakeMarsStar(), scMarsLighthouseStarRoomUseMarsStar() and scMarsLighthouseStarRoomWakeFlameDragons().

Referenced by scGetCues().

Definition at line 1811 of file mars_lighthouse_star_room.c.

On this page

MacrosEnumerationsFunctionsVariablesDescriptionMacros in detailFLAG_MARS_STAR_TAKENFLAG_ADEPTS_WOKEFLAG_DRAGON_ICE_CRACKEDFLAG_FLAME_DRAGONS_BEATENFLAG_MARS_STAR_SETFLAG_BURST_CAN_BREAK_DRAGON_ICEFLAG_DRAGON_ICE_BURSTDRAGON_WAKE_CUEMETATILE_DRAGON_ICEMETATILE_STATUE_FACERISING_SPARK_TICKSRISING_SPARK_TICKS_LEFTWEST_SPARKS_XEAST_SPARKS_XSPARKS_ZEFFECT_SET_MODEEFFECT_SET_SCRIPTMETATILE_PUSH_SLOT_ENTRYEnumerations in detailanonymous enumanonymous enumanonymous enumFunctions in detailscMarsLighthouseStarRoomSetUpTorchscGetEntrancesscGetExitRegionsscGetExitsscGetActorPlacementsscMarsLighthouseStarRoomStartBlazeOnEastTorchscMarsLighthouseStarRoomBlazeWestTorchscMarsLighthouseStarRoomEndBlazeOnWestTorchscMarsLighthouseStarRoomCreateActorscMarsLighthouseStarRoomScatterIceChipsscMarsLighthouseStarRoomWestFireballCracksIcescMarsLighthouseStarRoomEastFireballCracksIcescMarsLighthouseStarRoomClearDragonIcescMarsLighthouseStarRoomBurstIcescGetCuesscMarsLighthouseStarRoomWakeAfterBattlescMarsLighthouseStarRoomCreateMarsStarscMarsLighthouseStarRoomLayDownAdeptscPrepareMapscMarsLighthouseStarRoomWakeFlameDragonsscMarsLighthouseStarRoomDrawStarWithLeaderscMarsLighthouseStarRoomLoadMarsStarIconscMarsLighthouseStarRoomHoldWarmHandscMarsLighthouseStarRoomTakeMarsStarscMarsLighthouseStarRoomExamineStatuescMarsLighthouseStarRoomSpawnRisingSparksscMarsLighthouseStarRoomUseMarsStarscMarsLighthouseStarRoomUpdateRisingSparkscMarsLighthouseStarRoomShootFireballsscFlameThrowerSendSparkscFlameThrowersSetModescFlameThrowersGetCounterscMarsLighthouseStarRoomKnockBackIfHitscFireballCarryLeaderscMarsLighthouseStarRoomIsLeaderHitscLeaderSetSlideStoppedVariables in detailMsgMarsLighthouseStarRoomWhyWhyAmILyingMarsLighthouseStarRoomLightRiseScriptMarsLighthouseStarRoomLightSinkScriptMarsLighthouseStarRoomAgatioDragonShrinkScriptMarsLighthouseStarRoomKarstDragonShrinkScriptMarsLighthouseStarRoomWestSparkleRouteMarsLighthouseStarRoomEastSparkleRouteSlideOnIceStoppedCrackedTilesFieldEffectDurationScriptsMarsLighthouseStarRoomTorchScriptSceneEntrancesSceneExitsActorPlacementsSceneCues