Skip to Content
The Alchemy Project

src/scene/babi_lighthouse.c

Babi Lighthouse, the half-built tower north of Lalivero, and the road up to it. More…

Macros

NameDescription
#defineHOLE_WEST_COLUMN 6The holes with ladders down to the Tunnel Ruins at the Babi Lighthouse Entry, beside the west pillar at metatile (6, 20) and under the east one at (18, 20), and the last column of the Entry's west half.
#defineHOLE_EAST_COLUMN 18
#defineHOLE_ROW 20
#defineENTRY_WEST_HALF_LAST_COLUMN 12

Enumerations

NameDescription
enumanonymous enum { ACTOR_LEFT_DOOR, ACTOR_RIGHT_DOOR, ACTOR_IODEM, ACTOR_WITNES … }The cave before the stone door (BabiLighthouseStoneDoor): the door's two halves, Iodem, the strongman who saw the kidnappers go through, a grey-haired man, a young man and Faran.
enumanonymous enum { ACTOR_LUFF }Luff, on its pillar in the ground floor's pit (BabiLighthouseLuff).
enumanonymous enum { ACTOR_LEFT_PILLAR, ACTOR_RIGHT_PILLAR, ACTOR_SPROUT, ACTOR_F … }The Entry (BabiLighthouseEntry): the two pillars at the lighthouse's foot, the sprout for Growth and the four the kidnappers knocked down on their way in.
enumanonymous enum { ACTOR_WORKER_DAY_OFF, ACTOR_WORKER_STRANGE_FOLK, ACTOR_WORKE … }The Road to Babi Lighthouse (RoadToBabiLighthouse): four workers and the grey pillar for Move and Carry.
enumanonymous enum { SPIRAL_PILLAR_ANIMATION_ROAD }SPRITE_SPIRAL_PILLAR's look on the road: a grey block carved with a spiral.
enumBABI_LIGHTHOUSE_METATILE_BEHAVIOR { METATILE_BEHAVIOR_BABI_LIGHTHOUSE_BESIDE_PILLAR, METATILE_BE … }The metatiles that start a script, by place.
enumanonymous enum { FLAG_GROWTH_PASSAGE_OPEN, FLAG_BEYOND_DOOR }
enumanonymous enum { PIT_MASK }What scPlaceTranslucentBlackActor places at the far edge of a slide's pit, so that Isaac vanishes below the edge as he drops over it.

Functions

NameDescription
static voidscBabiLighthouseCloseTruthDoor (void)Walking through the open stone door slides it shut behind the party: on the far side at metatiles (18, 10) and (19, 10), coming back at (18, 16) and (19, 16).
static voidscBabiLighthouseRedrawPillarMetatiles (void)Redraws the metatiles round the Entry's two pillars and their ladder holes, then blocks the metatiles under the pillars.
static voidscBabiLighthouseStartDjinnBattle (void)Talking to Luff, the Jupiter Djinni on the pillar in the ground floor's pit, starts a battle with it.
static voidscBabiLighthouseLandWithParticles (void)Coming down a slide, Isaac drops in from the floor above, lands with a thud that shakes the screen, throws up a ring of dust and is startled.
static voidscBabiLighthouseFallToExit (Sint32 exit)Coming down the north-west or south-west slide, Isaac drops through a room without landing and falls on through the hole below, out through the given exit.
const SCENE_ENTRANCE *scGetEntrances (void)The six rooms share one entrance table.
const SCENE_EXIT_REGION *scGetExitRegions (void)Only the Entry has regions: the three holes with ladders down to the Tunnel Ruins, beside the two pillars and in the north-east corner.
const Uint32 *scGetExits (void)The four scenes share one exit table.
const ACTOR_PLACE *scGetActorPlacements (void)Some villagers only turn back after talking once the flood is over or their family has gone home.
static voidscBabiLighthouseHopClearOfPillar (void)Move on the west or east grey pillar at the lighthouse's foot slides it a metatile, pushing it the way Isaac faces.
static voidscBabiLighthousePushEntryPillar (void)Walking into the west or east grey pillar at the lighthouse's foot pushes it a metatile.
static voidscBabiLighthousePushPillarOrClimbDownHole (void)Walking south into the ladder hole beside the west pillar or under the east one, from metatile (6, 19) or (18, 19), climbs Isaac down the ladder into the Tunnel Ruins.
static voidscBabiLighthouseJumpIntoPit (void)Isaac jumps down the slide ahead (scFieldActorJumpDownLedge), and the screen closes behind him.
static voidscBabiLighthouseDropFromWestRoomEastPit (void)Walking south onto the east slide of the second floor's pit, metatile (11, 10), Isaac jumps down it and lands on the pillar beside Luff on the ground floor.
static voidscBabiLighthouseDropFromEastRoomPit (void)Walking south onto the slide below Luff's pillar on the ground floor, metatile (29, 12), Isaac jumps down it and lands in the basement room.
static voidscBabiLighthouseDropFromWestRoomSouthwestPit (void)Walking south onto the south-west slide of the second floor's pit, metatile (8, 12), Isaac jumps down it, drops through the ground floor and lands in the basement room.
static voidscBabiLighthouseDropFromWestRoomNorthwestPit (void)Walking south onto the north-west slide of the second floor's pit, metatile (9, 9), Isaac jumps down it and drops through the ground floor and the basement into the cave before the stone door.
static voidscBabiLighthouseInspectLockedDoor (void)Searching the stone door in the room at the foot of the basement stairs, metatile (45, 9): "It seems to be locked." It opens only from the cave beyond.
static voidscBabiLighthouseFaranAsksPartyToOpenDoor (void)
static voidscBabiLighthouseExplainTruthDoor (void)The first time the stone door opens, Iodem, Faran and the men gather before it in wonder.
static voidscBabiLighthouseShowTruthDoorSwitch (void)Reveal in the cave shows a switch on the wall beside the stone door, metatile (17, 15), flipped one way or the other as the door stands.
static voidscBabiLighthouseHideTruthDoorSwitch (void)As Reveal's light fades in the cave, the switch beside the stone door is hidden again.
static voidscBabiLighthouseOpenTruthDoor (void)The stone door's two halves slide apart with a grinding of stone.
static voidscBabiLighthouseInspectTruthDoorSwitch (void)Searching the switch beside the stone door, metatile (17, 15), under Reveal's light: "flipped the switch", and the door opens.
static inline voidscBabiLighthouseFindMetatileAhead (FIELD_POS *ahead, ACTOR *actor)The metatile one direction-table step ahead of the actor, at its ground height.
static ACTOR *scBabiLighthouseFindActorAhead (ACTOR *actor)Finds the pushed actor one direction-table step ahead, including ground height.
static voidscBabiLighthouseLandCarriedPillarInPuffs (void)When Carry is cast on the grey pillar on the Road to Babi Lighthouse, the pillar lands in a ring of puffs of dust where it is set down.
static voidscBabiLighthouseUpdateMovedPillar (void)After Move or Carry on the grey pillar on the Road to Babi Lighthouse, a pillar set down in the dip at metatile (20, 12), on the chest's ledge, settles into it level with the ledge, and from then on Isaac can walk over it.
static voidscBabiLighthousePushRoadPillar (void)Walking into the grey pillar on the Road to Babi Lighthouse pushes it a metatile, but only when Isaac stands on the same level as it.
static voidscBabiLighthouseClimbOrPushRoadPillar (void)On the ledge of the Road to Babi Lighthouse, walking north or south on a ladder climbs it, and walking into the grey pillar from a ladder's metatile pushes it.
const CUE *scGetCues (void)The first water beast's cave changes its cues once the first drain has lowered its water: the beast is gone and its two puddles can be frozen.
static voidscBabiLighthouseOpenGrowthPassage (void)Growth on the sprout in the north-east corner of the Babi Lighthouse Entry, metatile (18, 8), grows it into a vine Isaac can climb.
static voidscBabiLighthouseMatchLeaderPriority (ACTOR *updated)The Entry's pillars' update function, from the second patch: a pillar north of Isaac is drawn at his own sprite priority, and one level in front of him otherwise, so that he passes behind a pillar south of him.
Sint32scInit (void)Sets up the scene being entered: on the road, the pillar where it was left; at the Entry, the pillars, the vine and the four lying trembling; inside, Isaac landing or falling on through as the slide he took sends him; and before the stone door, its halves and those waiting there as far as the story has gone.

