Skip to Content
The Alchemy Project

src/scene/mikasalla.c

Mikasalla, the village in the far south of Osenia, and the tunnels under it, in two scenes that share this overlay (SceneIdMikasalla, the village, and SceneIdMikasallaNorth, the tunnels). More…

Macros

NameDescription
#defineFLAG_MIKASALLA_LADDER_DUG_UP 0x85bSet once Scoop has dug up the ladder down to the tunnels by the sheep; the village redraws it on every visit.
#defineFLAG_MIKASALLA_TUNNELS_PARCHED FLAG_SCENE_TEMP(0x00)Set once Parch has dried up the water in the tunnels, for this visit.
#defineMETATILE_BURIED_LADDER 50The patch of ground in the sheep pen that Scoop digs, metatile (5, 41).
#defineMETATILE_TUNNEL_WATER 60The tunnels' water, which Parch dries.
#definePEN_SQUASHOne squash of an animal in the pen as it turns: it flattens to three quarters of its width and springs back over ten ticks.
#definePEN_TURN_ROUNDAn animal at one end of its pace stands a moment, turns round and squashes three times.

Enumerations

NameDescription
enumanonymous enum { MIKASALLA_NORTH_CAVE_LADDER, MIKASALLA_NORTH_CHAMBER_HOLE }The ways between the tunnels' cave and the chamber above it, by the way out behind the inn, each an exit and the entrance that lands there: the top of the cave's ladder, and the hole in the chamber's floor.
enumanonymous enum { METATILE_LADDER_TOP_FROM_NORTH, METATILE_LADDER_TOP_FROM_WES … }The metatiles round a ladder top that climb Felix down it, by the way he walks in.
enumMIKASALLA_ACTOR_ID { ACTOR_VILLAGER_NO_VISITORS, ACTOR_VILLAGER_LOOKING_FOR_SOMEO … }The village's actors, numbering the rows of MikasallaVillagePlacements.

Functions

NameDescription
const SCENE_ENTRANCE *scGetEntrances (void)Where the party can enter: the cave under the spring has its own entrances.
const SCENE_REGION *scGetExitRegions (void)The regions of the rooms whose exits are rectangles: the Chestbeaters' room and the stream room.
const Uint32 *scGetExits (void)The dock's ways lead back the way the party came into Lemuria, which the harbour and the shore of Ancient Lemuria note in FLAG_LEMURIA_OTHER_WAY_IN.
const ACTOR_PLACE *scGetActorPlacements (void)The scene's actor placements: a room of names for its entrance, else the debug room's.
voidscMikasallaClimbDownLadder (void)Felix, at a ladder top, turns north, steps onto the rungs and climbs down out of sight: down the dug ladder from the sheep pen to the tunnels, or down the hole in the chamber's floor to the cave below.
voidscMikasallaEnterDoor (void)Felix walks north into one of the village's doors: the inn's, the northeast door at metatile (20, 32); the general store's, to the northwest at (13, 36); the house of the old man who climbs Air's Rock, to the east at (22, 40); the explorer's family's, to the southwest at (11, 43); or the Sanctum's wide door in the west cliff at (5, 31).
voidscMikasallaMeetSpark (void)Felix talks to Spark, the Mars Djinni on the path behind the inn, and Spark joins the party without a fight.
const CUE *scGetCues (void)The scene's cues: the rooms of names' for any entrance above ENTRANCE_NAMES_ABOVE, else the debug room's.
voidscMikasallaAskLookingForSomeone (void)The woman in a white dress south of the inn asks Felix whether he is looking for someone; either way, she says strangers are rare here.
voidscMikasallaDigUpLadder (void)Felix casts Scoop in the sheep pen in the village's southwest corner, metatile (5, 41), and digs up a ladder down to the tunnels under the village.
static inline voidscMikasallaDryTunnels (void)Dries up the water in the tunnels: its tile animations stop and dry ground is drawn over its pools.
voidscMikasallaCastParch (void)Felix casts Parch on the water in the tunnels under the village: the screen flashes, and the water is gone, leaving bare ground to walk across.
Sint32scInit (void)Opens the room through the window transition, and in the debug room draws the cat 1.7 times its size.
Sint32scPrepareMap (void)Once Briggs is caught the pool has dried up: its colours take the dry ground's.
voidscMikasallaStepOntoLadderFacingEast (void)Felix walks east into the dug ladder in the sheep pen from its west side, metatile (4, 41): he steps up and across onto the rungs and climbs down into the tunnels.
voidscMikasallaStepOntoLadderFacingWest (void)Felix walks west into the dug ladder in the sheep pen from its east side, metatile (6, 41): he steps up and across onto the rungs and climbs down into the tunnels.
voidscMikasallaTurnAndClimbDownLadder (void)Felix walks south onto the top of the dug ladder in the sheep pen, metatile (5, 40): he turns round and climbs down into the tunnels.
voidscMikasallaStepOntoLadderFacingNorth (void)Felix walks north into the hole in the floor of the small chamber at the tunnels' north end, metatile (26, 7): he steps onto its ladder from whichever side he stands and climbs down into the cave below.
voidscMikasallaStepOntoLadderAhead (void)Felix walks north into the hole in the floor of the small chamber at the tunnels' north end, beside its ladder, metatile (25, 7) or (27, 7): he steps onto the ladder and climbs down into the cave below.

