Skip to Content
The Alchemy Project

src/scene/champa_cliff_caves.c

The caves in Champa's cliff, where the sailors and their families live, in four scenes of this overlay climbing the cliff level by level: the lowest caves, entered from the village by the mouth Briggs's sailors watch (SceneIdChampaCliffCavesLower); the homes above them (ChampaCliffCavesMiddle); the level with Obaba's door and Briggs's home (ChampaCliffCavesUpper); and at the top Obaba's forge room (ChampaCliffCavesForge). More…

Structures

NameDescription
structDOOR_EDITObaba's door opening or closing: the map edit that draws it and the metatile it plays at.
structCHAMPA_CLIFF_CAVES_STATEThe state of the fire over Obaba's forge (heap slot HEAP_SLOT_MENU): the pictures of the glow, a glowing disc, and the column of fire, their sprites at the forge's spot, and their scales, each one's height trailing its width.
structTRIDENT_PRONGSThe trident's three prongs, in the order Obaba throws them into the forge.
structFLASH_STATEscChampaCliffCavesStartFlash's explosion: its tiles, decompressed into the heap, and the sprite that shows them.

Macros

NameDescription
#defineFLAG_CHAMPA_AVIMANDER_BEATEN 0x97eSet once Avimander is beaten and Obaba has heard the truth about Briggs.
#defineFLAG_OBABA_SAW_FIRST_PRONG 0x975The party hands Obaba the prongs one by one: set as she sees the first, the second, and as she forges the three into the Trident.
#defineFLAG_OBABA_SAW_SECOND_PRONG 0x976
#defineFLAG_TRIDENT_FORGED 0x977
#defineFLAG_TRIDENT_TAKEN 0x978The Trident has been picked up from Obaba's forge.
#defineFLAG_CHAMPA_BRIGGS_STOPPED_PARTY 0x974Set as Briggs first stops the party at Avimander's room ("Hold it right there!"); on a later visit he greets them with "Back for more?".
#definePIXEL_PALETTE_ROW_MASK 0xf0A 256-colour pixel's palette row (its high four bits) and its colour in that row.
#definePIXEL_ROW_COLOR_MASK 0xf
#defineDEFINE_CHAMPA_CLIFF_CAVES_GROW (name, step)Defines an update that grows an actor by step (a 16.16 scale) a tick until it is full size.
#defineFIRE_HEIGHT_SCALE (widthScale) ((widthScale) * 31 / 40)The height the glow and the column are drawn at: 31/40 of the width they had the tick before.

Enumerations

NameDescription
enumanonymous enum { ENTRANCE_FORGE_ROOM, ENTRANCE_AFTER_DEFEAT, ENTRANCE_AFTER_A … }Where the party comes back to the Avimander's room after losing to it (fdScriptSetDefeatDestination) or beating it, the second numbered 99 as The Broken Seal's Altin Peak numbers its own; the party then stands in the forge room by its way in from the passage west of it (ENTRANCE_FORGE_ROOM, which exit 22 leads to).
enumCHAMPA_CLIFF_CAVES_METATILE_BEHAVIOR { METATILE_BEHAVIOR_OBABAS_DOOR, METATILE_BEHAVIOR_FORGE_ROOM_ … }The map metatiles the caves' step and examine cues answer: Obaba's door, whose metatile takes the number of the exit into her home, the knock at it, and the way into her forge room from the passage west of it.
enumanonymous enum { ENCOUNTER_SLOT_AVIMANDER }Avimander's battle: slot 5 of ENCOUNTER_ZONE_SERPENT, between the Serpent's and Poseidon's.
enumanonymous enum { FORGE_PALETTE, FORGE_PALE_PALETTE, FORGE_FIERY_PALETTE, FORG … }The five colours of Obaba's forge pit, from colour 2 of a background palette: dark blue as the room shows them (palette 7), and the pale ones (palette 6) and the fiery yellow to orange ones (palette 13) the map keeps for the pit to fade to.
enumanonymous enum { FORGE_PATH_METATILE_X, FORGE_PATH_METATILE_Z, FORGE_PATH_MET … }The metatile column of the path Reveal shows across Obaba's forge pit, to the Trident floating over it, and the four metatiles from its north rim it covers.
enumCHAMPA_CLIFF_CAVES_OBABAS_ROOM_ACTOR_ID { ACTOR_OBABA, ACTOR_FORGE_ROOM_SAILOR, ACTOR_HELD_ITEM, ACTOR … }Obaba's forge room (SceneIdChampaCliffCavesForge), numbering ChampaCliffCavesForgePlacementsBriggsHome; Obaba is actor 8 at her door as well (SceneIdChampaCliffCavesUpper).
enumCHAMPA_CLIFF_CAVES_BRIGGS_HOME_ACTOR_ID { ACTOR_BRIGGS_IN_BED, ACTOR_EOLEO, ACTOR_CHAUCHA_BY_THE_BED }Briggs's home once Avimander is beaten (ChampaCliffCavesUpperPlacementsAfterAvimander).
enumCHAMPA_CLIFF_CAVES_OBABAS_DOOR_ACTOR_ID { ACTOR_MAN_AT_OBABAS_DOOR }The level with Obaba's door until Briggs is home (ChampaCliffCavesUpperPlacements): Obaba behind her door, and the man outside it, "Obaba's not seeing anyone right now."
enumCHAMPA_CLIFF_CAVES_OBABAS_LEVEL_SAILOR_ACTOR_ID { ACTOR_SAILOR_GUARDING_THE_FAMILIES, ACTOR_SAILOR_SPOILING_FO … }The two sailors on Obaba's level once Briggs has fled up here (ChampaCliffCavesUpperPlacementsBriggsHome): "Leave the women and children alone." and "Did you really think you could come storming into Champa, Briggs's home, without a fight?"
enumCHAMPA_CLIFF_CAVES_LOWEST_ACTOR_ID { ACTOR_WOMAN_MISSING_HER_SWEETHEART, ACTOR_WOMAN_SCORNING_HAR … }The lowest caves' women (ChampaCliffCavesLowerPlacements), and once Avimander is beaten Briggs's crew home from the sea (ChampaCliffCavesLowerPlacementsAfterAvimander).
enumCHAMPA_CLIFF_CAVES_LOWEST_BRIGGS_HOME_ACTOR_ID { ACTOR_SAILOR_CALLING_FELIX_A_BULLY, ACTOR_SAILOR_WHO_SURREND … }The lowest caves once Briggs has fled up here (ChampaCliffCavesLowerPlacementsBriggsHome).
enumCHAMPA_CLIFF_CAVES_HOMES_ACTOR_ID { ACTOR_MAN_KEEPING_WATCH, ACTOR_SAILORS_WIFE, ACTOR_SAILORS_S … }The homes above the lowest caves (ChampaCliffCavesMiddlePlacements): a sailor's family and the man Briggs left on watch; once Briggs has fled up here two of his sailors are there instead of the watchman and the wife (ChampaCliffCavesMiddlePlacementsBriggsHome).
enumanonymous enum { GLOW_DONE }The state the forge fire's steps end on.
enumanonymous enum { GLOW_PICTURE_ROW, GLOW_CYCLED_ROW, GLOW_COLORS, GLOW_GREEN_M … }The forge fire's pictures are shaded in colours 224 to 255.
enumanonymous enum { FLASH_PALETTE, FLASH_PICTURE_TILES }The explosion's sprite palette, and the tiles of each of its 16 by 16 pictures.

Functions

