Skip to Content
The Alchemy Project

include/scene/dehkan_plateau.h

Dehkan Plateau's tables and scripts, and functions several scenes keep a copy of and declare from here (fdPoundSinkTarget, fdActorSetMetatileOpen, scFieldEffectSpawn).

Included by alhafran_cave.c and dehkan_plateau.c.

Enumerations

NameDescription
enumDEHKAN_PLATEAU_CRACK_FIELD { CRACK_STARTS_CRACKED, CRACK_X, CRACK_Z, CRACK_HOLE, CRACK_HO … }A crack record's halfwords: a crack in a room's floor that Felix can fall through, and the hole it leaves in the ceiling of the cave below.

Functions

NameDescription
voidscDehkanPlateauMeetCannon (void)Cannon: meeting him at the rope bridge, the chase across the cracks and stakes, the fight in his cave and the Pound Cube he drops.
voidscDehkanPlateauCannonLeapsAway (void)Felix comes to the west end of the rope bridge (metatiles (6, 6) and (7, 6)): Cannon, standing on the bridge, starts at the sight of him, leaps along it and runs off east across.
voidscDehkanPlateauCannonFleesOverCracks (void)Felix comes up into the cracked field of the pillars stretch (metatiles (39, 13) to (41, 14)) and sees the Mars Djinni Cannon for the first time: the view pans north to him, he starts, and he runs north across the cracks, cracking one open and breaking through another into a hole, before he hops off to the east.
voidscDehkanPlateauCannonPoundsStake (void)Felix comes near Cannon east of the rope bridge (metatile (23, 6), or from the south at (25, 16) to (27, 17)): Cannon starts, casts Pound on the stake in his way so that a great fist drives it into the ground, and runs on south over it, cracking open a crack behind him.
voidscDehkanPlateauCannonCracksPillars (void)Felix follows Cannon to the gray pillars east of the rope bridge (metatiles (36, 12) to (36, 16), (35, 16) and (35, 17)): Cannon starts, leaps across the pillars, cracking two as he lands on them, and runs off north over a crack, which opens into a hole as he goes, and he is gone.
voidscDehkanPlateauCannonCastsPound (void)Cannon casts Pound on the rope bridge's stretch's stake.
voidscDehkanPlateauCannonCastsPoundOnLeader (void)Cannon casts Pound on the leader in the Pound Cube's cave.
voidscDehkanPlateauCannonPoundsLeaderThrough (void)Felix steps onto the crack south of where the Pound Cube lies, in the cave where Cannon drops it (metatile (15, 8)), before he has fallen in beside Cannon: Cannon starts and casts Pound on him, a great fist slams down, and Felix sinks through the floor and lands in Cannon's cave below.
voidscDehkanPlateauPoundLeaderThrough (void)The event of Cannon's Pound on the leader: the floor under him opens.
voidscDehkanPlateauJoltCamera (void)Jolts the camera down eight pixels and back over eight ticks, as the ground gives way.
voidscDehkanPlateauCannonCornered (void)Once the stake is down, Cannon sees Felix coming and finds he has nowhere to leap: he looks about him and turns to face Felix.
voidscDehkanPlateauFightCannon (void)Talking to Cannon in his cave starts the battle with him.
voidscDehkanPlateauCannonDropsPoundCube (void)Felix falls through a crack in the north of the rope bridge's stretch and lands beside Cannon in the cave below; both bounce apart, Cannon drops the Pound Cube in his fright, glares at Felix and runs off north.
voidscDehkanPlateauDrawPoundCubeFallLanding (void)Draws, in the Pound Cube's cave, the metatiles where the party landed under the crack it fell through.
voidscDehkanPlateauCreatePoundCube (void)Creates the Pound Cube Cannon drops, drawn with the item's own icon.
voidscDehkanPlateauTakePoundCube (void)Felix examines the Pound Cube where Cannon dropped it, north of the crack Cannon Pounds him through (metatile (15, 5)), and takes it.
voidscDehkanPlateauStepOnEntrancePillars (void)The gray pillars that crack under Felix and crumble at the next step.
voidscDehkanPlateauStepOnPillarsCrumblingPillars (void)Felix steps onto one of the gray pillars of the pillars stretch, which cracks and then crumbles as in the first; on the low ones he is drawn behind the ledge.
voidscDehkanPlateauStepOnTightropesPillars (void)Felix steps onto one of the gray pillars of the rope bridge's stretch, which cracks and then crumbles; below the ledge he is drawn behind it.
voidscDehkanPlateauStepOnCannonPillar (void)Felix steps onto the gray pillar in Cannon's cave, which cracks and then crumbles; once he is up on it he no longer counts as on the cave's lower floor (scDehkanPlateauLeaveLowerPath).
voidscDehkanPlateauCrackPillar (Sint32 id, Sint32 standingId, Sint32 flag)Cracks a crumbling pillar as Cannon lands on it: it flashes white and takes its cracked look, and eight puffs of dust rise about the one standing on it.
voidscDehkanPlateauSetPillarsStandingPillarMetatiles (void)Gives the metatiles of four of the pillars stretch's crumbling pillars, while each stands, the attributes of metatile (0, 0).
voidscDehkanPlateauSetTightropesStandingPillarMetatiles (void)The same for two of the rope bridge's stretch's crumbling pillars, from metatile (63, 0).
voidscDehkanPlateauDropEntrancePillarIntoGap (void)The stone and vine pillars Move lifts and Felix pushes into the gaps.
voidscDehkanPlateauLiftPillarsStonePillar (void)Move takes hold of the pillars stretch's stone pillar.
voidscDehkanPlateauPlacePillarsStonePillar (void)Moved or pushed to the gap's edge in the pillars stretch, the stone pillar drops into the gap for good, bridging it (FLAG_PILLARS_STONE_PILLAR_PLACED).
voidscDehkanPlateauLiftTightropesPillar (void)Move takes hold of the rope bridge's stretch's stone pillar.
voidscDehkanPlateauPushTightropesSecondPillar (void)Walking west into the rope bridge's stretch's second stone pillar pushes it a column west.
voidscDehkanPlateauSetTightropesSecondPillarInPlace (void)Puts the rope bridge's stretch's second stone pillar a column west, off the vine it stood before, with the metatiles that let it be walked over and the vine climbed.
voidscDehkanPlateauPushVinePillar (void)Walking into one of the rope bridge's stretch's vine pillars pushes it a metatile on.
voidscDehkanPlateauLiftTightropesVinePillar (void)Move takes hold of one of the rope bridge's stretch's vine pillars.
voidscDehkanPlateauFinishMovingVinePillar (void)Move lets go of one of the rope bridge's stretch's vine pillars.
voidscDehkanPlateauStepOnCrack (void)The cracks Felix falls through into the caves below, and the ways out.
voidscDehkanPlateauStepOffCrack (void)Stepping off a crack opened on this visit lets it be stepped on again.
voidscDehkanPlateauRestoreTightropesCracks (void)Restores the rope bridge's stretch's six cracks, as the first stretch's.
voidscDehkanPlateauRestorePoundCubeCracks (void)As the other rooms' (DEFINE_DEHKAN_PLATEAU_RESTORE_CRACKS) for the Pound Cube's cave's sixteen cracks.
voidscDehkanPlateauLandFromFall (void)Felix drops in from the crack above in a shaft of light, landing in a ring of dust.
voidscDehkanPlateauEnterLowerPath (void)Nothing visible happens when Felix steps onto the lower floor of Cannon's cave, below the ledge (metatiles (43, 16) to (43, 18)), before the stake is Pounded.
voidscDehkanPlateauLeaveRoom (void)Felix walks into a cave mouth in the cliff of the first stretch (map metatile (84, 21)) or of the pillars stretch (metatile (113, 12)): the exit sound plays, the screen fades to black, and he comes out in the caves below the cracks.
voidscDehkanPlateauSetBlocksShown (Sint32 show)The unseen blocks, drawn and hidden again as Felix steps past the foot of a cliff.
voidscDehkanPlateauShowBlocks (void)Felix steps onto the foot of a cliff in one of five rooms: the room's unseen blocks are drawn again, and noted shown.
voidscDehkanPlateauHideBlocks (void)Felix steps onto the metatiles beside those of scDehkanPlateauShowBlocks while the blocks are drawn (in the first stretch, (35, 13) to (35, 18)): the room's unseen blocks stop being drawn.
voidscDehkanPlateauHideEntranceBlocks (void)Hides the first stretch's unseen blocks as it opens.
voidscDehkanPlateauHidePillarsBlocks (void)Hides the pillars stretch's unseen blocks as it opens.
voidscDehkanPlateauHideTightropesBlocks (void)Hides the rope bridge's stretch's unseen blocks as it opens.
voidscDehkanPlateauHideCavesBlocks (void)Hides the unseen blocks of the caves below the cracks as they open.
voidscDehkanPlateauHideCannonBlocks (void)Hides Cannon's cave's unseen blocks as it opens.
voidscDehkanPlateauInitEntrance (void)Each room's setup as it opens.
voidscDehkanPlateauInitPillars (void)Sets up the pillars stretch: its crumbling pillars, stake and stone pillar, its cracks, and Cannon as far as he has fled.
voidscDehkanPlateauInitTightropes (void)Sets up the rope bridge's stretch: its tightropes and the rope to Lash, its stone, vine and stakes and crumbling pillars, its cracks, and Cannon as far as he has gone.
voidscDehkanPlateauInitCaves (void)Sets up the caves below the cracks: the floor Cannon opened, and the landing of a fall.
voidscDehkanPlateauInitPoundCube (void)Sets up the Pound Cube's cave: the Pound Cube where Cannon dropped it, its cracks, and the landing of a fall, beside Cannon the first time.
voidscDehkanPlateauInitCannon (void)Sets up Cannon's cave: its stake and crumbling pillar, Cannon met already if he is in the party, and the landing of a fall.
voidscDehkanPlateauInitRopes (void)Sets up the field engine's ropes for the scene (fdRopeInit).
voidfdPoundSinkTarget (Uint16 *list, Sint32 mode, Sint32 count)Functions and scripts other scenes keep a copy of.
voidfdActorDropAndWait (struct ACTOR *actor)Lets an actor fall to the ground and waits there: a thump as it lands, ten ticks, and it stands still again.
voidscCrumblingPillarPrepare (Sint32 id)Keeps an actor's sprite picture loaded even out of sight, and stops it moving, colliding and showing (fdActorDisableById).
voidscCrumblingPillarPlace (Uint16 *list)Places each crumbling pillar of an (actor, flag) list: one that has given way is moved out of sight; the others stand as their metatile's ground, 32 pixels above the floor, which the leader jumps onto (MAP_METATILE_JUMP), and a cracked one shows its cracks.
voidscDustScatter (Sint32 spread)Eight clouds of dust rise in a row across the leader, 2 pixels apart, and fly out from him in eight directions when spread is set.
voidscDustBurst (void)Throws a ring of dust clouds out from the leader as a pillar lands, the first thrown twice.
voidfdLeaderSetMetatileShapeAt (Sint32 level, Sint32 layer)Sets the shape of the metatile under the leader level steps above its ground.
voidfdActorSetMetatileOpen (Sint32 id, Uint32 mode, Sint32 flag, Sint32 layer)A stake as its flag leaves it: driven down by Pound, its metatile is open ground and it is drawn underfoot, sunk to its top; still standing, its metatile is a wall.
voidfdActorSetMetatileShape (Sint32 level, Sint32 layer, Sint32 owner)Gives the metatile of layer under an actor the shape of the ground there, level steps of 8 pixels (METATILE_HEIGHT_STEPS) higher, or lower when negative, as a crumbling pillar sinks 4.
voidscFieldEffectSpawn (Sint32 x, Sint32 y, Sint32 z, Sint32 velocityX, Sint32 velocityY, Sint32 velocityZ, Uint32 flags, const struct EFFECT_OPTIONS *options)Spawns a field effect at x, y, z moving at the velocity given, its type, scale, palette, priority, script, rotation, spin and update chosen by the EFFECT_USE_ flags from the options.