Variables

NameDescription
extern SCENE_REGIONMikasallaTunnelRegions []The tunnels' ways out at the tops of their ladders: up to the sheep pen, and up from the cave to the chamber.
extern ACTOR_PLACEMikasallaVillagePlacements []The village (MIKASALLA_ACTOR_ID).
extern ACTOR_PLACEMikasallaTunnelPlacements []The tunnels under the village.
extern CUEMikasallaTunnelCues []The tunnels' exits, the hole in the chamber's floor, and the water Parch dries.
extern CUEMikasallaVillageCues []The village's doors, talk, Mind Read, the dug ladder, and Spark.
extern Uint16MikasallaDoorOpening []The doors' openings: most doors, the east house's door with metatiles of its own, and the Sanctum's wide door, two metatiles across.
extern Uint16MikasallaThirdDoorOpening []
extern Uint16MikasallaWideDoorOpening []
extern Sint32MikasallaChickenPaces []The chicken paces between x 72 and 120 on its row, turning at each end.
extern Sint32MikasallaSheepPaces []The sheep paces its pen more slowly, between x 88 and 120.
extern Uint8MsgFieldAreYouLookingForSomeone []
extern MAP_EDITMikasallaDoors []The village's doors, by exit number from the first (scMikasallaEnterDoor): each opening and the metatile it is drawn at.
SCENE_ENTRANCESceneEntrances []Besides the party's return to the pier after the ship is stolen, four unused spots about the mast: below the huge block, on the dock by its crate, on the deck, and at the top of the sail's east pole.
Uint32SceneExits []The room has no exits of its own.

Description

Mikasalla, the village in the far south of Osenia, and the tunnels under it, in two scenes that share this overlay (SceneIdMikasalla, the village, and SceneIdMikasallaNorth, the tunnels).

The inn is the northeast door, the general store the northwest one, and the Sanctum the wide door in the west cliff. Once the party has crossed the desert, Scoop in the sheep pen in the southwest corner digs up a ladder down to the tunnels. Parch dries up the tunnels' water, and their far end comes out in the cliff behind the inn, where Spark the Mars Djinni joins the party without a fight.

Macros in detail

FLAG_MIKASALLA_LADDER_DUG_UP

#define FLAG_MIKASALLA_LADDER_DUG_UP 0x85b

Set once Scoop has dug up the ladder down to the tunnels by the sheep; the village redraws it on every visit.

Referenced by scMikasallaDigUpLadder() and scPrepareMap().

Definition at line 22 of file mikasalla.c.

FLAG_MIKASALLA_TUNNELS_PARCHED

#define FLAG_MIKASALLA_TUNNELS_PARCHED FLAG_SCENE_TEMP(0x00)