NameDescription
voidscChampaCliffCavesOpenDoorAndEnter (const DOOR_EDIT *edit, Sint32 door, Sint32 mode)Walking into a door in the cliff caves: it opens with a sound, Felix walks through (lined up on the door first when mode is 0, straight on when 1) and the screen goes to the room behind it.
voidscChampaCliffCavesAskIfBriggsLearned (void)Coming to after losing to Avimander, in the forge room: Briggs asks Felix whether he has learned his lesson, Obaba scolds, and the party is sent back down the passage.
voidscChampaCliffCavesObabaMournsSalamander (void)After the party beats Avimander, in the forge room: Obaba mourns her salamander ("My salamander!
voidscChampaCliffCavesHandPieceToObaba (Sint32 value)Felix walks up to Obaba's counter, holds the prong up over it, leaves it there and steps back.
voidscChampaCliffCavesObabaStepsForward (Sint32 mode)Obaba steps up to her counter and takes the prong from it, and unless she is to forge it at once steps back.
voidscChampaCliffCavesFlareAndDieDown (void)The forge's last flare: the column flares to twice its size, then it and the glow die away and the fire's state is released.
voidscChampaCliffCavesObabaSeesAWeapon (Sint32 item)Obaba is handed the first prong: she knows it for part of the trident of Ankohl and offers to keep it until the party brings the other two.
voidscChampaCliffCavesObabaAsksForSecondPiece (Sint32 item)Obaba is handed the second prong and keeps it with the first.
voidscChampaCliffCavesStartFlash (Sint32 id, Sint32 mode)Someone or something vanishes in a burst: it spins (mode 0) or not, is hidden, and the burst plays over it, twice the size in mode 1; then it is taken off the map.
voidscChampaCliffCavesLoadGlow (void)Loads the forge's glow, a glowing disc, into the fire's state, its picture moved onto the colours the fire cycles, and sets its sprite at no size.
voidscChampaCliffCavesDrawForgeFire (void)Each tick while Obaba's forge burns, its fire shimmers and pulses: the fire's 32 colours ripple through waves of green and blue, a 32nd of a turn apart (the first sixteen onto colours 111 down to 96, the rest onto 239 down to 224); the glow's and the column's sprites are placed at the fire's spot at their sizes; and each one's height is set to trail its width (FIRE_HEIGHT_SCALE).
voidscChampaCliffCavesLoadColumn (void)Loads the forge's column of fire into the fire's state as scChampaCliffCavesLoadGlow loads the glow.
DEFINE_CHAMPA_CLIFF_CAVES_GROW(ChampaCliffCavesGrowThrown , toFIXED(1) / 16)Each tick the Trident, thrown up from the rising column, grows by a sixteenth of its size until it is full size.
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.
voidscChampaCliffCavesEnterDoor (Sint32 door)Walking north into Obaba's door (metatile (11, 26)) once Avimander is beaten opens it, and Felix walks into the home behind it, where Briggs lies in bed.
voidscChampaCliffCavesObabaAsksForBriggs (void)Walking into or knocking at Obaba's door, at the west end of its passage (metatiles (11, 25) and (11, 26)), before Avimander is beaten: Felix steps up beside it and she opens it, asks "Has my grandson returned?
voidscChampaCliffCavesAskToComeIn (Sint32 actor)Talking to the woman standing in the doorway of her home at the west end of the lowest caves, once Briggs is back: "What, you want to come in?" A yes gets "As if!
voidscChampaCliffCavesSailorSurrenders (Sint32 actorId)Talking to the second of the two sailors on the east side of the lowest caves, once Briggs is back: he gives in ("I'll go back to Alhafra...but only if Briggs is going") and keeps his eyes on Felix.
voidscChampaCliffCavesSailorTurnsAway (Sint32 actor)Talking to the sailor in Obaba's forge room, once Briggs is back: "Aw, come on!
voidscChampaCliffCavesRevealPath (void)Reveal in Obaba's forge room shows a path hidden across the forge pit, north to the forged Trident floating over it.
voidscChampaCliffCavesHidePath (void)When Reveal wears off, the pit's own metatiles cover the path again, and a leader standing on it is set down on the pit's south rim.
voidscChampaCliffCavesPickUpTrident (Sint32 a)Talking to the forged Trident floating over Obaba's forge pit, reached by the path Reveal shows, takes it.
const CUE *scGetCues (void)The scene's cues: the rooms of names' for any entrance above ENTRANCE_NAMES_ABOVE, else the debug room's.
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.
voidscChampaCliffCavesFadeColors (Uint16 *from, Uint16 *to, Sint32 ticks)The forge pit's glow changes colour, its five colours fading from one set to another over the given number of ticks, a step a tick.
voidscChampaCliffCavesObabaForgesTrident (Sint32 value)Obaba is handed the last prong and throws the three into her forge, whose pit flashes pale at each, then flares, shakes the room and lifts out the Trident to float over it.
voidscChampaCliffCavesObabaOffersHelp (Sint32 actor)Talking to Obaba at her counter: she takes the next prong the party carries, right, left then center, or talks of the trident when it has none.
DEFINE_CHAMPA_CLIFF_CAVES_GROW(ChampaCliffCavesGrowThrownSlowly , toFIXED(3) / 64)Each tick Avimander, leaping out of the forge's fire, grows by three sixty- fourths of its size, from a quarter to full size.
voidscChampaCliffCavesFightAvimander (void)Walking east into Obaba's forge room from the passage (metatiles (36, 12) to (36, 18)) once Briggs has fled up here: "Hold it right there!" Briggs stops the party, and Obaba, for her great-grandson Eoleo's sake, tells Felix he had better leave; if he will not, she throws her salamander into the forge, whose pit turns fiery, and it climbs out grown into Avimander to fight.
voidscChampaCliffCavesStartForgeFire (const Sint32 *pos)The forge's fire at a spot: the glow grows, holds, and the column rises through it, while the room shakes.
voidscChampaCliffCavesPutOutForgeFire (void)Unused: puts out the forge's fire: the column and then the glow shrink away and the fire's state is released.
voidscChampaCliffCavesLightForge (const VECTOR3 *origin)The forge lights at a spot: the glow alone grows to full size.
voidscChampaCliffCavesRaiseColumn (void)The column of fire rises through the glow already burning.

Variables

NameDescription
extern LATE_DATADOOR_EDITObaba's door opening or closing: the map edit that draws it and the metatile it plays at.
extern ACTOR_PLACEChampaCliffCavesLowerPlacements []
extern ACTOR_PLACEChampaCliffCavesMiddlePlacements []
extern ACTOR_PLACEChampaCliffCavesLowerPlacementsBriggsHome []
extern ACTOR_PLACEChampaCliffCavesMiddlePlacementsBriggsHome []
extern ACTOR_PLACEChampaCliffCavesUpperPlacementsBriggsHome []
extern ACTOR_PLACEChampaCliffCavesLowerPlacementsAfterAvimander []
extern ACTOR_PLACEChampaCliffCavesMiddlePlacementsAfterAvimander []
extern ACTOR_PLACEChampaCliffCavesUpperPlacementsAfterAvimander []
extern CUEChampaCliffCavesMiddleCues []
extern CUEChampaCliffCavesUpperCues []
extern CUEChampaCliffCavesForgeCues []
extern Sint16ChampaCliffCavesOpenDoorFrames []Obaba's door opening and closing, as MAP_EDIT_STEP_ROW rows: two steps of six ticks each.
extern Sint16ChampaCliffCavesCloseDoorFrames []
extern ACTOR_PLACEChampaCliffCavesUpperPlacements []
extern ACTOR_PLACEChampaCliffCavesForgePlacements []
extern ACTOR_PLACEChampaCliffCavesForgePlacementsBriggsHome []
extern ACTOR_PLACEChampaCliffCavesForgePlacementsAfterAvimander []
extern CUEChampaCliffCavesLowerCues []
extern TRIDENT_PRONGSChampaCliffCavesProngsThe three prongs Obaba throws into her forge, in turn.
extern Uint32ChampaCliffCavesChaseToNorthScript []Obaba chasing Briggs round her forge: the four quarters of the way round, each walked to its end.
extern Uint32ChampaCliffCavesChaseToEastScript []
extern Uint32ChampaCliffCavesChaseToWestScript []
extern Uint32ChampaCliffCavesChaseToSouthScript []
LATE_DATA 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.
LATE_DATA Uint32SceneExits []The room has no exits of its own.
LATE_DATA DOOR_EDITChampaCliffCavesOpenDoorObaba's door opening and closing.
LATE_DATA DOOR_EDITChampaCliffCavesCloseDoor

Description

The caves in Champa's cliff, where the sailors and their families live, in four scenes of this overlay climbing the cliff level by level: the lowest caves, entered from the village by the mouth Briggs's sailors watch (SceneIdChampaCliffCavesLower); the homes above them (ChampaCliffCavesMiddle); the level with Obaba's door and Briggs's home (ChampaCliffCavesUpper); and at the top Obaba's forge room (ChampaCliffCavesForge). Before Briggs is home, knocking at Obaba's door only brings her out to ask after her grandson (scChampaCliffCavesObabaAsksForBriggs). Once he has fled up here from Felix, walking into the forge room finds Briggs with her, and she throws her salamander into the forge to come out as Avimander (scChampaCliffCavesFightAvimander). Beaten, she hears what Briggs has done (scChampaCliffCavesObabaMournsSalamander), and afterwards forges the three prongs the party brings her into the Trident of Ankohl (scChampaCliffCavesObabaForgesTrident), which Reveal's path across the pit reaches (scChampaCliffCavesRevealPath).

Macros in detail

FLAG_CHAMPA_AVIMANDER_BEATEN

#define FLAG_CHAMPA_AVIMANDER_BEATEN 0x97e

Set once Avimander is beaten and Obaba has heard the truth about Briggs.

Referenced by ChampaCliffCavesForgeCues, ChampaCliffCavesLowerCues, ChampaCliffCavesMiddleCues, ChampaCliffCavesUpperCues, scChampaCliffCavesFightAvimander(), scChampaCliffCavesObabaMournsSalamander(), scGetActorPlacements() and scInit().

Definition at line 24 of file champa_cliff_caves.c.

FLAG_OBABA_SAW_FIRST_PRONG

#define FLAG_OBABA_SAW_FIRST_PRONG 0x975

The party hands Obaba the prongs one by one: set as she sees the first, the second, and as she forges the three into the Trident.

Referenced by ChampaCliffCavesForgeCues and scChampaCliffCavesObabaOffersHelp().

Definition at line 27 of file champa_cliff_caves.c.

FLAG_OBABA_SAW_SECOND_PRONG

#define FLAG_OBABA_SAW_SECOND_PRONG 0x976

Referenced by ChampaCliffCavesForgeCues and scChampaCliffCavesObabaOffersHelp().

Definition at line 28 of file champa_cliff_caves.c.

FLAG_TRIDENT_FORGED

#define FLAG_TRIDENT_FORGED 0x977

Referenced by ChampaCliffCavesForgeCues, scChampaCliffCavesObabaOffersHelp() and scInit().

Definition at line 29 of file champa_cliff_caves.c.

FLAG_TRIDENT_TAKEN

#define FLAG_TRIDENT_TAKEN 0x978

The Trident has been picked up from Obaba's forge.

Referenced by scChampaCliffCavesPickUpTrident() and scInit().

Definition at line 31 of file champa_cliff_caves.c.

FLAG_CHAMPA_BRIGGS_STOPPED_PARTY

#define FLAG_CHAMPA_BRIGGS_STOPPED_PARTY 0x974

Set as Briggs first stops the party at Avimander's room ("Hold it right there!"); on a later visit he greets them with "Back for more?".

Referenced by scChampaCliffCavesFightAvimander().

Definition at line 34 of file champa_cliff_caves.c.

PIXEL_PALETTE_ROW_MASK

#define PIXEL_PALETTE_ROW_MASK 0xf0

A 256-colour pixel's palette row (its high four bits) and its colour in that row.

Referenced by scChampaCliffCavesLoadColumn() and scChampaCliffCavesLoadGlow().

Definition at line 295 of file champa_cliff_caves.c.

PIXEL_ROW_COLOR_MASK

#define PIXEL_ROW_COLOR_MASK 0xf

Referenced by scChampaCliffCavesLoadColumn() and scChampaCliffCavesLoadGlow().

Definition at line 296 of file champa_cliff_caves.c.

DEFINE_CHAMPA_CLIFF_CAVES_GROW

#define DEFINE_CHAMPA_CLIFF_CAVES_GROW(name, step)

Defines an update that grows an actor by step (a 16.16 scale) a tick until it is full size.

Definition at line 307 of file champa_cliff_caves.c.

FIRE_HEIGHT_SCALE

#define FIRE_HEIGHT_SCALE(widthScale) ((widthScale) * 31 / 40)

The height the glow and the column are drawn at: 31/40 of the width they had the tick before.

Referenced by scChampaCliffCavesDrawForgeFire().

Definition at line 2124 of file champa_cliff_caves.c.

Enumerations in detail

anonymous enum

enum { ENTRANCE_FORGE_ROOM, ENTRANCE_AFTER_DEFEAT, ENTRANCE_AFTER_AVIMANDER_BATTLE }

Where the party comes back to the Avimander's room after losing to it (fdScriptSetDefeatDestination) or beating it, the second numbered 99 as The Broken Seal's Altin Peak numbers its own; the party then stands in the forge room by its way in from the passage west of it (ENTRANCE_FORGE_ROOM, which exit 22 leads to).

EnumeratorValueDescription
ENTRANCE_FORGE_ROOM23
ENTRANCE_AFTER_DEFEAT98
ENTRANCE_AFTER_AVIMANDER_BATTLE99

Definition at line 41 of file champa_cliff_caves.c.

CHAMPA_CLIFF_CAVES_METATILE_BEHAVIOR

enum CHAMPA_CLIFF_CAVES_METATILE_BEHAVIOR

The map metatiles the caves' step and examine cues answer: Obaba's door, whose metatile takes the number of the exit into her home, the knock at it, and the way into her forge room from the passage west of it.

EnumeratorValueDescription
METATILE_BEHAVIOR_OBABAS_DOOR15
METATILE_BEHAVIOR_FORGE_ROOM_WAY_IN30
METATILE_BEHAVIOR_KNOCK_AT_OBABAS_DOOR40

Definition at line 51 of file champa_cliff_caves.c.

anonymous enum

enum { ENCOUNTER_SLOT_AVIMANDER }

Avimander's battle: slot 5 of ENCOUNTER_ZONE_SERPENT, between the Serpent's and Poseidon's.

EnumeratorValueDescription
ENCOUNTER_SLOT_AVIMANDER5

Definition at line 60 of file champa_cliff_caves.c.

anonymous enum

enum { FORGE_PALETTE, FORGE_PALE_PALETTE, FORGE_FIERY_PALETTE, FORGE_FIRST_COLOR, … }

The five colours of Obaba's forge pit, from colour 2 of a background palette: dark blue as the room shows them (palette 7), and the pale ones (palette 6) and the fiery yellow to orange ones (palette 13) the map keeps for the pit to fade to.

EnumeratorValueDescription
FORGE_PALETTE7
FORGE_PALE_PALETTE6
FORGE_FIERY_PALETTE13
FORGE_FIRST_COLOR2
FORGE_COLORS5

Definition at line 69 of file champa_cliff_caves.c.

anonymous enum

enum { FORGE_PATH_METATILE_X, FORGE_PATH_METATILE_Z, FORGE_PATH_METATILES }

The metatile column of the path Reveal shows across Obaba's forge pit, to the Trident floating over it, and the four metatiles from its north rim it covers.

EnumeratorValueDescription
FORGE_PATH_METATILE_X41
FORGE_PATH_METATILE_Z13
FORGE_PATH_METATILES4

Definition at line 81 of file champa_cliff_caves.c.

CHAMPA_CLIFF_CAVES_OBABAS_ROOM_ACTOR_ID

enum CHAMPA_CLIFF_CAVES_OBABAS_ROOM_ACTOR_ID

Obaba's forge room (SceneIdChampaCliffCavesForge), numbering ChampaCliffCavesForgePlacementsBriggsHome; Obaba is actor 8 at her door as well (SceneIdChampaCliffCavesUpper).

EnumeratorValueDescription
ACTOR_OBABAACTOR_FIRST_PLACED
ACTOR_FORGE_ROOM_SAILORThe sailor across the room from the forge: "That pit is Obaba's forge." Once Briggs is back he turns his back on the party (scChampaCliffCavesSailorTurnsAway).
ACTOR_HELD_ITEMThe prong or the Trident shown as an item icon
ACTOR_BRIGGSin Obaba's hands, and the forged Trident floating over the forge.
ACTOR_SALAMANDERObaba's salamander, which she throws into her forge.
ACTOR_AVIMANDERThe salamander grown into Avimander.
ACTOR_CHAUCHA
ACTOR_KRADEN

Definition at line 91 of file champa_cliff_caves.c.

CHAMPA_CLIFF_CAVES_BRIGGS_HOME_ACTOR_ID

enum CHAMPA_CLIFF_CAVES_BRIGGS_HOME_ACTOR_ID

Briggs's home once Avimander is beaten (ChampaCliffCavesUpperPlacementsAfterAvimander).

EnumeratorValueDescription
ACTOR_BRIGGS_IN_BEDACTOR_FIRST_PLACEDBriggs, lying in bed: "Once I'm over my cold, I'm setting out to get more jewels and make amends with Madra and Daila."
ACTOR_EOLEOACTOR_FIRST_PLACED + 2Eoleo, "Babu ba bubabu...",
ACTOR_CHAUCHA_BY_THE_BEDand Chaucha by the bed: "I wonder what's wrong with Briggs."

Definition at line 112 of file champa_cliff_caves.c.

CHAMPA_CLIFF_CAVES_OBABAS_DOOR_ACTOR_ID

enum CHAMPA_CLIFF_CAVES_OBABAS_DOOR_ACTOR_ID

The level with Obaba's door until Briggs is home (ChampaCliffCavesUpperPlacements): Obaba behind her door, and the man outside it, "Obaba's not seeing anyone right now."

EnumeratorValueDescription
ACTOR_MAN_AT_OBABAS_DOORACTOR_FIRST_PLACED + 1

Definition at line 129 of file champa_cliff_caves.c.

CHAMPA_CLIFF_CAVES_OBABAS_LEVEL_SAILOR_ACTOR_ID

enum CHAMPA_CLIFF_CAVES_OBABAS_LEVEL_SAILOR_ACTOR_ID

The two sailors on Obaba's level once Briggs has fled up here (ChampaCliffCavesUpperPlacementsBriggsHome): "Leave the women and children alone." and "Did you really think you could come storming into Champa, Briggs's home, without a fight?"

EnumeratorValueDescription
ACTOR_SAILOR_GUARDING_THE_FAMILIESACTOR_FIRST_PLACED
ACTOR_SAILOR_SPOILING_FOR_A_FIGHT

Definition at line 138 of file champa_cliff_caves.c.

CHAMPA_CLIFF_CAVES_LOWEST_ACTOR_ID

enum CHAMPA_CLIFF_CAVES_LOWEST_ACTOR_ID

The lowest caves' women (ChampaCliffCavesLowerPlacements), and once Avimander is beaten Briggs's crew home from the sea (ChampaCliffCavesLowerPlacementsAfterAvimander).

EnumeratorValueDescription
ACTOR_WOMAN_MISSING_HER_SWEETHEARTACTOR_FIRST_PLACED"All of our men went to sea with Briggs, even my sweetheart!"
ACTOR_WOMAN_SCORNING_HARBOR_SAILORS"The Champa sailors who don't live in the cliffs are no better than cowards."
ACTOR_SAILOR_WAITING_FOR_BRIGGS"We're going to wait until Briggs feels better before we go out to sea again."
ACTOR_SAILOR_ON_THE_ISLAND_TREASURE"There were plenty of treasures on that island in the middle of the sea."
ACTOR_SAILOR_WANTING_AMENDS"We really want to make amends."
ACTOR_SAILOR_WHO_HIT_THE_SWITCH"It's all my fault. If I hadn't messed with that switch, we'd have gotten everything."

Definition at line 147 of file champa_cliff_caves.c.

CHAMPA_CLIFF_CAVES_LOWEST_BRIGGS_HOME_ACTOR_ID

enum CHAMPA_CLIFF_CAVES_LOWEST_BRIGGS_HOME_ACTOR_ID

The lowest caves once Briggs has fled up here (ChampaCliffCavesLowerPlacementsBriggsHome).

EnumeratorValueDescription
ACTOR_SAILOR_CALLING_FELIX_A_BULLYACTOR_FIRST_PLACED"Why do you have to be so stubborn? Quit following us, you big bully!"
ACTOR_SAILOR_WHO_SURRENDERSThe sailor who gives in (scChampaCliffCavesSailorSurrenders).
ACTOR_WOMAN_IN_HER_DOORWAYThe woman in her doorway (scChampaCliffCavesAskToComeIn).

Definition at line 169 of file champa_cliff_caves.c.

CHAMPA_CLIFF_CAVES_HOMES_ACTOR_ID

enum CHAMPA_CLIFF_CAVES_HOMES_ACTOR_ID

The homes above the lowest caves (ChampaCliffCavesMiddlePlacements): a sailor's family and the man Briggs left on watch; once Briggs has fled up here two of his sailors are there instead of the watchman and the wife (ChampaCliffCavesMiddlePlacementsBriggsHome).

EnumeratorValueDescription
ACTOR_MAN_KEEPING_WATCHACTOR_FIRST_PLACED"Before he left, Briggs ordered me to keep watch in his absence."
ACTOR_SAILORS_WIFE"My husband wants our children to be sailors like him, but I simply won't have it."
ACTOR_SAILORS_SON"Someday, I want to be a sailor, like my father before me."
ACTOR_SAILORS_DAUGHTER"Mom's had it pretty rough. I hope I meet a sailor with a future..."
ACTOR_SAILOR_RATHER_FIGHTINGACTOR_MAN_KEEPING_WATCH"I'd rather fight than go back to jail. Bring it on, sissyboy!"
ACTOR_SAILOR_WHO_KNOWS_FELIXACTOR_SAILORS_WIFE"You're Felix, aren't you? You've come to bring in Briggs, haven't you?"

Definition at line 184 of file champa_cliff_caves.c.

anonymous enum

enum { GLOW_DONE }

The state the forge fire's steps end on.

EnumeratorValueDescription
GLOW_DONE999

Definition at line 275 of file champa_cliff_caves.c.

anonymous enum

enum { GLOW_PICTURE_ROW, GLOW_CYCLED_ROW, GLOW_COLORS, GLOW_GREEN_MIDDLE, … }

The forge fire's pictures are shaded in colours 224 to 255. Their brightest sixteen, of sprite palette 15, are moved onto palette 6, so that with palette 14's they are the 32 colours scChampaCliffCavesDrawForgeFire cycles, at levels about these middles: full red, green 20 and blue 3.

EnumeratorValueDescription
GLOW_PICTURE_ROW15
GLOW_CYCLED_ROW6
GLOW_COLORS2 * PALETTE_COLORS
GLOW_GREEN_MIDDLE20
GLOW_BLUE_MIDDLE3

Definition at line 284 of file champa_cliff_caves.c.

anonymous enum

enum { FLASH_PALETTE, FLASH_PICTURE_TILES }

The explosion's sprite palette, and the tiles of each of its 16 by 16 pictures.

EnumeratorValueDescription
FLASH_PALETTE15
FLASH_PICTURE_TILES16 * 16 / 64

Definition at line 1972 of file champa_cliff_caves.c.

Functions in detail

scChampaCliffCavesOpenDoorAndEnter

void scChampaCliffCavesOpenDoorAndEnter(const DOOR_EDIT *edit, Sint32 door, Sint32 mode)

Walking into a door in the cliff caves: it opens with a sound, Felix walks through (lined up on the door first when mode is 0, straight on when 1) and the screen goes to the room behind it.

References fdActorCenterAndWalk(), fdActorGetById(), fdActorSetAnimationById(), fdActorSetDestinationOffset(), fdMapGridPlayMapEdit(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptFinishScreenTransition(), fdScriptStart(), fdScriptWait(), fdScriptWaitTransitionTicks(), MainRoutineStateWork, Sint32, syImportScriptSetExitRequest() and sySoundPlay().

Referenced by scChampaCliffCavesEnterDoor().

Definition at lines 228 and 392 of file champa_cliff_caves.c.

scChampaCliffCavesAskIfBriggsLearned

void scChampaCliffCavesAskIfBriggsLearned(void)

Coming to after losing to Avimander, in the forge room: Briggs asks Felix whether he has learned his lesson, Obaba scolds, and the party is sent back down the passage.

References fdActorFaceDirection(), fdActorSetAnimationAndWait(), fdActorSetAnimationById(), fdActorShowEmoteById(), fdCameraFollowActor(), fdScriptEndLastingPsynergy(), fdScriptFinishScreenTransition(), fdScriptSetDestination(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), MainRoutineStateWork and Sint32.

Referenced by scInit().

Definition at lines 244 and 1340 of file champa_cliff_caves.c.

scChampaCliffCavesObabaMournsSalamander

void scChampaCliffCavesObabaMournsSalamander(void)

After the party beats Avimander, in the forge room: Obaba mourns her salamander ("My salamander! You... beat my salamander...") and leaves Briggs to fight for himself, the party tells her he is a pirate, Chaucha comes to tell why he did it, and Briggs and Chaucha go home (FLAG_CHAMPA_AVIMANDER_BEATEN).

References ChampaCliffCavesChaseToEastScript, ChampaCliffCavesChaseToNorthScript, ChampaCliffCavesChaseToSouthScript, ChampaCliffCavesChaseToWestScript, fdActorFaceDirection(), fdActorFaceDirectionAndRefreshById(), fdActorFaceDirectionAndWait(), fdActorFaceDirectionById(), fdActorGetById(), fdActorJump(), fdActorRunRepeatedMotion(), fdActorSetAnimationAndWait(), fdActorSetAnimationById(), fdActorSetAttachedEffect(), fdActorSetDestinationById(), fdActorSetMovementTypeById(), fdActorSetSpritePriority(), fdActorShowEmoteById(), fdActorStartRepeatedMotion(), fdActorStop(), fdActorWaitForMoveById(), fdActorWaitForScriptEndById(), fdActorWalkBy(), fdActorWalkByAndWait(), fdActorWalkByAndWaitById(), fdActorWalkByById(), fdActorWalkToAndWait(), fdActorWalkToById(), fdActorWatchAndSetScript(), fdCameraWaitForArrival(), fdEffectSetAttached(), fdMessageShowAtActor(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), MainRoutineStateWork, scChampaCliffCavesStartFlash(), scFieldActorLaunchFromLeader(), scFieldActorShowEmote(), scFieldScriptShowMessageThenWait(), Sint32 and syGameFlagSet().

Referenced by scInit().

Definition at lines 245 and 1385 of file champa_cliff_caves.c.

scChampaCliffCavesHandPieceToObaba

void scChampaCliffCavesHandPieceToObaba(Sint32 value)

void scChampaCliffCavesHandPieceToObaba(Sint32 actor)

Felix walks up to Obaba's counter, holds the prong up over it, leaves it there and steps back.

References fdActorFaceDirectionAndRefreshById(), fdActorGetById(), fdActorSetAnimationAndWait(), fdActorShowItemIconById(), fdActorWalkByAndWaitById(), fdActorWalkToAndWaitById(), fdScriptWait(), MainRoutineStateWork and Sint32.

Referenced by scChampaCliffCavesObabaAsksForSecondPiece(), scChampaCliffCavesObabaForgesTrident() and scChampaCliffCavesObabaSeesAWeapon().

Definition at lines 246 and 639 of file champa_cliff_caves.c.

scChampaCliffCavesObabaStepsForward

void scChampaCliffCavesObabaStepsForward(Sint32 mode)

void scChampaCliffCavesObabaStepsForward(Sint32 value)

Obaba steps up to her counter and takes the prong from it, and unless she is to forge it at once steps back.

References fdActorGetById(), fdActorSetAnimationById(), fdActorWalkByAndWait(), fdActorWalkByAndWaitById(), fdScriptWait() and Sint32.

Referenced by scChampaCliffCavesObabaAsksForSecondPiece(), scChampaCliffCavesObabaForgesTrident() and scChampaCliffCavesObabaSeesAWeapon().

Definition at lines 247 and 663 of file champa_cliff_caves.c.

scChampaCliffCavesFlareAndDieDown

void scChampaCliffCavesFlareAndDieDown(void)

The forge's last flare: the column flares to twice its size, then it and the glow die away and the fire's state is released.

References scChampaCliffCavesDrawForgeFire(), Sint32, syCloseEvent(), syHeapSlotRelease(), sySynch() and syVRAMCacheFreeEntry().

Referenced by scChampaCliffCavesObabaForgesTrident().

Definition at lines 249 and 2370 of file champa_cliff_caves.c.

scChampaCliffCavesObabaSeesAWeapon

void scChampaCliffCavesObabaSeesAWeapon(Sint32 item)

void scChampaCliffCavesObabaSeesAWeapon(Sint32 actor)

Obaba is handed the first prong: she knows it for part of the trident of Ankohl and offers to keep it until the party brings the other two.

References fdActorFaceDirectionAndRefreshById(), fdActorFaceDirectionAndWait(), fdActorRunRepeatedMotion(), fdActorSetAnimationAndWait(), fdActorSetAnimationById(), fdActorShowEmoteById(), fdMessageShowAtActor(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptWait(), scChampaCliffCavesHandPieceToObaba(), scChampaCliffCavesObabaStepsForward() and Sint32.

Referenced by scChampaCliffCavesObabaOffersHelp().

Definition at lines 250 and 725 of file champa_cliff_caves.c.

scChampaCliffCavesObabaAsksForSecondPiece

void scChampaCliffCavesObabaAsksForSecondPiece(Sint32 item)

void scChampaCliffCavesObabaAsksForSecondPiece(Sint32 actor)

Obaba is handed the second prong and keeps it with the first.

References fdActorFaceDirectionAndRefreshById(), fdActorFaceDirectionAndWait(), fdActorSetAnimationById(), fdActorShowEmoteById(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptWait(), scChampaCliffCavesHandPieceToObaba(), scChampaCliffCavesObabaStepsForward() and Sint32.

Referenced by scChampaCliffCavesObabaOffersHelp().

Definition at lines 251 and 787 of file champa_cliff_caves.c.

scChampaCliffCavesStartFlash

void scChampaCliffCavesStartFlash(Sint32 id, Sint32 mode)

Someone or something vanishes in a burst: it spins (mode 0) or not, is hidden, and the burst plays over it, twice the size in mode 1; then it is taken off the map.

References fdActorGetById(), fdActorSetSpriteFlags(), fdCameraWorldToScreen(), fdEffectSpriteDraw(), FieldExplosionPalette, mnVRAMLoad(), scFieldEffectSpriteInit(), Sint32, syDecompressTaggedLZ(), syDMAXCopy(), syHeapSlotAllocate(), syHeapSlotRelease(), syResourceGetTableEntry(), sySoundPlay(), sySynch(), syVRAMCacheFindFreeEntry() and syVRAMCacheFreeEntry().

Referenced by scChampaCliffCavesObabaMournsSalamander().

Definition at lines 252 and 1981 of file champa_cliff_caves.c.

scChampaCliffCavesLoadGlow

void scChampaCliffCavesLoadGlow(void)

Loads the forge's glow, a glowing disc, into the fire's state, its picture moved onto the colours the fire cycles, and sets its sprite at no size.

References scFieldEffectSpriteInit(), Sint32, syDecompressTaggedLZ(), syResourceGetTableEntry(), syVRAMCacheFindFreeEntry() and syVRAMCacheLoad().

Referenced by scChampaCliffCavesLightForge() and scChampaCliffCavesStartForgeFire().

Definition at lines 298 and 2056 of file champa_cliff_caves.c.

scChampaCliffCavesDrawForgeFire

void scChampaCliffCavesDrawForgeFire(void)

Each tick while Obaba's forge burns, its fire shimmers and pulses: the fire's 32 colours ripple through waves of green and blue, a 32nd of a turn apart (the first sixteen onto colours 111 down to 96, the rest onto 239 down to 224); the glow's and the column's sprites are placed at the fire's spot at their sizes; and each one's height is set to trail its width (FIRE_HEIGHT_SCALE).

References fdCameraWorldToScreen(), fdEffectSpriteDraw(), Sint32 and sySin().

Referenced by scChampaCliffCavesFlareAndDieDown(), scChampaCliffCavesLightForge(), scChampaCliffCavesPutOutForgeFire(), scChampaCliffCavesRaiseColumn() and scChampaCliffCavesStartForgeFire().

Definition at lines 299 and 2132 of file champa_cliff_caves.c.

scChampaCliffCavesLoadColumn

void scChampaCliffCavesLoadColumn(void)

Loads the forge's column of fire into the fire's state as scChampaCliffCavesLoadGlow loads the glow.

References scFieldEffectSpriteInit(), Sint32, syDecompressTaggedLZ(), syResourceGetTableEntry(), syVRAMCacheFindFreeEntry() and syVRAMCacheLoad().

Referenced by scChampaCliffCavesRaiseColumn() and scChampaCliffCavesStartForgeFire().

Definition at lines 300 and 2090 of file champa_cliff_caves.c.

ChampaCliffCavesGrowThrown

DEFINE_CHAMPA_CLIFF_CAVES_GROW(ChampaCliffCavesGrowThrown, toFIXED(1) / 16)

Each tick the Trident, thrown up from the rising column, grows by a sixteenth of its size until it is full size.

Referenced by scChampaCliffCavesObabaForgesTrident().

Definition at line 321 of file champa_cliff_caves.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References SceneEntrances.

Definition at line 323 of file champa_cliff_caves.c.

scGetExitRegions

const SCENE_REGION *scGetExitRegions(void)

Definition at line 328 of file champa_cliff_caves.c.

scGetExits

const Uint32 *scGetExits(void)

References SceneExits.

Definition at line 333 of file champa_cliff_caves.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

References ChampaCliffCavesForgePlacements, ChampaCliffCavesForgePlacementsAfterAvimander, ChampaCliffCavesForgePlacementsBriggsHome, ChampaCliffCavesLowerPlacements, ChampaCliffCavesLowerPlacementsAfterAvimander, ChampaCliffCavesLowerPlacementsBriggsHome, ChampaCliffCavesMiddlePlacements, ChampaCliffCavesMiddlePlacementsAfterAvimander, ChampaCliffCavesMiddlePlacementsBriggsHome, ChampaCliffCavesUpperPlacements, ChampaCliffCavesUpperPlacementsAfterAvimander, ChampaCliffCavesUpperPlacementsBriggsHome, MainRoutineStateWork, Sint32 and syGameFlagGet().

Definition at line 343 of file champa_cliff_caves.c.

scChampaCliffCavesEnterDoor

void scChampaCliffCavesEnterDoor(Sint32 door)

Walking north into Obaba's door (metatile (11, 26)) once Avimander is beaten opens it, and Felix walks into the home behind it, where Briggs lies in bed.

References ChampaCliffCavesOpenDoor, scChampaCliffCavesOpenDoorAndEnter() and Sint32.

Referenced by ChampaCliffCavesUpperCues.

Definition at line 420 of file champa_cliff_caves.c.

scChampaCliffCavesObabaAsksForBriggs

void scChampaCliffCavesObabaAsksForBriggs(void)

Walking into or knocking at Obaba's door, at the west end of its passage (metatiles (11, 25) and (11, 26)), before Avimander is beaten: Felix steps up beside it and she opens it, asks "Has my grandson returned? Has my Briggs come home?", answers the yes ("You lie!") or the no, and shuts herself in again.

References ChampaCliffCavesCloseDoor, ChampaCliffCavesOpenDoor, fdActorFaceDirectionAndRefreshById(), fdActorGetById(), fdActorWalkByAndWait(), fdActorWalkByAndWaitById(), fdActorWalkToAndWaitById(), fdMapGridPlayMapEdit(), fdMessageShowAtActor(), fdPartyGetLeaderActor(), fdScriptAskYesNoWithActorAnimation(), fdScriptSetMessageId(), fdScriptShowMessageAndWait(), fdScriptWait(), MainRoutineStateWork, Sint32 and sySoundPlay().

Referenced by ChampaCliffCavesUpperCues.

Definition at line 430 of file champa_cliff_caves.c.

scChampaCliffCavesAskToComeIn

void scChampaCliffCavesAskToComeIn(Sint32 actor)

Talking to the woman standing in the doorway of her home at the west end of the lowest caves, once Briggs is back: "What, you want to come in?" A yes gets "As if! I'm a nice girl...", a no "You're wasting my time."

References fdMessageShowAtActor(), fdPartyGetLeaderActor(), fdScriptAskYesNoWithActorAnimation(), fdScriptSetMessageId(), fdScriptShowMessageAndWait(), fdScriptWait() and Sint32.

Referenced by ChampaCliffCavesLowerCues.

Definition at line 474 of file champa_cliff_caves.c.

scChampaCliffCavesSailorSurrenders

void scChampaCliffCavesSailorSurrenders(Sint32 actorId)

Talking to the second of the two sailors on the east side of the lowest caves, once Briggs is back: he gives in ("I'll go back to Alhafra...but only if Briggs is going") and keeps his eyes on Felix.

References fdActorGetById(), fdActorWatchActor(), fdScriptSetMessageId(), fdScriptShowMessageAndWait(), MainRoutineStateWork and Sint32.

Referenced by ChampaCliffCavesLowerCues.

Definition at line 496 of file champa_cliff_caves.c.

scChampaCliffCavesSailorTurnsAway

void scChampaCliffCavesSailorTurnsAway(Sint32 actor)

Talking to the sailor in Obaba's forge room, once Briggs is back: "Aw, come on! I'm not doing anything! Leave me alone!", and he turns his back on the party, squashing and stretching from then on (MOVEMENT_TYPE_SQUASH).

References fdActorFaceDirectionAndWait(), fdActorGetById(), fdActorSetMovementType(), fdScriptSetMessageId(), fdScriptShowMessageAndWait() and Sint32.

Referenced by ChampaCliffCavesForgeCues.

Definition at line 511 of file champa_cliff_caves.c.

scChampaCliffCavesRevealPath

void scChampaCliffCavesRevealPath(void)

Reveal in Obaba's forge room shows a path hidden across the forge pit, north to the forged Trident floating over it. The path's metatiles, kept further down the map, are copied there with their behaviours.

References fdMapCopyMetatileAttributeRect() and fdMapGridCopyDrawnPicturesRect().

Referenced by ChampaCliffCavesForgeCues.

Definition at line 523 of file champa_cliff_caves.c.

scChampaCliffCavesHidePath

void scChampaCliffCavesHidePath(void)

When Reveal wears off, the pit's own metatiles cover the path again, and a leader standing on it is set down on the pit's south rim.

References fdActorGetById(), fdMapCopyMetatileAttributeRect(), fdMapGridCopyDrawnPicturesRect(), MainRoutineStateWork and Sint32.

Referenced by ChampaCliffCavesForgeCues.

Definition at line 537 of file champa_cliff_caves.c.

scChampaCliffCavesPickUpTrident

void scChampaCliffCavesPickUpTrident(Sint32 a)

Talking to the forged Trident floating over Obaba's forge pit, reached by the path Reveal shows, takes it.

References fdScriptPickUpItem() and Sint32.

Referenced by ChampaCliffCavesForgeCues.

Definition at line 566 of file champa_cliff_caves.c.

scGetCues

const CUE *scGetCues(void)

References ChampaCliffCavesForgeCues, ChampaCliffCavesLowerCues, ChampaCliffCavesMiddleCues, ChampaCliffCavesUpperCues, MainRoutineStateWork and Sint32.

Definition at line 571 of file champa_cliff_caves.c.

scInit

Sint32 scInit(void)

References fdActorGetById(), fdActorSetAnimationById(), fdActorSetSpriteFlags(), fdEffectStartBlankOverlay(), MainRoutineStateWork, scChampaCliffCavesAskIfBriggsLearned(), scChampaCliffCavesObabaMournsSalamander(), scFieldActorShowItemIconById(), Sint32 and syGameFlagGet().

Definition at line 586 of file champa_cliff_caves.c.

scPrepareMap

Sint32 scPrepareMap(void)

References Sint32.

Definition at line 632 of file champa_cliff_caves.c.

scChampaCliffCavesFadeColors

void scChampaCliffCavesFadeColors(Uint16 *from, Uint16 *to, Sint32 ticks)

The forge pit's glow changes colour, its five colours fading from one set to another over the given number of ticks, a step a tick.

References Sint32 and sySynch().

Referenced by scChampaCliffCavesFightAvimander() and scChampaCliffCavesObabaForgesTrident().

Definition at line 689 of file champa_cliff_caves.c.

scChampaCliffCavesObabaForgesTrident

void scChampaCliffCavesObabaForgesTrident(Sint32 value)

Obaba is handed the last prong and throws the three into her forge, whose pit flashes pale at each, then flares, shakes the room and lifts out the Trident to float over it.

References Call2(), ChampaCliffCavesGrowThrown(), ChampaCliffCavesProngs, fdActorFaceDirection(), fdActorFaceDirectionAndRefreshById(), fdActorFaceDirectionAndWait(), fdActorGetById(), fdActorJump(), fdActorRunRepeatedMotion(), fdActorSetAnimationById(), fdActorSetAttachedEffect(), fdActorSetDestinationOffsetById(), fdActorSetSpritePriority(), fdActorShowEmote(), fdActorShowEmoteById(), fdActorShowItemIconById(), fdActorStartRepeatedMotion(), fdActorWalkByAndWait(), fdActorWalkByAndWaitById(), fdActorWalkToAndWait(), fdCameraWaitForArrival(), fdEffectSetAttached(), fdMessageShowAtActor(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptWait(), fdStartColorTransition(), fdStartPaletteTransition(), gmPlayMusic(), MainRoutineStateWork, scChampaCliffCavesFadeColors(), scChampaCliffCavesFlareAndDieDown(), scChampaCliffCavesHandPieceToObaba(), scChampaCliffCavesLightForge(), scChampaCliffCavesObabaStepsForward(), scChampaCliffCavesRaiseColumn(), scFieldActorShowItemIconById(), scFieldScriptShowMessageThenWait(), Sint32, sySoundPlay() and sySynch().

Referenced by scChampaCliffCavesObabaOffersHelp().

Definition at line 828 of file champa_cliff_caves.c.

scChampaCliffCavesObabaOffersHelp

void scChampaCliffCavesObabaOffersHelp(Sint32 actor)

Talking to Obaba at her counter: she takes the next prong the party carries, right, left then center, or talks of the trident when it has none. From east of the forge path's column the field menu opens instead.

References fdActorFaceActorById(), fdActorFaceDirection(), fdActorGetById(), fdScriptGetFlag(), fdScriptSetMessageId(), fdScriptShowMessageAndWait(), gmPartyInventoryFindMember(), gmPartyInventoryRemove(), MainRoutineStateWork, scChampaCliffCavesObabaAsksForSecondPiece(), scChampaCliffCavesObabaForgesTrident(), scChampaCliffCavesObabaSeesAWeapon(), scFieldMapGridSetMetatileHeight(), Sint32, syGameFlagGet() and syGameFlagSet().

Referenced by ChampaCliffCavesForgeCues.

Definition at line 1015 of file champa_cliff_caves.c.

ChampaCliffCavesGrowThrownSlowly

DEFINE_CHAMPA_CLIFF_CAVES_GROW(ChampaCliffCavesGrowThrownSlowly, toFIXED(3) / 64)

Each tick Avimander, leaping out of the forge's fire, grows by three sixty- fourths of its size, from a quarter to full size.

Referenced by scChampaCliffCavesFightAvimander().

Definition at line 1095 of file champa_cliff_caves.c.

scChampaCliffCavesFightAvimander

void scChampaCliffCavesFightAvimander(void)

Walking east into Obaba's forge room from the passage (metatiles (36, 12) to (36, 18)) once Briggs has fled up here: "Hold it right there!" Briggs stops the party, and Obaba, for her great-grandson Eoleo's sake, tells Felix he had better leave; if he will not, she throws her salamander into the forge, whose pit turns fiery, and it climbs out grown into Avimander to fight. Coming back after a defeat, Briggs greets the party with "Back for more?".

References ChampaCliffCavesGrowThrownSlowly(), fdActorFaceDirectionAndWait(), fdActorFaceDirectionById(), fdActorGetById(), fdActorJump(), fdActorRunRepeatedMotion(), fdActorSetAnimationAndWait(), fdActorSetAnimationById(), fdActorSetSpriteFlags(), fdActorSetSpritePriority(), fdActorWalkByAndWaitById(), fdActorWalkToAndWait(), fdActorWalkToAndWaitById(), fdActorWalkToById(), fdCameraWaitForArrival(), fdRequestBattleFromEncounterTable(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetAfterBattleDestination(), fdScriptSetDefeatDestination(), fdScriptSetFlag(), fdScriptSetMessageId(), fdScriptStart(), fdScriptWait(), gmPlayMusic(), MainRoutineStateWork, scChampaCliffCavesFadeColors(), scChampaCliffCavesStartForgeFire(), scFieldActorShowEmote(), scFieldMapGridSetMetatileHeight(), scFieldScriptShowMessageThenWait(), Sint32 and sySoundPlay().

Referenced by ChampaCliffCavesForgeCues.

Definition at line 1104 of file champa_cliff_caves.c.

scChampaCliffCavesStartForgeFire

void scChampaCliffCavesStartForgeFire(const Sint32 *pos)

The forge's fire at a spot: the glow grows, holds, and the column rises through it, while the room shakes.

References scChampaCliffCavesDrawForgeFire(), scChampaCliffCavesLoadColumn(), scChampaCliffCavesLoadGlow(), Sint32, syHeapSlotAllocate(), sySetEvent() and sySynch().

Referenced by scChampaCliffCavesFightAvimander().

Definition at line 2191 of file champa_cliff_caves.c.

scChampaCliffCavesPutOutForgeFire

void scChampaCliffCavesPutOutForgeFire(void)

Unused: puts out the forge's fire: the column and then the glow shrink away and the fire's state is released.

References scChampaCliffCavesDrawForgeFire(), Sint32, syCloseEvent(), syHeapSlotRelease(), sySynch() and syVRAMCacheFreeEntry().

Definition at line 2253 of file champa_cliff_caves.c.

scChampaCliffCavesLightForge

void scChampaCliffCavesLightForge(const VECTOR3 *origin)

The forge lights at a spot: the glow alone grows to full size.

References scChampaCliffCavesDrawForgeFire(), scChampaCliffCavesLoadGlow(), Sint32, syHeapSlotAllocate(), sySetEvent(), sySoundPlay() and sySynch().

Referenced by scChampaCliffCavesObabaForgesTrident().

Definition at line 2301 of file champa_cliff_caves.c.

scChampaCliffCavesRaiseColumn

void scChampaCliffCavesRaiseColumn(void)

The column of fire rises through the glow already burning.

References scChampaCliffCavesDrawForgeFire(), scChampaCliffCavesLoadColumn(), Sint32, syHeapSlotAllocate(), sySetEvent(), sySoundPlay() and sySynch().

Referenced by scChampaCliffCavesObabaForgesTrident().

Definition at line 2333 of file champa_cliff_caves.c.

Variables in detail

DOOR_EDIT

extern LATE_DATA DOOR_EDIT

Referenced by ChampaCliffCavesCloseDoor, ChampaCliffCavesOpenDoor, scChampaCliffCavesObabaAsksForBriggs() and scChampaCliffCavesOpenDoorAndEnter().

Definition at lines 225 and 226 of file champa_cliff_caves.c.

ChampaCliffCavesLowerPlacements

extern ACTOR_PLACE ChampaCliffCavesLowerPlacements[]

LATE_DATA ACTOR_PLACE ChampaCliffCavesLowerPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 232 and 2475 of file champa_cliff_caves.c.

ChampaCliffCavesMiddlePlacements

extern ACTOR_PLACE ChampaCliffCavesMiddlePlacements[]

LATE_DATA ACTOR_PLACE ChampaCliffCavesMiddlePlacements[]

Referenced by scGetActorPlacements().

Definition at lines 233 and 2483 of file champa_cliff_caves.c.

ChampaCliffCavesLowerPlacementsBriggsHome

extern ACTOR_PLACE ChampaCliffCavesLowerPlacementsBriggsHome[]

LATE_DATA ACTOR_PLACE ChampaCliffCavesLowerPlacementsBriggsHome[]

Referenced by scGetActorPlacements().

Definition at lines 234 and 2516 of file champa_cliff_caves.c.

ChampaCliffCavesMiddlePlacementsBriggsHome

extern ACTOR_PLACE ChampaCliffCavesMiddlePlacementsBriggsHome[]

LATE_DATA ACTOR_PLACE ChampaCliffCavesMiddlePlacementsBriggsHome[]

Referenced by scGetActorPlacements().

Definition at lines 235 and 2528 of file champa_cliff_caves.c.

ChampaCliffCavesUpperPlacementsBriggsHome

extern ACTOR_PLACE ChampaCliffCavesUpperPlacementsBriggsHome[]

LATE_DATA ACTOR_PLACE ChampaCliffCavesUpperPlacementsBriggsHome[]

Referenced by scGetActorPlacements().

Definition at lines 236 and 2546 of file champa_cliff_caves.c.

ChampaCliffCavesLowerPlacementsAfterAvimander

extern ACTOR_PLACE ChampaCliffCavesLowerPlacementsAfterAvimander[]

LATE_DATA ACTOR_PLACE ChampaCliffCavesLowerPlacementsAfterAvimander[]

Referenced by scGetActorPlacements().

Definition at lines 237 and 2583 of file champa_cliff_caves.c.

ChampaCliffCavesMiddlePlacementsAfterAvimander

extern ACTOR_PLACE ChampaCliffCavesMiddlePlacementsAfterAvimander[]

LATE_DATA ACTOR_PLACE ChampaCliffCavesMiddlePlacementsAfterAvimander[]

Referenced by scGetActorPlacements().

Definition at lines 238 and 2604 of file champa_cliff_caves.c.

ChampaCliffCavesUpperPlacementsAfterAvimander

extern ACTOR_PLACE ChampaCliffCavesUpperPlacementsAfterAvimander[]

LATE_DATA ACTOR_PLACE ChampaCliffCavesUpperPlacementsAfterAvimander[]

Referenced by scGetActorPlacements().

Definition at lines 239 and 2620 of file champa_cliff_caves.c.

ChampaCliffCavesMiddleCues

extern CUE ChampaCliffCavesMiddleCues[]

LATE_DATA CUE ChampaCliffCavesMiddleCues[]

Referenced by scGetCues().

Definition at lines 240 and 2713 of file champa_cliff_caves.c.

ChampaCliffCavesUpperCues

extern CUE ChampaCliffCavesUpperCues[]

LATE_DATA CUE ChampaCliffCavesUpperCues[]

References scChampaCliffCavesEnterDoor() and scChampaCliffCavesObabaAsksForBriggs().

Referenced by scGetCues().

Definition at lines 241 and 2771 of file champa_cliff_caves.c.

ChampaCliffCavesForgeCues

extern CUE ChampaCliffCavesForgeCues[]

LATE_DATA CUE ChampaCliffCavesForgeCues[]

References scChampaCliffCavesFightAvimander(), scChampaCliffCavesHidePath(), scChampaCliffCavesObabaOffersHelp(), scChampaCliffCavesPickUpTrident(), scChampaCliffCavesRevealPath() and scChampaCliffCavesSailorTurnsAway().

Referenced by scGetCues().

Definition at lines 242 and 2814 of file champa_cliff_caves.c.

ChampaCliffCavesOpenDoorFrames

extern Sint16 ChampaCliffCavesOpenDoorFrames[]

LATE_DATA Sint16 ChampaCliffCavesOpenDoorFrames[]

Obaba's door opening and closing, as MAP_EDIT_STEP_ROW rows: two steps of six ticks each.

Referenced by ChampaCliffCavesOpenDoor.

Definition at lines 302 and 2646 of file champa_cliff_caves.c.

ChampaCliffCavesCloseDoorFrames

extern Sint16 ChampaCliffCavesCloseDoorFrames[]

LATE_DATA Sint16 ChampaCliffCavesCloseDoorFrames[]

Referenced by ChampaCliffCavesCloseDoor.

Definition at lines 303 and 2649 of file champa_cliff_caves.c.

ChampaCliffCavesUpperPlacements

extern ACTOR_PLACE ChampaCliffCavesUpperPlacements[]

LATE_DATA ACTOR_PLACE ChampaCliffCavesUpperPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 338 and 2498 of file champa_cliff_caves.c.

ChampaCliffCavesForgePlacements

extern ACTOR_PLACE ChampaCliffCavesForgePlacements[]

LATE_DATA ACTOR_PLACE ChampaCliffCavesForgePlacements[]

Referenced by scGetActorPlacements().

Definition at lines 339 and 2507 of file champa_cliff_caves.c.

ChampaCliffCavesForgePlacementsBriggsHome

extern ACTOR_PLACE ChampaCliffCavesForgePlacementsBriggsHome[]

LATE_DATA ACTOR_PLACE ChampaCliffCavesForgePlacementsBriggsHome[]

Referenced by scGetActorPlacements().

Definition at lines 340 and 2557 of file champa_cliff_caves.c.

ChampaCliffCavesForgePlacementsAfterAvimander

extern ACTOR_PLACE ChampaCliffCavesForgePlacementsAfterAvimander[]

LATE_DATA ACTOR_PLACE ChampaCliffCavesForgePlacementsAfterAvimander[]

Referenced by scGetActorPlacements().

Definition at lines 341 and 2635 of file champa_cliff_caves.c.

ChampaCliffCavesLowerCues

extern CUE ChampaCliffCavesLowerCues[]

LATE_DATA CUE ChampaCliffCavesLowerCues[]

References scChampaCliffCavesAskToComeIn() and scChampaCliffCavesSailorSurrenders().

Referenced by scGetCues().

Definition at lines 562 and 2659 of file champa_cliff_caves.c.

ChampaCliffCavesProngs

extern TRIDENT_PRONGS ChampaCliffCavesProngs

TRIDENT_PRONGS ChampaCliffCavesProngs

The three prongs Obaba throws into her forge, in turn.

Referenced by scChampaCliffCavesObabaForgesTrident().

Definition at lines 823 and 2423 of file champa_cliff_caves.c.

ChampaCliffCavesChaseToNorthScript

extern Uint32 ChampaCliffCavesChaseToNorthScript[]

LATE_DATA Uint32 ChampaCliffCavesChaseToNorthScript[]

Obaba chasing Briggs round her forge: the four quarters of the way round, each walked to its end.

Referenced by scChampaCliffCavesObabaMournsSalamander().

Definition at lines 1375 and 2851 of file champa_cliff_caves.c.

ChampaCliffCavesChaseToEastScript

extern Uint32 ChampaCliffCavesChaseToEastScript[]

LATE_DATA Uint32 ChampaCliffCavesChaseToEastScript[]

Referenced by scChampaCliffCavesObabaMournsSalamander().

Definition at lines 1376 and 2866 of file champa_cliff_caves.c.

ChampaCliffCavesChaseToWestScript

extern Uint32 ChampaCliffCavesChaseToWestScript[]

LATE_DATA Uint32 ChampaCliffCavesChaseToWestScript[]

Referenced by scChampaCliffCavesObabaMournsSalamander().

Definition at lines 1377 and 2896 of file champa_cliff_caves.c.

ChampaCliffCavesChaseToSouthScript

extern Uint32 ChampaCliffCavesChaseToSouthScript[]

LATE_DATA Uint32 ChampaCliffCavesChaseToSouthScript[]

Referenced by scChampaCliffCavesObabaMournsSalamander().

Definition at lines 1378 and 2883 of file champa_cliff_caves.c.

SceneEntrances

LATE_DATA SCENE_ENTRANCE SceneEntrances[]

Referenced by scGetEntrances().

Definition at line 2430 of file champa_cliff_caves.c.

SceneExits

LATE_DATA Uint32 SceneExits[]

Referenced by scGetExits().

Definition at line 2435 of file champa_cliff_caves.c.

ChampaCliffCavesOpenDoor

LATE_DATA DOOR_EDIT ChampaCliffCavesOpenDoor

Obaba's door opening and closing.

References ChampaCliffCavesOpenDoorFrames.

Referenced by scChampaCliffCavesEnterDoor() and scChampaCliffCavesObabaAsksForBriggs().

Definition at line 2654 of file champa_cliff_caves.c.

ChampaCliffCavesCloseDoor

LATE_DATA DOOR_EDIT ChampaCliffCavesCloseDoor

References ChampaCliffCavesCloseDoorFrames.

Referenced by scChampaCliffCavesObabaAsksForBriggs().

Definition at line 2656 of file champa_cliff_caves.c.

On this page

StructuresMacrosEnumerationsFunctionsVariablesDescriptionMacros in detailFLAG_CHAMPA_AVIMANDER_BEATENFLAG_OBABA_SAW_FIRST_PRONGFLAG_OBABA_SAW_SECOND_PRONGFLAG_TRIDENT_FORGEDFLAG_TRIDENT_TAKENFLAG_CHAMPA_BRIGGS_STOPPED_PARTYPIXEL_PALETTE_ROW_MASKPIXEL_ROW_COLOR_MASKDEFINE_CHAMPA_CLIFF_CAVES_GROWFIRE_HEIGHT_SCALEEnumerations in detailanonymous enumCHAMPA_CLIFF_CAVES_METATILE_BEHAVIORanonymous enumanonymous enumanonymous enumCHAMPA_CLIFF_CAVES_OBABAS_ROOM_ACTOR_IDCHAMPA_CLIFF_CAVES_BRIGGS_HOME_ACTOR_IDCHAMPA_CLIFF_CAVES_OBABAS_DOOR_ACTOR_IDCHAMPA_CLIFF_CAVES_OBABAS_LEVEL_SAILOR_ACTOR_IDCHAMPA_CLIFF_CAVES_LOWEST_ACTOR_IDCHAMPA_CLIFF_CAVES_LOWEST_BRIGGS_HOME_ACTOR_IDCHAMPA_CLIFF_CAVES_HOMES_ACTOR_IDanonymous enumanonymous enumanonymous enumFunctions in detailscChampaCliffCavesOpenDoorAndEnterscChampaCliffCavesAskIfBriggsLearnedscChampaCliffCavesObabaMournsSalamanderscChampaCliffCavesHandPieceToObabascChampaCliffCavesObabaStepsForwardscChampaCliffCavesFlareAndDieDownscChampaCliffCavesObabaSeesAWeaponscChampaCliffCavesObabaAsksForSecondPiecescChampaCliffCavesStartFlashscChampaCliffCavesLoadGlowscChampaCliffCavesDrawForgeFirescChampaCliffCavesLoadColumnChampaCliffCavesGrowThrownscGetEntrancesscGetExitRegionsscGetExitsscGetActorPlacementsscChampaCliffCavesEnterDoorscChampaCliffCavesObabaAsksForBriggsscChampaCliffCavesAskToComeInscChampaCliffCavesSailorSurrendersscChampaCliffCavesSailorTurnsAwayscChampaCliffCavesRevealPathscChampaCliffCavesHidePathscChampaCliffCavesPickUpTridentscGetCuesscInitscPrepareMapscChampaCliffCavesFadeColorsscChampaCliffCavesObabaForgesTridentscChampaCliffCavesObabaOffersHelpChampaCliffCavesGrowThrownSlowlyscChampaCliffCavesFightAvimanderscChampaCliffCavesStartForgeFirescChampaCliffCavesPutOutForgeFirescChampaCliffCavesLightForgescChampaCliffCavesRaiseColumnVariables in detailDOOR_EDITChampaCliffCavesLowerPlacementsChampaCliffCavesMiddlePlacementsChampaCliffCavesLowerPlacementsBriggsHomeChampaCliffCavesMiddlePlacementsBriggsHomeChampaCliffCavesUpperPlacementsBriggsHomeChampaCliffCavesLowerPlacementsAfterAvimanderChampaCliffCavesMiddlePlacementsAfterAvimanderChampaCliffCavesUpperPlacementsAfterAvimanderChampaCliffCavesMiddleCuesChampaCliffCavesUpperCuesChampaCliffCavesForgeCuesChampaCliffCavesOpenDoorFramesChampaCliffCavesCloseDoorFramesChampaCliffCavesUpperPlacementsChampaCliffCavesForgePlacementsChampaCliffCavesForgePlacementsBriggsHomeChampaCliffCavesForgePlacementsAfterAvimanderChampaCliffCavesLowerCuesChampaCliffCavesProngsChampaCliffCavesChaseToNorthScriptChampaCliffCavesChaseToEastScriptChampaCliffCavesChaseToWestScriptChampaCliffCavesChaseToSouthScriptSceneEntrancesSceneExitsChampaCliffCavesOpenDoorChampaCliffCavesCloseDoor