Skip to Content
The Alchemy Project

src/scene/lalivero.c

Lalivero (SceneIdLalivero), the walled desert town by Babi Lighthouse, with a gate in its north and south walls and a stone obelisk in a pool at its middle. More…

Enumerations

NameDescription
enumanonymous enum { LALIVERO_ENTRANCE_AFTER_LIGHTHOUSE, LALIVERO_ENTRANCE_AFTER_ … }Entrances that set up the visit after Venus Lighthouse, the first as if the party had also seen the ship at Idejima (FLAG_SAW_SHIP_AT_IDEJIMA).
enumLALIVERO_ACTOR_ID { ACTOR_WEST_SOLDIER, ACTOR_EAST_SOLDIER, ACTOR_VILLAGER_THEY_ … }The placed actors, numbered in the order of LaliveroActorPlacements.
enumLALIVERO_METATILE_BEHAVIOR { METATILE_BEHAVIOR_LALIVERO_SANCTUM_GATE, METATILE_BEHAVIOR_L … }The metatiles of the town the scene gives a meaning of its own.
enumanonymous enum { WALL_METATILE_X, WALL_METATILE_Y }A metatile of the wall along the town's south edge (METATILE_BEHAVIOR_WALL), whose attributes scInit copies onto metatiles the party may not cross.

Functions

NameDescription
Sint32scInit (void)Sets Lalivero up as the party enters: the Black Orb Iodem will hold out, the wounded soldiers of the first visit (and their scene), or the sign at the closed north gate after Venus Lighthouse.
static voidscLaliveroTalkAboutIdejimaShip (void)During Iodem's farewell, if the party saw the ship at Idejima, Iodem says it was not Babi's, which is here in Lalivero, and Garet guesses it was Saturos's.
static voidscLaliveroTalkToTorch (void)Talking to Torch, a Mars Djinni on a roof in Lalivero, makes it join the party, on either visit.
const SCENE_ENTRANCE *scGetEntrances (void)The six rooms share one entrance table.
const SCENE_EXIT_REGION *scGetExitRegions (void)The scene has no exit regions: its regions entry returns none.
const Uint32 *scGetExits (void)Both scenes share one exit table.
const ACTOR_PLACE *scGetActorPlacements (void)The townsfolk, who stand differently once the party is back from Venus Lighthouse.
static voidscLaliveroTalkToVillagerTheyTookSheba (Sint32 actorId)On the first visit to Lalivero, the young man sobbing for Sheba stops to say she was taken to the ruins, then turns away north and sobs again.
static voidscLaliveroWomanAsksIfLeaving (Sint32 actorId)After Venus Lighthouse, the fair-haired woman in Lalivero asks whether the party is leaving Lalivero, and wishes it well either way.
static voidscLaliveroWharfGuardLetsPartyThrough (void)After Venus Lighthouse, the soldier at the door of the shack in the north-west of Lalivero says he was told to let the party in, and steps aside west of the door (FLAG_LALIVERO_WHARF_OPEN).
static voidscLaliveroEnterDoor (void)Walking north into one of Lalivero's doors opens it, or the Sanctum's gate, and Isaac walks in.
static voidscLaliveroEnterDoorway (void)Stepping onto the hatch in the flat roof of Faran's house (metatile (6, 18)) or of the weapon and armor shop (metatile (26, 15)) in Lalivero takes Isaac down inside.
static voidscLaliveroWatchWoundedSoldiers (void)On the first visit to Lalivero, walking in through the south gate with Iodem, the party finds two more of Tolbi's soldiers lying beaten in the gateway, who tell Iodem that Sheba's captors went to the ruins beneath Babi Lighthouse.
static voidscLaliveroIodemGivesBlackOrb (void)After Venus Lighthouse, a few steps out of Faran's house in the south-west of Lalivero (metatiles (6, 23) and (6, 24)), Garet stops Isaac, for Iodem asked them to wait.
static voidscLaliveroTurnBackToTheShip (void)After Iodem's farewell, walking out through Lalivero's south gate (metatiles (12, 25) to (18, 25)) makes Garet ask whether they are not taking Babi's ship, and Isaac steps back into town.
const CUE *scGetCues (void)What the party can talk to, touch and search, which changes once they are back from Venus Lighthouse.

Variables