Set once Parch has dried up the water in the tunnels, for this visit.

Referenced by MikasallaTunnelCues, scMikasallaCastParch() and scPrepareMap().

Definition at line 24 of file mikasalla.c.

METATILE_BURIED_LADDER

#define METATILE_BURIED_LADDER 50

The patch of ground in the sheep pen that Scoop digs, metatile (5, 41).

Referenced by MikasallaVillageCues.

Definition at line 49 of file mikasalla.c.

METATILE_TUNNEL_WATER

#define METATILE_TUNNEL_WATER 60

The tunnels' water, which Parch dries.

Referenced by MikasallaTunnelCues.

Definition at line 51 of file mikasalla.c.

PEN_SQUASH

#define PEN_SQUASH

One squash of an animal in the pen as it turns: it flattens to three quarters of its width and springs back over ten ticks.

Definition at line 465 of file mikasalla.c.

PEN_TURN_ROUND

#define PEN_TURN_ROUND

An animal at one end of its pace stands a moment, turns round and squashes three times.

Referenced by MikasallaChickenPaces and MikasallaSheepPaces.

Definition at line 476 of file mikasalla.c.

Enumerations in detail

anonymous enum

enum { MIKASALLA_NORTH_CAVE_LADDER, MIKASALLA_NORTH_CHAMBER_HOLE }

The ways between the tunnels' cave and the chamber above it, by the way out behind the inn, each an exit and the entrance that lands there: the top of the cave's ladder, and the hole in the chamber's floor.

EnumeratorValueDescription
MIKASALLA_NORTH_CAVE_LADDER2
MIKASALLA_NORTH_CHAMBER_HOLE3

Definition at line 29 of file mikasalla.c.

anonymous enum

enum { METATILE_LADDER_TOP_FROM_NORTH, METATILE_LADDER_TOP_FROM_WEST, METATILE_LADDER_TOP_FROM_EAST, METATILE_LADDER_TOP_FROM_SOUTH, … }

The metatiles round a ladder top that climb Felix down it, by the way he walks in. The dug ladder in the sheep pen has the first three, round its top at metatile (5, 40); the hole in the tunnels' chamber floor has the last two, at metatiles (25, 7) to (27, 7).

EnumeratorValueDescription
METATILE_LADDER_TOP_FROM_NORTH30
METATILE_LADDER_TOP_FROM_WEST
METATILE_LADDER_TOP_FROM_EAST
METATILE_LADDER_TOP_FROM_SOUTH
METATILE_LADDER_TOP_FROM_SOUTH_BESIDE

Definition at line 39 of file mikasalla.c.

MIKASALLA_ACTOR_ID

enum MIKASALLA_ACTOR_ID

The village's actors, numbering the rows of MikasallaVillagePlacements.

EnumeratorValueDescription
ACTOR_VILLAGER_NO_VISITORSACTOR_FIRST_PLACED
ACTOR_VILLAGER_LOOKING_FOR_SOMEONEscMikasallaAskLookingForSomeone's villager.
ACTOR_VILLAGER_AFTER_EARTHQUAKE
ACTOR_VILLAGER_DEEPER_INTO_OSENIA
ACTOR_VILLAGER_AIRS_ROCK
ACTOR_VILLAGER_TWO_WAYS
ACTOR_VILLAGER_TUNDARIA
ACTOR_VILLAGER_GAROH
ACTOR_CHICKEN
ACTOR_SHEEP
ACTOR_SPARK

Definition at line 67 of file mikasalla.c.

Functions in detail

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References SceneEntrances.

Definition at line 83 of file mikasalla.c.

scGetExitRegions

const SCENE_REGION *scGetExitRegions(void)

References MainRoutineStateWork and MikasallaTunnelRegions.

Definition at line 88 of file mikasalla.c.

scGetExits

const Uint32 *scGetExits(void)

References SceneExits.

Definition at line 97 of file mikasalla.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

References MainRoutineStateWork, MikasallaTunnelPlacements and MikasallaVillagePlacements.

Definition at line 102 of file mikasalla.c.