Variables

NameDescription
extern SCENE_ENTRANCEBabiLighthouseEntryEntrances []
extern SCENE_ENTRANCEBabiLighthouseLuffEntrances []
extern SCENE_ENTRANCEBabiLighthouseStoneDoorEntrances []
extern SCENE_ENTRANCEBabiLighthouseRoadEntrances []
extern SCENE_EXIT_REGIONBabiLighthouseEntryRegions []
extern Uint32BabiLighthouseExits []
extern ACTOR_PLACEBabiLighthouseEntryActorPlacements []
extern ACTOR_PLACEBabiLighthouseLuffActorPlacements []
extern ACTOR_PLACEBabiLighthouseStoneDoorActorPlacements []
extern ACTOR_PLACEBabiLighthouseRoadActorPlacements []
extern CUEBabiLighthouseEntryCues []
extern CUEBabiLighthouseLuffCues []Inside, the first seven exits' metatiles carry numbers of their own.
extern CUEBabiLighthouseStoneDoorCues []
extern CUEBabiLighthouseRoadCues []
const Sint32 *FieldEffectDurationScripts []The resident copy of the scripts EFFECT_SCRIPT_MASK picks, by enum EFFECT_DURATION.
Sint32BabiLighthouseTrembleScript []The four the kidnappers knocked down tremble where they lie: two quick twitches, narrower and taller and back, then two seconds still.
ACTOR_PLACEBabiLighthouseNoActorPlacements []Unused: an empty actor placement table nothing returns.

Description

Babi Lighthouse, the half-built tower north of Lalivero, and the road up to it. The kidnappers who took Sheba came this way, and the party follows them through the lighthouse to a stone door, beyond which lie the Tunnel Ruins.

On the Road to Babi Lighthouse four workers have downed tools. A grey carved pillar stands on a ledge east of the path, below the chest with the Lucky Pepper. Moved west and lifted with Carry into the dip at metatile (20, 12), on the chest's ledge, it fills the dip and Isaac can walk across to the chest.

At the Babi Lighthouse Entry two of Babi's soldiers and two burly men lie trembling in the court, knocked down by the kidnappers. A grey pillar stands at the lighthouse's foot on each side, beside a hole with a ladder down to the Tunnel Ruins; the east one starts on top of its hole. Pushed or moved, the pillars cover and uncover the holes. Growth on the sprout in the north-east corner makes a vine up the lighthouse's side, the way to its upper doorway.

Inside are four rooms. The upper doorway opens on the second floor, a room round a deep pit with three slides down its sides. The lower doorway opens on the ground floor, where Luff, a Jupiter Djinni, stands on a pillar in the middle of the pit; the east slide from upstairs lands Isaac beside it. A slide from Luff's pillar and stairs lead down to a basement room, and stairs from there to a room with a locked door. The north-west slide upstairs drops Isaac all the way through the floors into the cave before the stone door.

There Faran and three men wait, sure that no one can open the door the kidnappers went through, and Iodem, who came with the party, steps out to meet them. Faran asks the party to prove itself by opening it. Reveal shows a switch beside the door, and searching it under Reveal's light opens the door; without it, the party reads "The truth of this door is open to those seeing with their true heart." The door slides shut behind the party whichever way it goes through, and from the far side it opens as Isaac walks up to it. The cave's south-west passage comes out through the locked door downstairs, which stays open from then on.

The four places share this overlay and one exit table; the other tables are chosen by MainRoutineStateWork.next, with the road as the fallback. Retreat anywhere but on the road leads back to the Entry.

