Skip to Content
The Alchemy Project

src/scene/madra.c

Madra, the walled town of eastern Gondowan that Felix reaches over the Dehkan Plateau. More…

Macros

NameDescription
#defineFLAG_MADRA_WORKER_SEEN_AT_HOLE FLAG_SCENE_TEMP(0x80)Set once the worker has popped up out of the Champa's hole on this visit.
#defineFLAG_MADRA_TOLD_WORKER_COMING_THROUGH FLAG_SCENE_TEMP(0x81)Set once Felix has told the worker he is coming through the hole.
#defineFLAG_MADRA_BOY_HAS_ASKED FLAG_AREA_TEMP(0x00)Set once the boy has asked the party about the Champa boat, or about Briggs; he no longer turns to face Felix first.
#defineFLAG_MADRA_TOLD_OF_JENNA FLAG_AREA_TEMP(0x01)Set once Felix has told the boat owner that Jenna is with him.
#defineFLAG_MADRA_RAID_QUESTIONING_DONE 0x914Set as the guards let the party go after questioning it about the Kibombo's raid.
#defineFLAG_MADRA_KARST_MET 0x98eSet once Karst has come to Madra looking for Menardi; she is gone from the town afterwards.
#defineFLAG_MADRA_KARST_CALLED_FOR_MENARDI FLAG_SCENE_TEMP(0x0f)Set once the party has heard Karst call for her sister, this visit.
#defineBRIGGS_FAN_SPEAKERThe actor the lines of the boy who asks about Briggs open beside.

Enumerations

NameDescription
enumMADRA_METATILE_BEHAVIOR { METATILE_BEHAVIOR_MADRA_CHAMPAS_HOLE, METATILE_BEHAVIOR_MADR … }The metatiles whose step cues run Madra's scripts; a door's metatile takes the number of the exit it leads by.
enumMADRA_ACTOR_ID { ACTOR_YOUNG_MAN_ON_THE_ELDER, ACTOR_YOUNG_WOMAN_ON_THE_DISAS … }The town's placed actors, by the rows of MadraPlacements, the first visit's: Kraden, out of sight, steps out from behind Felix at the gate, and Milady and her guard wait out of sight until they hurry to the jail.
enumMADRA_ON_RETURN_ACTOR_ID { ACTOR_KARST, ACTOR_MAYOR, ACTOR_MAN_AFRAID_OF_THE_KIBOMBO }The rows of MadraPlacementsOnReturn that differ: Karst, who comes looking for Menardi, and the mayor, back from Alhafra.
enumanonymous enum { SHOP_MADRA_WEAPONS, SHOP_MADRA_ARMOR, SHOP_MADRA_ITEMS }Madra's shops under the market tents, as mnShopRun numbers them.
enumanonymous enum { METATILE_BEHAVIOR_MADRA_EAST_LADDERS_LAST }The last of the ladder tops' step cues that lead down to the catacombs' east ladders; those above it lead to the west ones.

Functions

