Skip to Content
The Alchemy Project

src/scene/champa.c

Champa, the hungry seafaring village on the edge of Angara, its huts on cliffs and rafts about two waterfalls, whose people wait for Briggs to come home with food. More…

Macros

NameDescription
#defineFLAG_TOLD_OF_OBABA 0x972A villager told of Obaba.
#defineFLAG_SAILORS_SPOTTED_FELIX 0x973Two sailors ran to warn Briggs.
#defineFLAG_FEIZHIS_GIFT_WAITING 0xa74Feizhi holds out her gift.
#defineFLAG_FEIZHI_CAME 0xa75Feizhi came, taking Felix for a friend.
#defineFLAG_WALKED_INTO_THE_VILLAGE 0x970The party walked up the path into the village, so Alex meets it on the plank bridge on its way back out (scChampaMeetAlex).
#defineANIM_KRADEN_KEEP_SHAKING_HEAD 8Kraden's sprite's animation 8: shaking his head again and again, slower than ANIM_SHAKE_HEAD, until another animation is set.
#defineWATERFALL_LAST_COLOR 14The last of the two waterfalls' colours in background palettes 3, 4 and 5, which run from colour 1, each a band of blues from light to dark and back.
#defineSANCTUM_DOOR_ANIMATION 8The map's tile animation that swings the sanctum's stone door open, once.
#defineSANCTUM_DOOR_LOOP_ANIMATION 3The same frames of the sanctum's door over and over, kept paused.
#defineACTOR_VIKING_HELM_CHEST FIELD_TREASURE_ACTORThe chest Reveal shows by the six gravestones, holding the Viking Helm.

Enumerations

NameDescription
enumCHAMPA_METATILE_BEHAVIOR { METATILE_BEHAVIOR_PATH_INTO_THE_VILLAGE, METATILE_BEHAVIOR_P … }The map metatiles Champa's step and examine cues answer; a door's metatile takes the number of the exit it leaves by.
enumCHAMPA_ACTOR_ID { ACTOR_TIGHTROPE_START, ACTOR_TIGHTROPE_END, ACTOR_WEST_FLAG, … }Champa's people and things, numbering the rows of ChampaActorPlacements whose sprites are not the party's; ChampaActorPlacementsOnceBriggsSailed keeps them and adds the sailors who spot Felix.

Functions

