Skip to Content
The Alchemy Project

src/scene/ankohl_ruins.c

The Ankohl Ruins, where Felix, once Gaia Rock has given him Sand, climbs through the old ruins to the Left Prong of the Trident of Ankohl lying on their top. More…

Macros

NameDescription
#defineFLAG_STONE_FACE_A_MOVED 0x9d2The seven stone faces Move pushes off their ledge on the first floor, one flag a face; the macro takes the face's actor.
#defineFLAG_STONE_FACE_MOVED (face)
#defineFLAG_FIRST_FLOOR_WEEDS_A_SCATTERED 0x990The ruins' weeds Whirlwind scatters, one flag a clump: the fourteen of the first floor from FLAG_FIRST_FLOOR_WEEDS_A_SCATTERED, the second floor's three, then the fourth floor's seven; the macros take the clump's actor.
#defineFLAG_SECOND_FLOOR_WEEDS_A_SCATTERED 0x99e
#defineFLAG_FOURTH_FLOOR_WEEDS_A_SCATTERED 0x9a1
#defineFLAG_FIRST_FLOOR_WEEDS_SCATTERED (weeds)
#defineFLAG_SECOND_FLOOR_WEEDS_SCATTERED (weeds)
#defineFLAG_FOURTH_FLOOR_WEEDS_SCATTERED (weeds)
#defineFLAG_NUT_CHEST_PILLAR_MOVED 0x9c6The pillars Move has pushed to the end of their tracks: the one by the Nut's chest, the third floor's one, the fourth floor's three and the fifth floor's one.
#defineFLAG_THIRD_FLOOR_PILLAR_MOVED 0x9c7
#defineFLAG_FOURTH_FLOOR_PILLAR_MOVED 0x9c8
#defineFLAG_FOURTH_FLOOR_SECOND_PILLAR_MOVED 0x9c9
#defineFLAG_FOURTH_FLOOR_THIRD_PILLAR_MOVED 0x9ca
#defineFLAG_FIFTH_FLOOR_PILLAR_MOVED 0x9cb
#defineFLAG_LEFT_FACE_HALF_PLACED 0x9d9The halves of stone faces pushed into place: the fourth floor's two, the half pushed into the fifth floor's gap, the second floor's half, and the great face's right half.
#defineFLAG_RIGHT_FACE_HALF_PLACED 0x9da
#defineFLAG_FACE_HALF_PUSHED_INTO_GAP 0x9db
#defineFLAG_SECOND_FLOOR_FACE_HALF_PLACED 0x9dc
#defineFLAG_GREAT_FACE_HALF_PLACED 0x9dd
#defineFLAG_FIRST_SAND_DOOR_OPENED 0x9e2The doors the buttons on the sand rooms' far ledges open, the first room's and the second's.
#defineFLAG_SECOND_SAND_DOOR_OPENED 0x9e3
#defineFLAG_FIRST_SAND_SWITCH_PRESSED FLAG_SCENE_TEMP(0x02)The sand rooms' switches pressed, for this visit: the sand is rising or has risen in each.
#defineFLAG_SECOND_SAND_SWITCH_PRESSED FLAG_SCENE_TEMP(0x03)
#defineFLAG_ANKOHL_RUINS_REVEAL_SHOWN FLAG_SCENE_TEMP(0x05)Set while Reveal is up: the sand rooms stop trimming the sand's edge, and in every edition but the Japanese the fifth floor's gap lies open to a pushed half face.
#defineFLAG_GREAT_FACE_AT_REST FLAG_SCENE_TEMP(0x01)Set once the great face has slid to the foot of its corridor, for this visit: the corridor stays closed behind it.
#defineFLAG_SAND_ROOM_FULL FLAG_SCENE_TEMP(0x04)Set once a sand room's sand has risen to the top, for this visit.
#defineMAP_METATILE_FLOWING_SAND MAP_METATILE_SECOND_ZONEThe attribute bit that marks the metatiles whose sand flows south here (scAnkohlRuinsFlowWithSand); the field engine reads it elsewhere as MAP_METATILE_SECOND_ZONE.
#defineSTONE_FACE_DROP_ROW 31The row below the stone faces' ledge: a face pushed into it falls.
#defineGAP_COLUMN 26The metatile of the fifth floor's gap the half face drops into.
#defineGAP_ROW 35
#defineFOURTH_FLOOR_HALL_FIRST_ENTRANCEThe fourth floor's first entrance into the hall of the face halves, where the sand flows; the hall's entrances are numbered on from it.
#defineFOURTH_FLOOR_HALL_SOUND_LAST_ENTRANCE
#defineSAND_RISE_MOVES 16The moves a rise of the sand takes, and the sand rows' end marker.
#defineSAND_ROWS_END 99
#defineSAND_MASK_BYTES (4 * TILE_SIZE_4BPP)The sprite the sand's edge masks the screen with: 16 by 16 pixels, four tiles of colour 1.
#defineACTOR_LEFT_PRONG_CHEST 64The Left Prong, lying on the top of the ruins.
#defineEFFECT_SET_MODE fdActorSelectAnimation
#defineEFFECT_SET_SCRIPT fdActorStartScript
#defineEFFECT_SPRITE_PRIORITY
#defineDEFINE_SAND_DOOR_BUTTON (Defines a sand room's door button: the first time it is stepped on, under flag, it clicks and the door at column column slides open with a boom, its three metatiles drawn open from row pictureRow down, and the door's metatile on row takes the attributes of (openColumn, row) so the party can walk through.

Enumerations

NameDescription
enumanonymous enum { METATILE_BEHAVIOR_GREAT_FACE_CORRIDOR_FOOT, METATILE_BEHAVIO … }The metatile behaviours the rooms' cue tables answer: the foot of the great face's corridor and the metatile right in front of the face at its top; the sand rooms' switches and their far ledges' buttons; and the pit on the fifth floor Felix jumps down to the fourth floor.
enumanonymous enum { CUE_CARRIED_OFF_LEDGE, CUE_RAISE_FIRST_SAND, CUE_RAISE_SECON … }The cues the rooms' code raises: the flowing sand carrying Felix off a ledge, and each sand room's next rise.
enumanonymous enum { NUT_CHEST_PILLAR_END_COLUMN, THIRD_FLOOR_PILLAR_END_COLUMN, … }The metatile column each pillar Move pushes stands in at its track's end, where its flag is set and the set-up places it again.
enumANKOHL_RUINS_FIRST_FLOOR_WAY { WAY_FIRST_FLOOR_ENTRY_HALL_TO_STONE_FACES, WAY_FIRST_FLOOR_E … }The ways between the rooms of each floor, named by the room a way leaves and the room it leads to; a way's exit, the step trigger that takes it and the entrance at its foot share its number, so the way back is the entrance the exit leads to.
enumANKOHL_RUINS_SECOND_FLOOR_WAY { WAY_SECOND_FLOOR_WEEDS_TO_CHEST, WAY_SECOND_FLOOR_CHEST_TO_W … }The second floor's: the south hall the stairs from the first floor reach, the hall of the face half north of it, up two ways of stairs, east and west, and the room of three weeds and the room of a chest south-east of them.
enumANKOHL_RUINS_THIRD_FLOOR_WAY { WAY_THIRD_FLOOR_NORTH_HALL_TO_SOUTH_LOOP_WEST, WAY_THIRD_FLO … }The third floor's: the lit hall in the north-east, with the pillar, and the room south of it whose corridor runs round in a loop, each with a way at its west and east end.
enumANKOHL_RUINS_FOURTH_FLOOR_WAY { WAY_FOURTH_FLOOR_NORTH_HALL_TO_FACE_HALVES, WAY_FOURTH_FLOOR … }The fourth floor's: the hall along its north side, the hall of the face halves in the south-west, and the corridor of weeds in the south-east.
enumANKOHL_RUINS_FIFTH_FLOOR_WAY { WAY_FIFTH_FLOOR_SAND_FACE_TO_SOUTHWEST, WAY_FIFTH_FLOOR_SOUT … }The fifth floor's: the room where the stone face pours sand in the south-east and the room south-west of it, the room of brown and red blocks and the pillar's room north of it, and the lit hall in the north-west and the small room of the pit below it.
enumANKOHL_RUINS_SAND_MASK { SAND_MASK_WEST_SHALLOW, SAND_MASK_WEST, SAND_MASK_EAST, SAND … }How each of a sand room's masks moves as the sand rises (scAnkohlRuinsDrawSand): out west or east along a ledge's edge, up and out of the way once the sand is 16 pixels deep, or straight up until then.
enumANKOHL_RUINS_FIRST_FLOOR_ACTOR_ID { ACTOR_NUT_CHEST_PILLAR, ACTOR_STONE_FACE_A, ACTOR_STONE_FACE … }The first floor (AnkohlRuinsFirstFloorPlacements).
enumANKOHL_RUINS_SECOND_FLOOR_ACTOR_ID { ACTOR_SECOND_FLOOR_FACE_HALF, ACTOR_SECOND_FLOOR_WEEDS_A, AC … }The second floor (AnkohlRuinsSecondFloorPlacements).
enumANKOHL_RUINS_THIRD_FLOOR_ACTOR_ID { ACTOR_THIRD_FLOOR_PILLAR, ACTOR_GREAT_FACE, ACTOR_GREAT_FACE … }The third floor (AnkohlRuinsThirdFloorPlacements).
enumANKOHL_RUINS_FOURTH_FLOOR_ACTOR_ID { ACTOR_FOURTH_FLOOR_PILLAR, ACTOR_LEFT_FACE_HALF, ACTOR_RIGHT … }The fourth floor (AnkohlRuinsFourthFloorPlacements).
enumANKOHL_RUINS_FIFTH_FLOOR_ACTOR_ID { ACTOR_FIFTH_FLOOR_PILLAR, ACTOR_FACE_HALF_FOR_THE_GAP }The fifth floor (AnkohlRuinsFifthFloorPlacements).

Functions

