Alchemy
Loading...
Searching...
No Matches

lalivero.c File Reference

Lalivero, the desert town below Babi Lighthouse. More...

Go to the source code of this file.

Enumerations

enum  { ENTRANCE_WORLD_MAP_SOUTH = 20 , ENTRANCE_WORLD_MAP_NORTH = 21 , ENTRANCE_FROM_AERIE = 90 , ENTRANCE_FROM_AERIE_QUIETLY = 91 }
enum  {
  SOLDIER_WEST = 8 , SOLDIER_EAST = 9 , MOURNER = 10 , WANDERER_EAST = 11 ,
  WANDERER_WEST = 17 , WHARF_GUARD = 18 , IODEM = 22 , TORCH = 23 ,
  NORTH_EXIT_SPRITE = 24 , ACTOR_BLACK_ORB = 25
}
 The actors this scene's code moves, by their place in the placement tables. More...
enum  { GATE_TRIGGER = 6 }
 The door at trigger 6 is a gate two cells wide. More...
enum  { HEAP_ITEM_ICON = 17 , ITEM_ICON_BUFFER_SIZE = 0x608 , ITEM_ICON_TILES = 0x400 , ITEM_ICON_TILE_BYTES = 128 }

Functions

static void TalkToIodemAboutTheShip (void)
 The ship the party saw from the lighthouse was not Babi's but, Garet guesses, Saturos's.
static void TalkToTorch (void)
 Torch, Mars Djinni 6, joins the party.
const struct SceneEntrance * Lalivero_GetEntrances (void)
const struct SceneRegion * Lalivero_GetRegions (void)
const u32 * Lalivero_GetExits (void)
const struct ScenePlacement * Lalivero_GetPlacements (void)
 The townsfolk, who stand differently once the party is back from Venus Lighthouse.
static void TalkToMourner (s32 actor)
 The villager mourning Sheba stops sobbing to answer, faces north again and goes back to sobbing.
static void TalkToVillagerAskingIfLeaving (s32 actor)
 After Venus Lighthouse: a villager asks whether the party is leaving Lalivero, and answers yes or no.
static void TalkToWharfGuard (void)
 Once Iodem has given the Black Orb, the guard at the wharf door lets the party through and steps aside.
static void EnterDoor (void)
 The leader walks into a doorway: the door (or the gate) swings open, the leader steps in and the exit of the touched trigger is taken.
static void TakeTouchedExit (void)
 An exit with no door: leave by the touched trigger's exit.
static void WatchWoundedSoldiers (void)
 The first visit, arriving from the world map: the party and Iodem find Tolbi's soldiers beaten in the street.
static void ReceiveBlackOrb (void)
 Trigger 50 after Venus Lighthouse, until Iodem has spoken: Garet stops the leader, Iodem comes out of his house and tells the party that the misty island they saw may be Lemuria, which could save Babi, and gives them the Black Orb that sails Babi's ship.
static void TurnBackFromTheGate (void)
 Trigger 51 at the town exit: Garet turns the leader back toward Babi's ship and the wharf the guard was keeping.
const struct SceneEvent * Lalivero_GetEvents (void)
 What the party can talk to, touch and search, which changes once they are back from Venus Lighthouse.
s32 Lalivero_Initialize (void)
 Sets Lalivero up as the party enters: the Black Orb prop, the wounded soldiers of the first visit (and its cutscene), or the north exit closed after Venus Lighthouse.

Variables

s32 gLaliveroMournerSobs []
 The mourner's sobbing: the sprite squashes and stretches twice, then rests 80 frames.
struct SceneEntrance gLaliveroEntrances []
u32 gLaliveroExits []
struct ScenePlacement gLaliveroPlacements []
struct ScenePlacement gLaliveroPlacementsAfterLighthouse []
s16 gLaliveroDoorCells [][2]
u16 gLaliveroDoorOpenSteps []
u16 gLaliveroGateOpenSteps []
struct SceneEvent gLaliveroEvents []
struct SceneEvent gLaliveroEventsAfterLighthouse []

Detailed Description

Lalivero, the desert town below Babi Lighthouse.

Two visits share this scene. On the first, the party and Iodem find Tolbi's soldiers beaten by Saturos's group, who took Sheba to the ruins under the lighthouse. After Venus Lighthouse, the party comes back through the aerie's exit and Iodem gives them the Black Orb that sails Babi's ship.