NameDescription
extern Sint32LaliveroCryingScript []The sobbing of ACTOR_VILLAGER_THEY_TOOK_SHEBA: the sprite squashes and stretches twice, then rests 80 ticks.
extern SCENE_ENTRANCELaliveroEntrances []
extern Uint32LaliveroExits []
extern ACTOR_PLACELaliveroActorPlacements []
extern ACTOR_PLACELaliveroActorPlacementsAfterLighthouse []
extern Sint16LaliveroDoorMetatiles [][2]The metatile of each door by its metatile behaviour, and a door opening and the Sanctum's gate opening.
extern Uint16LaliveroDoorOpenSteps []
extern Uint16LaliveroGateOpenSteps []
extern CUELaliveroCues []
extern CUELaliveroCuesAfterLighthouse []

Description

Lalivero (SceneIdLalivero), the walled desert town by Babi Lighthouse, with a gate in its north and south walls and a stone obelisk in a pool at its middle. Its houses, shops, inn and Sanctum are timber_rooms_bc.c.

The story brings the party here twice, and the town's people and what answers the party change with FLAG_VENUS_LIGHTHOUSE_PARTY_RETURNED, set at Venus Lighthouse's aerie.

The first time, the party walks in through the south gate with Iodem and finds two of Tolbi's soldiers lying beaten in the gateway (scLaliveroWatchWoundedSoldiers, once, FLAG_LALIVERO_WOUNDED_SOLDIERS_SEEN). They tell Iodem that Sheba's captors went to the ruins beneath Babi Lighthouse, with Faran after them. The townsfolk talk of Sheba, and the soldier at the door of the shack in the north-west lets no one in.

The second time, the party comes back from Venus Lighthouse into Faran's house in the south-west. A few steps out of its door Garet stops Isaac, for Iodem asked them to wait; Iodem comes out, talks of Lemuria and gives the party the Black Orb that sails Babi's ship (scLaliveroIodemGivesBlackOrb, once, FLAG_IODEM_FAREWELL_SEEN). If the party saw the ship at Idejima, they talk of it too (scLaliveroTalkAboutIdejimaShip). From then on the soldier at the shack lets the party in (FLAG_LALIVERO_WHARF_OPEN), Garet turns Isaac back from the south gate, and a sign and a wall close the north gate.

On both visits Torch, a Mars Djinni, waits on a roof until spoken to, and a jar, a stone pillar and a chest hold a Water of Life, a Psy Crystal and a Warrior's Helm. Each door opens before Isaac walks in, and the hatches in two of the flat roofs lead down into Faran's house and the weapon and armor shop. Both gates lead out to the World Map.

Enumerations in detail

anonymous enum

enum { LALIVERO_ENTRANCE_AFTER_LIGHTHOUSE, LALIVERO_ENTRANCE_AFTER_LIGHTHOUSE_QUIETLY }

Entrances that set up the visit after Venus Lighthouse, the first as if the party had also seen the ship at Idejima (FLAG_SAW_SHIP_AT_IDEJIMA). No exit leads to them and the entrance table has no row for them (the aerie's exit leads into Faran's house, TIMBER_ROOMS_C_FROM_VENUS_LIGHTHOUSE_AERIE). Only the debug scene selector, which exits to any entrance from 0 to 99, reaches them.

EnumeratorValueDescription
LALIVERO_ENTRANCE_AFTER_LIGHTHOUSE90
LALIVERO_ENTRANCE_AFTER_LIGHTHOUSE_QUIETLY91

Definition at line 61 of file lalivero.c.

LALIVERO_ACTOR_ID

enum LALIVERO_ACTOR_ID

The placed actors, numbered in the order of LaliveroActorPlacements. LaliveroActorPlacementsAfterLighthouse, for the later visit, places the same people in the same rows, then the sign and the Black Orb. Its rows for Garet, Ivan and Mia take their own actor ids (fdScriptSpawnActorPlacements).