NameDescription
static inline Sint32scAnkohlRuinsFlagCheck (Sint32 flag)
BSS_DATAALIGNED (16)The sand rooms' rising sand: its level, and the masks that trim its edge.
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.
static __inline__ voidscAnkohlRuinsJumpActorDownLedge (Sint32 id, Sint32 pose, Sint32 flags)Jumps actor id down a ledge (fdActorJumpDownLedge).
voidscAnkohlRuinsJumpDownPit (void)Felix walks south into the pit in the middle of a small room on the fifth floor and jumps down it; the screen fades and he drops onto the fourth floor beside the left half of the stone face, landing in a ring of dust (scAnkohlRuinsLandFromFall).
voidscAnkohlRuinsLandFromFall (void)Felix drops onto the fourth floor from the pit above, lands sitting in a ring of dust and shakes the ground, then stands up.
Sint32scAnkohlRuinsSetUpWeeds (ACTOR *actor)The call AnkohlRuinsWeedsScript makes: clears the clump's sprite flags, draws it at priority 2 and stands it four pixels lower.
const ACTOR_PLACE *scGetActorPlacements (void)The scene's actor placements: a room of names for its entrance, else the debug room's.
voidscAnkohlRuinsSinkIntoSand (void)Felix sinks into the ground with Sand and moves on the sand layer, under the ruins' blocks and pillars.
voidscAnkohlRuinsRiseFromSand (void)Felix comes up out of the Sand and walks on the ground again.
voidscAnkohlRuinsStartMovingPillar (Sint32 unused, Sint32 id)Nothing visible happens as Felix starts to cast Move on one of the ruins' pillars; the game rewrites the floor metatiles around the pillar for the push.
voidscAnkohlRuinsFinishMovingPillar (Sint32 unused, Sint32 id)Felix pushes one of the ruins' pillars a metatile along with Move, and pushed to the end of its short track it stays there for good: the one beside the Nut's chest slides east into its groove.
voidscAnkohlRuinsPushStoneFaceOffLedge (Sint32 unused, Sint32 face)Felix pushes one of the seven stone faces in the north wall of the first floor south off its ledge with Move; it falls with a puff of dust and is gone for good, leaving open the doorway it stood in front of.
voidscAnkohlRuinsPourSand ( Sint32 rows, Sint32 ticks, Sint32 x, Sint32 y, Sint32 startZ, Sint32 count)Sand pours down from above: rows rows of count grains a metatile apart, each row two pixels further south, ticks apart.
voidscAnkohlRuinsPlaceFaceHalves (Sint32 unused, Sint32 id)Felix pushes a half of the stone face on the fourth floor with Move, and once it reaches its place, the left half at metatile (12, 45) and the right half beside it at (14, 45), it settles with a boom.
voidscAnkohlRuinsPlaceSecondFloorFaceHalf (Sint32 unused, Sint32 id)Felix pushes the left half of the stone face in the back room of the second floor east with Move, and when it meets the right half in the wall, at metatile (12, 5), it settles with a boom: the ground shakes, the camera looks at the face, and sand pours down from it, row by row, and fills the hall below it.
voidscAnkohlRuinsPlaceGreatFaceHalf (Sint32 unused, Sint32 id)Felix pushes the right half of the great stone face west with Move, and when it meets the face, at metatile (15, 24), it sinks into place with a thump, the face is whole, and its eyes glow green.
voidscAnkohlRuinsFlowWithSand (void)Felix, standing on the sand that flows down the fourth floor's slide or the fifth floor's sand, drifts south with it, and where it runs over a drop it carries him off (scAnkohlRuinsCarriedOffLedge).
voidscAnkohlRuinsCarriedOffLedge (void)Felix, carried by the flowing sand to the edge of a drop on the fifth floor, slides over it, starts with a "!" and falls to the floor below with a thump.
voidscAnkohlRuinsFinishPushing (Sint32 unused, Sint32 id)Felix pushes a face half or a pillar on the fourth floor by walking into it: once he has leant on it a moment where the floor lets him push, the field engine shoves it a metatile ahead (fdRunPushMetatile) and then this runs, the halves going on as scAnkohlRuinsPlaceFaceHalves and the pillars as scAnkohlRuinsFinishMovingPillar, as after Move.
voidscAnkohlRuinsScatterWeeds (Sint32 unused, Sint32 id)Felix casts Whirlwind ("Conjure wind to scatter weeds.") on a clump of weeds on the first, second or fourth floor: the leaves blow away and the clump is gone for good.
voidscAnkohlRuinsDrawSand (void)The rising sand of the sand rooms, drawn each tick: the sand's picture is raised to its level, and its edges against the ledges are trimmed.
voidscAnkohlRuinsInitSand (Sint32 unused)Sets up the sand rooms' rising sand on entering one: the tile of the masks that trim its edge, the window they draw into, the event that draws it, and the masks for the room the entrance leads into.
voidscAnkohlRuinsCountSandTime (void)Counts the time to the sand's next rise after the switch; when it runs out, the room's sand rises again (CUE_RAISE_FIRST_SAND or CUE_RAISE_SECOND_SAND).
voidscAnkohlRuinsRaiseFirstSand (void)The sand in the first sand room rises a step as the ground shakes and the great stone face in the north wall pours, lifting Felix if he stands on it, until the room is full and the door button on the far ledge can be reached.
voidscAnkohlRuinsRaiseSecondSand (void)The sand in the second sand room rises a step, as in the first (scAnkohlRuinsRaiseFirstSand), the shaking harder.
voidscAnkohlRuinsPressFirstSandSwitch (void)Felix steps onto the grey switch on the west ledge of the first sand room (metatile (1, 7)): the great stone face in the north wall opens its mouth and pours sand, which rises a step, then slowly another and another until the room is full.
DEFINE_SAND_DOOR_BUTTON(scAnkohlRuinsOpenFirstSandDoor , FLAG_FIRST_SAND_DOOR_OPENED, 14, 65, 15, 5)Felix steps on the first sand room's door button and the door in its north-east wall, metatile (14, 5), slides open.
voidscAnkohlRuinsPressSecondSandSwitch (void)Felix steps onto the grey switch on the east ledge of the second sand room (metatile (12, 25)): the great stone face in the north wall pours sand, which rises as in the first sand room but faster.
DEFINE_SAND_DOOR_BUTTON(scAnkohlRuinsOpenSecondSandDoor , FLAG_SECOND_SAND_DOOR_OPENED, 2, 83, 1, 23)Felix steps on the second sand room's door button and the door in its north-west wall, metatile (2, 23), slides open.
voidscAnkohlRuinsSlideGreatFace (void)The great stone face slides south down its corridor, shoving Felix ahead of it if he stands in its way and carrying him along if he stands right behind it, unless he is under the Sand; it stops at the corridor's foot.
voidscAnkohlRuinsStartGreatFaceSliding (void)Once the great face is whole, Felix stepping into the foot of its corridor (metatiles (13, 42) to (15, 42)) sets it moving: there is a rush, the ground shakes, the camera looks up the corridor at the face as it starts to slide down towards him, and then follows Felix again.
voidscAnkohlRuinsStartGreatFaceSlidingUpClose (void)Once the great face is whole, Felix stepping right in front of it at the top of its corridor (metatile (13, 26)) sets it sliding at once, the ground shaking, with no look up the corridor.
voidscAnkohlRuinsPushFaceHalfIntoGap (void)Felix pushes the half face in the room of brown and red blocks on the fifth floor into the gap Reveal shows (metatile (26, 35)): it falls in, and the screen fades to the fourth floor below, where it drops in from above with a thump, then back to Felix.
voidscAnkohlRuinsRevealGap (void)Reveal on the fifth floor shows a gap in the floor of the room of brown and red blocks, beside the half face (metatiles (25, 34) to (27, 38)).
voidscAnkohlRuinsHideGap (void)As Reveal fades, the gap in the room of brown and red blocks is hidden again.
voidscAnkohlRuinsStartReveal (void)Nothing visible happens to the sand when Felix casts Reveal in the sand rooms; the game stops trimming the sand's edge while Reveal is up.
voidscAnkohlRuinsEndReveal (void)As Reveal fades in the sand rooms the sand's edge is trimmed again.
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 (Sint32 unused)Sets up the room the party comes into: what Move and Whirlwind have done stays done, the great face rests where it slid, the fourth floor's sand slope stands and the half pushed through the gap drops in, the sand flows, the sand rooms' sand stands at its level, and the Left Prong sparkles.
Sint32scPrepareMap (void)Once Briggs is caught the pool has dried up: its colours take the dry ground's.

Variables

NameDescription
ANKOHL_RUINS_SPR_STATEAnkohlRuinsSandThe sand rooms' rising sand: its level, and the masks that trim its edge.
extern Sint16AnkohlRuinsSandStepDelayTicks between the sand's moves as it rises.
extern Sint16AnkohlRuinsSandTimerTicks since the sand last rose.
extern Sint16AnkohlRuinsSandRiseDelayTicks between the sand's rises.
extern Sint32AnkohlRuinsSandStepHow far the sand rises each move, in 16.16 pixels.
extern Sint32AnkohlRuinsSandRoomWhich sand room's switch was pressed: 1 or 2.
extern SCENE_REGIONAnkohlRuinsFifthFloorExitRegions []The fifth floor's way out onto the top of the ruins.
extern SCENE_REGIONAnkohlRuinsLeftProngExitRegions []The way back down from the top of the ruins to the fifth floor.
extern ACTOR_PLACEAnkohlRuinsPlacements []The forest at the ruins' doorway: no actors.
extern ACTOR_PLACEAnkohlRuinsFirstFloorPlacements []The first floor's actors, in ANKOHL_RUINS_FIRST_FLOOR_ACTOR_ID's order.
extern ACTOR_PLACEAnkohlRuinsSecondFloorPlacements []The second floor's actors, in ANKOHL_RUINS_SECOND_FLOOR_ACTOR_ID's order.
extern ACTOR_PLACEAnkohlRuinsThirdFloorPlacements []The third floor's actors, in ANKOHL_RUINS_THIRD_FLOOR_ACTOR_ID's order.
extern ACTOR_PLACEAnkohlRuinsFourthFloorPlacements []The fourth floor's actors, in ANKOHL_RUINS_FOURTH_FLOOR_ACTOR_ID's order.
extern ACTOR_PLACEAnkohlRuinsFifthFloorPlacements []The fifth floor's actors, in ANKOHL_RUINS_FIFTH_FLOOR_ACTOR_ID's order.
extern ACTOR_PLACEAnkohlRuinsSandRoomsPlacements []The sand rooms' actors: none.
extern ACTOR_PLACEAnkohlRuinsLeftProngPlacements []The top of the ruins' actors: none.
extern ANKOHL_RUINS_SAND_ROWAnkohlRuinsFirstSandRows []The first sand room's metatile blocks, each with the sand level that covers it, ended by SAND_ROWS_END.
extern ANKOHL_RUINS_SAND_ROWAnkohlRuinsSecondSandRows []The second sand room's metatile blocks, each with the sand level that covers it, ended by SAND_ROWS_END.
extern CUEAnkohlRuinsCues []The forest at the ruins' doorway: its two exits.
extern CUEAnkohlRuinsFirstFloorCues []The first floor's exits and stairs, Sand, Move on the stone faces and the pillar, and Whirlwind on the weeds.
extern CUEAnkohlRuinsSecondFloorCues []The second floor's exits and stairs, Sand, Move on the face half and Whirlwind on the weeds.
extern CUEAnkohlRuinsThirdFloorCues []The third floor's exits and stairs, Sand, Move on the pillar and the great face's right half, and the steps that set the face sliding.
extern CUEAnkohlRuinsFourthFloorCues []The fourth floor's exits and stairs, Sand, Move on the face halves and the pillars, and Whirlwind on the weeds.
extern CUEAnkohlRuinsFifthFloorCues []The fifth floor's exits and stairs, the pit, the flowing sand's drop, Sand, Move on the pillar and the half face, and Reveal on the gap.
extern CUEAnkohlRuinsSandRoomsCues []The sand rooms' exits and stairs, Sand, Reveal, the switches, the door buttons and the rising sand.
extern CUEAnkohlRuinsLeftProngCues []The top of the ruins' cues: none.
const Sint32 *FieldEffectDurationScripts []The field effects' three scripts by how long an effect lasts: short, medium and long.
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.
Sint32AnkohlRuinsWeedsScript []The weeds' script: each clump is drawn half as tall again, then set up by scAnkohlRuinsSetUpWeeds.
Uint32AnkohlRuinsFaceHalfScript []The face halves' script: each stands still until pushed.
Uint32AnkohlRuinsGreatFaceScript []The great face's script: it does not collide.

Description

The Ankohl Ruins, where Felix, once Gaia Rock has given him Sand, climbs through the old ruins to the Left Prong of the Trident of Ankohl lying on their top. Past the forest at the doorway, the first floor comes first: Whirlwind clears its weeds, some of which hide the way on, and Move pushes each of the seven stone faces in the north wall off its ledge to open the doorway behind it. On the second floor Move pushes the left half of a stone face against its right half and sand pours down into a slope. Move also pushes pillars aside, one by the Nut's chest, one on the third floor, three on the fourth floor and one on the fifth floor. In each of the two sand rooms a switch makes the great stone face in the north wall pour sand until the room is full, and a button on the far ledge, reached on the sand, opens the way on. On the fourth floor flowing sand carries Felix down a slide. On the third floor Move pushes the right half of the great face into place, its eyes glow, and stepping into its corridor sets it sliding down at Felix, who hides from it under the Sand. On the fifth floor Reveal shows a gap that Move pushes a half face into; it lands on the fourth floor, where Move pushes it against the other half and sand pours into a slope. From the fifth floor a way leads out onto the top of the ruins.

Macros in detail

FLAG_STONE_FACE_A_MOVED

#define FLAG_STONE_FACE_A_MOVED 0x9d2

The seven stone faces Move pushes off their ledge on the first floor, one flag a face; the macro takes the face's actor.

Definition at line 34 of file ankohl_ruins.c.

FLAG_STONE_FACE_MOVED

#define FLAG_STONE_FACE_MOVED(face)

Referenced by AnkohlRuinsFirstFloorCues, scAnkohlRuinsPushStoneFaceOffLedge() and scInit().

Definition at line 35 of file ankohl_ruins.c.

FLAG_FIRST_FLOOR_WEEDS_A_SCATTERED

#define FLAG_FIRST_FLOOR_WEEDS_A_SCATTERED 0x990

The ruins' weeds Whirlwind scatters, one flag a clump: the fourteen of the first floor from FLAG_FIRST_FLOOR_WEEDS_A_SCATTERED, the second floor's three, then the fourth floor's seven; the macros take the clump's actor.

Definition at line 40 of file ankohl_ruins.c.

FLAG_SECOND_FLOOR_WEEDS_A_SCATTERED

#define FLAG_SECOND_FLOOR_WEEDS_A_SCATTERED 0x99e