Macros in detail

HOLE_WEST_COLUMN

#define HOLE_WEST_COLUMN 6

The holes with ladders down to the Tunnel Ruins at the Babi Lighthouse Entry, beside the west pillar at metatile (6, 20) and under the east one at (18, 20), and the last column of the Entry's west half.

Referenced by scBabiLighthouseHopClearOfPillar() and scBabiLighthousePushPillarOrClimbDownHole().

Definition at line 385 of file babi_lighthouse.c.

HOLE_EAST_COLUMN

#define HOLE_EAST_COLUMN 18

Referenced by scBabiLighthouseHopClearOfPillar() and scBabiLighthousePushPillarOrClimbDownHole().

Definition at line 386 of file babi_lighthouse.c.

HOLE_ROW

#define HOLE_ROW 20

Referenced by scBabiLighthouseHopClearOfPillar() and scBabiLighthousePushPillarOrClimbDownHole().

Definition at line 387 of file babi_lighthouse.c.

ENTRY_WEST_HALF_LAST_COLUMN

#define ENTRY_WEST_HALF_LAST_COLUMN 12

Referenced by scBabiLighthousePushPillarOrClimbDownHole().

Definition at line 388 of file babi_lighthouse.c.

Enumerations in detail

anonymous enum

enum { ACTOR_LEFT_DOOR, ACTOR_RIGHT_DOOR, ACTOR_IODEM, ACTOR_WITNESS, … }

The cave before the stone door (BabiLighthouseStoneDoor): the door's two halves, Iodem, the strongman who saw the kidnappers go through, a grey-haired man, a young man and Faran.

EnumeratorValueDescription
ACTOR_LEFT_DOORACTOR_FIRST_PLACED
ACTOR_RIGHT_DOOR
ACTOR_IODEM
ACTOR_WITNESSA strongman.
ACTOR_DOUBTING_THE_DOORA burly grey-haired man with his arms folded.
ACTOR_WORRIED_FOR_SHEBAA young man with brown hair in a purple shirt.
ACTOR_FARAN

Definition at line 70 of file babi_lighthouse.c.

anonymous enum

enum { ACTOR_LUFF }

Luff, on its pillar in the ground floor's pit (BabiLighthouseLuff).

EnumeratorValueDescription
ACTOR_LUFFACTOR_FIRST_PLACED

Definition at line 82 of file babi_lighthouse.c.

anonymous enum

enum { ACTOR_LEFT_PILLAR, ACTOR_RIGHT_PILLAR, ACTOR_SPROUT, ACTOR_FALLEN_SOLDIER_NO_MATCH, … }

The Entry (BabiLighthouseEntry): the two pillars at the lighthouse's foot, the sprout for Growth and the four the kidnappers knocked down on their way in.

The four are two of Babi's soldiers, a strongman and a bald, muscular man. They lie on the ground, each named by what he says.

The pillars have the sprite of the pillars Move or a push shifts in Venus Lighthouse.

EnumeratorValueDescription
ACTOR_LEFT_PILLARACTOR_FIRST_PLACED
ACTOR_RIGHT_PILLAR
ACTOR_SPROUTThe sprout in the north-east corner, which Growth grows into a vine.
ACTOR_FALLEN_SOLDIER_NO_MATCHA soldier lying on the ground.
ACTOR_FALLEN_STRONGMAN_ONLY_TWOA strongman in a red top lying on the ground.
ACTOR_FALLEN_SOLDIER_KICKED_ASIDEA soldier lying on the ground.
ACTOR_FALLEN_MAN_SCORCHED_GROUNDA bald, muscular man lying on the ground.

Definition at line 96 of file babi_lighthouse.c.

anonymous enum

enum { ACTOR_WORKER_DAY_OFF, ACTOR_WORKER_STRANGE_FOLK, ACTOR_WORKER_ODD_PLACE, ACTOR_WORKER_CUTTING_STONES, … }

The Road to Babi Lighthouse (RoadToBabiLighthouse): four workers and the grey pillar for Move and Carry.

The workers are a bald, muscular man, a strongman and two men with pickaxes, each named by what he says. The pillar has the sprite of the pillars Carry takes across a gap in Venus Lighthouse.

EnumeratorValueDescription
ACTOR_WORKER_DAY_OFFACTOR_FIRST_PLACEDA bald, muscular man.
ACTOR_WORKER_STRANGE_FOLKA strongman in a red top.
ACTOR_WORKER_ODD_PLACEA man with a pickaxe.
ACTOR_WORKER_CUTTING_STONESA man with a pickaxe.
ACTOR_ROAD_PILLAR

Definition at line 116 of file babi_lighthouse.c.

anonymous enum

enum { SPIRAL_PILLAR_ANIMATION_ROAD }

SPRITE_SPIRAL_PILLAR's look on the road: a grey block carved with a spiral.

EnumeratorValueDescription
SPIRAL_PILLAR_ANIMATION_ROAD2

Definition at line 126 of file babi_lighthouse.c.

BABI_LIGHTHOUSE_METATILE_BEHAVIOR

enum BABI_LIGHTHOUSE_METATILE_BEHAVIOR

The metatiles that start a script, by place. An exit's metatile carries its exit's number, except inside the lighthouse, where the first exits' metatiles are numbered otherwise (BabiLighthouseLuffCues).