scMikasallaClimbDownLadder

void scMikasallaClimbDownLadder(void)

Felix, at a ladder top, turns north, steps onto the rungs and climbs down out of sight: down the dug ladder from the sheep pen to the tunnels, or down the hole in the chamber's floor to the cave below.

References fdActorFaceDirection(), fdActorGetById(), fdActorSetAnimation(), fdActorSetDestinationOffset(), fdActorSetSpriteFlags(), fdActorWaitForMoveById(), fdMapGridCopyMetatilesTo(), fdScriptEnd(), fdScriptPlaySound(), fdScriptWait(), MainRoutineStateWork, Sint32 and syImportScriptSetExitRequest().

Referenced by scMikasallaStepOntoLadderAhead(), scMikasallaStepOntoLadderFacingEast(), scMikasallaStepOntoLadderFacingNorth(), scMikasallaStepOntoLadderFacingWest() and scMikasallaTurnAndClimbDownLadder().

Definition at lines 111 and 280 of file mikasalla.c.

scMikasallaEnterDoor

void scMikasallaEnterDoor(void)

Felix walks north into one of the village's doors: the inn's, the northeast door at metatile (20, 32); the general store's, to the northwest at (13, 36); the house of the old man who climbs Air's Rock, to the east at (22, 40); the explorer's family's, to the southwest at (11, 43); or the Sanctum's wide door in the west cliff at (5, 31). Everyone stops, the door opens, and he walks in.

Each door's metatile carries the number of the exit it leaves by, and MikasallaDoors holds its opening, drawn over its metatiles. The Sanctum's door is entered without the walk.