NameDescription
voidscMadraGrantPassageToOsenia (void)Coming out of the jail after seeing Piers raise his shaft of ice, Felix meets Milady and her guard, who hurry up crying "Has Piers escaped!?"; she asks whether the party is going to Osenia and grants it passage over the drawbridge.
voidscMadraMeetKarst (void)Coming out of the mayor's house after Piers's farewell, Felix hears the mayor call "Felix, wait!" and is given the Cyclone Chip promised for the boat (with no room for it, the mayor sets it down beside his house to be picked up later).
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.
voidscMadraEnterDoor (void)Felix walks up to one of Madra's doors: it opens with a door's sound, he steps through and the screen fades to the room inside.
voidscMadraTalkToWeaponMerchant (Sint32 arg)Talking to the weapon merchant, the bald man in red at the east tent of the market, from across his counter opens his shop.
voidscMadraTalkToArmorMerchant (Sint32 arg)Talking to the armor merchant, the young man in green at the middle tent of the market, from across his counter opens his shop.
voidscMadraTalkToItemMerchant (Sint32 arg)Talking to whoever keeps the west tent of the market from across the counter opens the item shop.
voidscMadraKarstSendsPartyAway (void)Karst, told the party does not know her sister, shakes her head and sends it off: "If you don't know my sister, then I have nothing to say to you."
voidscMadraKarstAsksAboutMenardi (void)Talking to Karst, the red-haired woman outside the mayor's house when Felix brings Piers home: she asks whether the party has seen a girl named Menardi.
voidscMadraMindReadKarst (void)Casting Mind Read on Karst outside the mayor's house: she feels it, smiles and asks whether the party is too dense to be afraid, then tells it to leave her to her thoughts.
voidscMadraKarstCallsForMenardi (void)Walking towards the mayor's house along the path east of it (metatiles (13, 17) to (13, 19)) when Felix brings Piers home, the party hears Karst, standing just east of the path, call for her sister: "Where could Menardi have gone?
voidscMadraAskAfraidOfKibombo (Sint32 actor)Talking to the man with a pack who wanders in front of the jail when Felix brings Piers home: "Everyone here in Madra is afraid of the Kibombo now.
voidscMadraAskComingThroughHole (void)The worker in the Champa's hole outside the north-east wall asks "You comin' through here?", and whatever Felix answers, tells him nobody can come through while they work and he must enter Madra through the front gates.
voidscMadraAskComingThroughSealedHole (void)Once the Kibombo have raided Madra, the worker in the Champa's hole asks "Oh, uh...
static inline voidscMadraPlaceFacing (Sint32 actorId, Sint32 x, Sint32 z, Uint16 facing)Places an actor facing an angle, the angle taken as the Uint16 an actor's facing is.
voidscMadraWorkerBlocksHole (void)Felix steps into the hole the Champa dug among the flowers outside the town wall in the north-east corner (metatile (46, 15)).
voidscMadraWorkerBlocksSealedHole (void)Once the Kibombo have raided Madra, stepping into the Champa's hole (metatile (46, 15)) the first time on a visit makes the worker pop up out of it again, Felix hops back, and the worker says they are sealing it (scMadraAskComingThroughSealedHole).
const CUE *scGetCues (void)The scene's cues: the rooms of names' for any entrance above ENTRANCE_NAMES_ABOVE, else the debug room's.
voidscMadraSealHoleMetatiles (void)Makes the metatiles around the Champa's hole, (45, 14) to (47, 16), plain ground, copied from spare metatiles at (109, 14), so that stepping there no longer runs anything.
voidscMadraSealHole (void)When Felix brings Piers home the Champa's hole is filled in: a mound of earth is drawn where the ladder was, copied from spare metatiles at (51, 10), and its metatiles become plain ground.
Sint32scInit (void)Sets up the town as the party enters: the hole is filled in once Felix brings Piers home; otherwise the worker stands down in it, out of sight unless he has already popped up this visit, and the two who saw the shaft of ice are gone once Briggs is caught.
Sint32scPrepareMap (void)Once Briggs is caught the pool has dried up: its colours take the dry ground's.
voidscMadraAskAboutIceShaft (Sint32 actor)Talking to the strongman outside the jail who saw Piers raise his shaft of ice: "Was I just dreaming when that shaft of ice appeared?" Told yes, he is relieved; told no, he hopes Felix is joking.
voidscMadraAskAboutBriggs (void)Talking to the boy in a blue shirt beside the round sanctum: he asks whether the party came over the Dehkan Plateau and saw the boat grounded near the cave, or, once Briggs is caught, whether Felix is the one who beat him up.
voidscMadraMindReadBriggsFan (void)Casting Mind Read on the boy beside the sanctum before he has asked his question makes him ask it aloud, as talking to him does (scMadraAskAboutBriggs); while Briggs is free he starts, an exclamation mark over his head, and turns to Felix first.
voidscMadraAskAboutJenna (void)Talking to the auburn-haired boat owner south-east of the jail when Felix brings Piers home: she asks whether a girl named Jenna is with him.
voidscMadraInspectPartyAtGate (void)The first time Felix walks north into the south gate (metatiles (29, 26) and (30, 26)), the two guards stop the party: "You there!
voidscMadraStopPartyAfterRaid (void)Once the Kibombo have raided Madra, the first time Felix walks north into the south gate (metatiles (29, 26) and (30, 26)) a guard cries "Hey!
voidscMadraSkipGateInspection (void)Nothing visible happens when Felix walks south out through the gate (metatiles (29, 25) and (30, 25)) without having been inspected; the game marks the inspection done, so that the guards do not stop him on the metatiles south of it.
voidscMadraSkipRaidQuestioning (void)Nothing visible happens when Felix walks south out through the gate (metatiles (29, 25) and (30, 25)) after the Kibombo's raid without having been questioned; the game marks the questioning done, so that the guards do not stop him on the metatiles south of it.
voidscMadraClimbDownLadder (void)Felix, already beside a ladder top, turns north, steps onto the rungs and climbs down out of sight to the catacombs' east or west ladders, by the ladder top's step cue.
voidscMadraStepOntoLadderFacingEast (void)Unused: Felix steps up to a ladder top from its west side and climbs down; no cue runs it.
voidscMadraStepOntoLadderFacingWest (void)Unused: Felix steps up to a ladder top from its east side and climbs down; no cue runs it.
voidscMadraTurnAndClimbDownLadder (void)Unused: Felix turns north on the spot and climbs down; no cue runs it.

Variables

NameDescription
extern ACTOR_PLACEMadraPlacements []The town until the party returns with Piers (MADRA_ACTOR_ID).
extern ACTOR_PLACEMadraPlacementsOnReturn []MADRA_ON_RETURN_ACTOR_ID).
extern CUEMadraCuesBeforeRaid []The town's doors, gate, talk and Mind Read before the Kibombo raid.
extern CUEMadraCuesAfterRaid []The town's doors, gate, talk and Mind Read once the Kibombo have raided Madra.
extern CUEMadraCuesOnReturn []The town's doors, talk and Mind Read once the party returns with Piers, and Karst's visit.
extern Uint16MadraDoorOpening []A door opening: the one metatile animation step of most of the town's doors.
extern Uint16MadraCavernHomeDoorOpening []The door opening of the left cavern home's two doors, from other metatiles.
extern MAP_EDITMadraDoors []The town's doors that open with a metatile animation as the party walks through, by the exits they lead by.
Uint32SceneExits []The room has no exits of its own.

Description