Definition in file lalivero.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ENTRANCE_WORLD_MAP_SOUTH 
ENTRANCE_WORLD_MAP_NORTH 
ENTRANCE_FROM_AERIE 

Arriving from Venus Lighthouse's aerie: 90 also plays the talk about the ship the party saw from the lighthouse.

ENTRANCE_FROM_AERIE_QUIETLY 

Definition at line 36 of file lalivero.c.

◆ anonymous enum

anonymous enum

The actors this scene's code moves, by their place in the placement tables.

Enumerator
SOLDIER_WEST 

Tolbi's soldiers, wounded on the first visit.

SOLDIER_EAST 
MOURNER 

sobs for Sheba (gLaliveroMournerSobs)

WANDERER_EAST 
WANDERER_WEST 
WHARF_GUARD 

keeps the door to Babi's ship

IODEM 
TORCH 

the Mars Djinni

NORTH_EXIT_SPRITE 

placed after Venus Lighthouse

ACTOR_BLACK_ORB 

Definition at line 46 of file lalivero.c.

◆ anonymous enum

anonymous enum

The door at trigger 6 is a gate two cells wide.

Enumerator
GATE_TRIGGER 

Definition at line 60 of file lalivero.c.

◆ anonymous enum

anonymous enum
Enumerator
HEAP_ITEM_ICON 
ITEM_ICON_BUFFER_SIZE 
ITEM_ICON_TILES 
ITEM_ICON_TILE_BYTES 

Definition at line 62 of file lalivero.c.

Function Documentation

◆ TalkToIodemAboutTheShip()

void TalkToIodemAboutTheShip ( void )
static

The ship the party saw from the lighthouse was not Babi's but, Garet guesses, Saturos's.

Definition at line 657 of file lalivero.c.

Referenced by ReceiveBlackOrb(), and TalkToIodemAboutTheShip().

◆ TalkToTorch()

void TalkToTorch ( void )
static

Torch, Mars Djinni 6, joins the party.

Definition at line 70 of file lalivero.c.

Referenced by TalkToTorch().

◆ Lalivero_GetEntrances()

const struct SceneEntrance * Lalivero_GetEntrances ( void )

Definition at line 72 of file lalivero.c.

Referenced by Lalivero_GetEntrances().

◆ Lalivero_GetRegions()

const struct SceneRegion * Lalivero_GetRegions ( void )

Definition at line 76 of file lalivero.c.

Referenced by Lalivero_GetRegions().

◆ Lalivero_GetExits()

const u32 * Lalivero_GetExits ( void )

Definition at line 78 of file lalivero.c.

Referenced by Lalivero_GetExits().

◆ Lalivero_GetPlacements()

const struct ScenePlacement * Lalivero_GetPlacements ( void )

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

Definition at line 82 of file lalivero.c.

Referenced by Lalivero_GetPlacements().

◆ TalkToMourner()

void TalkToMourner ( s32 actor)
static

The villager mourning Sheba stops sobbing to answer, faces north again and goes back to sobbing.

Definition at line 91 of file lalivero.c.

Referenced by TalkToMourner().

◆ TalkToVillagerAskingIfLeaving()

void TalkToVillagerAskingIfLeaving ( s32 actor)
static

After Venus Lighthouse: a villager asks whether the party is leaving Lalivero, and answers yes or no.

Definition at line 109 of file lalivero.c.

Referenced by TalkToVillagerAskingIfLeaving().

◆ TalkToWharfGuard()

void TalkToWharfGuard ( void )
static

Once Iodem has given the Black Orb, the guard at the wharf door lets the party through and steps aside.

Definition at line 124 of file lalivero.c.

Referenced by TalkToWharfGuard().

◆ EnterDoor()

void EnterDoor ( void )
static

The leader walks into a doorway: the door (or the gate) swings open, the leader steps in and the exit of the touched trigger is taken.

Definition at line 137 of file lalivero.c.

Referenced by EnterDoor().

◆ TakeTouchedExit()

void TakeTouchedExit ( void )
static

An exit with no door: leave by the touched trigger's exit.

Definition at line 157 of file lalivero.c.

Referenced by TakeTouchedExit().

◆ WatchWoundedSoldiers()