EnumeratorValueDescription
ACTOR_WEST_SOLDIERACTOR_FIRST_PLACEDTolbi's soldiers, lying beaten in the street on the first visit. "Uhhnn... We were taken by surprise..." Later, "Ha ha! I thought they had done me in for sure, but I'm all better now."
ACTOR_EAST_SOLDIER"They were terrible! We were no match..."
ACTOR_VILLAGER_THEY_TOOK_SHEBAA young man with brown hair who sobs for Sheba (LaliveroCryingScript). "Ohh... They took Sheba and headed for the ruins."
ACTOR_WOMAN_OUR_ONLY_HOPEA woman with fair hair. "Sheba is our only hope. If something happens to her, Lalivero is finished." Later she asks whether the party is leaving Lalivero.
ACTOR_VILLAGER_BLAMING_TOLBIA man in a white turban. "This all happened because Tolbi took Sheba away from us..."
ACTOR_WOMAN_TRUSTING_FARANA woman in a green dress. "Faran followed Sheba. I'm sure he'll rescue her."
ACTOR_OLD_MAN_RUMBLING_WARNINGAn old man with a cane.
ACTOR_OLD_WOMAN_EARLIER_EARTHQUAKEAn old woman.
ACTOR_BOY_IF_I_WERE_BIGGERA small boy with fair hair. "If I were bigger, I would have saved Sheba myself!"
ACTOR_GIRL_SHEBAS_POWERSA little girl with orange pigtails. "I bet Sheba can use her powers to escape them."
ACTOR_WHARF_GUARDA soldier who keeps the door to Babi's ship. "Babi's most precious belonging is kept here. No one may enter!"
ACTOR_FIRST_PLANTThree plants, SPRITE_SPROUT, the sprout Growth grows at Alpine Crossing and Suhalla Gate. Here they stand half grown, block nothing and no cue answers them.
ACTOR_IODEMACTOR_FIRST_PLACED + 14Placed off the map until needed.
ACTOR_TORCHTorch, a Mars Djinni, placed until it joins.
ACTOR_NORTH_EXIT_SIGNPlaced after Venus Lighthouse. "No trespassing. Danger beyond this point."
ACTOR_BLACK_ORBThe orb Iodem holds out, drawn from its item icon.

Definition at line 71 of file lalivero.c.

LALIVERO_METATILE_BEHAVIOR

enum LALIVERO_METATILE_BEHAVIOR

The metatiles of the town the scene gives a meaning of its own. Each door's and roof hatch's metatile is the number of the exit it leads by.

EnumeratorValueDescription
METATILE_BEHAVIOR_LALIVERO_SANCTUM_GATELALIVERO_TIMBER_ROOMS_B_NORTHEASTThe Sanctum's door, a gate two
METATILE_BEHAVIOR_LALIVERO_OUTSIDE_FARANS_HOUSE50metatiles wide. Two metatiles a few steps from Faran's door, (6, 23) and (6, 24), where Garet stops Isaac for Iodem's farewell.
METATILE_BEHAVIOR_LALIVERO_SOUTH_GATE51The south gateway, metatiles (12, 25) to (18, 25), where after the farewell Garet turns Isaac back toward the ship.

Definition at line 127 of file lalivero.c.

anonymous enum

enum { WALL_METATILE_X, WALL_METATILE_Y }

A metatile of the wall along the town's south edge (METATILE_BEHAVIOR_WALL), whose attributes scInit copies onto metatiles the party may not cross.

EnumeratorValueDescription
WALL_METATILE_X20
WALL_METATILE_Y23

Definition at line 144 of file lalivero.c.

Functions in detail

scInit

Sint32 scInit(void)

Sets Lalivero up as the party enters: the Black Orb Iodem will hold out, the wounded soldiers of the first visit (and their scene), or the sign at the closed north gate after Venus Lighthouse.