Madra, the walled town of eastern Gondowan that Felix reaches over the Dehkan Plateau. Briggs's Champa pirates have just raided it to free their leader, so the two guards at the south gate stop the party and look it over before letting it in. Outside the wall in the north-east corner is the hole the Champa dug, with a ladder down into the catacombs; a worker in it turns Felix away until the guards have let him in. Piers is held in the jail on the west side, and coming out of it after he has made his shaft of ice, Felix is granted passage to Osenia by Milady. Once Briggs is caught the Kibombo have raided the town in turn, the hole is being sealed and the guards question the party again. When Felix brings Piers home the hole is filled in, and leaving the mayor's house after the welcome the mayor gives him the Cyclone Chip and Karst, come looking for Menardi, confronts him.

Macros in detail

FLAG_MADRA_WORKER_SEEN_AT_HOLE

#define FLAG_MADRA_WORKER_SEEN_AT_HOLE FLAG_SCENE_TEMP(0x80)

Set once the worker has popped up out of the Champa's hole on this visit.

Referenced by scInit(), scMadraWorkerBlocksHole() and scMadraWorkerBlocksSealedHole().

Definition at line 25 of file madra.c.

FLAG_MADRA_TOLD_WORKER_COMING_THROUGH

#define FLAG_MADRA_TOLD_WORKER_COMING_THROUGH FLAG_SCENE_TEMP(0x81)

Set once Felix has told the worker he is coming through the hole.

Referenced by scMadraAskComingThroughHole() and scMadraAskComingThroughSealedHole().

Definition at line 27 of file madra.c.

FLAG_MADRA_BOY_HAS_ASKED

#define FLAG_MADRA_BOY_HAS_ASKED FLAG_AREA_TEMP(0x00)

Set once the boy has asked the party about the Champa boat, or about Briggs; he no longer turns to face Felix first.

Referenced by MadraCuesBeforeRaid, scMadraAskAboutBriggs() and scMadraMindReadBriggsFan().

Definition at line 30 of file madra.c.

FLAG_MADRA_TOLD_OF_JENNA

#define FLAG_MADRA_TOLD_OF_JENNA FLAG_AREA_TEMP(0x01)

Set once Felix has told the boat owner that Jenna is with him.

Referenced by MadraCuesOnReturn and scMadraAskAboutJenna().

Definition at line 32 of file madra.c.

FLAG_MADRA_RAID_QUESTIONING_DONE

#define FLAG_MADRA_RAID_QUESTIONING_DONE 0x914

Set as the guards let the party go after questioning it about the Kibombo's raid.

Referenced by MadraCuesAfterRaid, scMadraSkipRaidQuestioning() and scMadraStopPartyAfterRaid().

Definition at line 35 of file madra.c.

FLAG_MADRA_KARST_MET

#define FLAG_MADRA_KARST_MET 0x98e

Set once Karst has come to Madra looking for Menardi; she is gone from the town afterwards.

Referenced by MadraCuesOnReturn, scInit() and scMadraMeetKarst().

Definition at line 38 of file madra.c.

FLAG_MADRA_KARST_CALLED_FOR_MENARDI

#define FLAG_MADRA_KARST_CALLED_FOR_MENARDI FLAG_SCENE_TEMP(0x0f)

Set once the party has heard Karst call for her sister, this visit.

Referenced by scMadraKarstCallsForMenardi().

Definition at line 40 of file madra.c.

BRIGGS_FAN_SPEAKER

#define BRIGGS_FAN_SPEAKER

The actor the lines of the boy who asks about Briggs open beside. BUG: the boy's lines open beside ACTOR_FIRST_PLACED, the young man who talks of the elder, wherever he stands, and not beside the boy: fdMessageShowAtActor places the window by its speaker's place on screen. In a render of the talk the young man is off screen to the north-west and every window stands at the screen's left edge; with BUGFIX's speaker, the boy, they stand over his head.

Referenced by scMadraAskAboutBriggs() and scMadraMindReadBriggsFan().

Definition at line 655 of file madra.c.

Enumerations in detail

MADRA_METATILE_BEHAVIOR

enum MADRA_METATILE_BEHAVIOR

The metatiles whose step cues run Madra's scripts; a door's metatile takes the number of the exit it leads by.

EnumeratorValueDescription
METATILE_BEHAVIOR_MADRA_CHAMPAS_HOLE16The Champa's hole outside the north-east wall, metatile (46, 15).
METATILE_BEHAVIOR_MADRA_GATE_INSIDE19The gate's inner metatiles, (29, 25) and (30, 25).
METATILE_BEHAVIOR_MADRA_GATE_OUTSIDEThe gate's outer metatiles, (29, 26) and (30, 26).
METATILE_BEHAVIOR_MADRA_PATH_PAST_KARSTThe path east of the mayor's house, (13, 17) to (13, 19).

Definition at line 44 of file madra.c.

MADRA_ACTOR_ID

enum MADRA_ACTOR_ID

The town's placed actors, by the rows of MadraPlacements, the first visit's: Kraden, out of sight, steps out from behind Felix at the gate, and Milady and her guard wait out of sight until they hurry to the jail.