EnumeratorValueDescription
METATILE_BEHAVIOR_BABI_LIGHTHOUSE_BESIDE_PILLAR10The Entry: the metatiles round each grey pillar, from which Isaac pushes it.
METATILE_BEHAVIOR_BABI_LIGHTHOUSE_LADDER_HOLE11The Entry: the ladder holes down to the Tunnel Ruins and the metatiles north of them, (6, 19) to (6, 20) and (18, 19) to (18, 20).
METATILE_BEHAVIOR_BABI_LIGHTHOUSE_LOCKED_DOOR20The locked stone door in the room at the foot of the basement stairs, (45, 9).
METATILE_BEHAVIOR_BABI_LIGHTHOUSE_EAST_SLIDE25The second floor's east slide, (11, 10).
METATILE_BEHAVIOR_BABI_LIGHTHOUSE_LUFF_SLIDE26The slide below
METATILE_BEHAVIOR_BABI_LIGHTHOUSE_SOUTHWEST_SLIDE27Luff's pillar, (29, 12). The second floor's
METATILE_BEHAVIOR_BABI_LIGHTHOUSE_NORTHWEST_SLIDE28south-west slide, (8, 12). The second floor's north-west slide, (9, 9).
METATILE_BEHAVIOR_BABI_LIGHTHOUSE_CAVE_MOUTH10The stone door's cave: across its mouth, (17, 23) to (20, 23).
METATILE_BEHAVIOR_BABI_LIGHTHOUSE_SOUTH_OF_DOOR20Just south of the stone door, (18, 16) and (19, 16).
METATILE_BEHAVIOR_BABI_LIGHTHOUSE_PAST_DOOR21Two rows north of the stone door, (18, 10) and (19, 10).
METATILE_BEHAVIOR_BABI_LIGHTHOUSE_NORTH_OF_DOOR22Just north of the stone door, (18, 11) and (19, 11).
METATILE_BEHAVIOR_BABI_LIGHTHOUSE_DOOR_SWITCH60The hidden switch beside the stone door, (17, 15).
METATILE_BEHAVIOR_BABI_LIGHTHOUSE_PILLAR_LEDGE50The road: the ledge where the grey pillar stands, (15, 13) to (25, 16).
METATILE_BEHAVIOR_BABI_LIGHTHOUSE_LADDER51The road: the
METATILE_BEHAVIOR_BABI_LIGHTHOUSE_LUCKY_PEPPER_CHEST100ladders up to and on the ledge, (16, 12) to (16, 13), (22, 13) to (22, 14) and (24, 13) to (24, 14). The road: the chest with the Lucky Pepper, (23, 12).

Definition at line 134 of file babi_lighthouse.c.

anonymous enum

enum { FLAG_GROWTH_PASSAGE_OPEN, FLAG_BEYOND_DOOR }

EnumeratorValueDescription
FLAG_GROWTH_PASSAGE_OPENFLAG_AREA_TEMP(0x00)Growth has grown the Entry's sprout into a vine.
FLAG_BEYOND_DOORFLAG_AREA_TEMP(0x01)The party is on the far side of the stone door, towards the Tunnel Ruins.

Definition at line 195 of file babi_lighthouse.c.

anonymous enum

enum { PIT_MASK }

What scPlaceTranslucentBlackActor places at the far edge of a slide's pit, so that Isaac vanishes below the edge as he drops over it.

It is a crate drawn solid black (SPRITE_COLOR_BLACK) and translucent in front of the actors, so it shows the background through him where they overlap.

EnumeratorValueDescription
PIT_MASKSPRITE_CRATE

Definition at line 209 of file babi_lighthouse.c.

Functions in detail

scBabiLighthouseCloseTruthDoor

static void scBabiLighthouseCloseTruthDoor(void)

Walking through the open stone door slides it shut behind the party: on the far side at metatiles (18, 10) and (19, 10), coming back at (18, 16) and (19, 16).

The first opening's scene closes it too, in Iodem's face as he steps up to it.

References fdActorSetDestination(), fdActorWaitForMoveById(), fdMapGridCopyMetatileAttributes(), fdScriptEnd(), fdScriptGetFlag(), fdScriptStart(), gmFlagClear(), gmFlagSet() and sySoundPlay().

Referenced by BabiLighthouseStoneDoorCues and scBabiLighthouseExplainTruthDoor().

Definition at lines 220 and 1226 of file babi_lighthouse.c.

scBabiLighthouseRedrawPillarMetatiles

static void scBabiLighthouseRedrawPillarMetatiles(void)

Redraws the metatiles round the Entry's two pillars and their ladder holes, then blocks the metatiles under the pillars.

References fdActorGet(), fdActorSetSpritePriority(), fdMapGridCopyMetatileAttributes() and Sint32.

Referenced by scBabiLighthouseHopClearOfPillar() and scInit().

Definition at lines 221 and 1426 of file babi_lighthouse.c.

scBabiLighthouseStartDjinnBattle

static void scBabiLighthouseStartDjinnBattle(void)

Talking to Luff, the Jupiter Djinni on the pillar in the ground floor's pit, starts a battle with it.

References fdRequestDjinnBattle().

Referenced by BabiLighthouseLuffCues.

Definition at line 230 of file babi_lighthouse.c.

scBabiLighthouseLandWithParticles

static void scBabiLighthouseLandWithParticles(void)

Coming down a slide, Isaac drops in from the floor above, lands with a thud that shakes the screen, throws up a ring of dust and is startled. It plays on Luff's pillar, in the basement room and in the cave before the stone door.

References fdActorGet(), fdActorSetAnimation(), fdActorSetAttachedEffect(), fdMapGridCenterOnFollowedPoint(), fdMapGridWaitForShakeToSettle(), fdScriptEnd(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), scFieldEffectAdvanceMotion(), Sint32, syCos(), sySin(), sySoundPlay() and sySynch().

Referenced by scInit().

Definition at line 241 of file babi_lighthouse.c.

scBabiLighthouseFallToExit

static void scBabiLighthouseFallToExit(Sint32 exit)

Coming down the north-west or south-west slide, Isaac drops through a room without landing and falls on through the hole below, out through the given exit.

References fdActorGet(), fdActorSetSpriteColorById(), fdActorSetSpriteFlags(), fdMapGridCenterOnFollowedPoint(), fdScriptEnd(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), scActorWaitUntilLanded(), Sint32, syImportScriptSetExitRequest(), sySoundPlay() and sySynch().

Referenced by scInit().

