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…
#include "ability_ids.h"#include "flags.h"#include "item_ids.h"#include "battle/battle.h"#include "debug/debug.h"#include "field/script_inline.h"#include "field/field_effect.h"#include "graphics/graphics.h"#include "text/msg_ids.h"
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous 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). |
enum | LALIVERO_ACTOR_ID { ACTOR_WEST_SOLDIER, ACTOR_EAST_SOLDIER, ACTOR_VILLAGER_THEY_ … } | The placed actors, numbered in the order of LaliveroActorPlacements. |
enum | LALIVERO_METATILE_BEHAVIOR { METATILE_BEHAVIOR_LALIVERO_SANCTUM_GATE, METATILE_BEHAVIOR_L … } | The metatiles of the town the scene gives a meaning of its own. |
enum | anonymous 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
| Name | Description | |
|---|---|---|
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. |
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. |
static void | scLaliveroTalkToTorch (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 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. |
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. |
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). |
static void | scLaliveroEnterDoor (void) | Walking north into one of Lalivero's doors opens it, or the Sanctum's gate, and Isaac walks in. |
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. |
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. |
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. |
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. |
const CUE * | scGetCues (void) | What the party can talk to, touch and search, which changes once they are back from Venus Lighthouse. |
Variables
| Name | Description | |
|---|---|---|
extern Sint32 | LaliveroCryingScript [] | The sobbing of ACTOR_VILLAGER_THEY_TOOK_SHEBA: the sprite squashes and stretches twice, then rests 80 ticks. |
extern SCENE_ENTRANCE | LaliveroEntrances [] | |
extern Uint32 | LaliveroExits [] | |
extern ACTOR_PLACE | LaliveroActorPlacements [] | |
extern ACTOR_PLACE | LaliveroActorPlacementsAfterLighthouse [] | |
extern Sint16 | LaliveroDoorMetatiles [][2] | The metatile of each door by its metatile behaviour, and a door opening and the Sanctum's gate opening. |
extern Uint16 | LaliveroDoorOpenSteps [] | |
extern Uint16 | LaliveroGateOpenSteps [] | |
extern CUE | LaliveroCues [] | |
extern CUE | LaliveroCuesAfterLighthouse [] |
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.
| Enumerator | Value | Description |
|---|---|---|
LALIVERO_ENTRANCE_AFTER_LIGHTHOUSE | 90 | |
LALIVERO_ENTRANCE_AFTER_LIGHTHOUSE_QUIETLY | 91 |
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).
| Enumerator | Value | Description |
|---|---|---|
ACTOR_WEST_SOLDIER | ACTOR_FIRST_PLACED | Tolbi'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_SHEBA | A young man with brown hair who sobs for Sheba (LaliveroCryingScript). "Ohh... They took Sheba and headed for the ruins." | |
ACTOR_WOMAN_OUR_ONLY_HOPE | A 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_TOLBI | A man in a white turban. "This all happened because Tolbi took Sheba away from us..." | |
ACTOR_WOMAN_TRUSTING_FARAN | A woman in a green dress. "Faran followed Sheba. I'm sure he'll rescue her." | |
ACTOR_OLD_MAN_RUMBLING_WARNING | An old man with a cane. | |
ACTOR_OLD_WOMAN_EARLIER_EARTHQUAKE | An old woman. | |
ACTOR_BOY_IF_I_WERE_BIGGER | A small boy with fair hair. "If I were bigger, I would have saved Sheba myself!" | |
ACTOR_GIRL_SHEBAS_POWERS | A little girl with orange pigtails. "I bet Sheba can use her powers to escape them." | |
ACTOR_WHARF_GUARD | A soldier who keeps the door to Babi's ship. "Babi's most precious belonging is kept here. No one may enter!" | |
ACTOR_FIRST_PLANT | Three 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_IODEM | ACTOR_FIRST_PLACED + 14 | Placed off the map until needed. |
ACTOR_TORCH | Torch, a Mars Djinni, placed until it joins. | |
ACTOR_NORTH_EXIT_SIGN | Placed after Venus Lighthouse. "No trespassing. Danger beyond this point." | |
ACTOR_BLACK_ORB | The 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.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_LALIVERO_SANCTUM_GATE | LALIVERO_TIMBER_ROOMS_B_NORTHEAST | The Sanctum's door, a gate two |
METATILE_BEHAVIOR_LALIVERO_OUTSIDE_FARANS_HOUSE | 50 | metatiles 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_GATE | 51 | The 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.
| Enumerator | Value | Description |
|---|---|---|
WALL_METATILE_X | 20 | |
WALL_METATILE_Y | 23 |
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().