EnumeratorValueDescription
ACTOR_YOUNG_MAN_ON_THE_ELDERACTOR_FIRST_PLACEDThe townsfolk, each named for what they talk of on the first visit; their lines change once the Kibombo have raided the town (FLAG_BRIGGS_CAUGHT) and again when the party returns with Piers.
ACTOR_YOUNG_WOMAN_ON_THE_DISASTERS
ACTOR_OLD_MAN_ON_THE_WAVE
ACTOR_BOAT_OWNERWho owns the boats the tidal wave ruined; on the party's return she asks after Jenna for Isaac's party.
ACTOR_OLD_MAN_ON_THE_CAPTURED_CHAMPA
ACTOR_OLD_WOMAN_ON_AIRS_ROCK
ACTOR_BRIGGS_FANThe boy who asks about the Champa boat and Briggs.
ACTOR_GIRL_ON_THE_SUPERCONTINENT
ACTOR_OLD_MAN_WHO_SCARED_THE_CHAMPA
ACTOR_OLD_MAN_ON_THE_CHAMPAS_HOLE
ACTOR_MAN_ON_THE_CHAMPAS_PLAN
ACTOR_GIRL_ON_THE_BIG_HOLE
ACTOR_YOUNG_MAN_AGAINST_THE_PRISONER
ACTOR_YOUNG_WOMAN_ON_THE_PRISONER
ACTOR_GUARD_ON_HIS_FRIENDTwo jail guards, one whose friend was on guard
ACTOR_GUARD_ON_HIS_PARTNERwhen Briggs's men attacked, one whose partner ran off.
ACTOR_GATE_GUARDThe guards who stop the party at the gate.
ACTOR_SECOND_GATE_GUARD
ACTOR_HOLE_WORKERThe worker who pops up out of the Champa's hole into the catacombs.
ACTOR_ICE_SHAFT_WITNESSThe two who saw the shaft of ice in the jail, there once Piers has used Frost.
ACTOR_FRIGHTENED_WITNESS
ACTOR_WEAPON_MERCHANT
ACTOR_ARMOR_MERCHANT
ACTOR_ITEM_MERCHANTThe item merchant, back at her stand once
ACTOR_KRADENBriggs is caught.
ACTOR_LADYThe lady who grants the party passage to
ACTOR_LADYS_GUARDOsenia, called "Milady", and her guard.
ACTOR_ITEM_MERCHANTS_SIBLINGWho keeps the item stand while her sister
ACTOR_CYCLONE_CHIPFIELD_TREASURE_ACTOR + 2recovers from the raid. The map's third treasure spot, where the mayor sets the Cyclone Chip down (scMadraMeetKarst); out of sight otherwise.

Definition at line 60 of file madra.c.

MADRA_ON_RETURN_ACTOR_ID

enum MADRA_ON_RETURN_ACTOR_ID

The rows of MadraPlacementsOnReturn that differ: Karst, who comes looking for Menardi, and the mayor, back from Alhafra.

EnumeratorValueDescription
ACTOR_KARSTACTOR_LADY
ACTOR_MAYOR
ACTOR_MAN_AFRAID_OF_THE_KIBOMBOA man with a pack who wanders in front of the jail, asking whether the Kibombo scare the party.

Definition at line 112 of file madra.c.

anonymous enum

enum { SHOP_MADRA_WEAPONS, SHOP_MADRA_ARMOR, SHOP_MADRA_ITEMS }

Madra's shops under the market tents, as mnShopRun numbers them.

EnumeratorValueDescription
SHOP_MADRA_WEAPONS4
SHOP_MADRA_ARMOR5
SHOP_MADRA_ITEMS6

Definition at line 209 of file madra.c.

anonymous enum

enum { METATILE_BEHAVIOR_MADRA_EAST_LADDERS_LAST }

The last of the ladder tops' step cues that lead down to the catacombs' east ladders; those above it lead to the west ones. No metatile of Madra's map has one.

EnumeratorValueDescription
METATILE_BEHAVIOR_MADRA_EAST_LADDERS_LAST34

Definition at line 1900 of file madra.c.

Functions in detail

scMadraGrantPassageToOsenia

void scMadraGrantPassageToOsenia(void)

Coming out of the jail after seeing Piers raise his shaft of ice, Felix meets Milady and her guard, who hurry up crying "Has Piers escaped!?"; she asks whether the party is going to Osenia and grants it passage over the drawbridge. It runs once (FLAG_PIERS_INTERROGATED, then FLAG_OSENIA_PASSAGE_GRANTED).