Definition at line 302 of file babi_lighthouse.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References BabiLighthouseEntryEntrances, BabiLighthouseLuffEntrances, BabiLighthouseRoadEntrances, BabiLighthouseStoneDoorEntrances and MainRoutineStateWork.

Definition at line 326 of file babi_lighthouse.c.

scGetExitRegions

const SCENE_EXIT_REGION *scGetExitRegions(void)

Only the Entry has regions: the three holes with ladders down to the Tunnel Ruins, beside the two pillars and in the north-east corner. A leader below the ground there has climbed down one.

References BabiLighthouseEntryRegions and MainRoutineStateWork.

Definition at line 348 of file babi_lighthouse.c.

scGetExits

const Uint32 *scGetExits(void)

The four scenes share one exit table.

References BabiLighthouseExits.

Definition at line 358 of file babi_lighthouse.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

References BabiLighthouseEntryActorPlacements, BabiLighthouseLuffActorPlacements, BabiLighthouseRoadActorPlacements, BabiLighthouseStoneDoorActorPlacements and MainRoutineStateWork.

Definition at line 363 of file babi_lighthouse.c.

scBabiLighthouseHopClearOfPillar

static void scBabiLighthouseHopClearOfPillar(void)

Move on the west or east grey pillar at the lighthouse's foot slides it a metatile, pushing it the way Isaac faces. If it slides onto the ladder hole where Isaac stands, metatile (6, 20) or (18, 20), he starts ("!") and hops out of its way, east or north. Each push of a pillar ends here too.

Last the pillars' metatiles are redrawn, so that the moved pillar blocks its new metatile and covers the hole it stands on.

References fdActorFaceDirection(), fdActorGet(), fdActorJump(), fdActorSetDestinationOffsetById(), fdActorShowEmote(), fdActorWaitForMoveById(), fdScriptEnd(), fdScriptStart(), scBabiLighthouseRedrawPillarMetatiles() and scFieldActorSetDestinationOffset().

Referenced by BabiLighthouseEntryCues and scBabiLighthousePushEntryPillar().

Definition at line 397 of file babi_lighthouse.c.

scBabiLighthousePushEntryPillar

static void scBabiLighthousePushEntryPillar(void)

Walking into the west or east grey pillar at the lighthouse's foot pushes it a metatile. Pushed east from where it starts, the west pillar slides onto the ladder hole at metatile (6, 20) and covers it.

References fdScriptEnd(), fdScriptStart(), scBabiLighthouseHopClearOfPillar() and scPushedActorAdvancePair().

Referenced by BabiLighthouseEntryCues and scBabiLighthousePushPillarOrClimbDownHole().

Definition at line 440 of file babi_lighthouse.c.

scBabiLighthousePushPillarOrClimbDownHole

static void scBabiLighthousePushPillarOrClimbDownHole(void)

Walking south into the ladder hole beside the west pillar or under the east one, from metatile (6, 19) or (18, 19), climbs Isaac down the ladder into the Tunnel Ruins. If the grey pillar stands on the hole, he pushes it south instead.

References fdActorGet(), fdClimbDown() and scBabiLighthousePushEntryPillar().

Referenced by BabiLighthouseEntryCues.

Definition at line 452 of file babi_lighthouse.c.

scBabiLighthouseJumpIntoPit

static void scBabiLighthouseJumpIntoPit(void)

Isaac jumps down the slide ahead (scFieldActorJumpDownLedge), and the screen closes behind him.

References fdScriptFinishScreenTransition(), fdScriptWaitTransitionTicks() and scFieldActorJumpDownLedge().

Referenced by scBabiLighthouseDropFromEastRoomPit(), scBabiLighthouseDropFromWestRoomEastPit(), scBabiLighthouseDropFromWestRoomNorthwestPit() and scBabiLighthouseDropFromWestRoomSouthwestPit().

Definition at line 485 of file babi_lighthouse.c.

scBabiLighthouseDropFromWestRoomEastPit

static void scBabiLighthouseDropFromWestRoomEastPit(void)

Walking south onto the east slide of the second floor's pit, metatile (11, 10), Isaac jumps down it and lands on the pillar beside Luff on the ground floor.

References fdScriptEnd(), fdScriptStart(), scBabiLighthouseJumpIntoPit() and syImportScriptSetExitRequest().

Referenced by BabiLighthouseLuffCues.

Definition at line 496 of file babi_lighthouse.c.

scBabiLighthouseDropFromEastRoomPit

static void scBabiLighthouseDropFromEastRoomPit(void)

Walking south onto the slide below Luff's pillar on the ground floor, metatile (29, 12), Isaac jumps down it and lands in the basement room.

References fdScriptEnd(), fdScriptStart(), scBabiLighthouseJumpIntoPit() and syImportScriptSetExitRequest().

Referenced by BabiLighthouseLuffCues.

Definition at line 507 of file babi_lighthouse.c.

scBabiLighthouseDropFromWestRoomSouthwestPit

static void scBabiLighthouseDropFromWestRoomSouthwestPit(void)

Walking south onto the south-west slide of the second floor's pit, metatile (8, 12), Isaac jumps down it, drops through the ground floor and lands in the basement room.

The pit's far edge and the pillar beside it are staged in front of him so that he vanishes below them.

References fdScriptEnd(), fdScriptStart(), scBabiLighthouseJumpIntoPit() and syImportScriptSetExitRequest().

Referenced by BabiLighthouseLuffCues.

Definition at line 523 of file babi_lighthouse.c.

scBabiLighthouseDropFromWestRoomNorthwestPit

static void scBabiLighthouseDropFromWestRoomNorthwestPit(void)

Walking south onto the north-west slide of the second floor's pit, metatile (9, 9), Isaac jumps down it and drops through the ground floor and the basement into the cave before the stone door.

References fdScriptEnd(), fdScriptStart(), scBabiLighthouseJumpIntoPit() and syImportScriptSetExitRequest().

Referenced by BabiLighthouseLuffCues.

Definition at line 537 of file babi_lighthouse.c.