References fdActorCenterAndWalk(), fdActorGetById(), fdActorSetAnimation(), fdMapGridAnimateMetatiles(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptFinishScreenTransition(), fdScriptPlaySound(), fdScriptStart(), fdScriptWait(), fdScriptWaitTransitionTicks(), MainRoutineStateWork, MikasallaDoors, Sint32 and syImportScriptSetExitRequest().

Referenced by MikasallaVillageCues.

Definition at line 127 of file mikasalla.c.

scMikasallaMeetSpark

void scMikasallaMeetSpark(void)

Felix talks to Spark, the Mars Djinni on the path behind the inn, and Spark joins the party without a fight.

References fdDjinnJoinParty().

Referenced by MikasallaVillageCues.

Definition at line 167 of file mikasalla.c.

scGetCues

const CUE *scGetCues(void)

References MainRoutineStateWork, MikasallaTunnelCues and MikasallaVillageCues.

Definition at line 174 of file mikasalla.c.

scMikasallaAskLookingForSomeone

void scMikasallaAskLookingForSomeone(void)

The woman in a white dress south of the inn asks Felix whether he is looking for someone; either way, she says strangers are rare here.

References fdPartyGetLeaderActor(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), MsgFieldAreYouLookingForSomeone and Sint32.

Referenced by MikasallaVillageCues.

Definition at line 185 of file mikasalla.c.

scMikasallaDigUpLadder

void scMikasallaDigUpLadder(void)

Felix casts Scoop in the sheep pen in the village's southwest corner, metatile (5, 41), and digs up a ladder down to the tunnels under the village. It stays dug on later visits.

References fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo() and fdScriptSetFlag().

Referenced by MikasallaVillageCues and scPrepareMap().

Definition at line 214 of file mikasalla.c.

scMikasallaDryTunnels

static inline void scMikasallaDryTunnels(void)

Dries up the water in the tunnels: its tile animations stop and dry ground is drawn over its pools.

References fdMapGridCopyMetatiles(), fdMapGridCopyMetatilesTo() and fdTilesetAnimationPause().

Referenced by scMikasallaCastParch() and scPrepareMap().

Definition at line 223 of file mikasalla.c.

scMikasallaCastParch

void scMikasallaCastParch(void)

Felix casts Parch on the water in the tunnels under the village: the screen flashes, and the water is gone, leaving bare ground to walk across. It stays dry until the party leaves, and is dried again on a return.

References fdScriptGetFlag(), fdScriptSetFlag() and scMikasallaDryTunnels().

Referenced by MikasallaTunnelCues.

Definition at line 242 of file mikasalla.c.

scInit

Sint32 scInit(void)

References Sint32.

Definition at line 251 of file mikasalla.c.

scPrepareMap

Sint32 scPrepareMap(void)

References fdActorGetById(), fdScriptGetFlag(), MainRoutineStateWork, scMikasallaDigUpLadder(), scMikasallaDryTunnels() and Sint32.

Definition at line 257 of file mikasalla.c.

scMikasallaStepOntoLadderFacingEast

void scMikasallaStepOntoLadderFacingEast(void)

Felix walks east into the dug ladder in the sheep pen from its west side, metatile (4, 41): he steps up and across onto the rungs and climbs down into the tunnels.

References fdActorWalkByAndWait(), fdScriptEndLastingPsynergy(), fdScriptStart() and scMikasallaClimbDownLadder().

Referenced by MikasallaTunnelCues and MikasallaVillageCues.

Definition at line 321 of file mikasalla.c.

scMikasallaStepOntoLadderFacingWest

void scMikasallaStepOntoLadderFacingWest(void)

Felix walks west into the dug ladder in the sheep pen from its east side, metatile (6, 41): he steps up and across onto the rungs and climbs down into the tunnels.

References fdActorWalkByAndWait(), fdScriptEndLastingPsynergy(), fdScriptStart() and scMikasallaClimbDownLadder().

Referenced by MikasallaTunnelCues and MikasallaVillageCues.

Definition at line 333 of file mikasalla.c.

scMikasallaTurnAndClimbDownLadder

void scMikasallaTurnAndClimbDownLadder(void)

Felix walks south onto the top of the dug ladder in the sheep pen, metatile (5, 40): he turns round and climbs down into the tunnels.

References fdActorFaceDirection(), fdScriptEndLastingPsynergy(), fdScriptStart() and scMikasallaClimbDownLadder().

Referenced by MikasallaTunnelCues and MikasallaVillageCues.

Definition at line 344 of file mikasalla.c.

scMikasallaStepOntoLadderFacingNorth

void scMikasallaStepOntoLadderFacingNorth(void)

Felix walks north into the hole in the floor of the small chamber at the tunnels' north end, metatile (26, 7): he steps onto its ladder from whichever side he stands and climbs down into the cave below.

References fdActorGetById(), fdActorWalkByAndWait(), fdActorWalkToAndWait(), fdScriptEndLastingPsynergy(), fdScriptStart(), scMikasallaClimbDownLadder() and Sint32.

Referenced by MikasallaTunnelCues.

Definition at line 355 of file mikasalla.c.

scMikasallaStepOntoLadderAhead

void scMikasallaStepOntoLadderAhead(void)

Felix walks north into the hole in the floor of the small chamber at the tunnels' north end, beside its ladder, metatile (25, 7) or (27, 7): he steps onto the ladder and climbs down into the cave below.

References fdActorWalkByAndWait(), fdActorWalkToAndWait(), fdScriptEndLastingPsynergy(), fdScriptStart() and scMikasallaClimbDownLadder().

Referenced by MikasallaTunnelCues.

Definition at line 378 of file mikasalla.c.

Variables in detail

MikasallaTunnelRegions

extern SCENE_REGION MikasallaTunnelRegions[]

SCENE_REGION MikasallaTunnelRegions[]

The tunnels' ways out at the tops of their ladders: up to the sheep pen, and up from the cave to the chamber.

Referenced by scGetExitRegions().

Definition at lines 53 and 423 of file mikasalla.c.

MikasallaVillagePlacements

extern ACTOR_PLACE MikasallaVillagePlacements[]

ACTOR_PLACE MikasallaVillagePlacements[]

The village (MIKASALLA_ACTOR_ID).

References MikasallaChickenPaces, MikasallaSheepPaces and Sint32.

Referenced by scGetActorPlacements().

Definition at lines 54 and 518 of file mikasalla.c.

MikasallaTunnelPlacements

extern ACTOR_PLACE MikasallaTunnelPlacements[]

ACTOR_PLACE MikasallaTunnelPlacements[]

The tunnels under the village.

Referenced by scGetActorPlacements().

Definition at lines 55 and 545 of file mikasalla.c.

MikasallaTunnelCues

extern CUE MikasallaTunnelCues[]

CUE MikasallaTunnelCues[]

The tunnels' exits, the hole in the chamber's floor, and the water Parch dries. The rows for a ladder top entered from the north, west or east answer no metatile of the tunnels' map: only the village's dug ladder has those.

References scMikasallaCastParch(), scMikasallaStepOntoLadderAhead(), scMikasallaStepOntoLadderFacingEast(), scMikasallaStepOntoLadderFacingNorth(), scMikasallaStepOntoLadderFacingWest() and scMikasallaTurnAndClimbDownLadder().

Referenced by scGetCues().

Definition at lines 57 and 621 of file mikasalla.c.

MikasallaVillageCues

extern CUE MikasallaVillageCues[]

CUE MikasallaVillageCues[]

The village's doors, talk, Mind Read, the dug ladder, and Spark.

References scMikasallaAskLookingForSomeone(), scMikasallaDigUpLadder(), scMikasallaEnterDoor(), scMikasallaMeetSpark(), scMikasallaStepOntoLadderFacingEast(), scMikasallaStepOntoLadderFacingWest() and scMikasallaTurnAndClimbDownLadder().

Referenced by scGetCues().

Definition at lines 59 and 552 of file mikasalla.c.

MikasallaDoorOpening

extern Uint16 MikasallaDoorOpening[]

Uint16 MikasallaDoorOpening[]

The doors' openings: most doors, the east house's door with metatiles of its own, and the Sanctum's wide door, two metatiles across.

Referenced by MikasallaDoors.

Definition at lines 60 and 389 of file mikasalla.c.

MikasallaThirdDoorOpening

extern Uint16 MikasallaThirdDoorOpening[]

Uint16 MikasallaThirdDoorOpening[]

Referenced by MikasallaDoors.

Definition at lines 61 and 394 of file mikasalla.c.

MikasallaWideDoorOpening

extern Uint16 MikasallaWideDoorOpening[]

Uint16 MikasallaWideDoorOpening[]

Referenced by MikasallaDoors.

Definition at lines 62 and 399 of file mikasalla.c.

MikasallaChickenPaces

extern Sint32 MikasallaChickenPaces[]

Sint32 MikasallaChickenPaces[]

The chicken paces between x 72 and 120 on its row, turning at each end.

References Sint32.

Referenced by MikasallaVillagePlacements.

Definition at lines 63 and 481 of file mikasalla.c.

MikasallaSheepPaces

extern Sint32 MikasallaSheepPaces[]

Sint32 MikasallaSheepPaces[]

The sheep paces its pen more slowly, between x 88 and 120.

References Sint32.

Referenced by MikasallaVillagePlacements.

Definition at lines 64 and 499 of file mikasalla.c.

MsgFieldAreYouLookingForSomeone

extern Uint8 MsgFieldAreYouLookingForSomeone[]

Referenced by scMikasallaAskLookingForSomeone().

Definition at line 113 of file mikasalla.c.

MikasallaDoors

extern MAP_EDIT MikasallaDoors[]

MAP_EDIT MikasallaDoors[]

The village's doors, by exit number from the first (scMikasallaEnterDoor): each opening and the metatile it is drawn at.

References MikasallaDoorOpening, MikasallaThirdDoorOpening and MikasallaWideDoorOpening.

Referenced by scMikasallaEnterDoor().

Definition at lines 115 and 407 of file mikasalla.c.

SceneEntrances

SCENE_ENTRANCE SceneEntrances[]

Referenced by scGetEntrances().

Definition at line 416 of file mikasalla.c.

SceneExits

Uint32 SceneExits[]

Referenced by scGetExits().

Definition at line 429 of file mikasalla.c.