NameDescription
Sint32mnWindowCloseMatchingId ()Closes at once the portrait window of a speaker, if one is open (mnPortraitCloseWindow, through the overlay's own import row).
static inline voidscActorHeadToward (Sint32 id, Sint32 target)Sends an actor walking to where another stands, if it is on the map.
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.
voidscChampaShrinkIntoTent (ACTOR *actor)Felix, each tick as he walks into the tent on one of the two rafts: he shrinks by 3/128 of his size, as if going in under the canvas.
voidscChampaOpenDoorAndEnter (const MAP_EDIT *opening, Sint32 door, Sint32 mode)Walking into a door of Champa: it opens with a sound, Felix walks in (lined up on the door first when mode is 0, straight on when 1) and the screen goes to the room behind it.
voidscChampaEnterDoor (Sint32 door)Walking north into one of Champa's doors or cave mouths takes the party in: into the tents on the two rafts Felix shrinks as he goes, the sanctum's stone door swings open first (SANCTUM_DOOR_ANIMATION), and the others he simply walks through.
voidscChampaRevealTreasureSpot (void)Reveal cast anywhere in Champa shows the hidden chest among the six gravestones east of the path into the village, holding the Viking Helm, for as long as the Psynergy lasts.
voidscChampaHideTreasureSpot (void)When Reveal fades, the chest among the six gravestones is hidden again.
voidscChampaSailorsSpotFelix (void)Walking up to the two sailors by the mouth of Briggs's cave in the cliff (metatiles (12, 19) and (12, 20)) after Briggs has escaped from Alhafra: they turn, "Whoa!
voidscChampaTalkToPracticingBoy (Sint32 actorId)Talking to the boy practicing Psynergy by his small rock: he stands up straight, tells of Eoleo's strange ability, and goes back to straining at the rock, squashed down with the effort.
voidscChampaTellOfBriggsTreasure (Sint32 actor)Talking to the woman who waited for Champa to prosper, once Briggs has sailed: "Hey, you just came to Champa not too long ago, didn't you?" Either way she tells how Briggs found ancient pirate treasure and fed the village.
voidscChampaAskAboutAnkohlRuins (Sint32 actor)Talking to the old man by the old woman: he asks whether the party has been to Ankohl Ruins, or, once Briggs has sailed, whether they want to know why Briggs took so long to return, and answers the yes or the no.
voidscChampaTellOfObaba (Sint32 actor)Talking to the sailor who speaks of the matriarch, once Briggs has sailed: the first time he tells of Obaba, last of the Ankohl, and after that of how she acts now that Briggs is back.
voidscChampaAskIfSailorsAreWellLiked (Sint32 actor)Talking to the sailor who asks "The Champa sailors aren't...well liked outside of here, are we?", and hearing his answer to the yes or the no.
voidscChampaTakeFeizhisGift (Sint32 actor)Talking to the charm Feizhi left on the path takes it, the Golden Ring; if the party cannot carry it, it stays there for later.
voidscChampaFeizhiHoldsHerGift (void)Feizhi's gift, the Golden Ring, shown as an item on the path where she set it down, and marked as waiting to be taken.
voidscChampaFeizhiArrives (void)Walking up the path past the six gravestones (metatiles (18, 35) to (20, 35)), in a game linked with a Broken Seal save in which Hsu was rescued, brings Feizhi running up behind with "Isaac!".
const CUE *scGetCues (void)The scene's cues: the rooms of names' for any entrance above ENTRANCE_NAMES_ABOVE, else the debug room's.
voidscChampaCycleWaterfallPalettes (void)Champa's two waterfalls flow: every other tick, the bands of blues they are drawn in, colours 1 to WATERFALL_LAST_COLOR of background palettes 3, 4 and 5, turn one place on.
Sint32scInit (void)Sets up the village as the party enters: the waterfalls flowing, the sanctum's door shut, the tightrope strung, the sailors and Briggs as the story leaves them, and Feizhi's gift where she left it.
Sint32scPrepareMap (void)Once Briggs has sailed, crates of the food he brought stand in the village.
voidscChampaSpawnQuestionMark ( Sint32 x, Sint32 y, Sint32 z, Sint32 angle, Sint32 ticks)A question mark over someone's head, the emote sprite's, turned to angle, for ticks ticks.
voidscChampaJennaAndShebaLookPuzzled (Sint32 firstId, Sint32 secondId)Jenna and Sheba, turned to each other while Kraden talks of what he has learned, puzzle at each other: a white bubble with a question mark in it, tilted towards the other, pops up over Jenna's head and then over Sheba's, twice each, each with a chime, before they both say they do not follow him.
voidscChampaShowTwoMessages (Sint32 first, Sint32 firstX, Sint32 firstY, Sint32 firstPortraitX, Sint32 firstPortraitY, Sint32 second, Sint32 secondX, Sint32 secondY, Sint32 secondPortraitX, Sint32 secondPortraitY, Sint32 delay)fdScriptShowTwoMessagesAndWait's first half, kept in the scene: two actors speak at once, the second message waiting for the first when delay is nonzero; scChampaCloseTwoMessages closes them.
voidscChampaCloseTwoMessages (Sint32 first, Sint32 second)Closes the two windows scChampaShowTwoMessages opened.
voidscChampaWalkIntoTheVillage (void)Walking up the path from the plank bridge into the village (metatiles (17, 40) to (22, 40)) marks the village as entered, so that Alex meets the party on the bridge on its way back out.
static inline voidscChampaMessageOpen (Sint32 speaker, Sint32 flags)Shows the speaker's message by its actor (fdMessageShowAtActor).
voidscChampaMeetAlex (void)Walking back south onto the plank bridge out of Champa (metatile (19, 42)) the first time, after going into the village, has Alex call "I see you've caught up with me again, Felix" and come down the path to meet the party.

Variables

NameDescription
extern ACTOR_PLACEChampaActorPlacements []Champa's actors, in CHAMPA_ACTOR_ID's order.
extern ACTOR_PLACEChampaActorPlacementsOnceBriggsSailed []Champa's actors once Briggs has sailed from Alhafra: the sailors at the mouth of his cave and Briggs too.
extern MAP_EDITChampaDoors []The doors' map edits for scChampaOpenDoorAndEnter, which does not play them: the sanctum's, then the others'.
extern CUEChampaCues []Champa's exits, doors, talks, Mind Read and Psynergy.
extern CUEChampaCuesOnceBriggsSailed []Champa's cues once Briggs has sailed, the sailors' warning among them.
extern Uint16ChampaNoDoor []A doorway with no door: nothing to open.
extern Uint16ChampaSanctumDoorOpening []The sanctum's door opening in two steps.
extern Uint32ChampaQuestionMarkScript []A question mark's script: it is released when its wait runs out.
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

Champa, the hungry seafaring village on the edge of Angara, its huts on cliffs and rafts about two waterfalls, whose people wait for Briggs to come home with food. The party comes in from the south over a plank bridge and up the path past six gravestones, where in a game linked with The Broken Seal Feizhi runs up to give Felix the gift she meant for Isaac (scChampaFeizhiArrives). Leaving by the same bridge the first time, the party meets Alex, who left it on Indra, with Karst and Agatio (scChampaMeetAlex); after he has gone, Kraden's hints leave Jenna and Sheba puzzled (scChampaJennaAndShebaLookPuzzled). Once Briggs has sailed from Alhafra, the people and cues change, and two sailors at the mouth of Briggs's cave spot Felix and send Briggs running inside (scChampaSailorsSpotFelix).

Macros in detail

FLAG_TOLD_OF_OBABA

#define FLAG_TOLD_OF_OBABA 0x972

A villager told of Obaba.

Referenced by scChampaTellOfObaba().

Definition at line 49 of file champa.c.

FLAG_SAILORS_SPOTTED_FELIX

#define FLAG_SAILORS_SPOTTED_FELIX 0x973

Two sailors ran to warn Briggs.

Referenced by ChampaCuesOnceBriggsSailed, scChampaSailorsSpotFelix() and scInit().

Definition at line 51 of file champa.c.

FLAG_FEIZHIS_GIFT_WAITING

#define FLAG_FEIZHIS_GIFT_WAITING 0xa74

Feizhi holds out her gift.

Referenced by scChampaFeizhiHoldsHerGift(), scChampaTakeFeizhisGift() and scInit().

Definition at line 53 of file champa.c.

FLAG_FEIZHI_CAME

#define FLAG_FEIZHI_CAME 0xa75

Feizhi came, taking Felix for a friend.

Referenced by ChampaCues, ChampaCuesOnceBriggsSailed and scChampaFeizhiArrives().

Definition at line 55 of file champa.c.

FLAG_WALKED_INTO_THE_VILLAGE

#define FLAG_WALKED_INTO_THE_VILLAGE 0x970

The party walked up the path into the village, so Alex meets it on the plank bridge on its way back out (scChampaMeetAlex).

Referenced by ChampaCues, ChampaCuesOnceBriggsSailed, scChampaMeetAlex() and scChampaWalkIntoTheVillage().

Definition at line 58 of file champa.c.

ANIM_KRADEN_KEEP_SHAKING_HEAD

#define ANIM_KRADEN_KEEP_SHAKING_HEAD 8

Kraden's sprite's animation 8: shaking his head again and again, slower than ANIM_SHAKE_HEAD, until another animation is set.

Referenced by scChampaMeetAlex().

Definition at line 62 of file champa.c.

WATERFALL_LAST_COLOR

#define WATERFALL_LAST_COLOR 14

The last of the two waterfalls' colours in background palettes 3, 4 and 5, which run from colour 1, each a band of blues from light to dark and back.

Referenced by scChampaCycleWaterfallPalettes().

Definition at line 86 of file champa.c.

SANCTUM_DOOR_ANIMATION

#define SANCTUM_DOOR_ANIMATION 8

The map's tile animation that swings the sanctum's stone door open, once.

Referenced by scChampaEnterDoor() and scInit().

Definition at line 88 of file champa.c.

SANCTUM_DOOR_LOOP_ANIMATION

#define SANCTUM_DOOR_LOOP_ANIMATION 3

The same frames of the sanctum's door over and over, kept paused.

Referenced by scInit().

Definition at line 90 of file champa.c.

ACTOR_VIKING_HELM_CHEST

#define ACTOR_VIKING_HELM_CHEST FIELD_TREASURE_ACTOR

The chest Reveal shows by the six gravestones, holding the Viking Helm.

Referenced by scChampaHideTreasureSpot() and scChampaRevealTreasureSpot().

Definition at line 159 of file champa.c.

Enumerations in detail

CHAMPA_METATILE_BEHAVIOR

enum CHAMPA_METATILE_BEHAVIOR

The map metatiles Champa's step and examine cues answer; a door's metatile takes the number of the exit it leaves by.

EnumeratorValueDescription
METATILE_BEHAVIOR_PATH_INTO_THE_VILLAGE19Across the path up from the
METATILE_BEHAVIOR_PLANK_BRIDGE20plank bridge (scChampaWalkIntoTheVillage), and the plank bridge itself (scChampaMeetAlex).
METATILE_BEHAVIOR_VILLAGE_SIGN24The sign at the village's south end: "Champa ahead!"
METATILE_BEHAVIOR_BEFORE_BRIGGS_CAVE26Before the two sailors at the mouth of Briggs's cave (scChampaSailorsSpotFelix).
METATILE_BEHAVIOR_GRAVESTONE_PATH100The path past the six gravestones (scChampaFeizhiArrives).

Definition at line 66 of file champa.c.

CHAMPA_ACTOR_ID

enum CHAMPA_ACTOR_ID

Champa's people and things, numbering the rows of ChampaActorPlacements whose sprites are not the party's; ChampaActorPlacementsOnceBriggsSailed keeps them and adds the sailors who spot Felix.

EnumeratorValueDescription
ACTOR_TIGHTROPE_STARTACTOR_FIRST_PLACEDThe ends of the tightrope
ACTOR_TIGHTROPE_ENDover the gap (fdTightropePlace).
ACTOR_WEST_FLAGThe village's two flags
ACTOR_EAST_FLAGeither side of its road, Champa's anchor on red.
ACTOR_HUNGRY_YOUNG_MAN"Oh, I'm so hungry... And there won't be anything to eat until..."
ACTOR_WOMAN_WAITING_FOR_FOOD"When is Briggs going to return with food for the village?"
ACTOR_MAN_AT_THE_EDGE_OF_ANGARA"How did you find your way here, to the edge of Angara?"
ACTOR_WOMAN_ON_PROSPERITY"Champa is impoverished, but soon, we will prosper again."
ACTOR_OLD_MAN_ON_ANKOHL_RUINSThe old man who asks about Ankohl Ruins.
ACTOR_OLD_WOMAN_ON_ANKOHL_RUINS"The ruins at Ankohl are all that remains of a great sanctum..."
ACTOR_PRACTICING_BOYThe boy practicing Psynergy: "If I could pick up things without using my hands..."
ACTOR_EOLEOS_FRIEND"Once Briggs comes back, I can play with Eoleo again..."
ACTOR_SAILOR_AT_THE_QUIET_CAVESSailors at the cliff caves: "The cliff caves are a lot quieter with Briggs gone..."
ACTOR_SAILOR_ON_THE_MATRIARCH"Our matriarch is the last successor of the Ankohl."
ACTOR_SAILOR_ASKING_IF_WELL_LIKED"The Champa sailors aren't...well liked outside of here, are we?"
ACTOR_ROCKA small rock by the practicing boy, drawn at half size.
ACTOR_WOMAN_ON_THE_CLIFF"I bet you're wondering why only sailors and their families..."
ACTOR_ALEXWho meet the party on the plank bridge at the village's south end (scChampaMeetAlex).
ACTOR_KARST
ACTOR_AGATIO
ACTOR_KRADEN
ACTOR_FEIZHIFeizhi, in a game linked with The Broken
ACTOR_KRADEN_MEETING_FEIZHISeal (scChampaFeizhiArrives), and Kraden as he meets her.
ACTOR_FEIZHIS_GIFTFeizhi's gift, until it is taken (scChampaTakeFeizhisGift).
ACTOR_SAILOR_WHO_SPOTS_FELIXOnce Briggs has sailed: "Whoa! You... You're Felix!"
ACTOR_SAILOR_WHO_WARNS_BRIGGS"What? Really? It's Felix?" and "Briggs,
ACTOR_BRIGGSget outta here!"

Definition at line 95 of file champa.c.

Functions in detail

mnWindowCloseMatchingId

Sint32 mnWindowCloseMatchingId()

Closes at once the portrait window of a speaker, if one is open (mnPortraitCloseWindow, through the overlay's own import row).

Referenced by scChampaCloseTwoMessages().

Definition at line 34 of file champa.c.

scActorHeadToward

static inline void scActorHeadToward(Sint32 id, Sint32 target)

Sends an actor walking to where another stands, if it is on the map.

References fdActorGet(), fdActorSetDestination() and Sint32.

Referenced by scChampaFeizhiArrives() and scChampaMeetAlex().

Definition at line 37 of file champa.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References SceneEntrances.

Definition at line 161 of file champa.c.

scGetExitRegions

const SCENE_REGION *scGetExitRegions(void)

Definition at line 166 of file champa.c.

scGetExits

const Uint32 *scGetExits(void)

References SceneExits.

Definition at line 171 of file champa.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

References ChampaActorPlacements, ChampaActorPlacementsOnceBriggsSailed and fdScriptGetFlag().

Definition at line 176 of file champa.c.

scChampaShrinkIntoTent

void scChampaShrinkIntoTent(ACTOR *actor)

Felix, each tick as he walks into the tent on one of the two rafts: he shrinks by 3/128 of his size, as if going in under the canvas.

Referenced by scChampaEnterDoor().

Definition at line 185 of file champa.c.

scChampaOpenDoorAndEnter

void scChampaOpenDoorAndEnter(const MAP_EDIT *opening, Sint32 door, Sint32 mode)

Walking into a door of Champa: it opens with a sound, Felix walks in (lined up on the door first when mode is 0, straight on when 1) and the screen goes to the room behind it. The door's map edit is not played.

References fdActorCenterAndWalk(), fdActorGet(), fdActorSetAnimation(), fdActorSetDestinationOffset(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptPlaySound(), fdScriptStart(), fdScriptWaitTransitionTicks(), MainRoutineStateWork, scFieldScriptEndLastingPsynergy(), scFieldScriptSetExitRequest(), scFieldScriptWait() and Sint32.

Referenced by scChampaEnterDoor().

Definition at line 194 of file champa.c.

scChampaEnterDoor

void scChampaEnterDoor(Sint32 door)

Walking north into one of Champa's doors or cave mouths takes the party in: into the tents on the two rafts Felix shrinks as he goes, the sanctum's stone door swings open first (SANCTUM_DOOR_ANIMATION), and the others he simply walks through.

References ChampaDoors, fdActorGet(), fdTilesetAnimationResume(), MainRoutineStateWork, scChampaOpenDoorAndEnter(), scChampaShrinkIntoTent() and Sint32.

Referenced by ChampaCues and ChampaCuesOnceBriggsSailed.

Definition at line 220 of file champa.c.

scChampaRevealTreasureSpot

void scChampaRevealTreasureSpot(void)

Reveal cast anywhere in Champa shows the hidden chest among the six gravestones east of the path into the village, holding the Viking Helm, for as long as the Psynergy lasts.

References fdActorGet() and fdTreasureSpotSetPos().

Referenced by ChampaCues and ChampaCuesOnceBriggsSailed.

Definition at line 241 of file champa.c.

scChampaHideTreasureSpot

void scChampaHideTreasureSpot(void)

When Reveal fades, the chest among the six gravestones is hidden again.

References fdTreasureSpotSetPos().

Referenced by ChampaCues and ChampaCuesOnceBriggsSailed.

Definition at line 249 of file champa.c.

scChampaSailorsSpotFelix

void scChampaSailorsSpotFelix(void)

Walking up to the two sailors by the mouth of Briggs's cave in the cliff (metatiles (12, 19) and (12, 20)) after Briggs has escaped from Alhafra: they turn, "Whoa! You... You're Felix!", and yell to Briggs, who comes out, sees that it is really him and runs back into the cave, the sailors after him.

References fdActorFaceDirection(), fdActorFaceDirectionAndWait(), fdActorGet(), fdActorSetAttachedEffect(), fdActorShowEmote(), fdActorWalkBy(), fdActorWalkByAndWait(), fdCameraWaitForArrival(), fdScriptEnd(), fdScriptSetFlag(), fdScriptStart(), scFieldActorJump(), scFieldActorStartRepeatedMotion(), scFieldActorWatchAndSetScript(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptWait() and Sint32.

Referenced by ChampaCuesOnceBriggsSailed.

Definition at line 260 of file champa.c.

scChampaTalkToPracticingBoy

void scChampaTalkToPracticingBoy(Sint32 actorId)

Talking to the boy practicing Psynergy by his small rock: he stands up straight, tells of Eoleo's strange ability, and goes back to straining at the rock, squashed down with the effort.

References fdActorFaceDirectionAndWait(), fdActorGet(), fdActorSetMovementType(), fdScriptShowMessage(), scFieldScriptSetMessageId() and Sint32.

Referenced by ChampaCues.

Definition at line 351 of file champa.c.

scChampaTellOfBriggsTreasure

void scChampaTellOfBriggsTreasure(Sint32 actor)

Talking to the woman who waited for Champa to prosper, once Briggs has sailed: "Hey, you just came to Champa not too long ago, didn't you?" Either way she tells how Briggs found ancient pirate treasure and fed the village.

References fdScriptOpenMessage(), fdScriptShowMessage(), scFieldPartyGetLeaderActor(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptSetMessageId(), scFieldScriptWait() and Sint32.

Referenced by ChampaCuesOnceBriggsSailed.

Definition at line 367 of file champa.c.

scChampaAskAboutAnkohlRuins

void scChampaAskAboutAnkohlRuins(Sint32 actor)

Talking to the old man by the old woman: he asks whether the party has been to Ankohl Ruins, or, once Briggs has sailed, whether they want to know why Briggs took so long to return, and answers the yes or the no.

References fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptShowMessage(), scFieldPartyGetLeaderActor(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptSetMessageId(), scFieldScriptWait() and Sint32.

Referenced by ChampaCues and ChampaCuesOnceBriggsSailed.

Definition at line 394 of file champa.c.

scChampaTellOfObaba

void scChampaTellOfObaba(Sint32 actor)

Talking to the sailor who speaks of the matriarch, once Briggs has sailed: the first time he tells of Obaba, last of the Ankohl, and after that of how she acts now that Briggs is back.

References fdScriptGetFlag(), fdScriptSetFlag(), fdScriptShowMessage(), scFieldScriptSetMessageId() and Sint32.

Referenced by ChampaCuesOnceBriggsSailed.

Definition at line 444 of file champa.c.

scChampaAskIfSailorsAreWellLiked

void scChampaAskIfSailorsAreWellLiked(Sint32 actor)

Talking to the sailor who asks "The Champa sailors aren't...well liked outside of here, are we?", and hearing his answer to the yes or the no.

References fdScriptOpenMessage(), fdScriptShowMessage(), scFieldPartyGetLeaderActor(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptSetMessageId(), scFieldScriptWait() and Sint32.

Referenced by ChampaCues.

Definition at line 462 of file champa.c.

scChampaTakeFeizhisGift

void scChampaTakeFeizhisGift(Sint32 actor)

Talking to the charm Feizhi left on the path takes it, the Golden Ring; if the party cannot carry it, it stays there for later.

References fdScriptClearFlag(), fdScriptEnd(), fdScriptPickUpItem(), fdScriptStart(), scFieldScriptEndLastingPsynergy(), Sint32 and Value3().

Referenced by ChampaCues and ChampaCuesOnceBriggsSailed.

Definition at line 488 of file champa.c.

scChampaFeizhiHoldsHerGift

void scChampaFeizhiHoldsHerGift(void)

Feizhi's gift, the Golden Ring, shown as an item on the path where she set it down, and marked as waiting to be taken.

References fdActorSetPosAndFacing(), fdScriptSetFlag() and scFieldActorShowItemIconById().

Referenced by scChampaFeizhiArrives() and scInit().

Definition at line 501 of file champa.c.

scChampaFeizhiArrives

void scChampaFeizhiArrives(void)

Walking up the path past the six gravestones (metatiles (18, 35) to (20, 35)), in a game linked with a Broken Seal save in which Hsu was rescued, brings Feizhi running up behind with "Isaac!". She takes Felix for Isaac, finds he is not, is teased by Kraden, and leaves the party the good luck charm she made for Isaac, the Golden Ring, before she goes home. In every edition but the Japanese she no longer comes once Isaac has joined the party.

References fdActorFaceDirection(), fdActorFaceDirectionAndWait(), fdActorFaceEachOther(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetPosAndFacing(), fdActorShowEmote(), fdActorWalkBy(), fdActorWalkToAndWait(), fdCameraWaitForArrival(), fdScriptEnd(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptStart(), scActorHeadToward(), scChampaFeizhiHoldsHerGift(), scFieldActorJump(), scFieldActorLaunchFromLeader(), scFieldActorWaitForMoveById(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptWait(), scScriptCameraFollowActor() and Sint32.

Referenced by ChampaCues and ChampaCuesOnceBriggsSailed.

Definition at line 515 of file champa.c.

scGetCues

const CUE *scGetCues(void)

References ChampaCues, ChampaCuesOnceBriggsSailed and fdScriptGetFlag().

Definition at line 690 of file champa.c.

scChampaCycleWaterfallPalettes

void scChampaCycleWaterfallPalettes(void)

Champa's two waterfalls flow: every other tick, the bands of blues they are drawn in, colours 1 to WATERFALL_LAST_COLOR of background palettes 3, 4 and 5, turn one place on.

References Sint32 and TickCount.

Referenced by scInit().

Definition at line 700 of file champa.c.

scInit

Sint32 scInit(void)

Sets up the village as the party enters: the waterfalls flowing, the sanctum's door shut, the tightrope strung, the sailors and Briggs as the story leaves them, and Feizhi's gift where she left it.

References fdActorGet(), fdActorSetMovementType(), fdActorSetSpriteFlags(), fdScriptGetFlag(), fdTightropeInit(), fdTightropePlace(), fdTilesetAnimationPause(), scChampaCycleWaterfallPalettes(), scChampaFeizhiHoldsHerGift(), scFieldActorSetSpritePriority(), Sint32 and sySetTickEvent().

Definition at line 725 of file champa.c.

scPrepareMap

Sint32 scPrepareMap(void)

Once Briggs has sailed, crates of the food he brought stand in the village.

References fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesLayered(), fdScriptGetFlag() and Sint32.

Definition at line 761 of file champa.c.

scChampaSpawnQuestionMark

void scChampaSpawnQuestionMark( Sint32 x, Sint32 y, Sint32 z, Sint32 angle, Sint32 ticks)

A question mark over someone's head, the emote sprite's, turned to angle, for ticks ticks.

References ChampaQuestionMarkScript, fdActorSelectAnimation(), fdActorStartScript(), scFieldActorCreate() and Sint32.

Referenced by scChampaJennaAndShebaLookPuzzled().

Definition at line 773 of file champa.c.

scChampaJennaAndShebaLookPuzzled

void scChampaJennaAndShebaLookPuzzled(Sint32 firstId, Sint32 secondId)

Jenna and Sheba, turned to each other while Kraden talks of what he has learned, puzzle at each other: a white bubble with a question mark in it, tilted towards the other, pops up over Jenna's head and then over Sheba's, twice each, each with a chime, before they both say they do not follow him. The bubble is the emote sprite's question mark, turned 22.5 degrees one way or the other.

References fdActorGet(), fdScriptPlaySound(), scChampaSpawnQuestionMark(), scFieldScriptWait() and Sint32.

Referenced by scChampaMeetAlex().

Definition at line 800 of file champa.c.

scChampaShowTwoMessages

void scChampaShowTwoMessages(Sint32 first, Sint32 firstX, Sint32 firstY, Sint32 firstPortraitX, Sint32 firstPortraitY, Sint32 second, Sint32 secondX, Sint32 secondY, Sint32 secondPortraitX, Sint32 secondPortraitY, Sint32 delay)

fdScriptShowTwoMessagesAndWait's first half, kept in the scene: two actors speak at once, the second message waiting for the first when delay is nonzero; scChampaCloseTwoMessages closes them.

References fdActorGetSpriteById(), fdSpeakerGetVoice(), mnMessageAllTyped(), mnMessageOpenWindow(), mnPortraitOpenWindow(), Sint32 and sySynch().

Referenced by scChampaMeetAlex().

Definition at line 836 of file champa.c.

scChampaCloseTwoMessages

void scChampaCloseTwoMessages(Sint32 first, Sint32 second)

Closes the two windows scChampaShowTwoMessages opened.

References fdActorGetSpriteById(), mnWindowCloseMatchingId() and Sint32.

Referenced by scChampaMeetAlex().

Definition at line 873 of file champa.c.

scChampaWalkIntoTheVillage

void scChampaWalkIntoTheVillage(void)

Walking up the path from the plank bridge into the village (metatiles (17, 40) to (22, 40)) marks the village as entered, so that Alex meets the party on the bridge on its way back out.

References syGameFlagSet().

Referenced by ChampaCues and ChampaCuesOnceBriggsSailed.

Definition at line 887 of file champa.c.

scChampaMessageOpen

static inline void scChampaMessageOpen(Sint32 speaker, Sint32 flags)

Shows the speaker's message by its actor (fdMessageShowAtActor).

References fdMessageShowAtActor() and Sint32.

Referenced by scChampaMeetAlex().

Definition at line 893 of file champa.c.

scChampaMeetAlex

void scChampaMeetAlex(void)

Walking back south onto the plank bridge out of Champa (metatile (19, 42)) the first time, after going into the village, has Alex call "I see you've caught up with me again, Felix" and come down the path to meet the party. Karst and Agatio walk up from either side to press it on to Jupiter Lighthouse, Alex tells Kraden that Lord Babi is dead, and once they have gone, Kraden's hints about what he has learned leave Jenna and Sheba demanding to be told.

References fdActorFaceDirection(), fdActorFaceDirectionAndWait(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorShowEmote(), fdActorWalkBy(), fdActorWalkByAndWait(), fdActorWalkToAndWait(), fdCameraWaitForArrival(), fdScriptEnd(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptPlaySound(), fdScriptSetFlag(), fdScriptShowMessage(), fdScriptStart(), MainRoutineStateWork, scActorHeadToward(), scChampaCloseTwoMessages(), scChampaJennaAndShebaLookPuzzled(), scChampaMessageOpen(), scChampaShowTwoMessages(), scFieldActorJump(), scFieldActorLaunchFromLeader(), scFieldActorStartRepeatedMotion(), scFieldActorWaitForMoveById(), scFieldActorWatchAndSetScript(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptShowTwoMessagesAndWait(), scFieldScriptWait(), scScriptCameraFollowActor() and Sint32.

Referenced by ChampaCues and ChampaCuesOnceBriggsSailed.

Definition at line 905 of file champa.c.

Variables in detail

ChampaActorPlacements

extern ACTOR_PLACE ChampaActorPlacements[]

ACTOR_PLACE ChampaActorPlacements[]

Champa's actors, in CHAMPA_ACTOR_ID's order.

Referenced by scGetActorPlacements().

Definition at lines 24 and 1854 of file champa.c.

ChampaActorPlacementsOnceBriggsSailed

extern ACTOR_PLACE ChampaActorPlacementsOnceBriggsSailed[]

ACTOR_PLACE ChampaActorPlacementsOnceBriggsSailed[]

Champa's actors once Briggs has sailed from Alhafra: the sailors at the mouth of his cave and Briggs too.

Referenced by scGetActorPlacements().

Definition at lines 25 and 1914 of file champa.c.

ChampaDoors

extern MAP_EDIT ChampaDoors[]

MAP_EDIT ChampaDoors[]

The doors' map edits for scChampaOpenDoorAndEnter, which does not play them: the sanctum's, then the others'. The sanctum's door opens through SANCTUM_DOOR_ANIMATION instead.

References ChampaNoDoor and ChampaSanctumDoorOpening.

Referenced by scChampaEnterDoor().

Definition at lines 26 and 1994 of file champa.c.

ChampaCues

extern CUE ChampaCues[]

CUE ChampaCues[]

Champa's exits, doors, talks, Mind Read and Psynergy.

References scChampaAskAboutAnkohlRuins(), scChampaAskIfSailorsAreWellLiked(), scChampaEnterDoor(), scChampaFeizhiArrives(), scChampaHideTreasureSpot(), scChampaMeetAlex(), scChampaRevealTreasureSpot(), scChampaTakeFeizhisGift(), scChampaTalkToPracticingBoy() and scChampaWalkIntoTheVillage().

Referenced by scGetCues().

Definition at lines 27 and 2000 of file champa.c.

ChampaCuesOnceBriggsSailed

extern CUE ChampaCuesOnceBriggsSailed[]

CUE ChampaCuesOnceBriggsSailed[]

Champa's cues once Briggs has sailed, the sailors' warning among them.

References scChampaAskAboutAnkohlRuins(), scChampaEnterDoor(), scChampaFeizhiArrives(), scChampaHideTreasureSpot(), scChampaMeetAlex(), scChampaRevealTreasureSpot(), scChampaSailorsSpotFelix(), scChampaTakeFeizhisGift(), scChampaTellOfBriggsTreasure(), scChampaTellOfObaba() and scChampaWalkIntoTheVillage().

Referenced by scGetCues().

Definition at lines 28 and 2129 of file champa.c.

ChampaNoDoor

extern Uint16 ChampaNoDoor[]

Uint16 ChampaNoDoor[]

A doorway with no door: nothing to open.

Referenced by ChampaDoors.

Definition at lines 29 and 1979 of file champa.c.

ChampaSanctumDoorOpening

extern Uint16 ChampaSanctumDoorOpening[]

Uint16 ChampaSanctumDoorOpening[]

The sanctum's door opening in two steps.

Referenced by ChampaDoors.

Definition at lines 30 and 1984 of file champa.c.

ChampaQuestionMarkScript

extern Uint32 ChampaQuestionMarkScript[]

Uint32 ChampaQuestionMarkScript[]

A question mark's script: it is released when its wait runs out.

Referenced by scChampaSpawnQuestionMark().

Definition at lines 31 and 2261 of file champa.c.

SceneEntrances

SCENE_ENTRANCE SceneEntrances[]

Referenced by scGetEntrances().

Definition at line 1800 of file champa.c.

SceneExits

Uint32 SceneExits[]

Referenced by scGetExits().

Definition at line 1805 of file champa.c.