Definition at line 41 of file ankohl_ruins.c.

FLAG_FOURTH_FLOOR_WEEDS_A_SCATTERED

#define FLAG_FOURTH_FLOOR_WEEDS_A_SCATTERED 0x9a1

Definition at line 42 of file ankohl_ruins.c.

FLAG_FIRST_FLOOR_WEEDS_SCATTERED

#define FLAG_FIRST_FLOOR_WEEDS_SCATTERED(weeds)

Referenced by scAnkohlRuinsScatterWeeds() and scInit().

Definition at line 43 of file ankohl_ruins.c.

FLAG_SECOND_FLOOR_WEEDS_SCATTERED

#define FLAG_SECOND_FLOOR_WEEDS_SCATTERED(weeds)

Referenced by scAnkohlRuinsScatterWeeds() and scInit().

Definition at line 45 of file ankohl_ruins.c.

FLAG_FOURTH_FLOOR_WEEDS_SCATTERED

#define FLAG_FOURTH_FLOOR_WEEDS_SCATTERED(weeds)

Referenced by scAnkohlRuinsScatterWeeds() and scInit().

Definition at line 47 of file ankohl_ruins.c.

FLAG_NUT_CHEST_PILLAR_MOVED

#define FLAG_NUT_CHEST_PILLAR_MOVED 0x9c6

The pillars Move has pushed to the end of their tracks: the one by the Nut's chest, the third floor's one, the fourth floor's three and the fifth floor's one.

Referenced by AnkohlRuinsFirstFloorCues, scAnkohlRuinsFinishMovingPillar() and scInit().

Definition at line 52 of file ankohl_ruins.c.

FLAG_THIRD_FLOOR_PILLAR_MOVED

#define FLAG_THIRD_FLOOR_PILLAR_MOVED 0x9c7

Referenced by AnkohlRuinsThirdFloorCues, scAnkohlRuinsFinishMovingPillar() and scInit().

Definition at line 53 of file ankohl_ruins.c.

FLAG_FOURTH_FLOOR_PILLAR_MOVED

#define FLAG_FOURTH_FLOOR_PILLAR_MOVED 0x9c8

Referenced by AnkohlRuinsFourthFloorCues, scAnkohlRuinsFinishMovingPillar() and scInit().

Definition at line 54 of file ankohl_ruins.c.

FLAG_FOURTH_FLOOR_SECOND_PILLAR_MOVED

#define FLAG_FOURTH_FLOOR_SECOND_PILLAR_MOVED 0x9c9

Referenced by AnkohlRuinsFourthFloorCues, scAnkohlRuinsFinishMovingPillar() and scInit().

Definition at line 55 of file ankohl_ruins.c.

FLAG_FOURTH_FLOOR_THIRD_PILLAR_MOVED

#define FLAG_FOURTH_FLOOR_THIRD_PILLAR_MOVED 0x9ca

Referenced by AnkohlRuinsFourthFloorCues, scAnkohlRuinsFinishMovingPillar() and scInit().

Definition at line 56 of file ankohl_ruins.c.

FLAG_FIFTH_FLOOR_PILLAR_MOVED

#define FLAG_FIFTH_FLOOR_PILLAR_MOVED 0x9cb

Referenced by AnkohlRuinsFifthFloorCues, scAnkohlRuinsFinishMovingPillar() and scInit().

Definition at line 57 of file ankohl_ruins.c.

FLAG_LEFT_FACE_HALF_PLACED

#define FLAG_LEFT_FACE_HALF_PLACED 0x9d9

The halves of stone faces pushed into place: the fourth floor's two, the half pushed into the fifth floor's gap, the second floor's half, and the great face's right half.

Referenced by scAnkohlRuinsPlaceFaceHalves() and scInit().

Definition at line 61 of file ankohl_ruins.c.

FLAG_RIGHT_FACE_HALF_PLACED

#define FLAG_RIGHT_FACE_HALF_PLACED 0x9da

Referenced by scAnkohlRuinsPlaceFaceHalves() and scInit().

Definition at line 62 of file ankohl_ruins.c.

FLAG_FACE_HALF_PUSHED_INTO_GAP

#define FLAG_FACE_HALF_PUSHED_INTO_GAP 0x9db

Referenced by AnkohlRuinsFifthFloorCues, scAnkohlRuinsPushFaceHalfIntoGap() and scInit().

Definition at line 63 of file ankohl_ruins.c.

FLAG_SECOND_FLOOR_FACE_HALF_PLACED

#define FLAG_SECOND_FLOOR_FACE_HALF_PLACED 0x9dc

Referenced by AnkohlRuinsSecondFloorCues, scAnkohlRuinsPlaceSecondFloorFaceHalf() and scInit().

Definition at line 64 of file ankohl_ruins.c.

FLAG_GREAT_FACE_HALF_PLACED

#define FLAG_GREAT_FACE_HALF_PLACED 0x9dd

Referenced by AnkohlRuinsThirdFloorCues, scAnkohlRuinsPlaceGreatFaceHalf(), scAnkohlRuinsStartGreatFaceSliding(), scAnkohlRuinsStartGreatFaceSlidingUpClose() and scInit().

Definition at line 65 of file ankohl_ruins.c.

FLAG_FIRST_SAND_DOOR_OPENED

#define FLAG_FIRST_SAND_DOOR_OPENED 0x9e2

The doors the buttons on the sand rooms' far ledges open, the first room's and the second's.

Referenced by scInit().

Definition at line 68 of file ankohl_ruins.c.

FLAG_SECOND_SAND_DOOR_OPENED

#define FLAG_SECOND_SAND_DOOR_OPENED 0x9e3

Referenced by scInit().

Definition at line 69 of file ankohl_ruins.c.

FLAG_FIRST_SAND_SWITCH_PRESSED

#define FLAG_FIRST_SAND_SWITCH_PRESSED FLAG_SCENE_TEMP(0x02)

The sand rooms' switches pressed, for this visit: the sand is rising or has risen in each.

Referenced by AnkohlRuinsSandRoomsCues and scAnkohlRuinsPressFirstSandSwitch().

Definition at line 72 of file ankohl_ruins.c.

FLAG_SECOND_SAND_SWITCH_PRESSED

#define FLAG_SECOND_SAND_SWITCH_PRESSED FLAG_SCENE_TEMP(0x03)

Referenced by AnkohlRuinsSandRoomsCues and scAnkohlRuinsPressSecondSandSwitch().

Definition at line 73 of file ankohl_ruins.c.

FLAG_ANKOHL_RUINS_REVEAL_SHOWN

#define FLAG_ANKOHL_RUINS_REVEAL_SHOWN FLAG_SCENE_TEMP(0x05)

Set while Reveal is up: the sand rooms stop trimming the sand's edge, and in every edition but the Japanese the fifth floor's gap lies open to a pushed half face.

Referenced by scAnkohlRuinsDrawSand(), scAnkohlRuinsEndReveal(), scAnkohlRuinsHideGap(), scAnkohlRuinsRevealGap() and scAnkohlRuinsStartReveal().

Definition at line 77 of file ankohl_ruins.c.

FLAG_GREAT_FACE_AT_REST

#define FLAG_GREAT_FACE_AT_REST FLAG_SCENE_TEMP(0x01)

Set once the great face has slid to the foot of its corridor, for this visit: the corridor stays closed behind it.

Referenced by scAnkohlRuinsSlideGreatFace() and scInit().

Definition at line 80 of file ankohl_ruins.c.

FLAG_SAND_ROOM_FULL

#define FLAG_SAND_ROOM_FULL FLAG_SCENE_TEMP(0x04)

Set once a sand room's sand has risen to the top, for this visit.

Referenced by scAnkohlRuinsRaiseFirstSand(), scAnkohlRuinsRaiseSecondSand() and scInit().

Definition at line 82 of file ankohl_ruins.c.

MAP_METATILE_FLOWING_SAND

#define MAP_METATILE_FLOWING_SAND MAP_METATILE_SECOND_ZONE

The attribute bit that marks the metatiles whose sand flows south here (scAnkohlRuinsFlowWithSand); the field engine reads it elsewhere as MAP_METATILE_SECOND_ZONE.

Referenced by scAnkohlRuinsFlowWithSand().

Definition at line 111 of file ankohl_ruins.c.

STONE_FACE_DROP_ROW

#define STONE_FACE_DROP_ROW 31

The row below the stone faces' ledge: a face pushed into it falls.

Referenced by scAnkohlRuinsPushStoneFaceOffLedge().

Definition at line 126 of file ankohl_ruins.c.

GAP_COLUMN

#define GAP_COLUMN 26

The metatile of the fifth floor's gap the half face drops into.

Referenced by scAnkohlRuinsPushFaceHalfIntoGap().

Definition at line 129 of file ankohl_ruins.c.

GAP_ROW

#define GAP_ROW 35

Referenced by scAnkohlRuinsPushFaceHalfIntoGap().

Definition at line 130 of file ankohl_ruins.c.

FOURTH_FLOOR_HALL_FIRST_ENTRANCE

#define FOURTH_FLOOR_HALL_FIRST_ENTRANCE

The fourth floor's first entrance into the hall of the face halves, where the sand flows; the hall's entrances are numbered on from it.

Referenced by scInit().

Definition at line 221 of file ankohl_ruins.c.

FOURTH_FLOOR_HALL_SOUND_LAST_ENTRANCE

#define FOURTH_FLOOR_HALL_SOUND_LAST_ENTRANCE

Referenced by scInit().

Definition at lines 227 and 230 of file ankohl_ruins.c.

SAND_RISE_MOVES

#define SAND_RISE_MOVES 16

The moves a rise of the sand takes, and the sand rows' end marker.

Referenced by scAnkohlRuinsRaiseFirstSand() and scAnkohlRuinsRaiseSecondSand().

Definition at line 235 of file ankohl_ruins.c.

SAND_ROWS_END

#define SAND_ROWS_END 99

Referenced by AnkohlRuinsFirstSandRows, AnkohlRuinsSecondSandRows, scAnkohlRuinsRaiseFirstSand() and scAnkohlRuinsRaiseSecondSand().

Definition at line 236 of file ankohl_ruins.c.

SAND_MASK_BYTES

#define SAND_MASK_BYTES (4 * TILE_SIZE_4BPP)

The sprite the sand's edge masks the screen with: 16 by 16 pixels, four tiles of colour 1.

Referenced by scAnkohlRuinsInitSand().

Definition at line 240 of file ankohl_ruins.c.

ACTOR_LEFT_PRONG_CHEST

#define ACTOR_LEFT_PRONG_CHEST 64

The Left Prong, lying on the top of the ruins.

Referenced by scInit().

Definition at line 337 of file ankohl_ruins.c.

EFFECT_SET_MODE

#define EFFECT_SET_MODE fdActorSelectAnimation

Referenced by EFFECT_SPAWN.

Definition at line 347 of file ankohl_ruins.c.

EFFECT_SET_SCRIPT

#define EFFECT_SET_SCRIPT fdActorStartScript

Referenced by EFFECT_SPAWN.

Definition at line 348 of file ankohl_ruins.c.

EFFECT_SPRITE_PRIORITY

#define EFFECT_SPRITE_PRIORITY

Definition at line 349 of file ankohl_ruins.c.

DEFINE_SAND_DOOR_BUTTON

#define DEFINE_SAND_DOOR_BUTTON(

Defines a sand room's door button: the first time it is stepped on, under flag, it clicks and the door at column column slides open with a boom, its three metatiles drawn open from row pictureRow down, and the door's metatile on row takes the attributes of (openColumn, row) so the party can walk through.

Definition at line 1441 of file ankohl_ruins.c.

Enumerations in detail

anonymous enum

enum { METATILE_BEHAVIOR_GREAT_FACE_CORRIDOR_FOOT, METATILE_BEHAVIOR_BEFORE_GREAT_FACE, METATILE_BEHAVIOR_FIRST_SAND_SWITCH, METATILE_BEHAVIOR_FIRST_SAND_DOOR_BUTTON, … }

The metatile behaviours the rooms' cue tables answer: the foot of the great face's corridor and the metatile right in front of the face at its top; the sand rooms' switches and their far ledges' buttons; and the pit on the fifth floor Felix jumps down to the fourth floor.

