src/scene/eastern_alhafra.c
Eastern Alhafra, the harbour east of the town, where the sailing ship Briggs's Champa crew bought lies at the end of a pier with its broken mast fallen across the water to the eastern dock, the sail spread under it and a huge block of stone pinning its tip. More…
#include "field/field.h"#include "game/game.h"#include "field/script_inline.h"#include "scene/scene.h"#include "field/call.h"#include "field/field_script.h"#include "field/actor_script.h"#include "scene/falling_rocks.h"#include "scene/pushed_actor.h"#include "graphics/palette_buffers.h"#include "macros.h"#include "text/msg_ids.h"#include "shared/leader_open_door_and_enter.c"#include "shared/actor_pop_question_marks.c"#include "shared/particle_update_falling.c"#include "shared/rock_spawn.c"#include "shared/rock_end_falling.c"#include "shared/push_target_fill_rectangle.c"#include "shared/map_metatile_fill.c"#include "shared/push_target_find_stop.c"#include "shared/push_target_find_ahead.c"#include "shared/push_target_push.c"#include "shared/actor_stop_at_push_target.c"#include "shared/pillar_place.c"#include "shared/pound_sink_target.c"#include "shared/actor_set_metatile_open.c"#include "shared/push_kinds.c"#include "shared/push_leader_steps.c"
Macros
| Name | Description | |
|---|---|---|
#define | FLAG_DOCK_CRATE_SUNK 0x8a0 | Story flags of the mast puzzle and its scripts. |
#define | FLAG_SAIL_CRATE_SUNK 0x8a1 | ACTOR_SAIL_CRATE |
#define | FLAG_EASTERN_ALHAFRA_STAKE_POUNDED 0x8a2 | |
#define | FLAG_EASTERN_ALHAFRA_ROPE_LASHED 0x8a3 | |
#define | FLAG_ROCK_UNDER_LOG_SUNK 0x8a4 | ACTOR_ROCK_UNDER_LOG |
#define | FLAG_EAST_POLE_ROCK_SUNK 0x8a5 | ACTOR_EAST_POLE_ROCK |
#define | FLAG_LOG_ROLLED 0x8a6 | |
#define | FLAG_TALKED_TO_SAILOR 0x8a8 | |
#define | FLAG_OVERHEARD_WORKERS 0x8a9 | |
#define | FLAG_ASKED_TO_HELP 0x8ac | |
#define | FLAG_ASKED_IF_FINISHED 0x8ad | |
#define | FLAG_REACHED_MAST_BLOCK 0x8be | |
#define | FLAG_GAVE_UP_ON_MAST_BLOCK 0x8bf | |
#define | FLAG_WORKERS_SAW_BLOCK_GONE 0x904 | |
#define | STEP_WITHOUT_TURNING (id, dz) | Moves an actor dz pixels south (north when negative) and waits a tick, without turning it to face the way it moves: the mayor stepping back and lunging, and the worker and Jiya hauled up a few pixels at a time, turned a little further round between hauls so that each spins as he is dragged to his feet. |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { ENTRANCE_BELOW_THE_BLOCK, ENTRANCE_ON_THE_DOCK, ENTRANCE_ON_ … } | Where the party is brought back to the docks once Briggs has taken the ship (scEasternAlhafraBriggsStealsShip), the workers knocked down; and four spots about the mast that nothing enters by: no exit of the game, no script, and not the debug menu's warp, which comes in by EASTERN_ALHAFRA_ALHAFRA. |
enum | anonymous enum { ENTRANCE_MANOR_BRIGGS_ESCAPES } | Alhafra Manor's entrance where the party arrives as Briggs escapes, as alhafra_manor.c names it. |
enum | EASTERN_ALHAFRA_METATILE { METATILE_MAST_BLOCK, METATILE_BESIDE_LOG, METATILE_WEST_POLE … } | What the map's metatiles hold for this scene's cues, besides the two exits (whose metatiles hold their exit numbers). |
enum | EASTERN_ALHAFRA_ACTOR_ID { ACTOR_ROPE_POST, ACTOR_SECOND_ROPE_POST, ACTOR_DOCK_CRATE, A … } | The dock's things and people before Briggs is caught, numbering the rows of EasternAlhafraPlacements whose sprites are not the party's; the things keep their rows in EasternAlhafraPlacementsAfterBriggsCaught. |
enum | EASTERN_ALHAFRA_AFTER_BRIGGS_ACTOR_ID { ACTOR_BRIGGS, ACTOR_CHAUCHA, ACTOR_EOLEO, ACTOR_ALHAFRAS_MAY … } | The people of EasternAlhafraPlacementsAfterBriggsCaught, after the things of the first table. |
enum | anonymous enum { ANIM_LYING_DOWN } | A townsperson's own animation 13: lying flat on the ground, as the people Briggs's pirates knocked down lie at the pier's foot. |
enum | EASTERN_ALHAFRA_JUNK_ANIMATION { ANIM_LOG_ROLL_SOUTH, ANIM_LOG_FLOAT, ANIM_LOG_SPLASH_DOWN, A … } | The junk's own animations: the log (SPRITE_LOG_WEST_EAST) rolling as it is pushed south, dropping into the water with a splash, and bobbing there; a crate (SPRITE_TALL_CRATE) settling into the water, and sunk to its lid (a white rock's sprite has neither: a rock is gone once sunk). |
enum | EASTERN_ALHAFRA_BRIGGS_ANIMATION { ANIM_BRIGGS_PULL_FACE, ANIM_BRIGGS_TONGUE_OUT, ANIM_BRIGGS_H … } | Briggs's own animations as he taunts the party from the ship: raising his hands to his face, then sticking his tongue out (also the two at once, and slower), and wagging his head from side to side. |
enum | anonymous enum { ANIM_MAYOR_KEEP_SHAKING_HEAD } | The Alhafran Mayor's own animation 5: shaking his head again and again. |
Functions
| Name | Description | |
|---|---|---|
void | scEasternAlhafraPlaceClearedDebris (void) | Puts the log and crates the party has sunk under the water, where Felix can hop across the crates, takes the sunk rocks away, and once the block is Burst clears its metatiles from the mast's tip. |
static inline void | scActorRejoinLeader (Sint32 id) | A party member walks to the leader and is gone, back in the party. |
void | scRockSpawn (Sint32 x, Sint32 y, Sint32 z, Sint32 count) | Throws count rocks from a 16.16 point, as Burst breaks stone: each starts 8 to 16 pixels out at a random angle and flies up at 5 pixels a tick and out along that angle at 2 to 4. |
void | scEasternAlhafraStartFallingRocks (void) | Loads the falling rocks' tiles and sprites into the menu heap slot and starts their update. |
void | scRockEndFalling (void) | Ends the falling rocks: removes their event and frees their picture and state. |
void | scEasternAlhafraAskIfFinished (void) | Once the dock crate has sunk and only the huge block is left, while no one in the party has Burst, Kraden asks: "Are you finished here, Felix?" Sheba and Jenna differ over giving up; without Piers, Kraden muses on asking the Madrans for their ship, and the party moves on. |
void | scEasternAlhafraWorkersSeeBlockGone (void) | Heading off the ship once the block is Burst, Felix sees two workers below the ship find it gone: "Hey! |
void | scEasternAlhafraMayorFindsShipGone (void) | Back on the pier after Briggs has sailed off: the mayor shouts "What!!! |
void | scEasternAlhafraInitRockSprite (EFFECT_SPR *sprite, Sint32 width, Sint32 height, Uint32 attributes, Sint32 tile) | Sets up a falling rock's width by height sprite of the given shape at its first tile. |
void | scParticleUpdateFalling (void) | Each tick, the falling rocks in flight: each falls, damped and pulled down, for FALLING_ROCK_TICKS ticks, keeping all but a sixty-fourth of its speed each tick, and shows the five pictures of falling_rock.png in turn, four ticks apiece, shrinking as it goes. |
ACTOR * | scPushTargetFindAhead (Sint32 *direction, Sint32 *number, Sint32 *kind) | Finds the pushable thing in front of the leader among the placed actors: returns it, with its slot, its kind (its row of PushKinds) and the leader's facing in sixteenths of a turn. |
void | scActorStopAtPushTarget (ACTOR *actor) | Stops a pushed thing where it is when an actor stands in the metatile ahead of it, unless that is another pushable thing, or when the map blocks it. |
void | fdActorSetMetatileOpen (Sint32 id, Uint32 kind, 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. |
Sint32 | scEasternAlhafraPushObjectAhead () | fdLeaderPushObjectAhead through this overlay's own stub: pushes the object ahead of the leader on by a metatile. |
BSS_DATA | ALIGNED (16) | The harbour water's two tables of BG1 offsets, a halfword a screen line: one an HBlank DMA reads while the other is filled for the next tick. |
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. |
void * | scGetActorPlacements (void) | The scene's actor placements: a room of names for its entrance, else the debug room's. |
void | scEasternAlhafraBurstMastBlock (Sint32 mode, Sint32 frame) | Felix casts Burst on the huge block pinning the mast's tip, at the east end of the mast by the dock (metatile (30, 25)), and it is blasted apart. |
void | scEasternAlhafraPoundStake (Sint32 mode, Sint32 frame) | Felix Pounds the stake on the cliff top east of the sail: it sinks into the ground, and the two ropes it held taut fall slack onto the sail's east pole. |
void | scEasternAlhafraStartPushing (Sint32 unused, Sint32 id) | Nothing visible happens as Felix begins to push or Move one of the crates or rocks of the mast's junk; the game only lets it keep its height as it moves, instead of following the ground under it. |
void | scEasternAlhafraFinishPushing (Sint32 mode, Sint32 id) | A crate or rock that Felix has pushed or Moved off the junk into the water falls in and sinks with three splashes. |
void | scEasternAlhafraStartPushingRockUnderLog (Sint32 unused, Sint32 id) | Nothing visible happens as Felix begins to push the rock under the log along the sail's west pole. |
void | scEasternAlhafraFinishPushingRockUnderLog (Sint32 mode, Sint32 id) | The rock under the log stops after a push along the sail's west pole. |
void | scEasternAlhafraOverhearWorkers (void) | The first time Felix comes aboard and walks by the cabin door, the party lines up at the deck's edge to watch the Champa sailors at the mast: "It's... |
void | scPushTargetPush (PUSH_TARGET target) | The leader pushes the object to its resting place: the metatiles it leaves are floor again and the metatiles it comes to are walls. |
void | scEasternAlhafraRollLog (void) | Felix walks into the log lying across the sail's west pole from its west end (metatiles (19, 27) to (19, 31)). |
void | scEasternAlhafraPushAhead (Sint32 mode) | Felix walks north or south into the rock under the log, along the sail's west pole (metatiles (21, 28) to (21, 32)), and pushes it a metatile along the pole; if the log is ahead of him instead, he pushes the log (scEasternAlhafraRollLog). |
void | scEasternAlhafraTalkToSailor (void) | Felix talks to the Champa sailor standing by the log at the edge of the ship, who has given up on the mast. |
void | scEasternAlhafraStepByCabinDoor (void) | Felix walks over the deck just southwest of the cabin door (metatile (14, 24)). |
void | scEasternAlhafraEnterShip (Sint32 countdown) | Felix walks north into the cabin door at the north end of the ship's deck (metatile (16, 23)); it opens and he goes inside, down into the ship. |
void | scEasternAlhafraIgnoreDiagonalStep (void) | Nothing happens when Felix walks diagonally into the log or the rock under it on the sail's west pole (toward the northwest or southeast, or between those and north or south); only walking straight north or south pushes them. |
void | scEasternAlhafraReachMastBlock (void) | Nothing visible happens when Felix steps up beside the huge block on the mast's tip (metatile (30, 26)); the game only notes it, so that walking away again without Burst has Jenna speak (scEasternAlhafraGiveUpOnMastBlock). |
void | scEasternAlhafraGiveUpOnMastBlock (void) | Walking south away from the huge block on the mast (metatile (30, 27)) after standing beside it, while no one in the party has Burst, Jenna comes up to Felix: "I don't know what we're going to do about this rock...". |
const CUE * | scGetCues (void) | The scene's cues: the rooms of names' for any entrance above ENTRANCE_NAMES_ABOVE, else the debug room's. |
void | scEasternAlhafraStartWaveDMA (void) | Each VBlank, starts DMA 0 copying the finished table of the water's line offsets into BG1's vertical offset at each HBlank, while the other table is filled for the next tick. |
void | scEasternAlhafraFillWaveLines (void) | Fills the other table: each line of the screen takes layer 2's vertical scroll plus a sine of up to 2 pixels that moves up the screen a line each tick. |
void | scEasternAlhafraStartWave (void) | The harbour's water ripples from the moment the scene starts: each line of the background layer BG1 is shifted up or down by up to 2 pixels along a wave that climbs the screen. |
void | scPillarPlace (const Uint16 *list) | Unused: places the pillars of a list as shared/pillar_place.c does, reading its halfwords as signed. |
Sint32 | scInit (void) | Sets up the harbour: the rippling water; once the workers have fetched the mayor, the ship gone from the pier with all the junk, and until Briggs has sailed off, the people his pirates knocked down lying at the pier's foot; the mayor finding the ship gone, when the party comes back after Briggs sails off; and the junk the party has sunk, the Lashed rope, the ropes to the stake and the stake. |
Sint32 | scPrepareMap (void) | Once Briggs is caught the pool has dried up: its colours take the dry ground's. |
void | scEasternAlhafraAskToHelpWithMast (void) | After Briggs is caught, when Felix crosses the deck from the cabin door (metatiles (14, 26) to (18, 26)), Kraden asks: "You do plan to help with the mast, right?" Sheba and Jenna talk it over, and the party agrees to get to work. |
void | scQuestionMarkPop (FIXED x, FIXED y, FIXED z, Uint16 rotation, Sint32 ticks) | Pops a "?" bubble up at (x, y, z), tilted by rotation, for the given ticks, as shared/question_mark_pop.c does but on sprite priority 1. |
void | scEasternAlhafraWorkersTellMayor (void) | Walking down the pier toward town once the block is Burst (metatiles (8, 32) and (9, 32)), Felix meets the workers bringing the mayor and Jiya to see: "It's gone! |
void | scEasternAlhafraBriggsStealsShip (void) | Back at the foot of the pier after Briggs's escape (metatiles (7, 34) to (9, 34)), Felix sees Briggs sailing off in the ship with Chaucha: "Briggs, where are you taking my boat?" Briggs says he paid for it fair and square, taunts the party from the deck ("Neener neener neener!") and sails away. |
Variables
| Name | Description | |
|---|---|---|
extern Sint32 | EasternAlhafraFirstWorkerCheerScript [] | The two workers' steps about the mayor as they insist the block is gone (scEasternAlhafraWorkersTellMayor), each ending facing west. |
extern Sint32 | EasternAlhafraSecondWorkerCheerScript [] | |
extern Uint32 | EasternAlhafraFirstWorkerRunScript [] | The two workers running ahead of the mayor to the pier's foot, each ending turned north-east. |
extern Uint32 | EasternAlhafraSecondWorkerRunScript [] | |
extern Sint32 | EasternAlhafraRunOffScript [] | The mayor, Jiya and the workers leaving the pier for town, one after another (scEasternAlhafraMayorFindsShipGone). |
extern Uint16 | PushKinds [] | The sprites of the things pushed: a log, a pipe and a fallen column, each lying west to east and north to south. |
Uint16 | EasternAlhafraWaveLines [2][DISPLAY_HEIGHT] | The harbour water's two tables of BG1 offsets, a halfword a screen line: one an HBlank DMA reads while the other is filled for the next tick. |
extern Uint16 | EasternAlhafraPoundStakes [] | The stake Pound sinks: its actor, its look and its flag (fdActorSetMetatileOpen). |
extern ACTOR_PLACE | EasternAlhafraPlacements [] | |
extern ACTOR_PLACE | EasternAlhafraPlacementsAfterBriggsCaught [] | |
extern MAP_EDIT | EasternAlhafraShipDoor | The ship's door opening as Felix walks into it. |
extern Uint8 | EasternAlhafraWaveTableIndex [] | Which of EasternAlhafraWaveLines' two tables the screen reads; the other is being filled. |
extern Uint32 | QuestionMarkScript [] | The "?" bubbles scActorPopQuestionMarks pops: each frees itself once its wait is over. |
extern Sint8 | PushRectangles [][4] | Each kind's rectangle: its corners from the actor, x and z in pixels (scPushTargetFillRectangle). |
extern Sint32 | PushLeaderSteps [] | One metatile along each facing's nearest direction (PUSH_STEP). |
Uint16 | EasternAlhafraUnusedActorList [] | Unused: a list of one actor, the dock crate, ended by ACTOR_LIST_END. |
SCENE_ENTRANCE | SceneEntrances [] | 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. |
Uint32 | SceneExits [] | The room has no exits of its own. |
Uint16 | EasternAlhafraShipDoorOpening [] | How the ship's door opens: one tick of metatiles copied over it. |
CUE | SceneCues [] | The room's scripts: talking to its people, Mind Read on them, the metatiles examined, and the field Psynergy each spot answers. |
Description
Eastern Alhafra, the harbour east of the town, where the sailing ship
Briggs's Champa crew bought lies at the end of a pier with its broken mast
fallen across the water to the eastern dock, the sail spread under it and a
huge block of stone pinning its tip. On the first visit the party, coming
aboard, overhears the sailors at the mast give up
(scEasternAlhafraOverhearWorkers), then catches Briggs below decks
(eastern_alhafra_ship.c). Coming out again, Kraden asks whether the party
means to help (scEasternAlhafraAskToHelpWithMast), and the mast is cleared as
a puzzle: the rocks pushed off the sail's poles into the water
(scEasternAlhafraFinishPushing), the log rolled in (scEasternAlhafraRollLog),
the crates Moved in as stepping stones, the stake on the cliff Pounded to
free the ropes (scEasternAlhafraPoundStake), and at last, once the party has
Burst from Tundaria Tower, the block blasted apart
(scEasternAlhafraBurstMastBlock). Two workers see the block gone and run for
the mayor (scEasternAlhafraWorkersSeeBlockGone), who comes down the pier to
look and invites the party to his manor (scEasternAlhafraWorkersTellMayor),
where Briggs escapes. Back at the pier, Briggs sails off in the ship
(scEasternAlhafraBriggsStealsShip) and the mayor blames everyone
(scEasternAlhafraMayorFindsShipGone). The harbour's water ripples all the
while (scEasternAlhafraStartWave).
Macros in detail
FLAG_DOCK_CRATE_SUNK
#define FLAG_DOCK_CRATE_SUNK 0x8a0
Story flags of the mast puzzle and its scripts.
Referenced by scEasternAlhafraFinishPushing(), scEasternAlhafraPlaceClearedDebris(), scEasternAlhafraStepByCabinDoor() and SceneCues.
Definition at line 34 of file eastern_alhafra.c.
FLAG_SAIL_CRATE_SUNK
#define FLAG_SAIL_CRATE_SUNK 0x8a1
Referenced by scEasternAlhafraFinishPushing(), scEasternAlhafraPlaceClearedDebris() and SceneCues.
Definition at line 35 of file eastern_alhafra.c.
FLAG_EASTERN_ALHAFRA_STAKE_POUNDED
#define FLAG_EASTERN_ALHAFRA_STAKE_POUNDED 0x8a2
Referenced by EasternAlhafraPoundStakes, SceneCues and scInit().
Definition at line 36 of file eastern_alhafra.c.
FLAG_EASTERN_ALHAFRA_ROPE_LASHED
#define FLAG_EASTERN_ALHAFRA_ROPE_LASHED 0x8a3
Referenced by SceneCues and scInit().
Definition at line 37 of file eastern_alhafra.c.
FLAG_ROCK_UNDER_LOG_SUNK
#define FLAG_ROCK_UNDER_LOG_SUNK 0x8a4
Referenced by scEasternAlhafraFinishPushing(), scEasternAlhafraPlaceClearedDebris(), scEasternAlhafraRollLog() and SceneCues.
Definition at line 38 of file eastern_alhafra.c.
FLAG_EAST_POLE_ROCK_SUNK
#define FLAG_EAST_POLE_ROCK_SUNK 0x8a5
Referenced by scEasternAlhafraFinishPushing(), scEasternAlhafraPlaceClearedDebris() and SceneCues.
Definition at line 39 of file eastern_alhafra.c.
FLAG_LOG_ROLLED
#define FLAG_LOG_ROLLED 0x8a6
Referenced by scEasternAlhafraPlaceClearedDebris(), scEasternAlhafraRollLog() and scInit().
Definition at line 40 of file eastern_alhafra.c.
FLAG_TALKED_TO_SAILOR
#define FLAG_TALKED_TO_SAILOR 0x8a8
Referenced by scEasternAlhafraTalkToSailor() and SceneCues.
Definition at line 41 of file eastern_alhafra.c.
FLAG_OVERHEARD_WORKERS
#define FLAG_OVERHEARD_WORKERS 0x8a9
Referenced by scEasternAlhafraStepByCabinDoor().
Definition at line 42 of file eastern_alhafra.c.
FLAG_ASKED_TO_HELP
#define FLAG_ASKED_TO_HELP 0x8ac
Referenced by scEasternAlhafraAskToHelpWithMast() and SceneCues.
Definition at line 43 of file eastern_alhafra.c.
FLAG_ASKED_IF_FINISHED
#define FLAG_ASKED_IF_FINISHED 0x8ad
Referenced by scEasternAlhafraStepByCabinDoor().
Definition at line 44 of file eastern_alhafra.c.
FLAG_REACHED_MAST_BLOCK
#define FLAG_REACHED_MAST_BLOCK 0x8be
Referenced by scEasternAlhafraGiveUpOnMastBlock(), scEasternAlhafraReachMastBlock() and SceneCues.
Definition at line 45 of file eastern_alhafra.c.
FLAG_GAVE_UP_ON_MAST_BLOCK
#define FLAG_GAVE_UP_ON_MAST_BLOCK 0x8bf
Referenced by scEasternAlhafraGiveUpOnMastBlock() and SceneCues.
Definition at line 46 of file eastern_alhafra.c.
FLAG_WORKERS_SAW_BLOCK_GONE
#define FLAG_WORKERS_SAW_BLOCK_GONE 0x904
Referenced by scEasternAlhafraStepByCabinDoor().
Definition at line 47 of file eastern_alhafra.c.
STEP_WITHOUT_TURNING
#define STEP_WITHOUT_TURNING(id, dz)
Moves an actor dz pixels south (north when negative) and waits a tick, without turning it to face the way it moves: the mayor stepping back and lunging, and the worker and Jiya hauled up a few pixels at a time, turned a little further round between hauls so that each spins as he is dragged to his feet.
Referenced by scEasternAlhafraMayorFindsShipGone().
Definition at line 2153 of file eastern_alhafra.c.
Enumerations in detail
anonymous enum
enum { ENTRANCE_BELOW_THE_BLOCK, ENTRANCE_ON_THE_DOCK, ENTRANCE_ON_THE_DECK, ENTRANCE_ON_THE_EAST_POLE, … }
Where the party is brought back to the docks once Briggs has taken the ship
(scEasternAlhafraBriggsStealsShip), the workers knocked down; and four spots
about the mast that nothing enters by: no exit of the game, no script, and
not the debug menu's warp, which comes in by EASTERN_ALHAFRA_ALHAFRA.
| Enumerator | Value | Description |
|---|---|---|
ENTRANCE_BELOW_THE_BLOCK | 0 | |
ENTRANCE_ON_THE_DOCK | 10 | |
ENTRANCE_ON_THE_DECK | 11 | |
ENTRANCE_ON_THE_EAST_POLE | 12 | |
ENTRANCE_AFTER_SHIP_STOLEN | 99 |
Definition at line 53 of file eastern_alhafra.c.
anonymous enum
enum { ENTRANCE_MANOR_BRIGGS_ESCAPES }
Alhafra Manor's entrance where the party arrives as Briggs escapes, as
alhafra_manor.c names it.
| Enumerator | Value | Description |
|---|---|---|
ENTRANCE_MANOR_BRIGGS_ESCAPES | 81 |
Definition at line 64 of file eastern_alhafra.c.
EASTERN_ALHAFRA_METATILE
enum EASTERN_ALHAFRA_METATILE
What the map's metatiles hold for this scene's cues, besides the two exits (whose metatiles hold their exit numbers).
| Enumerator | Value | Description |
|---|---|---|
METATILE_MAST_BLOCK | 10 | Under the huge block on the mast's tip, metatile (30, 25). |
METATILE_BESIDE_LOG | 11 | Beside the log's west end, metatiles (19, 27) to (19, 31). |
METATILE_WEST_POLE | 12 | Along the sail's west pole, where the |
METATILE_WEST_POLE_TIP | 13 | rock under the log rolls, metatiles (21, 28) to (21, 31), and the pole's south tip at (21, 32). |
METATILE_BY_CABIN_DOOR | 20 | The deck just southwest of the cabin door, metatile (14, 24). |
METATILE_PIER | 21 | Halfway down the pier, metatiles (8, 32) |
METATILE_PIER_FOOT | 22 | and (9, 32), and at its foot, (7, 34) to (9, 34). |
METATILE_ACROSS_DECK | 23 | Across the deck south of the cabin door, metatiles (14, 26) to (18, 26). |
METATILE_BELOW_MAST_BLOCK | 24 | Two steps south of the huge block, |
METATILE_BESIDE_MAST_BLOCK | 25 | metatile (30, 27), and right beside it, (30, 26). |
Definition at line 71 of file eastern_alhafra.c.
EASTERN_ALHAFRA_ACTOR_ID
enum EASTERN_ALHAFRA_ACTOR_ID
The dock's things and people before Briggs is caught, numbering the rows of
EasternAlhafraPlacements whose sprites are not the party's; the things keep
their rows in EasternAlhafraPlacementsAfterBriggsCaught.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_ROPE_POST | ACTOR_FIRST_PLACED | The posts Lash ties a rope between |
ACTOR_SECOND_ROPE_POST | (fdRopePlace): one at the tip of the ship's bow, where Lash is cast, and one on the cliff to its east. | |
ACTOR_DOCK_CRATE | The two crates pushed or Moved into | |
ACTOR_SAIL_CRATE | the water, where each sinks and stays as a stepping stone Felix hops across: the one on the dock east of the sail, and the one at the foot of the sail. | |
ACTOR_TIGHTROPE_START | The ends of the tightrope from the | |
ACTOR_TIGHTROPE_END | top of the sail's west pole across to its east pole (fdTightropePlace). | |
ACTOR_STAKE | The stake on the cliff top east of the sail, which Pound drives down, freeing the two ropes it holds taut. | |
ACTOR_LOG | The log lying across the sail's west pole, rolled into the water (scEasternAlhafraRollLog). | |
ACTOR_ROCK_UNDER_LOG | The two pale round rocks among the | |
ACTOR_EAST_POLE_ROCK | junk: one on the sail's west pole just south of the log, which rolls only once this rock has sunk, and one on the sail's east pole. | |
ACTOR_FIRST_STAKE_ROPE_START | The two ropes from the sail's east pole to the stake, each from its start on the pole to its end at the stake, until the stake is Pounded. | |
ACTOR_FIRST_STAKE_ROPE_END | ||
ACTOR_SECOND_STAKE_ROPE_START | ||
ACTOR_SECOND_STAKE_ROPE_END | ||
ACTOR_SAILOR_GIVING_UP | The Champa sailors working on the mast: "It's... It's no use!" | |
ACTOR_SAILOR_WHO_PAID_FOR_THE_SHIP | "We paid big money for this ship. It's ours now..." | |
ACTOR_SAILOR_WAITING_FOR_HIS_PAL | "We sent my pal into town to get some supplies..." | |
ACTOR_SAILOR_LONGING_FOR_CHAMPA | "If we could just raise the mast, we could head back to Champa..." | |
ACTOR_KRADEN | Kraden, after the party's own rows, in both tables. |
Definition at line 99 of file eastern_alhafra.c.
EASTERN_ALHAFRA_AFTER_BRIGGS_ACTOR_ID
enum EASTERN_ALHAFRA_AFTER_BRIGGS_ACTOR_ID
The people of EasternAlhafraPlacementsAfterBriggsCaught, after the things of
the first table.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_BRIGGS | ACTOR_SAILOR_GIVING_UP | |
ACTOR_CHAUCHA | ||
ACTOR_EOLEO | ||
ACTOR_ALHAFRAS_MAYOR | The Alhafran Mayor: "My prize ship, stolen by a bunch of filthy pirate scum!" | |
ACTOR_JIYA | ACTOR_KRADEN + 1 | Jiya, the mayor's aide (AlhafraManor's): "Excellent news, Mayor!" |
ACTOR_FIRST_WORKER | The workers who find the block on the mast | |
ACTOR_SECOND_WORKER | gone and tell the mayor, running by EasternAlhafraFirstWorkerCheerScript and the second's. | |
ACTOR_YOUNG_MAN_KNOCKED_DOWN | The Alhafrans Briggs's pirates knock down as they take the ship: "Briggs's pirates... They attacked us..." | |
ACTOR_MAN_KNOCKED_DOWN | "I just came down to see the repaired mast, and they jumped..." |
Definition at line 151 of file eastern_alhafra.c.
anonymous enum
enum { ANIM_LYING_DOWN }
A townsperson's own animation 13: lying flat on the ground, as the people Briggs's pirates knocked down lie at the pier's foot.
| Enumerator | Value | Description |
|---|---|---|
ANIM_LYING_DOWN | 13 |
Definition at line 174 of file eastern_alhafra.c.
EASTERN_ALHAFRA_JUNK_ANIMATION
enum EASTERN_ALHAFRA_JUNK_ANIMATION
The junk's own animations: the log (SPRITE_LOG_WEST_EAST) rolling as it is
pushed south, dropping into the water with a splash, and bobbing there; a
crate (SPRITE_TALL_CRATE) settling into the water, and sunk to its lid (a
white rock's sprite has neither: a rock is gone once sunk).
| Enumerator | Value | Description |
|---|---|---|
ANIM_LOG_ROLL_SOUTH | 3 | |
ANIM_LOG_FLOAT | 4 | |
ANIM_LOG_SPLASH_DOWN | 8 | |
ANIM_CRATE_SUNK | 2 | |
ANIM_CRATE_SINK | 4 |
Definition at line 183 of file eastern_alhafra.c.
EASTERN_ALHAFRA_BRIGGS_ANIMATION
enum EASTERN_ALHAFRA_BRIGGS_ANIMATION
Briggs's own animations as he taunts the party from the ship: raising his hands to his face, then sticking his tongue out (also the two at once, and slower), and wagging his head from side to side.
| Enumerator | Value | Description |
|---|---|---|
ANIM_BRIGGS_PULL_FACE | 5 | |
ANIM_BRIGGS_TONGUE_OUT | 6 | |
ANIM_BRIGGS_HANDS_TO_FACE | 7 | |
ANIM_BRIGGS_WAG_HEAD | 8 | |
ANIM_BRIGGS_PULL_FACE_SLOWLY | 9 |
Definition at line 195 of file eastern_alhafra.c.
anonymous enum
enum { ANIM_MAYOR_KEEP_SHAKING_HEAD }
The Alhafran Mayor's own animation 5: shaking his head again and again.
| Enumerator | Value | Description |
|---|---|---|
ANIM_MAYOR_KEEP_SHAKING_HEAD | 5 |
Definition at line 205 of file eastern_alhafra.c.
Functions in detail
scEasternAlhafraPlaceClearedDebris
void scEasternAlhafraPlaceClearedDebris(void)
Puts the log and crates the party has sunk under the water, where Felix can hop across the crates, takes the sunk rocks away, and once the block is Burst clears its metatiles from the mast's tip.
References fdActorGet(), fdActorSetAnimation(), fdMapGridCopyMetatiles(), fdMapGridSetMetatileAttributesAt(), fdScriptGetFlag() and scFieldMapGridSetMetatileBehavior().
Referenced by scEasternAlhafraBurstMastBlock(), scEasternAlhafraFinishPushing(), scEasternAlhafraRollLog() and scInit().
Definition at lines 214 and 1037 of file eastern_alhafra.c.
scActorRejoinLeader
static inline void scActorRejoinLeader(Sint32 id)
A party member walks to the leader and is gone, back in the party.
References fdActorGetById(), fdActorSetAnimation(), fdActorSetDestination(), MainRoutineStateWork, scFieldActorWaitForMoveById() and Sint32.
Referenced by scEasternAlhafraAskIfFinished(), scEasternAlhafraAskToHelpWithMast() and scEasternAlhafraOverhearWorkers().
Definition at line 217 of file eastern_alhafra.c.
scEasternAlhafraStartFallingRocks
void scEasternAlhafraStartFallingRocks(void)
Loads the falling rocks' tiles and sprites into the menu heap slot and starts their update.
References mnVRAMLoad(), scEasternAlhafraInitRockSprite(), scFieldSetTickEvent(), scParticleUpdateFalling(), Sint32, syDecompressTaggedLZ(), syHeapSlotAllocate(), syResourceGetTableEntry() and syVRAMCacheFindFreeEntry().
Referenced by scEasternAlhafraBurstMastBlock().
Definition at lines 235 and 2511 of file eastern_alhafra.c.
scEasternAlhafraAskIfFinished
void scEasternAlhafraAskIfFinished(void)
Once the dock crate has sunk and only the huge block is left, while no one in the party has Burst, Kraden asks: "Are you finished here, Felix?" Sheba and Jenna differ over giving up; without Piers, Kraden muses on asking the Madrans for their ship, and the party moves on.
References fdActorFaceDirection(), fdActorFaceDirectionAndWait(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorShowEmote(), fdActorWalkToAndWait(), fdScriptEnd(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptStart(), scActorRejoinLeader(), scFieldActorLaunchFromLeader(), scFieldActorShowEmote(), scFieldActorWaitForMoveById(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptWait() and Sint32.
Referenced by scEasternAlhafraStepByCabinDoor().
Definition at lines 238 and 1293 of file eastern_alhafra.c.
scEasternAlhafraWorkersSeeBlockGone
void scEasternAlhafraWorkersSeeBlockGone(void)
Heading off the ship once the block is Burst, Felix sees two workers below the ship find it gone: "Hey! That block on the mast has disappeared!" They run to tell the mayor, and Chaucha, brought by Eoleo, guesses the party did it and goes to tell Briggs.
References fdActorFaceDirection(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorWalkBy(), fdActorWalkByAndWait(), fdCameraWaitForArrival(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptStart(), scFieldActorJump(), scFieldActorShowEmote(), scFieldActorStartRepeatedMotion(), scFieldActorStop(), scFieldActorWatchAndSetScript(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptWait(), scScriptCameraFollowActor() and Sint32.
Referenced by scEasternAlhafraStepByCabinDoor().
Definition at lines 239 and 1425 of file eastern_alhafra.c.
scEasternAlhafraMayorFindsShipGone
void scEasternAlhafraMayorFindsShipGone(void)
Back on the pier after Briggs has sailed off: the mayor shouts "What!!! You let Briggs get away!", hauls the knocked-down workers to their feet, blames them all, tells Felix there will be no reward and storms off to his manor. Kraden thinks Briggs is heading back to Champa.
References EasternAlhafraRunOffScript, fdActorFaceDirection(), fdActorFaceDirectionById(), fdActorGetById(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorSetDestination(), fdActorSetScript(), fdActorSetSpriteFlags(), fdActorWalkBy(), fdActorWalkByAndWait(), fdActorWalkTo(), fdActorWalkToAndWait(), fdCameraWaitForArrival(), fdPaletteFadeApplyTarget(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptPlaySound(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), MainRoutineStateWork, scFieldActorJump(), scFieldActorSetPosAndResetMotion(), scFieldActorSetSpriteRotationById(), scFieldActorShowEmote(), scFieldActorStartRepeatedMotion(), scFieldActorWaitForMoveById(), scFieldActorWaitForScriptEndById(), scFieldActorWatchAndSetScript(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptWait(), scScriptCameraFollowActor() and Sint32.
Referenced by scInit().
Definition at lines 240 and 2163 of file eastern_alhafra.c.
scEasternAlhafraInitRockSprite
void scEasternAlhafraInitRockSprite(EFFECT_SPR *sprite, Sint32 width, Sint32 height, Uint32 attributes, Sint32 tile)
Sets up a falling rock's width by height sprite of the given shape at its first tile.
Referenced by scEasternAlhafraStartFallingRocks().
Definition at line 250 of file eastern_alhafra.c.
scEasternAlhafraPushObjectAhead
Sint32 scEasternAlhafraPushObjectAhead()
fdLeaderPushObjectAhead through this overlay's own stub: pushes the object
ahead of the leader on by a metatile.
Referenced by scEasternAlhafraPushAhead().
Definition at line 268 of file eastern_alhafra.c.
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References SceneEntrances.
Definition at line 277 of file eastern_alhafra.c.
scGetExitRegions
const SCENE_REGION *scGetExitRegions(void)
Definition at line 282 of file eastern_alhafra.c.
scGetExits
const Uint32 *scGetExits(void)
References SceneExits.
Definition at line 287 of file eastern_alhafra.c.
scGetActorPlacements
void *scGetActorPlacements(void)
References EasternAlhafraPlacements, EasternAlhafraPlacementsAfterBriggsCaught and fdScriptGetFlag().
Definition at line 292 of file eastern_alhafra.c.
scEasternAlhafraBurstMastBlock
void scEasternAlhafraBurstMastBlock(Sint32 mode, Sint32 frame)
Felix casts Burst on the huge block pinning the mast's tip, at the east end of the mast by the dock (metatile (30, 25)), and it is blasted apart. Each small blast throws two chips of rock from it and the great one thirty; as the blasts die down the mast is clear.
References fdScriptSetFlag(), scEasternAlhafraPlaceClearedDebris(), scEasternAlhafraStartFallingRocks(), scRockEndFalling(), scRockSpawn() and Sint32.
Referenced by SceneCues.
Definition at line 303 of file eastern_alhafra.c.
scEasternAlhafraPoundStake
void scEasternAlhafraPoundStake(Sint32 mode, Sint32 frame)
Felix Pounds the stake on the cliff top east of the sail: it sinks into the ground, and the two ropes it held taut fall slack onto the sail's east pole. The ropes are redrawn each tick, for up to a second, until both their loose ends have arrived.
References EasternAlhafraPoundStakes, fdActorGet(), fdActorHasArrived(), fdPoundSinkTarget(), fdTightropePlace(), fdTightropeRelease(), scFieldActorSetPosAndResetMotion(), Sint32 and sySynch().
Referenced by SceneCues.
Definition at line 324 of file eastern_alhafra.c.
scEasternAlhafraStartPushing
void scEasternAlhafraStartPushing(Sint32 unused, Sint32 id)
Nothing visible happens as Felix begins to push or Move one of the crates or
rocks of the mast's junk; the game only lets it keep its height as it moves,
instead of following the ground under it. When he stands just west of the
dock crate, on its first two metatiles, his own metatile is walled until
scEasternAlhafraFinishPushing, so that a pull of Move cannot drag the crate
onto him.
References fdActorGet(), MainRoutineStateWork, scFieldMapGridSetMetatileBehavior() and Sint32.
Referenced by scEasternAlhafraStartPushingRockUnderLog() and SceneCues.
Definition at line 371 of file eastern_alhafra.c.
scEasternAlhafraFinishPushing
void scEasternAlhafraFinishPushing(Sint32 mode, Sint32 id)
A crate or rock that Felix has pushed or Moved off the junk into the water falls in and sinks with three splashes. Each has its own spot: the dock crate at metatile (31, 32), the crate at the foot of the sail at (25, 33), the rock under the log at (21, 33) and the east pole's rock at (27, 33). A crate stays there just under the water as a stepping stone Felix can hop across; a rock is gone. Stopping anywhere else, nothing happens.
References fdActorGet(), fdActorRelease(), fdActorSelectAnimation(), fdActorSetSpriteFlags(), fdScriptPlaySound(), fdScriptSetFlag(), MainRoutineStateWork, scEasternAlhafraPlaceClearedDebris(), scFieldActorCreate(), scFieldActorStop(), scFieldMapGridSetMetatileBehavior(), Sint32 and sySynch().
Referenced by scEasternAlhafraFinishPushingRockUnderLog() and SceneCues.
Definition at line 406 of file eastern_alhafra.c.
scEasternAlhafraStartPushingRockUnderLog
void scEasternAlhafraStartPushingRockUnderLog(Sint32 unused, Sint32 id)
Nothing visible happens as Felix begins to push the rock under the log along the sail's west pole. The game walls the metatiles on either side of the pole, so that the rock can only roll along it, and opens the water at the pole's south tip (metatile (21, 33)) for it to fall into.
References scEasternAlhafraStartPushing(), scFieldMapGridSetMetatileBehavior() and Sint32.
Referenced by scEasternAlhafraPushAhead() and SceneCues.
Definition at line 484 of file eastern_alhafra.c.
scEasternAlhafraFinishPushingRockUnderLog
void scEasternAlhafraFinishPushingRockUnderLog(Sint32 mode, Sint32 id)
The rock under the log stops after a push along the sail's west pole. If it has come off the pole's south tip into the water (metatile (21, 33)), the camera turns to watch it sink and comes back to Felix. The walls beside the pole come down again.
References fdActorGet(), MainRoutineStateWork, scEasternAlhafraFinishPushing(), scFieldMapGridSetMetatileBehavior(), scScriptCameraFollowActor() and Sint32.
Referenced by scEasternAlhafraPushAhead() and SceneCues.
Definition at line 510 of file eastern_alhafra.c.
scEasternAlhafraOverhearWorkers
void scEasternAlhafraOverhearWorkers(void)
The first time Felix comes aboard and walks by the cabin door, the party lines up at the deck's edge to watch the Champa sailors at the mast: "It's... It's no use!" They grumble that the junk has to come off the mast, the rope has to be untangled and the huge rock is beyond them, and that they can do nothing until Zack finishes the canoe.
References fdActorFaceDirection(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorShowEmote(), fdActorWalkByAndWait(), fdActorWalkToAndWait(), fdCameraWaitForArrival(), fdScriptEnd(), fdScriptStart(), MainRoutineStateWork, scActorRejoinLeader(), scFieldActorJump(), scFieldActorLaunchFromLeader(), scFieldActorStartRepeatedMotion(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptWait(), scScriptCameraFollowActor(), scScriptCameraMoveToActor() and Sint32.
Referenced by scEasternAlhafraStepByCabinDoor().
Definition at lines 540 and 1096 of file eastern_alhafra.c.
scEasternAlhafraRollLog
void scEasternAlhafraRollLog(void)
Felix walks into the log lying across the sail's west pole from its west end
(metatiles (19, 27) to (19, 31)). Once the rock under the log has sunk,
pushing it south: the camera pans down the pole, the log rolls south off it
and drops into the water with a splash, where it floats by the ship's stern,
and the camera comes back to Felix, the way along the pole open. Pushing it
north instead takes the ordinary push (scPushTargetPush). Nothing visible
happens when he walks into it, from the north or the south, before the rock
has sunk: the log does not move.
References fdActorGetById(), fdActorSetAnimation(), fdActorSetDestinationOffset(), fdMapGridSetMetatileBehavior(), fdScriptEnd(), fdScriptGetFlag(), fdScriptPlaySound(), fdScriptSetFlag(), fdScriptStart(), MainRoutineStateWork, scEasternAlhafraPlaceClearedDebris(), scFieldScriptEndLastingPsynergy(), scFieldScriptWait(), scPushTargetFindStop(), scPushTargetPush(), scScriptCameraFollowActor(), Sint32 and sySynch().
Referenced by scEasternAlhafraPushAhead() and SceneCues.
Definition at line 551 of file eastern_alhafra.c.
scEasternAlhafraPushAhead
void scEasternAlhafraPushAhead(Sint32 mode)
Felix walks north or south into the rock under the log, along the sail's west
pole (metatiles (21, 28) to (21, 32)), and pushes it a metatile along the
pole; if the log is ahead of him instead, he pushes the log
(scEasternAlhafraRollLog).
References fdFindNearbyTalkTarget(), fdLeaderCanPushObjectAhead(), MainRoutineStateWork, scEasternAlhafraFinishPushingRockUnderLog(), scEasternAlhafraPushObjectAhead(), scEasternAlhafraRollLog(), scEasternAlhafraStartPushingRockUnderLog() and Sint32.
Referenced by SceneCues.
Definition at line 623 of file eastern_alhafra.c.
scEasternAlhafraTalkToSailor
void scEasternAlhafraTalkToSailor(void)
Felix talks to the Champa sailor standing by the log at the edge of the ship, who has given up on the mast. He asks whether the party is new in town and curious about the ship, and tells what a sailing ship is; Mind Read on him before talking starts the same talk.
References fdActorFaceActor(), fdActorFaceDirection(), fdActorRunRepeatedMotion(), fdActorShowEmote(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptStart(), MainRoutineStateWork, scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait() and scFieldScriptWait().
Referenced by SceneCues.
Definition at line 645 of file eastern_alhafra.c.
scEasternAlhafraStepByCabinDoor
void scEasternAlhafraStepByCabinDoor(void)
Felix walks over the deck just southwest of the cabin door (metatile (14,
24)). The first time, before Briggs is caught, the party overhears the
sailors at the mast (scEasternAlhafraOverhearWorkers). After he is caught,
once the dock crate has sunk while no one has Burst, Kraden asks whether the
party is finished here (scEasternAlhafraAskIfFinished). Once the block is
Burst, two workers see it gone (scEasternAlhafraWorkersSeeBlockGone).
Otherwise nothing happens.
References fdScriptGetFlag(), fdScriptSetFlag(), gmPartyFindOwnerWithAction(), scEasternAlhafraAskIfFinished(), scEasternAlhafraOverhearWorkers() and scEasternAlhafraWorkersSeeBlockGone().
Referenced by SceneCues.
Definition at line 721 of file eastern_alhafra.c.
scEasternAlhafraEnterShip
void scEasternAlhafraEnterShip(Sint32 countdown)
Felix walks north into the cabin door at the north end of the ship's deck (metatile (16, 23)); it opens and he goes inside, down into the ship.
References EasternAlhafraShipDoor, scLeaderOpenDoorAndEnter() and Sint32.
Referenced by SceneCues.
Definition at line 752 of file eastern_alhafra.c.
scEasternAlhafraIgnoreDiagonalStep
void scEasternAlhafraIgnoreDiagonalStep(void)
Nothing happens when Felix walks diagonally into the log or the rock under it on the sail's west pole (toward the northwest or southeast, or between those and north or south); only walking straight north or south pushes them.
Referenced by SceneCues.
Definition at line 760 of file eastern_alhafra.c.
scEasternAlhafraReachMastBlock
void scEasternAlhafraReachMastBlock(void)
Nothing visible happens when Felix steps up beside the huge block on the
mast's tip (metatile (30, 26)); the game only notes it, so that walking away
again without Burst has Jenna speak (scEasternAlhafraGiveUpOnMastBlock).
References syGameFlagSet().
Referenced by SceneCues.
Definition at line 767 of file eastern_alhafra.c.
scEasternAlhafraGiveUpOnMastBlock
void scEasternAlhafraGiveUpOnMastBlock(void)
Walking south away from the huge block on the mast (metatile (30, 27)) after standing beside it, while no one in the party has Burst, Jenna comes up to Felix: "I don't know what we're going to do about this rock...". She says it once; after that, and once anyone can Burst, nothing happens.
References fdActorFaceDirectionAndWait(), fdActorGet(), fdActorSetAnimation(), fdActorSetDestination(), fdActorWalkToAndWait(), fdScriptEnd(), fdScriptGetFlag(), fdScriptSetFlag(), fdScriptStart(), gmPartyFindOwnerWithAction(), MainRoutineStateWork, scFieldActorLaunchFromLeader(), scFieldActorWaitForMoveById(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait() and scFieldScriptWait().
Referenced by SceneCues.
Definition at line 776 of file eastern_alhafra.c.
scGetCues
const CUE *scGetCues(void)
References SceneCues.
Definition at line 810 of file eastern_alhafra.c.
scEasternAlhafraStartWaveDMA
void scEasternAlhafraStartWaveDMA(void)
Each VBlank, starts DMA 0 copying the finished table of the water's line offsets into BG1's vertical offset at each HBlank, while the other table is filled for the next tick.
References EasternAlhafraWaveLines, EasternAlhafraWaveTableIndex and syDMAXCopy().
Referenced by scEasternAlhafraStartWave().
Definition at line 820 of file eastern_alhafra.c.
scEasternAlhafraFillWaveLines
void scEasternAlhafraFillWaveLines(void)
Fills the other table: each line of the screen takes layer 2's vertical scroll plus a sine of up to 2 pixels that moves up the screen a line each tick.
References EasternAlhafraWaveLines, EasternAlhafraWaveTableIndex, fdMapGridGetLayer(), Sint32, sySin() and TickCount.
Referenced by scEasternAlhafraStartWave().
Definition at line 840 of file eastern_alhafra.c.
scEasternAlhafraStartWave
void scEasternAlhafraStartWave(void)
The harbour's water ripples from the moment the scene starts: each line of the background layer BG1 is shifted up or down by up to 2 pixels along a wave that climbs the screen. A table of the lines is filled each tick and handed to an HBlank DMA in the VBlank pass.
References scEasternAlhafraFillWaveLines(), scEasternAlhafraStartWaveDMA() and sySetTickEvent().
Referenced by scInit().
Definition at line 862 of file eastern_alhafra.c.
scInit
Sint32 scInit(void)
Sets up the harbour: the rippling water; once the workers have fetched the mayor, the ship gone from the pier with all the junk, and until Briggs has sailed off, the people his pirates knocked down lying at the pier's foot; the mayor finding the ship gone, when the party comes back after Briggs sails off; and the junk the party has sunk, the Lashed rope, the ropes to the stake and the stake.
References Call3(), EasternAlhafraPoundStakes, fdActorFaceDirection(), fdActorFallOverWithAnimationById(), fdActorGet(), fdActorSetAnimation(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesLayered(), fdRopeInit(), fdRopePlace(), fdScriptGetFlag(), fdTightropeInit(), fdTightropePlace(), fdTightropeSettle(), MainRoutineStateWork, scEasternAlhafraMayorFindsShipGone(), scEasternAlhafraPlaceClearedDebris(), scEasternAlhafraStartWave(), scFieldActorSetSpritePriority(), scFieldActorSetSpriteRotationById(), scPillarPlace(), scPushTargetFillRectangle() and Sint32.
Definition at line 876 of file eastern_alhafra.c.
scPrepareMap
Sint32 scPrepareMap(void)
References Sint32.
Definition at line 1029 of file eastern_alhafra.c.
scEasternAlhafraAskToHelpWithMast
void scEasternAlhafraAskToHelpWithMast(void)
After Briggs is caught, when Felix crosses the deck from the cabin door (metatiles (14, 26) to (18, 26)), Kraden asks: "You do plan to help with the mast, right?" Sheba and Jenna talk it over, and the party agrees to get to work. It happens once, and not after the mast is clear.
References fdActorFaceDirection(), fdActorSetAnimationAndWait(), fdActorShowEmote(), fdActorWalkToAndWait(), fdScriptEnd(), fdScriptGetFlag(), fdScriptSetFlag(), fdScriptStart(), scActorRejoinLeader(), scFieldActorLaunchFromLeader(), scFieldActorWaitForMoveById(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptWait() and Sint32.
Referenced by SceneCues.
Definition at line 1234 of file eastern_alhafra.c.
scQuestionMarkPop
void scQuestionMarkPop(FIXED x, FIXED y, FIXED z, Uint16 rotation, Sint32 ticks)
Pops a "?" bubble up at (x, y, z), tilted by rotation, for the given ticks,
as shared/question_mark_pop.c does but on sprite priority 1.
References fdActorSelectAnimation(), fdActorSetSpritePriorityDirect(), fdActorStartScript(), QuestionMarkScript, scFieldActorCreate() and Sint32.
Referenced by scActorPopQuestionMarks().
Definition at line 1400 of file eastern_alhafra.c.
scEasternAlhafraWorkersTellMayor
void scEasternAlhafraWorkersTellMayor(void)
Walking down the pier toward town once the block is Burst (metatiles (8, 32) and (9, 32)), Felix meets the workers bringing the mayor and Jiya to see: "It's gone! That huge block is really gone!" The mayor sends the workers to gather the townspeople to raise the mast and invites the party back to his manor to rest, where a guard brings word that Briggs has escaped.
References EasternAlhafraFirstWorkerCheerScript, EasternAlhafraFirstWorkerRunScript, EasternAlhafraSecondWorkerCheerScript, EasternAlhafraSecondWorkerRunScript, fdActorFaceDirection(), fdActorGetById(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorSetScript(), fdActorWalkBy(), fdActorWalkByAndWait(), fdActorWalkTo(), fdActorWalkToAndWait(), fdCameraWaitForArrival(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetDestination(), fdScriptSetFlag(), fdScriptStart(), fdScriptWaitTransitionTicks(), scFieldActorJump(), scFieldActorLaunchFromLeader(), scFieldActorShowEmote(), scFieldActorStartRepeatedMotion(), scFieldActorWaitForMoveById(), scFieldActorWaitForScriptEndById(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptWait(), scScriptCameraFollowActor() and Sint32.
Referenced by SceneCues.
Definition at line 1548 of file eastern_alhafra.c.
scEasternAlhafraBriggsStealsShip
void scEasternAlhafraBriggsStealsShip(void)
Back at the foot of the pier after Briggs's escape (metatiles (7, 34) to (9,
34)), Felix sees Briggs sailing off in the ship with Chaucha: "Briggs, where
are you taking my boat?" Briggs says he paid for it fair and square, taunts
the party from the deck ("Neener neener neener!") and sails away. The music
fades, and the party finds itself back on the pier with the mayor
(scEasternAlhafraMayorFindsShipGone).
References fdActorFaceDirection(), fdActorFaceDirectionAndWait(), fdActorFaceDirectionById(), fdActorGetById(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorWalkByAndWait(), fdActorWalkToAndWait(), fdCameraWaitForArrival(), fdMapGridCopyMetatilesLayered(), fdPaletteFadeApplyTarget(), fdPaletteFadeInterpolate(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptGetFlag(), fdScriptPlaySound(), fdScriptSetDestination(), fdScriptSetFlag(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), scActorPopQuestionMarks(), scFieldActorJump(), scFieldActorLaunchFromLeader(), scFieldActorSetPosAndResetMotion(), scFieldActorSetSpritePriority(), scFieldActorShowEmote(), scFieldActorStartRepeatedMotion(), scFieldActorWaitForMoveById(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptWait(), Sint32 and sySynch().
Referenced by SceneCues.
Definition at line 1866 of file eastern_alhafra.c.
Variables in detail
EasternAlhafraFirstWorkerCheerScript
extern Sint32 EasternAlhafraFirstWorkerCheerScript[]
Sint32 EasternAlhafraFirstWorkerCheerScript[]
The two workers' steps about the mayor as they insist the block is gone
(scEasternAlhafraWorkersTellMayor), each ending facing west.
References Sint32.
Referenced by scEasternAlhafraWorkersTellMayor().
Definition at lines 242 and 2809 of file eastern_alhafra.c.
EasternAlhafraSecondWorkerCheerScript
extern Sint32 EasternAlhafraSecondWorkerCheerScript[]
Sint32 EasternAlhafraSecondWorkerCheerScript[]
References Sint32.
Referenced by scEasternAlhafraWorkersTellMayor().
Definition at lines 243 and 2825 of file eastern_alhafra.c.
EasternAlhafraFirstWorkerRunScript
extern Uint32 EasternAlhafraFirstWorkerRunScript[]
Uint32 EasternAlhafraFirstWorkerRunScript[]
The two workers running ahead of the mayor to the pier's foot, each ending turned north-east.
Referenced by scEasternAlhafraWorkersTellMayor().
Definition at lines 244 and 2840 of file eastern_alhafra.c.
EasternAlhafraSecondWorkerRunScript
extern Uint32 EasternAlhafraSecondWorkerRunScript[]
Uint32 EasternAlhafraSecondWorkerRunScript[]
Referenced by scEasternAlhafraWorkersTellMayor().
Definition at lines 245 and 2852 of file eastern_alhafra.c.
EasternAlhafraRunOffScript
extern Sint32 EasternAlhafraRunOffScript[]
Sint32 EasternAlhafraRunOffScript[]
The mayor, Jiya and the workers leaving the pier for town, one after another
(scEasternAlhafraMayorFindsShipGone).
References Sint32.
Referenced by scEasternAlhafraMayorFindsShipGone().
Definition at lines 246 and 2866 of file eastern_alhafra.c.
EasternAlhafraWaveLines
Uint16 EasternAlhafraWaveLines[2][DISPLAY_HEIGHT]
The harbour water's two tables of BG1 offsets, a halfword a screen line: one an HBlank DMA reads while the other is filled for the next tick.
Referenced by scEasternAlhafraFillWaveLines() and scEasternAlhafraStartWaveDMA().
Definition at line 271 of file eastern_alhafra.c.
EasternAlhafraPoundStakes
extern Uint16 EasternAlhafraPoundStakes[]
Uint16 EasternAlhafraPoundStakes[]
The stake Pound sinks: its actor, its look and its flag (fdActorSetMetatileOpen).
Referenced by scEasternAlhafraPoundStake() and scInit().
Definition at lines 273 and 2568 of file eastern_alhafra.c.
EasternAlhafraPlacements
extern ACTOR_PLACE EasternAlhafraPlacements[]
ACTOR_PLACE EasternAlhafraPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 274 and 2594 of file eastern_alhafra.c.
EasternAlhafraPlacementsAfterBriggsCaught
extern ACTOR_PLACE EasternAlhafraPlacementsAfterBriggsCaught[]
ACTOR_PLACE EasternAlhafraPlacementsAfterBriggsCaught[]
Referenced by scGetActorPlacements().
Definition at lines 275 and 2642 of file eastern_alhafra.c.
EasternAlhafraShipDoor
extern MAP_EDIT EasternAlhafraShipDoor
MAP_EDIT EasternAlhafraShipDoor
The ship's door opening as Felix walks into it.
References EasternAlhafraShipDoorOpening.
Referenced by scEasternAlhafraEnterShip().
Definition at lines 398 and 2707 of file eastern_alhafra.c.
EasternAlhafraWaveTableIndex
extern Uint8 EasternAlhafraWaveTableIndex[]
Uint8 EasternAlhafraWaveTableIndex[]
Which of EasternAlhafraWaveLines' two tables the screen reads; the other is being filled.
Referenced by scEasternAlhafraFillWaveLines() and scEasternAlhafraStartWaveDMA().
Definition at lines 815 and 2803 of file eastern_alhafra.c.
QuestionMarkScript
extern Uint32 QuestionMarkScript[]
Uint32 QuestionMarkScript[]
The "?" bubbles scActorPopQuestionMarks pops: each frees itself once its wait
is over.
Referenced by scQuestionMarkPop().
Definition at lines 1396 and 2883 of file eastern_alhafra.c.
EasternAlhafraUnusedActorList
Uint16 EasternAlhafraUnusedActorList[]
Unused: a list of one actor, the dock crate, ended by ACTOR_LIST_END.
Definition at line 2563 of file eastern_alhafra.c.
SceneEntrances
SCENE_ENTRANCE SceneEntrances[]
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.
Referenced by scGetEntrances().
Definition at line 2575 of file eastern_alhafra.c.
SceneExits
Uint32 SceneExits[]
Referenced by scGetExits().
Definition at line 2585 of file eastern_alhafra.c.
EasternAlhafraShipDoorOpening
Uint16 EasternAlhafraShipDoorOpening[]
How the ship's door opens: one tick of metatiles copied over it.
Referenced by EasternAlhafraShipDoor.
Definition at line 2701 of file eastern_alhafra.c.
SceneCues
CUE SceneCues[]
References scEasternAlhafraAskToHelpWithMast(), scEasternAlhafraBriggsStealsShip(), scEasternAlhafraBurstMastBlock(), scEasternAlhafraEnterShip(), scEasternAlhafraFinishPushing(), scEasternAlhafraFinishPushingRockUnderLog(), scEasternAlhafraGiveUpOnMastBlock(), scEasternAlhafraIgnoreDiagonalStep(), scEasternAlhafraPoundStake(), scEasternAlhafraPushAhead(), scEasternAlhafraReachMastBlock(), scEasternAlhafraRollLog(), scEasternAlhafraStartPushing(), scEasternAlhafraStartPushingRockUnderLog(), scEasternAlhafraStepByCabinDoor(), scEasternAlhafraTalkToSailor() and scEasternAlhafraWorkersTellMayor().
Referenced by scGetCues().
Definition at line 2711 of file eastern_alhafra.c.