scBabiLighthouseInspectLockedDoor

static void scBabiLighthouseInspectLockedDoor(void)

Searching the stone door in the room at the foot of the basement stairs, metatile (45, 9): "It seems to be locked." It opens only from the cave beyond.

References fdActorSetAnimation(), fdScriptEnd(), fdScriptStart() and mnFieldMessageShow().

Referenced by BabiLighthouseLuffCues.

Definition at line 549 of file babi_lighthouse.c.

scBabiLighthouseFaranAsksPartyToOpenDoor

static void scBabiLighthouseFaranAsksPartyToOpenDoor(void)

The first time the party walks north into the cave before the stone door,
across metatiles (17,
23) to (20, 23), Iodem steps out beside Isaac to meet Faran and three men,
    who say the door has
never opened. Faran doubts the party, and asks it to prove its power by
opening the door that the kidnappers went through.

References fdActorFaceDirection(), fdActorFaceEachOther(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorWaitForMoveById(), fdActorWalkBy(), fdActorWalkByAndWait(), fdActorWalkTo(), fdActorWalkToAndWait(), fdCameraWaitForMove(), fdEndBusyAndReveal(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagSet(), scFieldActorLaunchFromLeader() and scWalkIntoLeader().

Referenced by BabiLighthouseStoneDoorCues.

Definition at line 563 of file babi_lighthouse.c.

scBabiLighthouseExplainTruthDoor

static void scBabiLighthouseExplainTruthDoor(void)

The first time the stone door opens, Iodem, Faran and the men gather before it in wonder. As Iodem steps up to follow, the door slides shut in his face: it will not let those without Psynergy through. Faran and Iodem agree to stay behind and let the party go on alone.

References fdActorFaceDirection(), fdActorFaceEachOther(), fdActorJump(), fdActorLaunchFromLeader(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorShowEmote(), fdActorWaitForMoveById(), fdActorWalkByAndWait(), fdActorWalkToAndWait(), fdCameraFollowActor(), fdCameraWaitForMove(), fdEndBusyAndReveal(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagClear(), gmFlagSet(), scBabiLighthouseCloseTruthDoor(), scFieldActorLaunchFromLeader() and scWalkIntoLeader().

Referenced by scBabiLighthouseOpenTruthDoor().

Definition at line 871 of file babi_lighthouse.c.

scBabiLighthouseShowTruthDoorSwitch

static void scBabiLighthouseShowTruthDoorSwitch(void)

Reveal in the cave shows a switch on the wall beside the stone door, metatile (17, 15), flipped one way or the other as the door stands.

References fdMapGridCopyMetatilesLayered() and gmFlagGet().

Referenced by BabiLighthouseStoneDoorCues.

Definition at line 1184 of file babi_lighthouse.c.

scBabiLighthouseHideTruthDoorSwitch

static void scBabiLighthouseHideTruthDoorSwitch(void)

As Reveal's light fades in the cave, the switch beside the stone door is hidden again.

References fdMapGridCopyMetatilesLayered().

Referenced by BabiLighthouseStoneDoorCues.

Definition at line 1198 of file babi_lighthouse.c.

scBabiLighthouseOpenTruthDoor

static void scBabiLighthouseOpenTruthDoor(void)

The stone door's two halves slide apart with a grinding of stone. It runs when the switch is flipped, and when Isaac walks up to the closed door from the far side, metatiles (18, 11) and (19, 11).

References fdActorSetDestination(), fdActorWaitForMoveById(), fdMapGridCopyMetatileAttributes(), fdScriptEnd(), fdScriptGetFlag(), fdScriptStart(), gmFlagGet(), gmFlagSet(), scBabiLighthouseExplainTruthDoor() and sySoundPlay().

Referenced by BabiLighthouseStoneDoorCues and scBabiLighthouseInspectTruthDoorSwitch().

Definition at line 1206 of file babi_lighthouse.c.

scBabiLighthouseInspectTruthDoorSwitch

static void scBabiLighthouseInspectTruthDoorSwitch(void)

Searching the switch beside the stone door, metatile (17, 15), under Reveal's light: "flipped the switch", and the door opens. Without Reveal, the wall there reads "The truth of this door is open to those seeing with their true heart."

References fdMapGridCopyMetatilesLayered(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagGet(), mnFieldMessageShow(), scBabiLighthouseOpenTruthDoor(), state and sySoundPlay().

Referenced by BabiLighthouseStoneDoorCues.

Definition at line 1254 of file babi_lighthouse.c.

scBabiLighthouseFindMetatileAhead

static inline void scBabiLighthouseFindMetatileAhead(FIELD_POS *ahead, ACTOR *actor)

The metatile one direction-table step ahead of the actor, at its ground height.

References fdMapGridGetTerrainHeight(), PushedActorDirectionSteps and Sint32.

Referenced by scBabiLighthouseFindActorAhead().

Definition at line 1284 of file babi_lighthouse.c.

scBabiLighthouseFindActorAhead

static ACTOR *scBabiLighthouseFindActorAhead(ACTOR *actor)

Finds the pushed actor one direction-table step ahead, including ground height.

References scBabiLighthouseFindMetatileAhead() and scPushedActorFindAtTile().

Referenced by scBabiLighthouseClimbOrPushRoadPillar() and scBabiLighthousePushRoadPillar().

Definition at line 1296 of file babi_lighthouse.c.

scBabiLighthouseLandCarriedPillarInPuffs

static void scBabiLighthouseLandCarriedPillarInPuffs(void)

When Carry is cast on the grey pillar on the Road to Babi Lighthouse, the pillar lands in a ring of puffs of dust where it is set down.

It only asks Carry (through sceneVariant) to wait for the dropped pillar to land and throw the puffs.

Referenced by BabiLighthouseRoadCues.

Definition at line 1309 of file babi_lighthouse.c.

scBabiLighthouseUpdateMovedPillar

static void scBabiLighthouseUpdateMovedPillar(void)

After Move or Carry on the grey pillar on the Road to Babi Lighthouse, a pillar set down in the dip at metatile (20, 12), on the chest's ledge, settles into it level with the ledge, and from then on Isaac can walk over it.

References fdActorGet(), fdMapGridCopyMetatileAttributes() and Sint32.

Referenced by BabiLighthouseRoadCues.

Definition at line 1318 of file babi_lighthouse.c.

scBabiLighthousePushRoadPillar

static void scBabiLighthousePushRoadPillar(void)

Walking into the grey pillar on the Road to Babi Lighthouse pushes it a metatile, but only when Isaac stands on the same level as it.

References fdActorGet(), scBabiLighthouseFindActorAhead() and scPushedActorAdvancePair().

Referenced by BabiLighthouseRoadCues and scBabiLighthouseClimbOrPushRoadPillar().

Definition at line 1344 of file babi_lighthouse.c.

scBabiLighthouseClimbOrPushRoadPillar

static void scBabiLighthouseClimbOrPushRoadPillar(void)

On the ledge of the Road to Babi Lighthouse, walking north or south on a ladder climbs it, and walking into the grey pillar from a ladder's metatile pushes it.

References fdActorGet(), fdClimbDown(), fdClimbUp(), MainRoutineStateWork, scBabiLighthouseFindActorAhead(), scBabiLighthousePushRoadPillar() and Sint32.

Referenced by BabiLighthouseRoadCues.

Definition at line 1368 of file babi_lighthouse.c.

scGetCues

const CUE *scGetCues(void)

References BabiLighthouseEntryCues, BabiLighthouseLuffCues, BabiLighthouseRoadCues, BabiLighthouseStoneDoorCues and MainRoutineStateWork.

Definition at line 1396 of file babi_lighthouse.c.

scBabiLighthouseOpenGrowthPassage

static void scBabiLighthouseOpenGrowthPassage(void)

Growth on the sprout in the north-east corner of the Babi Lighthouse Entry, metatile (18, 8), grows it into a vine Isaac can climb.

References fdMapGridCopyMetatileAttributes(), gmFlagSet() and sySynch().

Referenced by BabiLighthouseEntryCues and scInit().

Definition at line 1417 of file babi_lighthouse.c.

scBabiLighthouseMatchLeaderPriority

static void scBabiLighthouseMatchLeaderPriority(ACTOR *updated)

The Entry's pillars' update function, from the second patch: a pillar north of Isaac is drawn at his own sprite priority, and one level in front of him otherwise, so that he passes behind a pillar south of him.

References fdActorGet(), fdActorSetSpritePriority() and Sint32.

Referenced by scInit().

Definition at line 1453 of file babi_lighthouse.c.

scInit

Sint32 scInit(void)

Sets up the scene being entered: on the road, the pillar where it was left; at the Entry, the pillars, the vine and the four lying trembling; inside, Isaac landing or falling on through as the slide he took sends him; and before the stone door, its halves and those waiting there as far as the story has gone. Returns 0.

References fdActorFaceDirection(), fdActorGet(), fdActorSetAnimation(), fdActorSetSpriteColorById(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), fdScriptWait(), gmFlagClear(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork, scBabiLighthouseFallToExit(), scBabiLighthouseLandWithParticles(), scBabiLighthouseMatchLeaderPriority(), scBabiLighthouseOpenGrowthPassage(), scBabiLighthouseRedrawPillarMetatiles(), Sint32 and sySynch().

Definition at line 1496 of file babi_lighthouse.c.

Variables in detail

BabiLighthouseEntryEntrances

extern SCENE_ENTRANCE BabiLighthouseEntryEntrances[]

SCENE_ENTRANCE BabiLighthouseEntryEntrances[]

Referenced by scGetEntrances().

Definition at lines 52 and 1746 of file babi_lighthouse.c.

BabiLighthouseLuffEntrances

extern SCENE_ENTRANCE BabiLighthouseLuffEntrances[]

SCENE_ENTRANCE BabiLighthouseLuffEntrances[]

Referenced by scGetEntrances().

Definition at lines 53 and 1801 of file babi_lighthouse.c.

BabiLighthouseStoneDoorEntrances

extern SCENE_ENTRANCE BabiLighthouseStoneDoorEntrances[]

SCENE_ENTRANCE BabiLighthouseStoneDoorEntrances[]

Referenced by scGetEntrances().

Definition at lines 54 and 1933 of file babi_lighthouse.c.

BabiLighthouseRoadEntrances

extern SCENE_ENTRANCE BabiLighthouseRoadEntrances[]

SCENE_ENTRANCE BabiLighthouseRoadEntrances[]

Referenced by scGetEntrances().

Definition at lines 55 and 1958 of file babi_lighthouse.c.

BabiLighthouseEntryRegions

extern SCENE_EXIT_REGION BabiLighthouseEntryRegions[]

SCENE_EXIT_REGION BabiLighthouseEntryRegions[]

Referenced by scGetExitRegions().

Definition at lines 56 and 1983 of file babi_lighthouse.c.

BabiLighthouseExits

extern Uint32 BabiLighthouseExits[]

Uint32 BabiLighthouseExits[]

Referenced by scGetExits().

Definition at lines 57 and 2005 of file babi_lighthouse.c.

BabiLighthouseEntryActorPlacements

extern ACTOR_PLACE BabiLighthouseEntryActorPlacements[]

ACTOR_PLACE BabiLighthouseEntryActorPlacements[]

References BabiLighthouseTrembleScript and Sint32.

Referenced by scGetActorPlacements().

Definition at lines 58 and 2102 of file babi_lighthouse.c.

BabiLighthouseLuffActorPlacements

extern ACTOR_PLACE BabiLighthouseLuffActorPlacements[]

ACTOR_PLACE BabiLighthouseLuffActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 59 and 2169 of file babi_lighthouse.c.

BabiLighthouseStoneDoorActorPlacements

extern ACTOR_PLACE BabiLighthouseStoneDoorActorPlacements[]

ACTOR_PLACE BabiLighthouseStoneDoorActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 60 and 2183 of file babi_lighthouse.c.

BabiLighthouseRoadActorPlacements

extern ACTOR_PLACE BabiLighthouseRoadActorPlacements[]

ACTOR_PLACE BabiLighthouseRoadActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 61 and 2207 of file babi_lighthouse.c.

BabiLighthouseEntryCues

extern CUE BabiLighthouseEntryCues[]

CUE BabiLighthouseEntryCues[]

References scBabiLighthouseHopClearOfPillar(), scBabiLighthouseOpenGrowthPassage(), scBabiLighthousePushEntryPillar() and scBabiLighthousePushPillarOrClimbDownHole().

Referenced by scGetCues().

Definition at lines 62 and 2221 of file babi_lighthouse.c.

BabiLighthouseLuffCues

extern CUE BabiLighthouseLuffCues[]

CUE BabiLighthouseLuffCues[]

Inside, the first seven exits' metatiles carry numbers of their own.

References scBabiLighthouseDropFromEastRoomPit(), scBabiLighthouseDropFromWestRoomEastPit(), scBabiLighthouseDropFromWestRoomNorthwestPit(), scBabiLighthouseDropFromWestRoomSouthwestPit(), scBabiLighthouseInspectLockedDoor() and scBabiLighthouseStartDjinnBattle().

Referenced by scGetCues().

Definition at lines 63 and 2258 of file babi_lighthouse.c.

BabiLighthouseStoneDoorCues

extern CUE BabiLighthouseStoneDoorCues[]

CUE BabiLighthouseStoneDoorCues[]

References scBabiLighthouseCloseTruthDoor(), scBabiLighthouseFaranAsksPartyToOpenDoor(), scBabiLighthouseHideTruthDoorSwitch(), scBabiLighthouseInspectTruthDoorSwitch(), scBabiLighthouseOpenTruthDoor() and scBabiLighthouseShowTruthDoorSwitch().

Referenced by scGetCues().

Definition at lines 64 and 2292 of file babi_lighthouse.c.

BabiLighthouseRoadCues

extern CUE BabiLighthouseRoadCues[]

CUE BabiLighthouseRoadCues[]

References scBabiLighthouseClimbOrPushRoadPillar(), scBabiLighthouseLandCarriedPillarInPuffs(), scBabiLighthousePushRoadPillar() and scBabiLighthouseUpdateMovedPillar().

Referenced by scGetCues().

Definition at lines 65 and 2353 of file babi_lighthouse.c.

FieldEffectDurationScripts

const Sint32 *FieldEffectDurationScripts[]

References FieldEffectLongScript, FieldEffectMediumScript, FieldEffectShortScript and Sint32.

Definition at line 1706 of file babi_lighthouse.c.

BabiLighthouseTrembleScript

Sint32 BabiLighthouseTrembleScript[]

The four the kidnappers knocked down tremble where they lie: two quick twitches, narrower and taller and back, then two seconds still.

References Sint32.

Referenced by BabiLighthouseEntryActorPlacements.

Definition at line 1714 of file babi_lighthouse.c.

BabiLighthouseNoActorPlacements

ACTOR_PLACE BabiLighthouseNoActorPlacements[]

Unused: an empty actor placement table nothing returns.

Definition at line 2098 of file babi_lighthouse.c.

On this page

MacrosEnumerationsFunctionsVariablesDescriptionMacros in detailHOLE_WEST_COLUMNHOLE_EAST_COLUMNHOLE_ROWENTRY_WEST_HALF_LAST_COLUMNEnumerations in detailanonymous enumanonymous enumanonymous enumanonymous enumanonymous enumBABI_LIGHTHOUSE_METATILE_BEHAVIORanonymous enumanonymous enumFunctions in detailscBabiLighthouseCloseTruthDoorscBabiLighthouseRedrawPillarMetatilesscBabiLighthouseStartDjinnBattlescBabiLighthouseLandWithParticlesscBabiLighthouseFallToExitscGetEntrancesscGetExitRegionsscGetExitsscGetActorPlacementsscBabiLighthouseHopClearOfPillarscBabiLighthousePushEntryPillarscBabiLighthousePushPillarOrClimbDownHolescBabiLighthouseJumpIntoPitscBabiLighthouseDropFromWestRoomEastPitscBabiLighthouseDropFromEastRoomPitscBabiLighthouseDropFromWestRoomSouthwestPitscBabiLighthouseDropFromWestRoomNorthwestPitscBabiLighthouseInspectLockedDoorscBabiLighthouseFaranAsksPartyToOpenDoorscBabiLighthouseExplainTruthDoorscBabiLighthouseShowTruthDoorSwitchscBabiLighthouseHideTruthDoorSwitchscBabiLighthouseOpenTruthDoorscBabiLighthouseInspectTruthDoorSwitchscBabiLighthouseFindMetatileAheadscBabiLighthouseFindActorAheadscBabiLighthouseLandCarriedPillarInPuffsscBabiLighthouseUpdateMovedPillarscBabiLighthousePushRoadPillarscBabiLighthouseClimbOrPushRoadPillarscGetCuesscBabiLighthouseOpenGrowthPassagescBabiLighthouseMatchLeaderPriorityscInitVariables in detailBabiLighthouseEntryEntrancesBabiLighthouseLuffEntrancesBabiLighthouseStoneDoorEntrancesBabiLighthouseRoadEntrancesBabiLighthouseEntryRegionsBabiLighthouseExitsBabiLighthouseEntryActorPlacementsBabiLighthouseLuffActorPlacementsBabiLighthouseStoneDoorActorPlacementsBabiLighthouseRoadActorPlacementsBabiLighthouseEntryCuesBabiLighthouseLuffCuesBabiLighthouseStoneDoorCuesBabiLighthouseRoadCuesFieldEffectDurationScriptsBabiLighthouseTrembleScriptBabiLighthouseNoActorPlacements