Variables

NameDescription
extern Uint16DehkanPlateauPoundCubeCrackPictures []The cracks' pictures and records (each room's crack table).
extern Uint16DehkanPlateauPoundCubeCracks [][CRACK_FIELDS]
extern Uint16DehkanPlateauEntranceHolePictures []The pictures of the hole under each crack, drawn as the leader falls.
extern Uint16DehkanPlateauPillarsHolePictures []
extern Uint16DehkanPlateauTightropesHolePictures []
extern Uint16DehkanPlateauPoundCubeHolePictures []
extern Uint32FieldEffectShortScript []
extern Uint32FieldEffectMediumScript []The flash about the Tomegathericon: held 45 ticks, then put away and freed.

Description

Dehkan Plateau's tables and scripts, and functions several scenes keep a copy of and declare from here (fdPoundSinkTarget, fdActorSetMetatileOpen, scFieldEffectSpawn).

Enumerations in detail

DEHKAN_PLATEAU_CRACK_FIELD

enum DEHKAN_PLATEAU_CRACK_FIELD

A crack record's halfwords: a crack in a room's floor that Felix can fall through, and the hole it leaves in the ceiling of the cave below.

EnumeratorValueDescription
CRACK_STARTS_CRACKEDnonzero: cracked when the room is first entered
CRACK_Xits map metatile
CRACK_Z
CRACK_HOLEits hole picture, a pair of the room's hole pictures
CRACK_HOLE_Xthe map metatile the hole is drawn at
CRACK_HOLE_Z
CRACK_FIELDS

Definition at line 84 of file dehkan_plateau.h.

Functions in detail

scDehkanPlateauInitRopes

void scDehkanPlateauInitRopes(void)

Sets up the field engine's ropes for the scene (fdRopeInit).

Referenced by scDehkanPlateauInitTightropes().

Definition at line 80 of file dehkan_plateau.h.