EnumeratorValueDescription
METATILE_BEHAVIOR_GREAT_FACE_CORRIDOR_FOOT40
METATILE_BEHAVIOR_BEFORE_GREAT_FACE41
METATILE_BEHAVIOR_FIRST_SAND_SWITCH40
METATILE_BEHAVIOR_FIRST_SAND_DOOR_BUTTON41
METATILE_BEHAVIOR_SECOND_SAND_SWITCH42
METATILE_BEHAVIOR_SECOND_SAND_DOOR_BUTTON43
METATILE_BEHAVIOR_PIT_TO_FOURTH_FLOOR13

Definition at line 88 of file ankohl_ruins.c.

anonymous enum

enum { CUE_CARRIED_OFF_LEDGE, CUE_RAISE_FIRST_SAND, CUE_RAISE_SECOND_SAND }

The cues the rooms' code raises: the flowing sand carrying Felix off a ledge, and each sand room's next rise.

EnumeratorValueDescription
CUE_CARRIED_OFF_LEDGE66
CUE_RAISE_FIRST_SAND68
CUE_RAISE_SECOND_SAND69

Definition at line 101 of file ankohl_ruins.c.

anonymous enum

enum { NUT_CHEST_PILLAR_END_COLUMN, THIRD_FLOOR_PILLAR_END_COLUMN, FOURTH_FLOOR_PILLAR_END_COLUMN, FOURTH_FLOOR_SECOND_PILLAR_END_COLUMN, … }

The metatile column each pillar Move pushes stands in at its track's end, where its flag is set and the set-up places it again.

EnumeratorValueDescription
NUT_CHEST_PILLAR_END_COLUMN4
THIRD_FLOOR_PILLAR_END_COLUMN32
FOURTH_FLOOR_PILLAR_END_COLUMN2
FOURTH_FLOOR_SECOND_PILLAR_END_COLUMN39
FOURTH_FLOOR_THIRD_PILLAR_END_COLUMN38
FIFTH_FLOOR_PILLAR_END_COLUMN17

Definition at line 115 of file ankohl_ruins.c.

ANKOHL_RUINS_FIRST_FLOOR_WAY

enum ANKOHL_RUINS_FIRST_FLOOR_WAY

The ways between the rooms of each floor, named by the room a way leaves and the room it leads to; a way's exit, the step trigger that takes it and the entrance at its foot share its number, so the way back is the entrance the exit leads to.

The first floor's: the entry hall the forest leads into, the hall of the seven stone faces north of it, the rooms south-west and east of that hall, the two rooms of three chests south-east and north-east of the entry hall, the rooms behind the first, second, third, fifth and sixth faces, and the lit hall in the north-west corner. The fourth face's way leads to the sand rooms and the seventh's up to the fifth floor.

EnumeratorValueDescription
WAY_FIRST_FLOOR_ENTRY_HALL_TO_STONE_FACES2
WAY_FIRST_FLOOR_ENTRY_HALL_TO_SOUTHEAST_CHESTS
WAY_FIRST_FLOOR_ENTRY_HALL_TO_NORTHEAST_CHESTS
WAY_FIRST_FLOOR_SOUTHEAST_CHESTS_TO_ENTRY_HALL
WAY_FIRST_FLOOR_NORTHEAST_CHESTS_TO_ENTRY_HALL
WAY_FIRST_FLOOR_EAST_TO_STONE_FACES8
WAY_FIRST_FLOOR_SOUTHWEST_TO_STONE_FACES
WAY_FIRST_FLOOR_STONE_FACES_TO_SOUTHWEST
WAY_FIRST_FLOOR_STONE_FACES_TO_ENTRY_HALL
WAY_FIRST_FLOOR_STONE_FACES_TO_EAST
WAY_FIRST_FLOOR_STONE_FACES_TO_BEHIND_FIRST_FACE
WAY_FIRST_FLOOR_STONE_FACES_TO_BEHIND_SECOND_FACE
WAY_FIRST_FLOOR_STONE_FACES_TO_BEHIND_THIRD_FACE
WAY_FIRST_FLOOR_STONE_FACES_TO_BEHIND_FIFTH_FACE17
WAY_FIRST_FLOOR_STONE_FACES_TO_BEHIND_SIXTH_FACE
WAY_FIRST_FLOOR_BEHIND_FIRST_FACE_TO_STONE_FACES20
WAY_FIRST_FLOOR_BEHIND_SECOND_FACE_TO_STONE_FACES
WAY_FIRST_FLOOR_BEHIND_THIRD_FACE_TO_STONE_FACES
WAY_FIRST_FLOOR_BEHIND_FIFTH_FACE_TO_STONE_FACES24
WAY_FIRST_FLOOR_BEHIND_SIXTH_FACE_TO_STONE_FACES
WAY_FIRST_FLOOR_BEHIND_FIRST_FACE_TO_NORTH_HALL27
WAY_FIRST_FLOOR_BEHIND_SIXTH_FACE_TO_NORTH_HALL29
WAY_FIRST_FLOOR_NORTH_HALL_TO_BEHIND_FIRST_FACE
WAY_FIRST_FLOOR_NORTH_HALL_TO_BEHIND_SIXTH_FACE

Definition at line 143 of file ankohl_ruins.c.

ANKOHL_RUINS_SECOND_FLOOR_WAY

enum ANKOHL_RUINS_SECOND_FLOOR_WAY

The second floor's: the south hall the stairs from the first floor reach, the hall of the face half north of it, up two ways of stairs, east and west, and the room of three weeds and the room of a chest south-east of them.

EnumeratorValueDescription
WAY_SECOND_FLOOR_WEEDS_TO_CHEST11
WAY_SECOND_FLOOR_CHEST_TO_WEEDS
WAY_SECOND_FLOOR_SOUTH_HALL_TO_FACE_HALL_EAST14
WAY_SECOND_FLOOR_FACE_HALL_TO_SOUTH_HALL_EAST
WAY_SECOND_FLOOR_SOUTH_HALL_TO_FACE_HALL_WEST
WAY_SECOND_FLOOR_FACE_HALL_TO_SOUTH_HALL_WEST

Definition at line 174 of file ankohl_ruins.c.

ANKOHL_RUINS_THIRD_FLOOR_WAY

enum ANKOHL_RUINS_THIRD_FLOOR_WAY

The third floor's: the lit hall in the north-east, with the pillar, and the room south of it whose corridor runs round in a loop, each with a way at its west and east end.

EnumeratorValueDescription
WAY_THIRD_FLOOR_NORTH_HALL_TO_SOUTH_LOOP_WEST5
WAY_THIRD_FLOOR_NORTH_HALL_TO_SOUTH_LOOP_EAST
WAY_THIRD_FLOOR_SOUTH_LOOP_TO_NORTH_HALL_WEST8
WAY_THIRD_FLOOR_SOUTH_LOOP_TO_NORTH_HALL_EAST10

Definition at line 187 of file ankohl_ruins.c.

ANKOHL_RUINS_FOURTH_FLOOR_WAY

enum ANKOHL_RUINS_FOURTH_FLOOR_WAY

The fourth floor's: the hall along its north side, the hall of the face halves in the south-west, and the corridor of weeds in the south-east.

EnumeratorValueDescription
WAY_FOURTH_FLOOR_NORTH_HALL_TO_FACE_HALVES3
WAY_FOURTH_FLOOR_NORTH_HALL_TO_SOUTHEAST8
WAY_FOURTH_FLOOR_SOUTHEAST_TO_NORTH_HALL11
WAY_FOURTH_FLOOR_FACE_HALVES_TO_NORTH_HALL14

Definition at line 197 of file ankohl_ruins.c.

ANKOHL_RUINS_FIFTH_FLOOR_WAY

enum ANKOHL_RUINS_FIFTH_FLOOR_WAY

The fifth floor's: the room where the stone face pours sand in the south-east and the room south-west of it, the room of brown and red blocks and the pillar's room north of it, and the lit hall in the north-west and the small room of the pit below it.

EnumeratorValueDescription
WAY_FIFTH_FLOOR_SAND_FACE_TO_SOUTHWEST1
WAY_FIFTH_FLOOR_SOUTHWEST_TO_SAND_FACE
WAY_FIFTH_FLOOR_BLOCKS_TO_PILLAR5
WAY_FIFTH_FLOOR_PILLAR_TO_BLOCKS
WAY_FIFTH_FLOOR_NORTHWEST_TO_PIT10
WAY_FIFTH_FLOOR_PIT_TO_NORTHWEST

Definition at line 209 of file ankohl_ruins.c.

ANKOHL_RUINS_SAND_MASK

enum ANKOHL_RUINS_SAND_MASK

How each of a sand room's masks moves as the sand rises (scAnkohlRuinsDrawSand): out west or east along a ledge's edge, up and out of the way once the sand is 16 pixels deep, or straight up until then.

EnumeratorValueDescription
SAND_MASK_WEST_SHALLOW
SAND_MASK_WEST
SAND_MASK_EAST
SAND_MASK_EAST_SHALLOW
SAND_MASK_UP_SHALLOW

Definition at line 245 of file ankohl_ruins.c.

ANKOHL_RUINS_FIRST_FLOOR_ACTOR_ID

enum ANKOHL_RUINS_FIRST_FLOOR_ACTOR_ID

The first floor (AnkohlRuinsFirstFloorPlacements).

EnumeratorValueDescription
ACTOR_NUT_CHEST_PILLARACTOR_FIRST_PLACEDThe pillar beside the Nut's chest, in the room behind the westmost face.
ACTOR_STONE_FACE_AACTOR_FIRST_PLACED + 2The seven stone faces in the north wall, west to east.
ACTOR_STONE_FACE_B
ACTOR_STONE_FACE_C
ACTOR_STONE_FACE_DUnused: placed at (0, 0), off the room; at its place in the row the wall's own face stands split open on a doorway.
ACTOR_STONE_FACE_E
ACTOR_STONE_FACE_F
ACTOR_STONE_FACE_G
ACTOR_FIRST_FLOOR_WEEDS_AThe fourteen clumps of weeds.
ACTOR_FIRST_FLOOR_WEEDS_B
ACTOR_FIRST_FLOOR_WEEDS_C
ACTOR_FIRST_FLOOR_WEEDS_D
ACTOR_FIRST_FLOOR_WEEDS_E
ACTOR_FIRST_FLOOR_WEEDS_F
ACTOR_FIRST_FLOOR_WEEDS_G
ACTOR_FIRST_FLOOR_WEEDS_H
ACTOR_FIRST_FLOOR_WEEDS_I
ACTOR_FIRST_FLOOR_WEEDS_J
ACTOR_FIRST_FLOOR_WEEDS_K
ACTOR_FIRST_FLOOR_WEEDS_L
ACTOR_FIRST_FLOOR_WEEDS_M
ACTOR_FIRST_FLOOR_WEEDS_N

Definition at line 255 of file ankohl_ruins.c.

ANKOHL_RUINS_SECOND_FLOOR_ACTOR_ID

enum ANKOHL_RUINS_SECOND_FLOOR_ACTOR_ID

The second floor (AnkohlRuinsSecondFloorPlacements).

EnumeratorValueDescription
ACTOR_SECOND_FLOOR_FACE_HALFACTOR_FIRST_PLACEDThe left half of a stone face, pushed into place.
ACTOR_SECOND_FLOOR_WEEDS_AIts three clumps of weeds.
ACTOR_SECOND_FLOOR_WEEDS_B
ACTOR_SECOND_FLOOR_WEEDS_C

Definition at line 288 of file ankohl_ruins.c.

ANKOHL_RUINS_THIRD_FLOOR_ACTOR_ID

enum ANKOHL_RUINS_THIRD_FLOOR_ACTOR_ID

The third floor (AnkohlRuinsThirdFloorPlacements).

EnumeratorValueDescription
ACTOR_THIRD_FLOOR_PILLARACTOR_FIRST_PLACED
ACTOR_GREAT_FACEThe great stone face, which slides down its corridor once its right half is in place.
ACTOR_GREAT_FACE_HALFIts right half, which Move pushes against it.

Definition at line 300 of file ankohl_ruins.c.

ANKOHL_RUINS_FOURTH_FLOOR_ACTOR_ID

enum ANKOHL_RUINS_FOURTH_FLOOR_ACTOR_ID

The fourth floor (AnkohlRuinsFourthFloorPlacements).