References fdActorGet(), fdActorSetAnimation(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes(), fdScriptGetFlag(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork, mnIconDrawItem(), scLaliveroWatchWoundedSoldiers(), Sint32, syHeapSlotAllocate(), syHeapSlotRelease() and syVRAMCacheLoad().

Definition at lines 41 and 913 of file lalivero.c.

scLaliveroTalkAboutIdejimaShip

static void scLaliveroTalkAboutIdejimaShip(void)

During Iodem's farewell, if the party saw the ship at Idejima, Iodem says it was not Babi's, which is here in Lalivero, and Garet guesses it was Saturos's.

References fdActorFaceDirection(), fdActorRunRepeatedMotion(), fdActorSetAnimationAndWait(), fdActorShowEmote(), fdScriptSetMessageId(), fdScriptShowMessage() and fdScriptWait().

Referenced by scLaliveroIodemGivesBlackOrb().

Definition at lines 53 and 838 of file lalivero.c.

scLaliveroTalkToTorch

static void scLaliveroTalkToTorch(void)

Talking to Torch, a Mars Djinni on a roof in Lalivero, makes it join the party, on either visit.

References fdDjinnJoinParty().

Referenced by LaliveroCues and LaliveroCuesAfterLighthouse.

Definition at line 152 of file lalivero.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References LaliveroEntrances.

Definition at line 157 of file lalivero.c.

scGetExitRegions

const SCENE_EXIT_REGION *scGetExitRegions(void)

Definition at line 162 of file lalivero.c.

scGetExits

const Uint32 *scGetExits(void)

References LaliveroExits.

Definition at line 167 of file lalivero.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

The townsfolk, who stand differently once the party is back from Venus Lighthouse.

References gmFlagGet(), LaliveroActorPlacements and LaliveroActorPlacementsAfterLighthouse.

Definition at line 174 of file lalivero.c.

scLaliveroTalkToVillagerTheyTookSheba

static void scLaliveroTalkToVillagerTheyTookSheba(Sint32 actorId)

On the first visit to Lalivero, the young man sobbing for Sheba stops to say she was taken to the ruins, then turns away north and sobs again.

References fdActorFaceDirection(), fdActorGet(), fdActorSetScript(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptWait(), LaliveroCryingScript and Sint32.

Referenced by LaliveroCues.

Definition at line 185 of file lalivero.c.

scLaliveroWomanAsksIfLeaving

static void scLaliveroWomanAsksIfLeaving(Sint32 actorId)

After Venus Lighthouse, the fair-haired woman in Lalivero asks whether the party is leaving Lalivero, and wishes it well either way.

References fdScriptAskYesNoWithActorAnimation(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptWait() and Sint32.

Referenced by LaliveroCuesAfterLighthouse.

Definition at line 199 of file lalivero.c.

scLaliveroWharfGuardLetsPartyThrough

static void scLaliveroWharfGuardLetsPartyThrough(void)

After Venus Lighthouse, the soldier at the door of the shack in the north-west of Lalivero says he was told to let the party in, and steps aside west of the door (FLAG_LALIVERO_WHARF_OPEN).

References fdActorFaceDirection(), fdActorWalkByAndWait(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptWait() and gmFlagSet().

Referenced by LaliveroCuesAfterLighthouse.

Definition at line 220 of file lalivero.c.

scLaliveroEnterDoor

static void scLaliveroEnterDoor(void)

Walking north into one of Lalivero's doors opens it, or the Sanctum's gate, and Isaac walks in.

References fdActorCenterAndWalk(), fdActorGet(), fdActorWalkBy(), fdMapGridAnimateMetatiles(), fdScriptWait(), LaliveroDoorMetatiles, LaliveroDoorOpenSteps, LaliveroGateOpenSteps, Sint32, syImportScriptSetExitRequest() and sySoundPlay().

Referenced by LaliveroCues and LaliveroCuesAfterLighthouse.

Definition at line 234 of file lalivero.c.

scLaliveroEnterDoorway

static void scLaliveroEnterDoorway(void)

Stepping onto the hatch in the flat roof of Faran's house (metatile (6, 18)) or of the weapon and armor shop (metatile (26, 15)) in Lalivero takes Isaac down inside.

References Sint32, state and syImportScriptSetExitRequest().

Referenced by LaliveroCues and LaliveroCuesAfterLighthouse.

Definition at line 260 of file lalivero.c.

scLaliveroWatchWoundedSoldiers

static void scLaliveroWatchWoundedSoldiers(void)

On the first visit to Lalivero, walking in through the south gate with Iodem, the party finds two more of Tolbi's soldiers lying beaten in the gateway, who tell Iodem that Sheba's captors went to the ruins beneath Babi Lighthouse.

References fdActorFaceActor(), fdActorFaceDirection(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetDestination(), fdActorShowEmote(), fdActorWaitForMoveById(), fdActorWalkByAndWait(), fdActorWalkToAndWait(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks() and scFieldActorLaunchFromLeader().

Referenced by scInit().

Definition at line 273 of file lalivero.c.

scLaliveroIodemGivesBlackOrb

static void scLaliveroIodemGivesBlackOrb(void)

After Venus Lighthouse, a few steps out of Faran's house in the south-west of Lalivero (metatiles (6, 23) and (6, 24)), Garet stops Isaac, for Iodem asked them to wait. Iodem comes out of the house, talks of Lemuria and of Babi's promise, and gives the party the Black Orb that sails Babi's ship. Plays once.

References fdActorFaceActor(), fdActorFaceDirection(), fdActorFaceEachOther(), fdActorGet(), fdActorJump(), fdActorLaunchFromLeader(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetDestination(), fdActorSetDestinationOffset(), fdActorSetSpritePriority(), fdActorShowEmote(), fdActorWaitForMoveById(), fdActorWalkBy(), fdActorWalkByAndWait(), fdActorWalkToAndWait(), fdMapGridCopyMetatilesLayered(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagGet(), gmFlagSet(), gmPartyGiveItem(), scFieldActorLaunchFromLeader(), scLaliveroTalkAboutIdejimaShip() and sySoundPlay().

Referenced by LaliveroCuesAfterLighthouse.

Definition at line 496 of file lalivero.c.

scLaliveroTurnBackToTheShip

static void scLaliveroTurnBackToTheShip(void)

After Iodem's farewell, walking out through Lalivero's south gate (metatiles (12, 25) to (18, 25)) makes Garet ask whether they are not taking Babi's ship, and Isaac steps back into town.

References fdActorWalkByAndWait(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage() and fdScriptStart().

Referenced by LaliveroCuesAfterLighthouse.

Definition at line 889 of file lalivero.c.

scGetCues

const CUE *scGetCues(void)

What the party can talk to, touch and search, which changes once they are back from Venus Lighthouse.

References gmFlagGet(), LaliveroCues and LaliveroCuesAfterLighthouse.

Definition at line 901 of file lalivero.c.

Variables in detail

LaliveroCryingScript

extern Sint32 LaliveroCryingScript[]

Sint32 LaliveroCryingScript[]

The sobbing of ACTOR_VILLAGER_THEY_TOOK_SHEBA: the sprite squashes and stretches twice, then rests 80 ticks.

References Sint32.

Referenced by LaliveroActorPlacements and scLaliveroTalkToVillagerTheyTookSheba().

Definition at lines 42 and 1027 of file lalivero.c.

LaliveroEntrances

extern SCENE_ENTRANCE LaliveroEntrances[]

SCENE_ENTRANCE LaliveroEntrances[]

Referenced by scGetEntrances().

Definition at lines 43 and 1057 of file lalivero.c.

LaliveroExits

extern Uint32 LaliveroExits[]

Uint32 LaliveroExits[]

Referenced by scGetExits().

Definition at lines 44 and 1187 of file lalivero.c.

LaliveroActorPlacements

extern ACTOR_PLACE LaliveroActorPlacements[]

ACTOR_PLACE LaliveroActorPlacements[]

References LaliveroCryingScript and Sint32.

Referenced by scGetActorPlacements().

Definition at lines 45 and 1228 of file lalivero.c.

LaliveroActorPlacementsAfterLighthouse

extern ACTOR_PLACE LaliveroActorPlacementsAfterLighthouse[]

ACTOR_PLACE LaliveroActorPlacementsAfterLighthouse[]

Referenced by scGetActorPlacements().

Definition at lines 46 and 1265 of file lalivero.c.

LaliveroDoorMetatiles

extern Sint16 LaliveroDoorMetatiles[][2]

Sint16 LaliveroDoorMetatiles[][2]

The metatile of each door by its metatile behaviour, and a door opening and the Sanctum's gate opening.

Referenced by scLaliveroEnterDoor().

Definition at lines 47 and 1313 of file lalivero.c.

LaliveroDoorOpenSteps

extern Uint16 LaliveroDoorOpenSteps[]

Uint16 LaliveroDoorOpenSteps[]

Referenced by scLaliveroEnterDoor().

Definition at lines 48 and 1317 of file lalivero.c.

LaliveroGateOpenSteps

extern Uint16 LaliveroGateOpenSteps[]

Uint16 LaliveroGateOpenSteps[]

Referenced by scLaliveroEnterDoor().

Definition at lines 49 and 1322 of file lalivero.c.

LaliveroCues

extern CUE LaliveroCues[]

CUE LaliveroCues[]

References scLaliveroEnterDoor(), scLaliveroEnterDoorway(), scLaliveroTalkToTorch() and scLaliveroTalkToVillagerTheyTookSheba().

Referenced by scGetCues().

Definition at lines 50 and 1328 of file lalivero.c.

LaliveroCuesAfterLighthouse

extern CUE LaliveroCuesAfterLighthouse[]

CUE LaliveroCuesAfterLighthouse[]

References scLaliveroEnterDoor(), scLaliveroEnterDoorway(), scLaliveroIodemGivesBlackOrb(), scLaliveroTalkToTorch(), scLaliveroTurnBackToTheShip(), scLaliveroWharfGuardLetsPartyThrough() and scLaliveroWomanAsksIfLeaving().

Referenced by scGetCues().

Definition at lines 51 and 1408 of file lalivero.c.