void WatchWoundedSoldiers ( void )
static

The first visit, arriving from the world map: the party and Iodem find Tolbi's soldiers beaten in the street.

Seven attackers took Sheba to the ruins under Babi Lighthouse, and Faran followed them.

Definition at line 169 of file lalivero.c.

Referenced by Lalivero_Initialize(), and WatchWoundedSoldiers().

◆ ReceiveBlackOrb()

void ReceiveBlackOrb ( void )
static

Trigger 50 after Venus Lighthouse, until Iodem has spoken: Garet stops the leader, Iodem comes out of his house and tells the party that the misty island they saw may be Lemuria, which could save Babi, and gives them the Black Orb that sails Babi's ship.

Definition at line 363 of file lalivero.c.

Referenced by ReceiveBlackOrb().

◆ TurnBackFromTheGate()

void TurnBackFromTheGate ( void )
static

Trigger 51 at the town exit: Garet turns the leader back toward Babi's ship and the wharf the guard was keeping.

Definition at line 699 of file lalivero.c.

Referenced by TurnBackFromTheGate().

◆ Lalivero_GetEvents()

const struct SceneEvent * Lalivero_GetEvents ( void )

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

Definition at line 709 of file lalivero.c.

Referenced by Lalivero_GetEvents().

◆ Lalivero_Initialize()

s32 Lalivero_Initialize ( void )

Sets Lalivero up as the party enters: the Black Orb prop, the wounded soldiers of the first visit (and its cutscene), or the north exit closed after Venus Lighthouse.

Definition at line 719 of file lalivero.c.

Referenced by Lalivero_Initialize().

Variable Documentation

◆ gLaliveroMournerSobs

s32 gLaliveroMournerSobs[]
Initial value:
= {
SC_SET(SW_SCALE_X, 0x10000),
SC_SET(SW_SCALE_Y, 0x10000),
SC_ADD(SW_SCALE_X, -0x4000),
SC_ADD(SW_SCALE_Y, 0x2000),
SC_WAIT(2),
SC_ADD(SW_SCALE_X, 0x2000),
SC_ADD(SW_SCALE_Y, -0x1000),
SC_WAIT(2),
SC_ADD(SW_SCALE_X, 0x1000),
SC_ADD(SW_SCALE_Y, -2048),
SC_WAIT(2),
SC_ADD(SW_SCALE_X, 0x1000),
SC_ADD(SW_SCALE_Y, -2048),
SC_WAIT(4),
SC_ADD(SW_SCALE_X, -0x4000),
SC_ADD(SW_SCALE_Y, 0x2000),
SC_WAIT(2),
SC_ADD(SW_SCALE_X, 0x2000),
SC_ADD(SW_SCALE_Y, -0x1000),
SC_WAIT(2),
SC_ADD(SW_SCALE_X, 0x1000),
SC_ADD(SW_SCALE_Y, -2048),
SC_WAIT(2),
SC_ADD(SW_SCALE_X, 0x1000),
SC_ADD(SW_SCALE_Y, -2048),
SC_WAIT(80),
}
#define SC_SET(w, v)
Write a work value.
Definition objcmd.h:37
#define SC_LOOP(n, to)
Repeat up to n times.
Definition objcmd.h:28
#define SC_FOREVER
Definition objcmd.h:14
#define SC_ADD(w, v)
Definition objcmd.h:38
#define SC_WAIT(n)
Wait n frames.
Definition objcmd.h:16
#define SC_TOP
Script start.
Definition objcmd.h:13
@ SW_SCALE_Y
Definition objcmd.h:63
@ SW_SCALE_X
Definition objcmd.h:62

The mourner's sobbing: the sprite squashes and stretches twice, then rests 80 frames.

Definition at line 813 of file lalivero.c.

Referenced by TalkToMourner().

◆ gLaliveroEntrances