EnumeratorValueDescription
ACTOR_FOURTH_FLOOR_PILLARACTOR_FIRST_PLACED
ACTOR_LEFT_FACE_HALFThe two halves of a stone face: the left one stands
ACTOR_RIGHT_FACE_HALFin the room, the right one falls in through the fifth floor's gap.
ACTOR_FOURTH_FLOOR_WEEDS_AIts seven clumps of weeds.
ACTOR_FOURTH_FLOOR_WEEDS_B
ACTOR_FOURTH_FLOOR_WEEDS_C
ACTOR_FOURTH_FLOOR_WEEDS_D
ACTOR_FOURTH_FLOOR_WEEDS_E
ACTOR_FOURTH_FLOOR_WEEDS_F
ACTOR_FOURTH_FLOOR_WEEDS_G
ACTOR_FOURTH_FLOOR_SECOND_PILLAR
ACTOR_FOURTH_FLOOR_THIRD_PILLAR

Definition at line 309 of file ankohl_ruins.c.

ANKOHL_RUINS_FIFTH_FLOOR_ACTOR_ID

enum ANKOHL_RUINS_FIFTH_FLOOR_ACTOR_ID

The fifth floor (AnkohlRuinsFifthFloorPlacements).

EnumeratorValueDescription
ACTOR_FIFTH_FLOOR_PILLARACTOR_FIRST_PLACED
ACTOR_FACE_HALF_FOR_THE_GAPThe half face pushed into the gap Reveal shows.

Definition at line 329 of file ankohl_ruins.c.

Functions in detail

scAnkohlRuinsFlagCheck

static inline Sint32 scAnkohlRuinsFlagCheck(Sint32 flag)

References Sint32 and syGameFlagGet().

Referenced by scAnkohlRuinsPressFirstSandSwitch(), scAnkohlRuinsPressSecondSandSwitch() and scAnkohlRuinsSlideGreatFace().

Definition at line 339 of file ankohl_ruins.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References SceneEntrances.

Definition at line 355 of file ankohl_ruins.c.

scGetExitRegions

const SCENE_REGION *scGetExitRegions(void)

References AnkohlRuinsFifthFloorExitRegions, AnkohlRuinsLeftProngExitRegions and MainRoutineStateWork.

Definition at line 369 of file ankohl_ruins.c.

scGetExits

const Uint32 *scGetExits(void)

References SceneExits.

Definition at line 378 of file ankohl_ruins.c.

scAnkohlRuinsJumpActorDownLedge

static __inline__ void scAnkohlRuinsJumpActorDownLedge(Sint32 id, Sint32 pose, Sint32 flags)

Jumps actor id down a ledge (fdActorJumpDownLedge).

References fdActorJumpDownLedge() and Sint32.

Referenced by scAnkohlRuinsJumpDownPit().

Definition at line 384 of file ankohl_ruins.c.

scAnkohlRuinsJumpDownPit

void scAnkohlRuinsJumpDownPit(void)

Felix walks south into the pit in the middle of a small room on the fifth floor and jumps down it; the screen fades and he drops onto the fourth floor beside the left half of the stone face, landing in a ring of dust (scAnkohlRuinsLandFromFall).

References fdScriptPlaySound(), fdScriptSetFlag(), MainRoutineStateWork, scAnkohlRuinsJumpActorDownLedge(), scFieldActorSetSpritePriority() and scFieldScriptSetExitRequest().

Referenced by AnkohlRuinsFifthFloorCues.

Definition at line 394 of file ankohl_ruins.c.

scAnkohlRuinsLandFromFall

void scAnkohlRuinsLandFromFall(void)

Felix drops onto the fourth floor from the pit above, lands sitting in a ring of dust and shakes the ground, then stands up. In every edition but the Japanese.

References fdActorGet(), fdActorSetAnimation(), fdActorSetAttachedEffect(), fdEffectAdvanceMotion(), fdMapGridCenterOnFollowedPoint(), fdScriptEnd(), fdScriptPlaySound(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), MainRoutineStateWork, scFieldEffectSpawn(), scFieldMapGridWaitForShakeToSettle(), scFieldScriptEndLastingPsynergy(), scFieldScriptWait(), Sint32, syCos(), sySin() and sySynch().

Referenced by scInit().

Definition at line 417 of file ankohl_ruins.c.

scAnkohlRuinsSetUpWeeds

Sint32 scAnkohlRuinsSetUpWeeds(ACTOR *actor)

The call AnkohlRuinsWeedsScript makes: clears the clump's sprite flags, draws it at priority 2 and stands it four pixels lower.

References fdActorSetSpriteFlags() and Sint32.

Referenced by AnkohlRuinsWeedsScript.

Definition at line 487 of file ankohl_ruins.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

References AnkohlRuinsFifthFloorPlacements, AnkohlRuinsFirstFloorPlacements, AnkohlRuinsFourthFloorPlacements, AnkohlRuinsLeftProngPlacements, AnkohlRuinsPlacements, AnkohlRuinsSandRoomsPlacements, AnkohlRuinsSecondFloorPlacements, AnkohlRuinsThirdFloorPlacements and MainRoutineStateWork.

Definition at line 506 of file ankohl_ruins.c.

scAnkohlRuinsSinkIntoSand

void scAnkohlRuinsSinkIntoSand(void)

Felix sinks into the ground with Sand and moves on the sand layer, under the ruins' blocks and pillars.

References fdActorGet() and MainRoutineStateWork.

Referenced by AnkohlRuinsFifthFloorCues, AnkohlRuinsFirstFloorCues, AnkohlRuinsFourthFloorCues, AnkohlRuinsSandRoomsCues, AnkohlRuinsSecondFloorCues and AnkohlRuinsThirdFloorCues.

Definition at line 527 of file ankohl_ruins.c.

scAnkohlRuinsRiseFromSand

void scAnkohlRuinsRiseFromSand(void)

Felix comes up out of the Sand and walks on the ground again.

References fdActorGet() and MainRoutineStateWork.

Referenced by AnkohlRuinsFifthFloorCues, AnkohlRuinsFirstFloorCues, AnkohlRuinsFourthFloorCues, AnkohlRuinsSandRoomsCues, AnkohlRuinsSecondFloorCues and AnkohlRuinsThirdFloorCues.

Definition at line 534 of file ankohl_ruins.c.

scAnkohlRuinsStartMovingPillar

void scAnkohlRuinsStartMovingPillar(Sint32 unused, Sint32 id)

Nothing visible happens as Felix starts to cast Move on one of the ruins' pillars; the game rewrites the floor metatiles around the pillar for the push. It rewrites the metatiles beside the pillar by the Nut's chest, the third floor's pillar, the fourth floor's three and the fifth floor's one. For the half face beside the fifth floor's gap it copies in the gap's metatiles, in every edition but the Japanese only while Reveal shows the gap.

References fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatiles(), MainRoutineStateWork and Sint32.

Referenced by AnkohlRuinsFifthFloorCues, AnkohlRuinsFirstFloorCues, AnkohlRuinsFourthFloorCues and AnkohlRuinsThirdFloorCues.

Definition at line 546 of file ankohl_ruins.c.

scAnkohlRuinsFinishMovingPillar

void scAnkohlRuinsFinishMovingPillar(Sint32 unused, Sint32 id)

Felix pushes one of the ruins' pillars a metatile along with Move, and pushed to the end of its short track it stays there for good: the one beside the Nut's chest slides east into its groove. The game fixes the metatiles the pillar has left and entered, and at the track's end sets the pillar's flag, so that the set-up puts it there again.

References fdActorGet(), fdMapGridCopyMetatileAttributes(), fdScriptSetFlag(), MainRoutineStateWork and Sint32.

Referenced by AnkohlRuinsFifthFloorCues, AnkohlRuinsFirstFloorCues, AnkohlRuinsFourthFloorCues, AnkohlRuinsThirdFloorCues and scAnkohlRuinsFinishPushing().

Definition at line 599 of file ankohl_ruins.c.

scAnkohlRuinsPushStoneFaceOffLedge

void scAnkohlRuinsPushStoneFaceOffLedge(Sint32 unused, Sint32 face)

Felix pushes one of the seven stone faces in the north wall of the first floor south off its ledge with Move; it falls with a puff of dust and is gone for good, leaving open the doorway it stood in front of.

References fdActorGet(), fdActorSetSpritePriorityDirect(), fdScriptPlaySound(), fdScriptSetFlag(), Sint32 and sySynch().

Referenced by AnkohlRuinsFirstFloorCues.

Definition at line 670 of file ankohl_ruins.c.

scAnkohlRuinsPourSand

void scAnkohlRuinsPourSand( Sint32 rows, Sint32 ticks, Sint32 x, Sint32 y, Sint32 startZ, Sint32 count)

Sand pours down from above: rows rows of count grains a metatile apart, each row two pixels further south, ticks apart.

References scFieldEffectSpawn(), scFieldScriptWait(), Sint32 and syRandom().

Referenced by scAnkohlRuinsPlaceFaceHalves() and scAnkohlRuinsPlaceSecondFloorFaceHalf().

Definition at line 710 of file ankohl_ruins.c.

scAnkohlRuinsPlaceFaceHalves

void scAnkohlRuinsPlaceFaceHalves(Sint32 unused, Sint32 id)

Felix pushes a half of the stone face on the fourth floor with Move, and once it reaches its place, the left half at metatile (12, 45) and the right half beside it at (14, 45), it settles with a boom. When both halves are in place the ground shakes, the camera looks at the face, and sand pours down below it, row by row, into a slope. The slope is the face's metatiles copied in from beside the room, a row at a time, as in scAnkohlRuinsPlaceSecondFloorFaceHalf.

References fdActorGetById(), fdMapGridCopyMetatiles(), fdMapGridCopyMetatilesLayered(), fdScriptEnd(), fdScriptPlaySound(), fdScriptSetFlag(), fdScriptStart(), scActorWaitToLandWithSound(), scAnkohlRuinsPourSand(), scFieldScriptEndLastingPsynergy(), scFieldScriptWait(), Sint32 and syGameFlagGet().

Referenced by AnkohlRuinsFourthFloorCues and scAnkohlRuinsFinishPushing().

Definition at line 762 of file ankohl_ruins.c.

scAnkohlRuinsPlaceSecondFloorFaceHalf

void scAnkohlRuinsPlaceSecondFloorFaceHalf(Sint32 unused, Sint32 id)

Felix pushes the left half of the stone face in the back room of the second floor east with Move, and when it meets the right half in the wall, at metatile (12, 5), it settles with a boom: the ground shakes, the camera looks at the face, and sand pours down from it, row by row, and fills the hall below it.

References fdActorGetById(), fdMapGridCopyMetatiles(), fdScriptEnd(), fdScriptPlaySound(), fdScriptSetFlag(), fdScriptStart(), scActorWaitToLandWithSound(), scAnkohlRuinsPourSand(), scFieldScriptEndLastingPsynergy(), scFieldScriptWait() and Sint32.

Referenced by AnkohlRuinsSecondFloorCues.

Definition at line 825 of file ankohl_ruins.c.

scAnkohlRuinsPlaceGreatFaceHalf

void scAnkohlRuinsPlaceGreatFaceHalf(Sint32 unused, Sint32 id)

Felix pushes the right half of the great stone face west with Move, and when it meets the face, at metatile (15, 24), it sinks into place with a thump, the face is whole, and its eyes glow green. Now stepping into the face's corridor sets it sliding (scAnkohlRuinsStartGreatFaceSliding).

References fdActorGetById(), fdActorSetAnimation(), fdActorSetSpriteFlags(), fdScriptPlaySound(), fdScriptSetFlag(), scFieldScriptWait() and Sint32.

Referenced by AnkohlRuinsThirdFloorCues.

Definition at line 869 of file ankohl_ruins.c.

scAnkohlRuinsFlowWithSand

void scAnkohlRuinsFlowWithSand(void)

Felix, standing on the sand that flows down the fourth floor's slide or the fifth floor's sand, drifts south with it, and where it runs over a drop it carries him off (scAnkohlRuinsCarriedOffLedge). It runs every tick from the room's set-up, and moves him and the camera half a pixel south on metatiles marked MAP_METATILE_FLOWING_SAND, unless he is under the Sand.

References fdActorGet(), fdMapGridCheckCollision(), fdScriptGetFlag(), MainRoutineStateWork, MapGridMetatileBuffer and Sint32.

Referenced by scInit().

Definition at line 901 of file ankohl_ruins.c.

scAnkohlRuinsCarriedOffLedge

void scAnkohlRuinsCarriedOffLedge(void)

Felix, carried by the flowing sand to the edge of a drop on the fifth floor, slides over it, starts with a "!" and falls to the floor below with a thump.