References fdActorFaceActorById(), fdActorFaceDirection(), fdActorFaceDirectionAndWait(), fdActorFaceDirectionById(), fdActorRunRepeatedMotion(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorWaitForMoveById(), fdActorWalkByAndWaitById(), fdActorWalkTo(), fdActorWalkToAndWait(), fdCameraWaitForArrival(), fdMessageShowAtActor(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), scFieldActorShowEmote(), Sint32, syGameFlagGet() and syGameFlagSet().

Referenced by scInit().

Definition at lines 124 and 968 of file madra.c.

scMadraMeetKarst

void scMadraMeetKarst(void)

Coming out of the mayor's house after Piers's farewell, Felix hears the mayor call "Felix, wait!" and is given the Cyclone Chip promised for the boat (with no room for it, the mayor sets it down beside his house to be picked up later). Then Karst, hearing Felix's name, confronts the party about Menardi, learns of Isaac and swears to have her revenge.

References fdActorFaceActorById(), fdActorFaceDirection(), fdActorFaceDirectionAndRefreshById(), fdActorFaceDirectionAndWait(), fdActorFaceDirectionById(), fdActorGetById(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationById(), fdActorSetDestinationById(), fdActorSetHorizontalPosAndAngleWithTerrain(), fdActorSetSpriteColor(), fdActorTurnToFaceEachOther(), fdActorWaitForMoveById(), fdActorWalkByAndWait(), fdActorWalkByAndWaitById(), fdActorWalkByById(), fdActorWalkToAndWait(), fdCameraFollowActor(), fdItemDisplayShowItem(), fdMapGridAnimateMetatiles(), fdMessageShowAtActor(), fdPartyInventoryGiveItem(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptSetMessageId(), fdScriptShowMessageAndWait(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), gmPartyInventoryFindRoom(), gmPlayMusic(), MadraDoors, mnFieldMessageShow(), mnMessageArgumentPush(), scFieldActorLaunchFromLeader(), scFieldActorShowEmote(), Sint32, syGameFlagGet(), syGameFlagSet() and sySoundPlay().

Referenced by scInit().

Definition at lines 126 and 1335 of file madra.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References SceneEntrances.

Definition at line 134 of file madra.c.

scGetExitRegions

const SCENE_REGION *scGetExitRegions(void)

Definition at line 139 of file madra.c.

scGetExits

const Uint32 *scGetExits(void)

References SceneExits.

Definition at line 144 of file madra.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

References fdScriptGetFlag(), MadraPlacements and MadraPlacementsOnReturn.

Definition at line 149 of file madra.c.

scMadraEnterDoor

void scMadraEnterDoor(void)

Felix walks up to one of Madra's doors: it opens with a door's sound, he steps through and the screen fades to the room inside. The doors are the left cavern home's two in the cliff at the top of town, the mayor's house on the north-west, the two of the inn (its ground floor and its upstairs), the house of the couple wary of Gondowan by the south-west corner, the mushroom couple's house and the house east of it, and the round sanctum by the south wall. The jail's doorway on the west side is a plain exit, with no door to open.

Each door metatile's step cue is the number of the exit it leads by, and MadraDoors holds, at that number less one, the metatiles that redraw the door open. Everyone else on the map stops while Felix walks in.

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

Referenced by MadraCuesAfterRaid, MadraCuesBeforeRaid and MadraCuesOnReturn.

Definition at line 170 of file madra.c.

scMadraTalkToWeaponMerchant

void scMadraTalkToWeaponMerchant(Sint32 arg)

Talking to the weapon merchant, the bald man in red at the east tent of the market, from across his counter opens his shop. Spoken to from any other side he talks of the merchants fighting off the Champa, and later of the strange weapons the Kibombo left behind.

References fdActorGetById(), fdScriptGetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), MainRoutineStateWork, mnShopRun() and Sint32.

Referenced by MadraCuesAfterRaid, MadraCuesBeforeRaid and MadraCuesOnReturn.

Definition at line 220 of file madra.c.

scMadraTalkToArmorMerchant

void scMadraTalkToArmorMerchant(Sint32 arg)

Talking to the armor merchant, the young man in green at the middle tent of the market, from across his counter opens his shop. From any other side he moans of a bone bruise from the fighting, and later talks of the pirates and the Kibombo.

References fdActorGetById(), fdScriptGetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), MainRoutineStateWork, mnShopRun() and Sint32.

Referenced by MadraCuesAfterRaid, MadraCuesBeforeRaid and MadraCuesOnReturn.

Definition at line 244 of file madra.c.

scMadraTalkToItemMerchant

void scMadraTalkToItemMerchant(Sint32 arg)

Talking to whoever keeps the west tent of the market from across the counter opens the item shop. Spoken to from any other side, at first the merchant's sister, keeping the tent, says the merchant was hurt in the Champa's attack; once Briggs is caught the merchant is back, healed, and later worries about her boyfriend Shin.

References fdActorGetById(), fdScriptGetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), MainRoutineStateWork, mnShopRun() and Sint32.

Referenced by MadraCuesAfterRaid, MadraCuesBeforeRaid and MadraCuesOnReturn.

Definition at line 268 of file madra.c.

scMadraKarstSendsPartyAway

void scMadraKarstSendsPartyAway(void)

Karst, told the party does not know her sister, shakes her head and sends it off: "If you don't know my sister, then I have nothing to say to you."