struct SceneEntrance gLaliveroEntrances[]
Initial value:
= {
{0, CONDITION_ALWAYS, 172, 0, 149, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{1, CONDITION_ALWAYS, 72, 0, 184, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{2, CONDITION_ALWAYS, 152, 0, 216, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{3, CONDITION_ALWAYS, 200, 0, 168, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{4, CONDITION_ALWAYS, 296, 0, 168, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{5, CONDITION_ALWAYS, 360, 0, 168, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{6, CONDITION_ALWAYS, 432, 0, 152, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{7, CONDITION_ALWAYS, 72, 0, 328, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{8, CONDITION_ALWAYS, 104, 0, 312, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{9, CONDITION_ALWAYS, 360, 0, 280, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{10, CONDITION_ALWAYS, 440, 0, 328, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{11, CONDITION_ALWAYS, 424, 0, 264, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{20, CONDITION_ALWAYS, 248, 0, 416, FACING_NORTH, 0, -1, -1, -1, -1, 0},
{21, CONDITION_ALWAYS, 248, 0, 64, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
}
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44
@ FACING_NORTH
Definition field_scene.h:32
@ FACING_SOUTH
Definition field_scene.h:28

Definition at line 843 of file lalivero.c.

Referenced by Lalivero_GetEntrances(), and LaliveroInteriors_GetEntrances().

◆ gLaliveroExits

u32 gLaliveroExits[]
Initial value:
= {
SCENE_EXITS(178), SCENE_EXIT(1, 180, 30), SCENE_EXIT(2, 179, 1),
SCENE_EXIT(3, 180, 23), SCENE_EXIT(4, 179, 6), SCENE_EXIT(5, 179, 4),
SCENE_EXIT(6, 179, 11), SCENE_EXIT(7, 180, 21), SCENE_EXIT(8, 180, 22),
SCENE_EXIT(9, 179, 9), SCENE_EXIT(10, 179, 2), SCENE_EXIT(11, 179, 10),
SCENE_EXIT(20, 2, 30), SCENE_EXIT(21, 2, 59), SCENE_EXITS_END,
}
#define SCENE_EXITS(scene)
Definition field_scene.h:72
#define SCENE_EXIT(exit, scene, entrance)
Definition field_scene.h:73
#define SCENE_EXITS_END
Definition field_scene.h:77

Definition at line 861 of file lalivero.c.

Referenced by Lalivero_GetExits(), and LaliveroInteriors_GetExits().

◆ gLaliveroPlacements

struct ScenePlacement gLaliveroPlacements[]

Definition at line 870 of file lalivero.c.

Referenced by Lalivero_GetPlacements(), and LaliveroInteriors_GetPlacements().

◆ gLaliveroPlacementsAfterLighthouse

struct ScenePlacement gLaliveroPlacementsAfterLighthouse[]

Definition at line 906 of file lalivero.c.

Referenced by Lalivero_GetPlacements().

◆ gLaliveroDoorCells

s16 gLaliveroDoorCells[][2]
Initial value:
= {
{ 0, 0 }, { 4, 9 }, { 9, 11 }, { 12, 8 }, { 18, 8 }, { 22, 8 }, { 26, 7 }, { 4, 18 },
{ 0, 0 }, { 22, 15 }, { 27, 18 }, { 0, 0 },
}

Definition at line 952 of file lalivero.c.

Referenced by EnterDoor().

◆ gLaliveroDoorOpenSteps

u16 gLaliveroDoorOpenSteps[]
Initial value:
= {
MAP_CELL_STEP(33, 0, 1, 2, 8), MAP_CELL_STEP(34, 0, 1, 2, 1), MAP_CELL_STEPS_END,
}
#define MAP_CELL_STEP(srcX, srcY, width, height, frames)
Definition field_event.h:59
#define MAP_CELL_STEPS_END
Definition field_event.h:61

Definition at line 957 of file lalivero.c.

Referenced by EnterDoor().

◆ gLaliveroGateOpenSteps

u16 gLaliveroGateOpenSteps[]
Initial value:
= {
MAP_CELL_STEP(34, 2, 2, 2, 8), MAP_CELL_STEP(36, 2, 2, 2, 1), MAP_CELL_STEPS_END,
}

Definition at line 961 of file lalivero.c.

Referenced by EnterDoor().

◆ gLaliveroEvents

struct SceneEvent gLaliveroEvents[]

Definition at line 965 of file lalivero.c.

Referenced by Lalivero_GetEvents(), and LaliveroInteriors_GetEvents().

◆ gLaliveroEventsAfterLighthouse

struct SceneEvent gLaliveroEventsAfterLighthouse[]

Definition at line 1008 of file lalivero.c.

Referenced by Lalivero_GetEvents(), and LaliveroInteriors_GetEvents().