References fdActorGet(), fdActorSetAnimation(), fdActorSetAttachedEffect(), fdActorSetDestinationOffset(), fdActorShowEmoteById(), fdScriptEnd(), fdScriptPlaySound(), fdScriptStart(), MainRoutineStateWork, scActorWaitToLandWithSound(), scFieldActorWaitForMoveById(), scFieldScriptEndLastingPsynergy() and scFieldScriptWait().

Referenced by AnkohlRuinsFifthFloorCues.

Definition at line 945 of file ankohl_ruins.c.

scAnkohlRuinsFinishPushing

void scAnkohlRuinsFinishPushing(Sint32 unused, Sint32 id)

Felix pushes a face half or a pillar on the fourth floor by walking into it: once he has leant on it a moment where the floor lets him push, the field engine shoves it a metatile ahead (fdRunPushMetatile) and then this runs, the halves going on as scAnkohlRuinsPlaceFaceHalves and the pillars as scAnkohlRuinsFinishMovingPillar, as after Move. A push by Move does not come here: its own rows run those two directly.

References scAnkohlRuinsFinishMovingPillar(), scAnkohlRuinsPlaceFaceHalves() and Sint32.

Referenced by AnkohlRuinsFourthFloorCues.

Definition at line 975 of file ankohl_ruins.c.

scAnkohlRuinsScatterWeeds

void scAnkohlRuinsScatterWeeds(Sint32 unused, Sint32 id)

Felix casts Whirlwind ("Conjure wind to scatter weeds.") on a clump of weeds on the first, second or fourth floor: the leaves blow away and the clump is gone for good. Most hide nothing; a few hide the way on, such as the one in the middle of the entrance hall and the one at the upper left of the first floor, over a stairway. Whirlwind itself blows the clump away; this only sets its flag, so that the set-up leaves it out next time.

References fdScriptSetFlag(), MainRoutineStateWork and Sint32.

Referenced by AnkohlRuinsFirstFloorCues, AnkohlRuinsFourthFloorCues and AnkohlRuinsSecondFloorCues.

Definition at line 989 of file ankohl_ruins.c.

scAnkohlRuinsDrawSand

void scAnkohlRuinsDrawSand(void)

The rising sand of the sand rooms, drawn each tick: the sand's picture is raised to its level, and its edges against the ledges are trimmed. Until the sand is 32 pixels deep, and while Reveal is not up, eight sprites drawn into the object window mask its edge, each moved by the level as its kind says; map layer 1, the sand, is scrolled by the level over its base.

References AnkohlRuinsSand, fdMapStateView(), fdScriptGetFlag(), Sint32, syOAMAddSpriteAtDepthClamped() and VramCacheEntries.

Referenced by scAnkohlRuinsInitSand().

Definition at line 1004 of file ankohl_ruins.c.

scAnkohlRuinsInitSand

void scAnkohlRuinsInitSand(Sint32 unused)

Sets up the sand rooms' rising sand on entering one: the tile of the masks that trim its edge, the window they draw into, the event that draws it, and the masks for the room the entrance leads into.

References AnkohlRuinsSand, fdScriptGetFlag(), MainRoutineStateWork, mnVRAMLoad(), scAnkohlRuinsDrawSand(), Sint32, syHeapAllocate(), syHeapRelease(), sySetTickEvent() and syVRAMCacheFindFreeEntry().

Referenced by scInit().

Definition at line 1087 of file ankohl_ruins.c.

scAnkohlRuinsCountSandTime

void scAnkohlRuinsCountSandTime(void)

Counts the time to the sand's next rise after the switch; when it runs out, the room's sand rises again (CUE_RAISE_FIRST_SAND or CUE_RAISE_SECOND_SAND).

References AnkohlRuinsSandRiseDelay, AnkohlRuinsSandRoom, AnkohlRuinsSandTimer, fdScriptGetFlag() and scFieldCloseEvent().

Referenced by scAnkohlRuinsRaiseFirstSand() and scAnkohlRuinsRaiseSecondSand().

Definition at line 1179 of file ankohl_ruins.c.

scAnkohlRuinsRaiseFirstSand

void scAnkohlRuinsRaiseFirstSand(void)

The sand in the first sand room rises a step as the ground shakes and the great stone face in the north wall pours, lifting Felix if he stands on it, until the room is full and the door button on the far ledge can be reached. A step takes SAND_RISE_MOVES moves; after it the room's metatiles, read from AnkohlRuinsFirstSandRows, follow the new level, and while the sand is below 32 pixels the next rise is timed (scAnkohlRuinsCountSandTime).