References fdActorSetAnimationAndWait(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptWait() and Sint32.

Referenced by scMadraKarstAsksAboutMenardi().

Definition at line 289 of file madra.c.

scMadraKarstAsksAboutMenardi

void scMadraKarstAsksAboutMenardi(void)

Talking to Karst, the red-haired woman outside the mayor's house when Felix brings Piers home: she asks whether the party has seen a girl named Menardi. Answering yes, and yes again when she asks whether her sister is dead, makes her threaten the party; either no sends it away.

References fdScriptAskYesNoWithActorAnimation(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), scFieldActorShowEmote(), scMadraKarstSendsPartyAway() and Sint32.

Referenced by MadraCuesOnReturn.

Definition at line 302 of file madra.c.

scMadraMindReadKarst

void scMadraMindReadKarst(void)

Casting Mind Read on Karst outside the mayor's house: she feels it, smiles and asks whether the party is too dense to be afraid, then tells it to leave her to her thoughts.

References fdActorRunRepeatedMotion(), fdActorSetAnimationAndWait(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptWait(), scFieldActorShowEmote() and Sint32.

Referenced by MadraCuesOnReturn.

Definition at line 335 of file madra.c.

scMadraKarstCallsForMenardi

void scMadraKarstCallsForMenardi(void)

Walking towards the mayor's house along the path east of it (metatiles (13, 17) to (13, 19)) when Felix brings Piers home, the party hears Karst, standing just east of the path, call for her sister: "Where could Menardi have gone? Where are you, my sister?" She calls once a visit.

References fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptGetFlag(), fdScriptSetFlag(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), scFieldActorShowEmote() and Sint32.

Referenced by MadraCuesOnReturn.

Definition at line 353 of file madra.c.

scMadraAskAfraidOfKibombo

void scMadraAskAfraidOfKibombo(Sint32 actor)

Talking to the man with a pack who wanders in front of the jail when Felix brings Piers home: "Everyone here in Madra is afraid of the Kibombo now. Do they scare you, too?" Either way he says their smoke signals have since announced a truce.

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

Referenced by MadraCuesOnReturn.

Definition at line 372 of file madra.c.

scMadraAskComingThroughHole

void scMadraAskComingThroughHole(void)

The worker in the Champa's hole outside the north-east wall asks "You comin' through here?", and whatever Felix answers, tells him nobody can come through while they work and he must enter Madra through the front gates. Once told yes, he says only that.

References fdActorFaceActor(), fdActorSetAnimationAndWait(), fdPartyGetLeaderActor(), fdScriptAskYesNoWithActorAnimation(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptWait(), scFieldActorShowEmote() and Sint32.

Referenced by MadraCuesBeforeRaid and scMadraWorkerBlocksHole().

Definition at line 395 of file madra.c.

scMadraAskComingThroughSealedHole

void scMadraAskComingThroughSealedHole(void)

Once the Kibombo have raided Madra, the worker in the Champa's hole asks "Oh, uh... You coming through?", and whatever Felix answers, says they are sealing the hole up and sends him round to the main gates.

References fdActorFaceActor(), fdActorSetAnimationAndWait(), fdPartyGetLeaderActor(), fdScriptAskYesNoWithActorAnimation(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptWait(), scFieldActorShowEmote() and Sint32.

Referenced by MadraCuesAfterRaid and scMadraWorkerBlocksSealedHole().

Definition at line 431 of file madra.c.

scMadraPlaceFacing

static inline void scMadraPlaceFacing(Sint32 actorId, Sint32 x, Sint32 z, Uint16 facing)

Places an actor facing an angle, the angle taken as the Uint16 an actor's facing is.

References fdActorSetPosAndFacing() and Sint32.

Referenced by scMadraWorkerBlocksHole() and scMadraWorkerBlocksSealedHole().

Definition at line 466 of file madra.c.

scMadraWorkerBlocksHole

void scMadraWorkerBlocksHole(void)

Felix steps into the hole the Champa dug among the flowers outside the town wall in the north-east corner (metatile (46, 15)). Once the guards at the gate have let the party in, the ladder in it takes him down into the catacombs. Before that, the first time on a visit, a worker pops his head up out of the hole, Felix hops back out of his way, and the worker turns him away (scMadraAskComingThroughHole); later steps that visit do nothing.

References fdActorFaceDirectionAndWait(), fdActorGetById(), fdActorWalkToAndWait(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptGetFlag(), fdScriptPlaySound(), fdScriptSetFlag(), fdScriptStart(), scMadraAskComingThroughHole(), scMadraPlaceFacing() and syImportScriptSetExitRequest().

Referenced by MadraCuesBeforeRaid.

Definition at line 478 of file madra.c.

scMadraWorkerBlocksSealedHole

void scMadraWorkerBlocksSealedHole(void)

Once the Kibombo have raided Madra, stepping into the Champa's hole (metatile (46, 15)) the first time on a visit makes the worker pop up out of it again, Felix hops back, and the worker says they are sealing it (scMadraAskComingThroughSealedHole). Later steps that visit do nothing, and the hole no longer leads down.

References fdActorFaceDirectionAndWait(), fdActorGetById(), fdActorWalkToAndWait(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptGetFlag(), fdScriptSetFlag(), fdScriptStart(), scMadraAskComingThroughSealedHole() and scMadraPlaceFacing().

Referenced by MadraCuesAfterRaid.

Definition at line 508 of file madra.c.

scGetCues

const CUE *scGetCues(void)

References fdScriptGetFlag(), MadraCuesAfterRaid, MadraCuesBeforeRaid and MadraCuesOnReturn.

Definition at line 528 of file madra.c.

scMadraSealHoleMetatiles

void scMadraSealHoleMetatiles(void)

Makes the metatiles around the Champa's hole, (45, 14) to (47, 16), plain ground, copied from spare metatiles at (109, 14), so that stepping there no longer runs anything.

References fdMapGridCopyMetatileAttributes().

Referenced by scMadraSealHole().

Definition at line 540 of file madra.c.

scMadraSealHole

void scMadraSealHole(void)

When Felix brings Piers home the Champa's hole is filled in: a mound of earth is drawn where the ladder was, copied from spare metatiles at (51, 10), and its metatiles become plain ground.

References fdMapGridCopyMetatilesLayered() and scMadraSealHoleMetatiles().

Referenced by scInit().

Definition at line 548 of file madra.c.

scInit

Sint32 scInit(void)

Sets up the town as the party enters: the hole is filled in once Felix brings Piers home; otherwise the worker stands down in it, out of sight unless he has already popped up this visit, and the two who saw the shaft of ice are gone once Briggs is caught. Coming out of the jail Felix is granted passage to Osenia (scMadraGrantPassageToOsenia), and on the return, coming out of the mayor's house after the farewell, he is met once by the mayor and Karst (scMadraMeetKarst).

References fdActorGetById(), fdActorSetSpriteFlags(), fdScriptGetFlag(), fdScriptSetFlag(), MainRoutineStateWork, scMadraGrantPassageToOsenia(), scMadraMeetKarst(), scMadraSealHole() and Sint32.

Definition at line 561 of file madra.c.

scPrepareMap

Sint32 scPrepareMap(void)

References Sint32.

Definition at line 617 of file madra.c.

scMadraAskAboutIceShaft

void scMadraAskAboutIceShaft(Sint32 actor)

Talking to the strongman outside the jail who saw Piers raise his shaft of ice: "Was I just dreaming when that shaft of ice appeared?" Told yes, he is relieved; told no, he hopes Felix is joking.

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

Referenced by MadraCuesBeforeRaid.

Definition at line 625 of file madra.c.

scMadraAskAboutBriggs

void scMadraAskAboutBriggs(void)

Talking to the boy in a blue shirt beside the round sanctum: he asks whether the party came over the Dehkan Plateau and saw the boat grounded near the cave, or, once Briggs is caught, whether Felix is the one who beat him up.

References fdActorFaceActor(), fdActorFaceDirection(), fdPartyGetLeaderActor(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait() and Sint32.

Referenced by MadraCuesAfterRaid and MadraCuesBeforeRaid.

Definition at line 661 of file madra.c.

scMadraMindReadBriggsFan

void scMadraMindReadBriggsFan(void)

Casting Mind Read on the boy beside the sanctum before he has asked his question makes him ask it aloud, as talking to him does (scMadraAskAboutBriggs); while Briggs is free he starts, an exclamation mark over his head, and turns to Felix first.

References fdActorFaceActor(), fdActorFaceDirection(), fdPartyGetLeaderActor(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), scFieldActorShowEmote() and Sint32.

Referenced by MadraCuesBeforeRaid.

Definition at line 715 of file madra.c.

scMadraAskAboutJenna

void scMadraAskAboutJenna(void)

Talking to the auburn-haired boat owner south-east of the jail when Felix brings Piers home: she asks whether a girl named Jenna is with him. Told yes, she says the four weatherworn travellers with the amazing ship must have been looking for them; told no, she asks him to let Jenna know Isaac is looking for her, and asks again next time.

References fdActorFaceActor(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and Sint32.

Referenced by MadraCuesOnReturn.

Definition at line 775 of file madra.c.

scMadraInspectPartyAtGate

void scMadraInspectPartyAtGate(void)

The first time Felix walks north into the south gate (metatiles (29, 26) and (30, 26)), the two guards stop the party: "You there! Hold your ground!" Kraden asks what the trouble is, one guard walks round the party looking it over, and they agree it is not the Champa, who raided the town to free Briggs, and let it pass.

References fdActorFaceActor(), fdActorFaceDirection(), fdActorFaceDirectionAndWait(), fdActorFaceEachOther(), fdActorGetById(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetDestination(), fdActorSetSpritePriority(), fdActorWaitForMoveById(), fdActorWalkBy(), fdActorWalkByAndWait(), fdActorWalkToAndWait(), fdCameraWaitForArrival(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptSetFlag(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptWait(), MainRoutineStateWork, scFieldActorLaunchFromLeader(), scFieldActorShowEmote() and Sint32.

Referenced by MadraCuesBeforeRaid.

Definition at line 811 of file madra.c.

scMadraStopPartyAfterRaid

void scMadraStopPartyAfterRaid(void)

Once the Kibombo have raided Madra, the first time Felix walks north into the south gate (metatiles (29, 26) and (30, 26)) a guard cries "Hey! You lot! Hold it right there!", but the other says the party could not be involved, and with Kraden's answers they let it go.

References fdActorFaceActor(), fdActorFaceDirection(), fdActorFaceDirectionAndWait(), fdActorGetById(), fdActorJump(), fdActorLaunchFromLeader(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetDestination(), fdActorWaitForMoveById(), fdActorWalkBy(), fdActorWalkByAndWait(), fdActorWalkToAndWait(), fdCameraWaitForArrival(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptWait(), MainRoutineStateWork, scFieldActorShowEmote() and Sint32.

Referenced by MadraCuesAfterRaid.

Definition at line 1157 of file madra.c.

scMadraSkipGateInspection

void scMadraSkipGateInspection(void)

Nothing visible happens when Felix walks south out through the gate (metatiles (29, 25) and (30, 25)) without having been inspected; the game marks the inspection done, so that the guards do not stop him on the metatiles south of it.

References syGameFlagSet().

Referenced by MadraCuesBeforeRaid.

Definition at line 1883 of file madra.c.

scMadraSkipRaidQuestioning

void scMadraSkipRaidQuestioning(void)

Nothing visible happens when Felix walks south out through the gate (metatiles (29, 25) and (30, 25)) after the Kibombo's raid without having been questioned; the game marks the questioning done, so that the guards do not stop him on the metatiles south of it.

References syGameFlagSet().

Referenced by MadraCuesAfterRaid.

Definition at line 1892 of file madra.c.

scMadraClimbDownLadder

void scMadraClimbDownLadder(void)

Felix, already beside a ladder top, turns north, steps onto the rungs and climbs down out of sight to the catacombs' east or west ladders, by the ladder top's step cue. Only the unused functions below call it.

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

Referenced by scMadraStepOntoLadderFacingEast(), scMadraStepOntoLadderFacingWest() and scMadraTurnAndClimbDownLadder().

Definition at line 1908 of file madra.c.

scMadraStepOntoLadderFacingEast

void scMadraStepOntoLadderFacingEast(void)

Unused: Felix steps up to a ladder top from its west side and climbs down; no cue runs it.

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

Definition at line 1933 of file madra.c.

scMadraStepOntoLadderFacingWest

void scMadraStepOntoLadderFacingWest(void)

Unused: Felix steps up to a ladder top from its east side and climbs down; no cue runs it.

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

Definition at line 1944 of file madra.c.

scMadraTurnAndClimbDownLadder

void scMadraTurnAndClimbDownLadder(void)

Unused: Felix turns north on the spot and climbs down; no cue runs it.

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

Definition at line 1954 of file madra.c.

Variables in detail

MadraPlacements

extern ACTOR_PLACE MadraPlacements[]

ACTOR_PLACE MadraPlacements[]

The town until the party returns with Piers (MADRA_ACTOR_ID).

Referenced by scGetActorPlacements().

Definition at lines 121 and 1996 of file madra.c.

MadraPlacementsOnReturn

extern ACTOR_PLACE MadraPlacementsOnReturn[]

ACTOR_PLACE MadraPlacementsOnReturn[]

MADRA_ON_RETURN_ACTOR_ID).

Referenced by scGetActorPlacements().

Definition at lines 122 and 2059 of file madra.c.

MadraCuesBeforeRaid

extern CUE MadraCuesBeforeRaid[]

CUE MadraCuesBeforeRaid[]

The town's doors, gate, talk and Mind Read before the Kibombo raid.

References scMadraAskAboutBriggs(), scMadraAskAboutIceShaft(), scMadraAskComingThroughHole(), scMadraEnterDoor(), scMadraInspectPartyAtGate(), scMadraMindReadBriggsFan(), scMadraSkipGateInspection(), scMadraTalkToArmorMerchant(), scMadraTalkToItemMerchant(), scMadraTalkToWeaponMerchant() and scMadraWorkerBlocksHole().

Referenced by scGetCues().

Definition at lines 127 and 2154 of file madra.c.

MadraCuesAfterRaid

extern CUE MadraCuesAfterRaid[]

CUE MadraCuesAfterRaid[]

The town's doors, gate, talk and Mind Read once the Kibombo have raided Madra.

References scMadraAskAboutBriggs(), scMadraAskComingThroughSealedHole(), scMadraEnterDoor(), scMadraSkipRaidQuestioning(), scMadraStopPartyAfterRaid(), scMadraTalkToArmorMerchant(), scMadraTalkToItemMerchant(), scMadraTalkToWeaponMerchant() and scMadraWorkerBlocksSealedHole().

Referenced by scGetCues().

Definition at lines 128 and 2356 of file madra.c.

MadraCuesOnReturn

extern CUE MadraCuesOnReturn[]

CUE MadraCuesOnReturn[]

The town's doors, talk and Mind Read once the party returns with Piers, and Karst's visit.

References scMadraAskAboutJenna(), scMadraAskAfraidOfKibombo(), scMadraEnterDoor(), scMadraKarstAsksAboutMenardi(), scMadraKarstCallsForMenardi(), scMadraMindReadKarst(), scMadraTalkToArmorMerchant(), scMadraTalkToItemMerchant() and scMadraTalkToWeaponMerchant().

Referenced by scGetCues().

Definition at lines 129 and 2537 of file madra.c.

MadraDoorOpening

extern Uint16 MadraDoorOpening[]

Uint16 MadraDoorOpening[]

A door opening: the one metatile animation step of most of the town's doors.

Referenced by MadraDoors.

Definition at lines 131 and 2126 of file madra.c.

MadraCavernHomeDoorOpening

extern Uint16 MadraCavernHomeDoorOpening[]

Uint16 MadraCavernHomeDoorOpening[]

The door opening of the left cavern home's two doors, from other metatiles.

Referenced by MadraDoors.

Definition at lines 132 and 2132 of file madra.c.

MadraDoors

extern MAP_EDIT MadraDoors[]

MAP_EDIT MadraDoors[]

The town's doors that open with a metatile animation as the party walks through, by the exits they lead by.

References MadraCavernHomeDoorOpening and MadraDoorOpening.

Referenced by scMadraEnterDoor() and scMadraMeetKarst().

Definition at lines 156 and 2140 of file madra.c.

SceneExits

Uint32 SceneExits[]

Referenced by scGetExits().

Definition at line 1965 of file madra.c.