References AnkohlRuinsFirstSandRows, AnkohlRuinsSand, AnkohlRuinsSandStep, AnkohlRuinsSandStepDelay, AnkohlRuinsSandTimer, fdActorGet(), fdActorSetAnimation(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatiles(), fdMapGridCopyMetatilesLayered(), fdScriptClearFlag(), fdScriptPlaySound(), fdScriptSetFlag(), MainRoutineStateWork, scAnkohlRuinsCountSandTime(), scFieldScriptWait(), Sint32 and sySetTickEvent().

Referenced by AnkohlRuinsSandRoomsCues and scAnkohlRuinsPressFirstSandSwitch().

Definition at line 1204 of file ankohl_ruins.c.

scAnkohlRuinsRaiseSecondSand

void scAnkohlRuinsRaiseSecondSand(void)

The sand in the second sand room rises a step, as in the first (scAnkohlRuinsRaiseFirstSand), the shaking harder.

References AnkohlRuinsSand, AnkohlRuinsSandStep, AnkohlRuinsSandStepDelay, AnkohlRuinsSandTimer, AnkohlRuinsSecondSandRows, fdActorGet(), fdActorSetAnimation(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatiles(), fdMapGridCopyMetatilesLayered(), fdScriptClearFlag(), fdScriptPlaySound(), fdScriptSetFlag(), MainRoutineStateWork, scAnkohlRuinsCountSandTime(), scFieldScriptWait(), Sint32 and sySetTickEvent().

Referenced by AnkohlRuinsSandRoomsCues and scAnkohlRuinsPressSecondSandSwitch().

Definition at line 1308 of file ankohl_ruins.c.

scAnkohlRuinsPressFirstSandSwitch

void scAnkohlRuinsPressFirstSandSwitch(void)

Felix steps onto the grey switch on the west ledge of the first sand room (metatile (1, 7)): the great stone face in the north wall opens its mouth and pours sand, which rises a step, then slowly another and another until the room is full. Saving is barred while it rises.

References AnkohlRuinsSandRiseDelay, AnkohlRuinsSandRoom, AnkohlRuinsSandStep, AnkohlRuinsSandStepDelay, AnkohlRuinsSandTimer, fdMapGridCopyMetatiles(), fdScriptPlaySound(), fdScriptSetFlag(), scAnkohlRuinsFlagCheck(), scAnkohlRuinsRaiseFirstSand(), scFieldScriptEndLastingPsynergy(), scFieldScriptWait() and Sint32.

Referenced by AnkohlRuinsSandRoomsCues.

Definition at line 1412 of file ankohl_ruins.c.

scAnkohlRuinsOpenFirstSandDoor

DEFINE_SAND_DOOR_BUTTON( scAnkohlRuinsOpenFirstSandDoor, FLAG_FIRST_SAND_DOOR_OPENED, 14, 65, 15, 5)

Felix steps on the first sand room's door button and the door in its north-east wall, metatile (14, 5), slides open. The button is the block 16 pixels high at metatile (11, 5), east of the great stone face: once the sand has risen two steps, to 16 pixels, scAnkohlRuinsRaiseFirstSand gives that metatile the button's behaviour from metatile (18, 8), which the map keeps east of the rooms where no camera shows it, and the next rise takes it away again.

Referenced by AnkohlRuinsSandRoomsCues.

Definition at line 1468 of file ankohl_ruins.c.

scAnkohlRuinsPressSecondSandSwitch

void scAnkohlRuinsPressSecondSandSwitch(void)

Felix steps onto the grey switch on the east ledge of the second sand room (metatile (12, 25)): the great stone face in the north wall pours sand, which rises as in the first sand room but faster.

References AnkohlRuinsSandRiseDelay, AnkohlRuinsSandRoom, AnkohlRuinsSandStep, AnkohlRuinsSandStepDelay, AnkohlRuinsSandTimer, fdMapGridCopyMetatiles(), fdScriptPlaySound(), fdScriptSetFlag(), scAnkohlRuinsFlagCheck(), scAnkohlRuinsRaiseSecondSand(), scFieldScriptEndLastingPsynergy(), scFieldScriptWait() and Sint32.

Referenced by AnkohlRuinsSandRoomsCues.

Definition at line 1474 of file ankohl_ruins.c.

scAnkohlRuinsOpenSecondSandDoor

DEFINE_SAND_DOOR_BUTTON( scAnkohlRuinsOpenSecondSandDoor, FLAG_SECOND_SAND_DOOR_OPENED, 2, 83, 1, 23)

Felix steps on the second sand room's door button and the door in its north-west wall, metatile (2, 23), slides open. The button is the block 16 pixels high at metatile (4, 23), two metatiles east of the door: once the sand has risen two steps, to 16 pixels, scAnkohlRuinsRaiseSecondSand gives that metatile the button's behaviour from metatile (18, 7), which the map keeps east of the rooms where no camera shows it, and the next rise takes it away again.

Referenced by AnkohlRuinsSandRoomsCues.

Definition at line 1505 of file ankohl_ruins.c.

scAnkohlRuinsSlideGreatFace

void scAnkohlRuinsSlideGreatFace(void)

The great stone face slides south down its corridor, shoving Felix ahead of it if he stands in its way and carrying him along if he stands right behind it, unless he is under the Sand; it stops at the corridor's foot. It moves four fifths of a pixel a tick. While it passes the sand patch midway, from row 31 until it reaches row 37, Sand cannot end (FLAG_SAND_CANNOT_END). Past row 41 it stops, the shaking dies away with a sound, and the six metatiles at the corridor's foot where it comes to rest, (13, 41) to (15, 42), where the corridor opens onto the hall below, become wall: Felix cannot walk through the face there, and the metatiles that set the slide off are gone with them. FLAG_GREAT_FACE_AT_REST keeps them so for this visit.

References fdActorGetById(), fdMapGridCopyMetatileAttributes(), fdScriptClearFlag(), fdScriptPlaySound(), fdScriptSetFlag(), MainRoutineStateWork, scAnkohlRuinsFlagCheck(), scFieldCloseEvent(), Sint32 and syGameFlagGet().

Referenced by scAnkohlRuinsStartGreatFaceSliding() and scAnkohlRuinsStartGreatFaceSlidingUpClose().

Definition at line 1518 of file ankohl_ruins.c.

scAnkohlRuinsStartGreatFaceSliding

void scAnkohlRuinsStartGreatFaceSliding(void)

Once the great face is whole, Felix stepping into the foot of its corridor (metatiles (13, 42) to (15, 42)) sets it moving: there is a rush, the ground shakes, the camera looks up the corridor at the face as it starts to slide down towards him, and then follows Felix again. Saving and battles are barred while it slides.

References fdActorGet(), fdCameraWaitForArrival(), fdMapGridCopyMetatileAttributes(), fdScriptEnd(), fdScriptGetFlag(), fdScriptPlaySound(), fdScriptSetFlag(), fdScriptStart(), MainRoutineStateWork, scAnkohlRuinsSlideGreatFace(), scFieldScriptEndLastingPsynergy(), scFieldScriptWait(), scScriptCameraFollowActor(), Sint32, syFindEvent() and sySetTickEvent().

Referenced by AnkohlRuinsThirdFloorCues.

Definition at line 1577 of file ankohl_ruins.c.

scAnkohlRuinsStartGreatFaceSlidingUpClose

void scAnkohlRuinsStartGreatFaceSlidingUpClose(void)

Once the great face is whole, Felix stepping right in front of it at the top of its corridor (metatile (13, 26)) sets it sliding at once, the ground shaking, with no look up the corridor.

References fdActorGet(), fdMapGridCopyMetatileAttributes(), fdScriptEnd(), fdScriptGetFlag(), fdScriptSetFlag(), scAnkohlRuinsSlideGreatFace(), Sint32, syFindEvent() and sySetTickEvent().

Referenced by AnkohlRuinsThirdFloorCues.

Definition at line 1610 of file ankohl_ruins.c.

scAnkohlRuinsPushFaceHalfIntoGap

void scAnkohlRuinsPushFaceHalfIntoGap(void)

Felix pushes the half face in the room of brown and red blocks on the fifth floor into the gap Reveal shows (metatile (26, 35)): it falls in, and the screen fades to the fourth floor below, where it drops in from above with a thump, then back to Felix.

References fdActorGet(), fdActorTableSnapshot(), fdMapGridCopyMetatiles(), fdScriptPlaySound(), fdScriptSetFlag(), scActorWaitToLandWithSound() and scFieldScriptSetExitRequest().

Referenced by AnkohlRuinsFifthFloorCues.

Definition at line 1644 of file ankohl_ruins.c.

scAnkohlRuinsRevealGap

void scAnkohlRuinsRevealGap(void)

Reveal on the fifth floor shows a gap in the floor of the room of brown and red blocks, beside the half face (metatiles (25, 34) to (27, 38)).

References fdMapGridCopyMetatiles() and fdScriptSetFlag().

Referenced by AnkohlRuinsFifthFloorCues.

Definition at line 1667 of file ankohl_ruins.c.

scAnkohlRuinsHideGap

void scAnkohlRuinsHideGap(void)

As Reveal fades, the gap in the room of brown and red blocks is hidden again.

References fdMapGridCopyMetatiles() and fdScriptClearFlag().

Referenced by AnkohlRuinsFifthFloorCues.

Definition at line 1678 of file ankohl_ruins.c.

scAnkohlRuinsStartReveal

void scAnkohlRuinsStartReveal(void)

Nothing visible happens to the sand when Felix casts Reveal in the sand rooms; the game stops trimming the sand's edge while Reveal is up.

References syGameFlagSet().

Referenced by AnkohlRuinsSandRoomsCues.

Definition at line 1689 of file ankohl_ruins.c.

scAnkohlRuinsEndReveal

void scAnkohlRuinsEndReveal(void)

As Reveal fades in the sand rooms the sand's edge is trimmed again.

References syGameFlagClear().

Referenced by AnkohlRuinsSandRoomsCues.

Definition at line 1695 of file ankohl_ruins.c.

scGetCues

const CUE *scGetCues(void)

References AnkohlRuinsCues, AnkohlRuinsFifthFloorCues, AnkohlRuinsFirstFloorCues, AnkohlRuinsFourthFloorCues, AnkohlRuinsLeftProngCues, AnkohlRuinsSandRoomsCues, AnkohlRuinsSecondFloorCues, AnkohlRuinsThirdFloorCues and MainRoutineStateWork.

Definition at line 1700 of file ankohl_ruins.c.

scInit

Sint32 scInit(Sint32 unused)

Sets up the room the party comes into: what Move and Whirlwind have done stays done, the great face rests where it slid, the fourth floor's sand slope stands and the half pushed through the gap drops in, the sand flows, the sand rooms' sand stands at its level, and the Left Prong sparkles.

References AnkohlRuinsSand, fdActorGetById(), fdActorSetAnimation(), fdEffectStartBlankOverlay(), fdMapGridCenterOnFollowedPoint(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatiles(), fdMapGridCopyMetatilesLayered(), fdScriptClearFlag(), fdScriptPlaySound(), fdScriptSetFlag(), fdScriptStart(), fdScriptStartScreenTransition(), MainRoutineStateWork, scAnkohlRuinsFlowWithSand(), scAnkohlRuinsInitSand(), scAnkohlRuinsLandFromFall(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetExitRequest(), scFieldScriptWait(), scProngSparkle(), Sint32, syGameFlagGet(), sySetTickEvent() and sySynch().

Definition at line 1725 of file ankohl_ruins.c.

scPrepareMap

Sint32 scPrepareMap(void)

References Sint32.

Definition at line 2067 of file ankohl_ruins.c.

Variables in detail

AnkohlRuinsSand

ANKOHL_RUINS_SPR_STATE AnkohlRuinsSand

The sand rooms' rising sand: its level, and the masks that trim its edge.

Referenced by scAnkohlRuinsDrawSand(), scAnkohlRuinsInitSand(), scAnkohlRuinsRaiseFirstSand(), scAnkohlRuinsRaiseSecondSand() and scInit().

Definition at line 353 of file ankohl_ruins.c.

AnkohlRuinsSandStepDelay

extern Sint16 AnkohlRuinsSandStepDelay

Sint16 AnkohlRuinsSandStepDelay

Ticks between the sand's moves as it rises.

Referenced by scAnkohlRuinsPressFirstSandSwitch(), scAnkohlRuinsPressSecondSandSwitch(), scAnkohlRuinsRaiseFirstSand() and scAnkohlRuinsRaiseSecondSand().

Definition at lines 360 and 2487 of file ankohl_ruins.c.

AnkohlRuinsSandTimer

extern Sint16 AnkohlRuinsSandTimer

Sint16 AnkohlRuinsSandTimer

Ticks since the sand last rose.

Referenced by scAnkohlRuinsCountSandTime(), scAnkohlRuinsPressFirstSandSwitch(), scAnkohlRuinsPressSecondSandSwitch(), scAnkohlRuinsRaiseFirstSand() and scAnkohlRuinsRaiseSecondSand().

Definition at lines 361 and 2490 of file ankohl_ruins.c.

AnkohlRuinsSandRiseDelay

extern Sint16 AnkohlRuinsSandRiseDelay

Sint16 AnkohlRuinsSandRiseDelay

Ticks between the sand's rises.

Referenced by scAnkohlRuinsCountSandTime(), scAnkohlRuinsPressFirstSandSwitch() and scAnkohlRuinsPressSecondSandSwitch().

Definition at lines 362 and 2493 of file ankohl_ruins.c.

AnkohlRuinsSandStep

extern Sint32 AnkohlRuinsSandStep

Sint32 AnkohlRuinsSandStep

How far the sand rises each move, in 16.16 pixels.

References Sint32.

Referenced by scAnkohlRuinsPressFirstSandSwitch(), scAnkohlRuinsPressSecondSandSwitch(), scAnkohlRuinsRaiseFirstSand() and scAnkohlRuinsRaiseSecondSand().

Definition at lines 363 and 2496 of file ankohl_ruins.c.

AnkohlRuinsSandRoom

extern Sint32 AnkohlRuinsSandRoom

Sint32 AnkohlRuinsSandRoom

Which sand room's switch was pressed: 1 or 2.

References Sint32.

Referenced by scAnkohlRuinsCountSandTime(), scAnkohlRuinsPressFirstSandSwitch() and scAnkohlRuinsPressSecondSandSwitch().

Definition at lines 364 and 2499 of file ankohl_ruins.c.

AnkohlRuinsFifthFloorExitRegions

extern SCENE_REGION AnkohlRuinsFifthFloorExitRegions[]

SCENE_REGION AnkohlRuinsFifthFloorExitRegions[]

The fifth floor's way out onto the top of the ruins.

Referenced by scGetExitRegions().

Definition at lines 366 and 2104 of file ankohl_ruins.c.

AnkohlRuinsLeftProngExitRegions

extern SCENE_REGION AnkohlRuinsLeftProngExitRegions[]

SCENE_REGION AnkohlRuinsLeftProngExitRegions[]

The way back down from the top of the ruins to the fifth floor.

Referenced by scGetExitRegions().

Definition at lines 367 and 2111 of file ankohl_ruins.c.

AnkohlRuinsPlacements

extern ACTOR_PLACE AnkohlRuinsPlacements[]

ACTOR_PLACE AnkohlRuinsPlacements[]

The forest at the ruins' doorway: no actors.

Referenced by scGetActorPlacements().

Definition at lines 497 and 2355 of file ankohl_ruins.c.

AnkohlRuinsFirstFloorPlacements

extern ACTOR_PLACE AnkohlRuinsFirstFloorPlacements[]

ACTOR_PLACE AnkohlRuinsFirstFloorPlacements[]

The first floor's actors, in ANKOHL_RUINS_FIRST_FLOOR_ACTOR_ID's order.

References AnkohlRuinsWeedsScript and Sint32.

Referenced by scGetActorPlacements().

Definition at lines 498 and 2360 of file ankohl_ruins.c.

AnkohlRuinsSecondFloorPlacements

extern ACTOR_PLACE AnkohlRuinsSecondFloorPlacements[]

ACTOR_PLACE AnkohlRuinsSecondFloorPlacements[]

The second floor's actors, in ANKOHL_RUINS_SECOND_FLOOR_ACTOR_ID's order.

References AnkohlRuinsFaceHalfScript, AnkohlRuinsWeedsScript and Sint32.

Referenced by scGetActorPlacements().

Definition at lines 499 and 2411 of file ankohl_ruins.c.

AnkohlRuinsThirdFloorPlacements

extern ACTOR_PLACE AnkohlRuinsThirdFloorPlacements[]

ACTOR_PLACE AnkohlRuinsThirdFloorPlacements[]

The third floor's actors, in ANKOHL_RUINS_THIRD_FLOOR_ACTOR_ID's order.

References AnkohlRuinsFaceHalfScript, AnkohlRuinsGreatFaceScript and Sint32.

Referenced by scGetActorPlacements().

Definition at lines 500 and 2425 of file ankohl_ruins.c.

AnkohlRuinsFourthFloorPlacements

extern ACTOR_PLACE AnkohlRuinsFourthFloorPlacements[]

ACTOR_PLACE AnkohlRuinsFourthFloorPlacements[]

The fourth floor's actors, in ANKOHL_RUINS_FOURTH_FLOOR_ACTOR_ID's order.

References AnkohlRuinsFaceHalfScript, AnkohlRuinsWeedsScript and Sint32.

Referenced by scGetActorPlacements().

Definition at lines 501 and 2437 of file ankohl_ruins.c.

AnkohlRuinsFifthFloorPlacements

extern ACTOR_PLACE AnkohlRuinsFifthFloorPlacements[]

ACTOR_PLACE AnkohlRuinsFifthFloorPlacements[]

The fifth floor's actors, in ANKOHL_RUINS_FIFTH_FLOOR_ACTOR_ID's order.

References AnkohlRuinsFaceHalfScript and Sint32.

Referenced by scGetActorPlacements().

Definition at lines 502 and 2467 of file ankohl_ruins.c.

AnkohlRuinsSandRoomsPlacements

extern ACTOR_PLACE AnkohlRuinsSandRoomsPlacements[]

ACTOR_PLACE AnkohlRuinsSandRoomsPlacements[]

The sand rooms' actors: none.

Referenced by scGetActorPlacements().

Definition at lines 503 and 2477 of file ankohl_ruins.c.

AnkohlRuinsLeftProngPlacements

extern ACTOR_PLACE AnkohlRuinsLeftProngPlacements[]

ACTOR_PLACE AnkohlRuinsLeftProngPlacements[]

The top of the ruins' actors: none.

Referenced by scGetActorPlacements().

Definition at lines 504 and 2482 of file ankohl_ruins.c.

AnkohlRuinsFirstSandRows

extern ANKOHL_RUINS_SAND_ROW AnkohlRuinsFirstSandRows[]

ANKOHL_RUINS_SAND_ROW AnkohlRuinsFirstSandRows[]

The first sand room's metatile blocks, each with the sand level that covers it, ended by SAND_ROWS_END.

Referenced by scAnkohlRuinsRaiseFirstSand().

Definition at lines 1196 and 2077 of file ankohl_ruins.c.

AnkohlRuinsSecondSandRows

extern ANKOHL_RUINS_SAND_ROW AnkohlRuinsSecondSandRows[]

ANKOHL_RUINS_SAND_ROW AnkohlRuinsSecondSandRows[]

The second sand room's metatile blocks, each with the sand level that covers it, ended by SAND_ROWS_END.

Referenced by scAnkohlRuinsRaiseSecondSand().

Definition at lines 1304 and 2085 of file ankohl_ruins.c.

AnkohlRuinsCues

extern CUE AnkohlRuinsCues[]

CUE AnkohlRuinsCues[]

The forest at the ruins' doorway: its two exits.

Referenced by scGetCues().

Definition at lines 1631 and 2502 of file ankohl_ruins.c.

AnkohlRuinsFirstFloorCues

extern CUE AnkohlRuinsFirstFloorCues[]

CUE AnkohlRuinsFirstFloorCues[]

The first floor's exits and stairs, Sand, Move on the stone faces and the pillar, and Whirlwind on the weeds.

References scAnkohlRuinsFinishMovingPillar(), scAnkohlRuinsPushStoneFaceOffLedge(), scAnkohlRuinsRiseFromSand(), scAnkohlRuinsScatterWeeds(), scAnkohlRuinsSinkIntoSand() and scAnkohlRuinsStartMovingPillar().

Referenced by scGetCues().

Definition at lines 1632 and 2512 of file ankohl_ruins.c.

AnkohlRuinsSecondFloorCues

extern CUE AnkohlRuinsSecondFloorCues[]

CUE AnkohlRuinsSecondFloorCues[]

The second floor's exits and stairs, Sand, Move on the face half and Whirlwind on the weeds.

References scAnkohlRuinsPlaceSecondFloorFaceHalf(), scAnkohlRuinsRiseFromSand(), scAnkohlRuinsScatterWeeds() and scAnkohlRuinsSinkIntoSand().

Referenced by scGetCues().

Definition at lines 1633 and 2638 of file ankohl_ruins.c.

AnkohlRuinsThirdFloorCues

extern CUE AnkohlRuinsThirdFloorCues[]

CUE AnkohlRuinsThirdFloorCues[]

The third floor's exits and stairs, Sand, Move on the pillar and the great face's right half, and the steps that set the face sliding.

References scAnkohlRuinsFinishMovingPillar(), scAnkohlRuinsPlaceGreatFaceHalf(), scAnkohlRuinsRiseFromSand(), scAnkohlRuinsSinkIntoSand(), scAnkohlRuinsStartGreatFaceSliding(), scAnkohlRuinsStartGreatFaceSlidingUpClose() and scAnkohlRuinsStartMovingPillar().

Referenced by scGetCues().

Definition at lines 1634 and 2700 of file ankohl_ruins.c.

AnkohlRuinsFourthFloorCues

extern CUE AnkohlRuinsFourthFloorCues[]

CUE AnkohlRuinsFourthFloorCues[]

The fourth floor's exits and stairs, Sand, Move on the face halves and the pillars, and Whirlwind on the weeds.

References scAnkohlRuinsFinishMovingPillar(), scAnkohlRuinsFinishPushing(), scAnkohlRuinsPlaceFaceHalves(), scAnkohlRuinsRiseFromSand(), scAnkohlRuinsScatterWeeds(), scAnkohlRuinsSinkIntoSand() and scAnkohlRuinsStartMovingPillar().

Referenced by scGetCues().

Definition at lines 1635 and 2752 of file ankohl_ruins.c.

AnkohlRuinsFifthFloorCues

extern CUE AnkohlRuinsFifthFloorCues[]

CUE AnkohlRuinsFifthFloorCues[]

The fifth floor's exits and stairs, the pit, the flowing sand's drop, Sand, Move on the pillar and the half face, and Reveal on the gap.

References scAnkohlRuinsCarriedOffLedge(), scAnkohlRuinsFinishMovingPillar(), scAnkohlRuinsHideGap(), scAnkohlRuinsJumpDownPit(), scAnkohlRuinsPushFaceHalfIntoGap(), scAnkohlRuinsRevealGap(), scAnkohlRuinsRiseFromSand(), scAnkohlRuinsSinkIntoSand() and scAnkohlRuinsStartMovingPillar().

Referenced by scGetCues().

Definition at lines 1636 and 2843 of file ankohl_ruins.c.

AnkohlRuinsSandRoomsCues

extern CUE AnkohlRuinsSandRoomsCues[]

CUE AnkohlRuinsSandRoomsCues[]

The sand rooms' exits and stairs, Sand, Reveal, the switches, the door buttons and the rising sand.

References scAnkohlRuinsEndReveal(), scAnkohlRuinsOpenFirstSandDoor(), scAnkohlRuinsOpenSecondSandDoor(), scAnkohlRuinsPressFirstSandSwitch(), scAnkohlRuinsPressSecondSandSwitch(), scAnkohlRuinsRaiseFirstSand(), scAnkohlRuinsRaiseSecondSand(), scAnkohlRuinsRiseFromSand(), scAnkohlRuinsSinkIntoSand() and scAnkohlRuinsStartReveal().

Referenced by scGetCues().

Definition at lines 1637 and 2902 of file ankohl_ruins.c.

AnkohlRuinsLeftProngCues

extern CUE AnkohlRuinsLeftProngCues[]

CUE AnkohlRuinsLeftProngCues[]

The top of the ruins' cues: none.

Referenced by scGetCues().

Definition at lines 1638 and 2941 of file ankohl_ruins.c.

FieldEffectDurationScripts

const Sint32 *FieldEffectDurationScripts[]

References FieldEffectLongScript, FieldEffectMediumScript, FieldEffectShortScript and Sint32.

Referenced by fdEffectSpawnResident(), scFieldEffectSpawn() and scFieldEffectSpawnLocal().

Definition at line 2092 of file ankohl_ruins.c.

SceneEntrances

SCENE_ENTRANCE SceneEntrances[]

Referenced by scGetEntrances().

Definition at line 2098 of file ankohl_ruins.c.

SceneExits

Uint32 SceneExits[]

Referenced by scGetExits().

Definition at line 2117 of file ankohl_ruins.c.

AnkohlRuinsWeedsScript

Sint32 AnkohlRuinsWeedsScript[]

The weeds' script: each clump is drawn half as tall again, then set up by scAnkohlRuinsSetUpWeeds.

References scAnkohlRuinsSetUpWeeds() and Sint32.

Referenced by AnkohlRuinsFirstFloorPlacements, AnkohlRuinsFourthFloorPlacements and AnkohlRuinsSecondFloorPlacements.

Definition at line 2336 of file ankohl_ruins.c.

AnkohlRuinsFaceHalfScript

Uint32 AnkohlRuinsFaceHalfScript[]

The face halves' script: each stands still until pushed.

Referenced by AnkohlRuinsFifthFloorPlacements, AnkohlRuinsFourthFloorPlacements, AnkohlRuinsSecondFloorPlacements and AnkohlRuinsThirdFloorPlacements.

Definition at line 2343 of file ankohl_ruins.c.

AnkohlRuinsGreatFaceScript

Uint32 AnkohlRuinsGreatFaceScript[]

The great face's script: it does not collide.

Referenced by AnkohlRuinsThirdFloorPlacements.

Definition at line 2349 of file ankohl_ruins.c.

On this page

MacrosEnumerationsFunctionsVariablesDescriptionMacros in detailFLAG_STONE_FACE_A_MOVEDFLAG_STONE_FACE_MOVEDFLAG_FIRST_FLOOR_WEEDS_A_SCATTEREDFLAG_SECOND_FLOOR_WEEDS_A_SCATTEREDFLAG_FOURTH_FLOOR_WEEDS_A_SCATTEREDFLAG_FIRST_FLOOR_WEEDS_SCATTEREDFLAG_SECOND_FLOOR_WEEDS_SCATTEREDFLAG_FOURTH_FLOOR_WEEDS_SCATTEREDFLAG_NUT_CHEST_PILLAR_MOVEDFLAG_THIRD_FLOOR_PILLAR_MOVEDFLAG_FOURTH_FLOOR_PILLAR_MOVEDFLAG_FOURTH_FLOOR_SECOND_PILLAR_MOVEDFLAG_FOURTH_FLOOR_THIRD_PILLAR_MOVEDFLAG_FIFTH_FLOOR_PILLAR_MOVEDFLAG_LEFT_FACE_HALF_PLACEDFLAG_RIGHT_FACE_HALF_PLACEDFLAG_FACE_HALF_PUSHED_INTO_GAPFLAG_SECOND_FLOOR_FACE_HALF_PLACEDFLAG_GREAT_FACE_HALF_PLACEDFLAG_FIRST_SAND_DOOR_OPENEDFLAG_SECOND_SAND_DOOR_OPENEDFLAG_FIRST_SAND_SWITCH_PRESSEDFLAG_SECOND_SAND_SWITCH_PRESSEDFLAG_ANKOHL_RUINS_REVEAL_SHOWNFLAG_GREAT_FACE_AT_RESTFLAG_SAND_ROOM_FULLMAP_METATILE_FLOWING_SANDSTONE_FACE_DROP_ROWGAP_COLUMNGAP_ROWFOURTH_FLOOR_HALL_FIRST_ENTRANCEFOURTH_FLOOR_HALL_SOUND_LAST_ENTRANCESAND_RISE_MOVESSAND_ROWS_ENDSAND_MASK_BYTESACTOR_LEFT_PRONG_CHESTEFFECT_SET_MODEEFFECT_SET_SCRIPTEFFECT_SPRITE_PRIORITYDEFINE_SAND_DOOR_BUTTONEnumerations in detailanonymous enumanonymous enumanonymous enumANKOHL_RUINS_FIRST_FLOOR_WAYANKOHL_RUINS_SECOND_FLOOR_WAYANKOHL_RUINS_THIRD_FLOOR_WAYANKOHL_RUINS_FOURTH_FLOOR_WAYANKOHL_RUINS_FIFTH_FLOOR_WAYANKOHL_RUINS_SAND_MASKANKOHL_RUINS_FIRST_FLOOR_ACTOR_IDANKOHL_RUINS_SECOND_FLOOR_ACTOR_IDANKOHL_RUINS_THIRD_FLOOR_ACTOR_IDANKOHL_RUINS_FOURTH_FLOOR_ACTOR_IDANKOHL_RUINS_FIFTH_FLOOR_ACTOR_IDFunctions in detailscAnkohlRuinsFlagCheckscGetEntrancesscGetExitRegionsscGetExitsscAnkohlRuinsJumpActorDownLedgescAnkohlRuinsJumpDownPitscAnkohlRuinsLandFromFallscAnkohlRuinsSetUpWeedsscGetActorPlacementsscAnkohlRuinsSinkIntoSandscAnkohlRuinsRiseFromSandscAnkohlRuinsStartMovingPillarscAnkohlRuinsFinishMovingPillarscAnkohlRuinsPushStoneFaceOffLedgescAnkohlRuinsPourSandscAnkohlRuinsPlaceFaceHalvesscAnkohlRuinsPlaceSecondFloorFaceHalfscAnkohlRuinsPlaceGreatFaceHalfscAnkohlRuinsFlowWithSandscAnkohlRuinsCarriedOffLedgescAnkohlRuinsFinishPushingscAnkohlRuinsScatterWeedsscAnkohlRuinsDrawSandscAnkohlRuinsInitSandscAnkohlRuinsCountSandTimescAnkohlRuinsRaiseFirstSandscAnkohlRuinsRaiseSecondSandscAnkohlRuinsPressFirstSandSwitchscAnkohlRuinsOpenFirstSandDoorscAnkohlRuinsPressSecondSandSwitchscAnkohlRuinsOpenSecondSandDoorscAnkohlRuinsSlideGreatFacescAnkohlRuinsStartGreatFaceSlidingscAnkohlRuinsStartGreatFaceSlidingUpClosescAnkohlRuinsPushFaceHalfIntoGapscAnkohlRuinsRevealGapscAnkohlRuinsHideGapscAnkohlRuinsStartRevealscAnkohlRuinsEndRevealscGetCuesscInitscPrepareMapVariables in detailAnkohlRuinsSandAnkohlRuinsSandStepDelayAnkohlRuinsSandTimerAnkohlRuinsSandRiseDelayAnkohlRuinsSandStepAnkohlRuinsSandRoomAnkohlRuinsFifthFloorExitRegionsAnkohlRuinsLeftProngExitRegionsAnkohlRuinsPlacementsAnkohlRuinsFirstFloorPlacementsAnkohlRuinsSecondFloorPlacementsAnkohlRuinsThirdFloorPlacementsAnkohlRuinsFourthFloorPlacementsAnkohlRuinsFifthFloorPlacementsAnkohlRuinsSandRoomsPlacementsAnkohlRuinsLeftProngPlacementsAnkohlRuinsFirstSandRowsAnkohlRuinsSecondSandRowsAnkohlRuinsCuesAnkohlRuinsFirstFloorCuesAnkohlRuinsSecondFloorCuesAnkohlRuinsThirdFloorCuesAnkohlRuinsFourthFloorCuesAnkohlRuinsFifthFloorCuesAnkohlRuinsSandRoomsCuesAnkohlRuinsLeftProngCuesFieldEffectDurationScriptsSceneEntrancesSceneExitsAnkohlRuinsWeedsScriptAnkohlRuinsFaceHalfScriptAnkohlRuinsGreatFaceScript