Skip to Content
The Alchemy Project

src/scene/idejima.c

Idejima, the peninsula at the end of the road west of Venus Lighthouse, where the story of The Lost Age begins. More…

Macros

NameDescription
#defineFLAG_IDEJIMA_LEADER_WALKED_BACK FLAG_SCENE_TEMP(0x00)Set once the leader has been walked back from the edge of the map by scIdejimaCatchUpWithFelix, so the next one to catch up finds him there.

Enumerations

NameDescription
enumIDEJIMA_ENTRANCE { ENTRANCE_FROM_DOOR, ENTRANCE_WAKE, ENTRANCE_FROM_DOOR_AGAIN, … }The entrances the cues are chosen by: two at the foot of the mountain, where only the unseen door answers, and the two of the island run aground.
enumanonymous enum { EXIT_DOOR }The unseen door, which leads back out at ENTRANCE_FROM_DOOR_AGAIN.
enumIDEJIMA_METATILE_BEHAVIOR { METATILE_BEHAVIOR_DOOR, METATILE_BEHAVIOR_WHERE_ALEX_WENT, M … }The metatiles the cues answer, by their behaviour in the map.
enumIDEJIMA_ACTOR_ID { ACTOR_KRADEN, ACTOR_SHIP, ACTOR_ALEX, ACTOR_NARRATOR }The scene's placed actors, numbering the rows of IdejimaPlacements; its rows of Jenna's and Sheba's sprites place ACTOR_JENNA and ACTOR_SHEBA.
enumanonymous enum { SPARE_METATILE_X, SPARE_ROW_UNMARKED, SPARE_ROW_KRADEN, SPAR … }The spare metatiles at (38..39, 31..34) whose behaviour is copied under each sleeper: Kraden's, Jenna's and Sheba's marks on rows 32 to 34, and on row 31 the ground each spot is set back to as its sleeper gets up.
enumanonymous enum { KRADEN_ANIMATION_ASLEEP }Kraden's sprite lying asleep on his side.
enumanonymous enum { ANIM_SHEBA_SIT_UP, ANIM_JENNA_LIE_ON_SIDE }Animation 18 of Sheba's sheet sits her up on the ground; of Jenna's, it lays her on her side.
enumanonymous enum { SHIP_ANIMATION_ROCK_FAST }Menardi's ship rocking every 10 ticks, quicker than at rest, as the island drifts.

Functions

NameDescription
BSS_DATAALIGNED (16)The wave scroll's two tables of BG3 row offsets, one for each tick in turn.
voidscIdejimaResetWaveLines (void)Starts the wave scroll from its first phase and table.
voidscIdejimaApplyWaveLines (void)The sea's wave scroll: each scanline's vertical offset for BG3 from the table finished last tick, streamed by DMA 0 at every HBlank.
voidscIdejimaUpdateWaveLines (void)Fills the other table of IdejimaWaveLines with BG3's scroll plus twice the sine plus one, 0 to 4 pixels: a wave that moves down the screen a row each tick.
voidscIdejimaUseDriftPalette (void)Copies BG palettes 8 to 11 of the palette being faded to over palettes 0 to 3 and clears colour 0, for the island adrift.
voidscDriftScenePrepare (void)Readies the island adrift: the sea's layer drifts a quarter of a pixel east and an eighth south each tick, the beacon's metatiles are copied in and the ship rocks quickly.
voidscIdejimaLayDownTheOthers (void)Lays each of Kraden, Jenna and Sheba who has not yet joined asleep on the grass where the wave left them, and wakes Felix the first time.
voidscIdejimaWakeKraden (void)Talking to Kraden, asleep on the grass north-east of where Felix woke, or reading his mind: he groans awake, marvels that the wave carried them to solid land and joins the party.
voidscIdejimaWakeJenna (void)Talking to Jenna, asleep on the grass west of where Felix woke, or reading her mind: she wakes, asks whether he has checked on the others and joins the party.
voidscIdejimaWakeSheba (void)Talking to Sheba, asleep on the grass north-west of where Felix woke: she wakes, wonders where they are and joins the party.
voidscIdejimaCatchUpWithFelix (void)Walking west across the grass towards the island's edge, metatiles (8..10, 44..47), while any of the others is still asleep: Felix is walked back a little, and each sleeper in turn wakes, runs after him, scolds him for leaving them behind and joins the party.
voidscIdejimaWonderWhereAlexHasGone (void)Walking on west, metatiles (5..6, 44..47), with all four together: Kraden wonders where Alex has gone, the party decides to follow him to the Great Western Sea, and they ask Sheba why she travels with them.
voidscIdejimaCountAnswer ()Counts the answer just given (fdScriptCountAnswerStub).
const SCENE_ENTRANCE *scGetEntrances (void)Where the party can enter: the cave under the spring has its own entrances.
const SCENE_REGION *scGetExitRegions (void)The regions of the rooms whose exits are rectangles: the Chestbeaters' room and the stream room.
const Uint32 *scGetExits (void)The dock's ways lead back the way the party came into Lemuria, which the harbour and the shore of Ancient Lemuria note in FLAG_LEMURIA_OTHER_WAY_IN.
const ACTOR_PLACE *scGetActorPlacements (void)The scene's actor placements: a room of names for its entrance, else the debug room's.
const CUE *scGetCues (void)The scene's cues: the rooms of names' for any entrance above ENTRANCE_NAMES_ABOVE, else the debug room's.
voidscIdejimaGetUp (Sint32 id)Stands a sleeper up where it lay, with a little hop.
voidscIdejimaEnterDoor (void)Walking north onto the bare grass at the foot of the mountain, metatile (11, 10), plays a door's sound and leaves through a door that is not drawn, to come straight back out on the same spot.
voidscIdejimaWalkLeaderBack (void)Walks Felix back from the edge of the shore, once a visit.
voidscIdejimaBreakAwayFromGondowan (void)Jenna and Kraden reach Idejima and find Menardi's ship, which cannot sail without the orb that moved it.
voidscIdejimaFindFelixAndSheba (void)Adrift, Alex leads Jenna and Kraden to Felix and Sheba, washed up on the island.
voidscIdejimaRideTheTidalWave (void)Sheba wakes and tells what happened at the lighthouse, a new continent comes in sight, and a tidal wave sweeps the island towards it.
voidscFelixWakeStartStep (void)Begins a step of Felix's waking: empty.
voidscFelixWakeEndStep (void)Ends a step of Felix's waking: empty.
voidscFelixWakeWaitForButton (void)Waits for a button, or 3 seconds.
voidscIdejimaFelixWakes (void)Felix wakes on the grass, stirring a little more at each button, gets up and is asked "Do you want to check yourself for injuries?"; Yes has him check his arms and then his legs, No has him walk about a bit.
Sint32scInit (void)Starts the sea's ripple, then runs what the entrance taken calls for: the island run aground (after the tidal wave, or back from the world map, both making Daila's sanctum the place a defeat returns the party to), or one of the story's three cutscenes before it.
Sint32scPrepareMap (void)Once Briggs is caught the pool has dried up: its colours take the dry ground's.
voidscIdejimaLieDown (Sint32 id)Unused: lays an actor down, the reverse of scIdejimaGetUp.

Variables

NameDescription
extern 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.
extern Uint32IdejimaExits []
extern CUEIdejimaCues []
extern CUEIdejimaCuesFromDoor []
extern CUEIdejimaCuesWake []
extern ACTOR_PLACEIdejimaPlacements []
extern Sint32IdejimaStretchScript []
extern Uint32IdejimaKradenStepsAsideScript []
extern Uint32IdejimaJoinTheLeaderScript []
extern Uint32IdejimaGoAfterAlexScript []
extern Uint32IdejimaKradenToTheShipScript []
extern Uint32IdejimaJennaToTheShipScript []
extern Uint32IdejimaAlexLeadsTheWayScript []
extern Uint32IdejimaKradenFollowsAlexScript []
extern Uint32IdejimaJennaFollowsAlexScript []
extern Uint32IdejimaKradenRunsToFelixScript []
extern Uint32IdejimaJennaRunsToFelixScript []
extern Uint32IdejimaJennaToTheShoreScript []
extern Uint32IdejimaShebaToTheShoreScript []
extern Uint32IdejimaKradenToTheShoreScript []
extern Uint32IdejimaFelixToTheShoreScript []
Sint16IdejimaWaveLines [2][160]The wave scroll's two tables of BG3 row offsets, one for each tick in turn.
Sint32IdejimaWavePhaseThe tick count the wave scroll's phase follows.
Sint16IdejimaWaveBufferWhich of IdejimaWaveLines the next tick computes.
Uint32EmotePopTiltedScript []An emote bubble popping up tilted; each scene that shows one keeps its own copy.

Description

Idejima, the peninsula at the end of the road west of Venus Lighthouse, where the story of The Lost Age begins. The scene is entered by its story's three cutscenes, one entrance each, and then by the party washed ashore.

First Jenna and Kraden reach Idejima and find Menardi's ship without the orb that moves it; Alex joins them, the beacon is lit, and the tremor tears Idejima away from Gondowan (scIdejimaBreakAwayFromGondowan). Adrift, Alex shows Jenna and Kraden that Felix and Sheba have washed up on the island (scIdejimaFindFelixAndSheba). Then Sheba wakes, land comes in sight, and a tidal wave carries the island onto it (scIdejimaRideTheTidalWave).

Felix wakes on the grass of the island, now run aground on the coast of Indra near Daila (scIdejimaFelixWakes), with Jenna, Sheba and Kraden still lying where the wave left them (scIdejimaLayDownTheOthers). Each wakes when he talks to them (scIdejimaWakeKraden, scIdejimaWakeJenna, scIdejimaWakeSheba), or runs after him if he heads west without them (scIdejimaCatchUpWithFelix). Once all three have joined, they wonder where Alex has gone (scIdejimaWonderWhereAlexHasGone), and the island's west edge leads out onto the world map.

While the island drifts, the sea around it ripples (scIdejimaUpdateWaveLines, scIdejimaApplyWaveLines).

Macros in detail

FLAG_IDEJIMA_LEADER_WALKED_BACK

#define FLAG_IDEJIMA_LEADER_WALKED_BACK FLAG_SCENE_TEMP(0x00)

Set once the leader has been walked back from the edge of the map by scIdejimaCatchUpWithFelix, so the next one to catch up finds him there.

Referenced by scIdejimaWalkLeaderBack().

Definition at line 37 of file idejima.c.

Enumerations in detail

IDEJIMA_ENTRANCE

enum IDEJIMA_ENTRANCE

The entrances the cues are chosen by: two at the foot of the mountain, where only the unseen door answers, and the two of the island run aground.

EnumeratorValueDescription
ENTRANCE_FROM_DOOR1At the foot of the mountain, metatile (11, 10), with the unseen door north. No exit table or script in the game leads here by it; the unseen door leads back by ENTRANCE_FROM_DOOR_AGAIN.
ENTRANCE_WAKE2The island run aground, where Felix
ENTRANCE_FROM_DOOR_AGAIN3wakes after the tidal wave.
ENTRANCE_BACK_FROM_WORLD_MAP4Back onto the island from the world map, at its west edge.
ENTRANCE_BREAK_AWAY11Two of the story's three scenes
ENTRANCE_FIND_FELIX_AND_SHEBA12before the shore, each played on arriving by its own entrance (scInit); the third is the title's IDEJIMA_RIDE_THE_TIDAL_WAVE.

Definition at line 41 of file idejima.c.

anonymous enum

enum { EXIT_DOOR }

The unseen door, which leads back out at ENTRANCE_FROM_DOOR_AGAIN.

EnumeratorValueDescription
EXIT_DOOR3

Definition at line 63 of file idejima.c.

IDEJIMA_METATILE_BEHAVIOR

enum IDEJIMA_METATILE_BEHAVIOR

The metatiles the cues answer, by their behaviour in the map.

EnumeratorValueDescription
METATILE_BEHAVIOR_DOOR3The unseen door at the foot of the mountain, metatile (11, 10).
METATILE_BEHAVIOR_WHERE_ALEX_WENT8The line across the grass at (5..6, 44..47), where the party talks about Alex.
METATILE_BEHAVIOR_CATCH_UP9The line across the grass at (8..10, 44..47), east of it, where the sleepers catch up with Felix.
METATILE_BEHAVIOR_BY_KRADEN10Stamped under Kraden, Jenna and Sheba where each lies asleep, from the spare metatiles at (38..39, 32..34).
METATILE_BEHAVIOR_BY_JENNA
METATILE_BEHAVIOR_BY_SHEBA

Definition at line 69 of file idejima.c.

IDEJIMA_ACTOR_ID

enum IDEJIMA_ACTOR_ID

The scene's placed actors, numbering the rows of IdejimaPlacements; its rows of Jenna's and Sheba's sprites place ACTOR_JENNA and ACTOR_SHEBA.

EnumeratorValueDescription
ACTOR_KRADENACTOR_FIRST_PLACED
ACTOR_SHIPMenardi's ship, moored in a cove of the peninsula.
ACTOR_ALEX
ACTOR_NARRATORAn actor with no picture that speaks the lines no one says, above Felix as he wakes.

Definition at line 88 of file idejima.c.

anonymous enum

enum { SPARE_METATILE_X, SPARE_ROW_UNMARKED, SPARE_ROW_KRADEN, SPARE_ROW_JENNA, … }

The spare metatiles at (38..39, 31..34) whose behaviour is copied under each sleeper: Kraden's, Jenna's and Sheba's marks on rows 32 to 34, and on row 31 the ground each spot is set back to as its sleeper gets up.

EnumeratorValueDescription
SPARE_METATILE_X38
SPARE_ROW_UNMARKED31
SPARE_ROW_KRADEN
SPARE_ROW_JENNA
SPARE_ROW_SHEBA

Definition at line 100 of file idejima.c.

anonymous enum

enum { KRADEN_ANIMATION_ASLEEP }

Kraden's sprite lying asleep on his side.

EnumeratorValueDescription
KRADEN_ANIMATION_ASLEEP5

Definition at line 110 of file idejima.c.

anonymous enum

enum { ANIM_SHEBA_SIT_UP, ANIM_JENNA_LIE_ON_SIDE }

Animation 18 of Sheba's sheet sits her up on the ground; of Jenna's, it lays her on her side.

EnumeratorValueDescription
ANIM_SHEBA_SIT_UP18
ANIM_JENNA_LIE_ON_SIDE18

Definition at line 117 of file idejima.c.

anonymous enum

enum { SHIP_ANIMATION_ROCK_FAST }

Menardi's ship rocking every 10 ticks, quicker than at rest, as the island drifts.

EnumeratorValueDescription
SHIP_ANIMATION_ROCK_FAST2

Definition at line 125 of file idejima.c.

Functions in detail

scIdejimaResetWaveLines

void scIdejimaResetWaveLines(void)

Starts the wave scroll from its first phase and table.

References IdejimaWaveBuffer and IdejimaWavePhase.

Referenced by scInit().

Definition at lines 159 and 984 of file idejima.c.

scIdejimaApplyWaveLines

void scIdejimaApplyWaveLines(void)

The sea's wave scroll: each scanline's vertical offset for BG3 from the table finished last tick, streamed by DMA 0 at every HBlank.

References IdejimaWaveBuffer, IdejimaWaveLines and syDMAXCopy().

Referenced by scInit().

Definition at lines 160 and 992 of file idejima.c.

scIdejimaUpdateWaveLines

void scIdejimaUpdateWaveLines(void)

Fills the other table of IdejimaWaveLines with BG3's scroll plus twice the sine plus one, 0 to 4 pixels: a wave that moves down the screen a row each tick.

References fdMapGridGetLayer(), IdejimaWaveBuffer, IdejimaWaveLines, IdejimaWavePhase, Sint32 and sySin().

Referenced by scInit().

Definition at lines 161 and 1004 of file idejima.c.

scIdejimaUseDriftPalette

void scIdejimaUseDriftPalette(void)

Copies BG palettes 8 to 11 of the palette being faded to over palettes 0 to 3 and clears colour 0, for the island adrift.

References fdPaletteFadeApplyTarget().

Referenced by scIdejimaFindFelixAndSheba().

Definition at lines 162 and 1025 of file idejima.c.

scDriftScenePrepare

void scDriftScenePrepare(void)

Readies the island adrift: the sea's layer drifts a quarter of a pixel east and an eighth south each tick, the beacon's metatiles are copied in and the ship rocks quickly.

References fdActorSetAnimation(), fdMapGridCopyMetatilesTo() and fdMapGridGetLayer().

Referenced by scIdejimaFindFelixAndSheba() and scIdejimaRideTheTidalWave().

Definition at lines 163 and 1041 of file idejima.c.

scIdejimaLayDownTheOthers

void scIdejimaLayDownTheOthers(void)

Lays each of Kraden, Jenna and Sheba who has not yet joined asleep on the grass where the wave left them, and wakes Felix the first time.

References fdActorGet(), fdActorSetAnimation(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), fdScriptGetFlag(), scIdejimaFelixWakes(), Sint32 and sySynch().

Referenced by scInit().

Definition at lines 164 and 1934 of file idejima.c.

scIdejimaWakeKraden

void scIdejimaWakeKraden(void)

Talking to Kraden, asleep on the grass north-east of where Felix woke, or reading his mind: he groans awake, marvels that the wave carried them to solid land and joins the party.

References fdActorFaceActor(), fdActorFaceDirection(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAttachedEffect(), fdActorSetDestination(), fdActorSetSpriteFlags(), fdActorShowEmote(), fdActorWalkToAndWait(), fdMapGridCopyMetatileAttributes(), fdScriptEnd(), fdScriptSetFlag(), fdScriptShowMessage(), fdScriptStart(), MainRoutineStateWork, mnMessageShowCentered(), scFieldActorWaitForMoveById(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptWait(), Sint32 and sySynch().

Referenced by IdejimaCuesWake.

Definition at lines 165 and 224 of file idejima.c.

scIdejimaWakeJenna

void scIdejimaWakeJenna(void)

Talking to Jenna, asleep on the grass west of where Felix woke, or reading her mind: she wakes, asks whether he has checked on the others and joins the party.

References fdActorFaceActor(), fdActorFaceDirection(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetDestination(), fdActorSetSpriteFlags(), fdActorShowEmote(), fdMapGridCopyMetatileAttributes(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptShowMessage(), fdScriptStart(), MainRoutineStateWork, scFieldActorJump(), scFieldActorWaitForMoveById(), scFieldScriptAddPartyMember(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptWait() and sySynch().

Referenced by IdejimaCuesWake.

Definition at lines 166 and 296 of file idejima.c.

scIdejimaWakeSheba

void scIdejimaWakeSheba(void)

Talking to Sheba, asleep on the grass north-west of where Felix woke: she wakes, wonders where they are and joins the party.

References fdActorFaceActorById(), fdActorFaceDirection(), fdActorGetById(), fdActorJump(), fdActorRunRepeatedMotion(), fdActorSetAnimationAndWait(), fdActorSetAnimationById(), fdActorSetDestinationById(), fdActorSetSpriteFlags(), fdActorShowEmoteById(), fdActorTurnToFaceEachOther(), fdActorWaitForMoveById(), fdActorWalkToAndWait(), fdMapGridCopyMetatileAttributes(), fdScriptAddPartyMember(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptSetMessageId(), fdScriptShowMessageAndWait(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptWait(), MainRoutineStateWork and syGameFlagSet().

Referenced by IdejimaCuesWake.

Definition at lines 167 and 372 of file idejima.c.

scIdejimaCatchUpWithFelix

void scIdejimaCatchUpWithFelix(void)

Walking west across the grass towards the island's edge, metatiles (8..10, 44..47), while any of the others is still asleep: Felix is walked back a little, and each sleeper in turn wakes, runs after him, scolds him for leaving them behind and joins the party.

References fdActorFaceDirection(), fdActorFaceEachOther(), fdActorGetById(), fdActorJump(), fdActorRunScriptAndWait(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAnimationById(), fdActorSetAttachedEffect(), fdActorSetDestinationById(), fdActorSetScript(), fdActorSetSpriteFlags(), fdActorShowEmote(), fdActorShowEmoteById(), fdActorWalkToAndWait(), fdMapGridCopyMetatileAttributes(), fdScriptAddPartyMember(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptGetFlag(), fdScriptSetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptShowMessageAndWait(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptWait(), IdejimaJoinTheLeaderScript, IdejimaKradenStepsAsideScript, IdejimaStretchScript, MainRoutineStateWork, mnMessageShowCentered(), scFieldActorJump(), scFieldActorWaitForMoveById(), scFieldActorWaitForScriptEndById(), scFieldScriptAddPartyMember(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scIdejimaGetUp(), scIdejimaWalkLeaderBack(), Sint32, syGameFlagSet() and sySynch().

Referenced by IdejimaCuesWake.

Definition at lines 168 and 466 of file idejima.c.

scIdejimaWonderWhereAlexHasGone

void scIdejimaWonderWhereAlexHasGone(void)

Walking on west, metatiles (5..6, 44..47), with all four together: Kraden wonders where Alex has gone, the party decides to follow him to the Great Western Sea, and they ask Sheba why she travels with them.

References fdActorFaceDirection(), fdActorPlaceOnActor(), fdActorRunScriptAndWait(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorSetScript(), fdActorShowEmote(), fdActorWalkTo(), fdActorWalkToAndWait(), fdScriptAskYesNo(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptShowMessage(), fdScriptStart(), IdejimaGoAfterAlexScript, MainRoutineStateWork, scFieldActorJump(), scFieldActorStop(), scFieldActorWaitForMoveById(), scFieldActorWaitForScriptEndById(), scFieldActorWatchAndSetScript(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptWait(), scIdejimaCountAnswer(), Sint32 and sySynch().

Referenced by IdejimaCuesWake.

Definition at lines 169 and 699 of file idejima.c.

scIdejimaCountAnswer

void scIdejimaCountAnswer()

Counts the answer just given (fdScriptCountAnswerStub).

Referenced by scIdejimaWonderWhereAlexHasGone().

Definition at line 171 of file idejima.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References SceneEntrances.

Definition at line 173 of file idejima.c.

scGetExitRegions

const SCENE_REGION *scGetExitRegions(void)

Definition at line 178 of file idejima.c.

scGetExits

const Uint32 *scGetExits(void)

References IdejimaExits.

Definition at line 183 of file idejima.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

References IdejimaPlacements.

Definition at line 188 of file idejima.c.

scGetCues

const CUE *scGetCues(void)

References IdejimaCues, IdejimaCuesFromDoor, IdejimaCuesWake and MainRoutineStateWork.

Definition at line 193 of file idejima.c.

scIdejimaGetUp

void scIdejimaGetUp(Sint32 id)

Stands a sleeper up where it lay, with a little hop.

References fdActorGet(), fdActorSetAnimation(), fdActorSetSpriteFlags(), Sint32 and sySynch().

Referenced by scIdejimaCatchUpWithFelix().

Definition at line 206 of file idejima.c.

scIdejimaEnterDoor

void scIdejimaEnterDoor(void)

Walking north onto the bare grass at the foot of the mountain, metatile (11, 10), plays a door's sound and leaves through a door that is not drawn, to come straight back out on the same spot.

Only entrances 1 and 3 answer this metatile, and the door itself is the only way the game enters by 3, so a player who arrives with the story never meets it.

References fdScriptEndLastingPsynergy(), fdScriptFinishScreenTransition(), fdScriptStart(), fdScriptWaitTransitionTicks(), syImportScriptSetExitRequest() and sySoundPlay().

Referenced by IdejimaCuesFromDoor.

Definition at line 441 of file idejima.c.

scIdejimaWalkLeaderBack

void scIdejimaWalkLeaderBack(void)

Walks Felix back from the edge of the shore, once a visit.

References fdActorWalkToAndWait(), fdScriptGetFlag(), fdScriptSetFlag() and MainRoutineStateWork.

Referenced by scIdejimaCatchUpWithFelix().

Definition at line 452 of file idejima.c.

scIdejimaBreakAwayFromGondowan

void scIdejimaBreakAwayFromGondowan(void)

Jenna and Kraden reach Idejima and find Menardi's ship, which cannot sail without the orb that moved it. Alex joins them, the beacon is lit and the tremor tears Idejima away from Gondowan.

References fdActorFaceDirection(), fdActorGet(), fdActorPlaceOnActor(), fdActorRunScriptAndWait(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetPosAndFacing(), fdActorSetScript(), fdActorSetSpriteFlags(), fdActorShowEmote(), fdActorWaitForAnimationChange(), fdActorWalkToAndWait(), fdMapGridCenterOnFollowedPoint(), fdScriptFinishScreenTransition(), fdScriptOpenMessage(), fdScriptShowMessage(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), IdejimaJennaToTheShipScript, IdejimaKradenToTheShipScript, MainRoutineStateWork, scEmotePopTilted(), scFieldActorJump(), scFieldActorSetSpriteColor(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetExitRequest(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptWait() and sySynch().

Referenced by scInit().

Definition at line 1056 of file idejima.c.

scIdejimaFindFelixAndSheba

void scIdejimaFindFelixAndSheba(void)

Adrift, Alex leads Jenna and Kraden to Felix and Sheba, washed up on the island.

References fdActorFaceDirection(), fdActorGet(), fdActorRunScriptAndWait(), fdActorSetAnimation(), fdActorSetAttachedEffect(), fdActorSetScript(), fdActorSetSpriteFlags(), fdActorShowEmote(), fdActorWalkToAndWait(), fdMapGridCenterOnFollowedPoint(), fdScriptFinishScreenTransition(), fdScriptShowMessage(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), IdejimaAlexLeadsTheWayScript, IdejimaJennaFollowsAlexScript, IdejimaJennaRunsToFelixScript, IdejimaKradenFollowsAlexScript, IdejimaKradenRunsToFelixScript, MainRoutineStateWork, scDriftScenePrepare(), scFieldActorJump(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetExitRequest(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptShowTwoMessagesAndWait(), scFieldScriptWait(), scIdejimaUseDriftPalette(), Sint32 and sySynch().

Referenced by scInit().

Definition at line 1300 of file idejima.c.

scIdejimaRideTheTidalWave

void scIdejimaRideTheTidalWave(void)

Sheba wakes and tells what happened at the lighthouse, a new continent comes in sight, and a tidal wave sweeps the island towards it.

References fdActorFaceDirection(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorSetPosAndFacing(), fdActorSetScript(), fdActorSetSpriteFlags(), fdActorShowEmote(), fdActorWalkTo(), fdActorWalkToAndWait(), fdCameraWaitForArrival(), fdScriptShowMessage(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), IdejimaFelixToTheShoreScript, IdejimaJennaToTheShoreScript, IdejimaKradenToTheShoreScript, IdejimaShebaToTheShoreScript, MainRoutineStateWork, scDriftScenePrepare(), scFieldActorJump(), scFieldActorStartRepeatedMotion(), scFieldActorStop(), scFieldActorWaitForScriptEndById(), scFieldActorWatchAndSetScript(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetExitRequest(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptShowTwoMessagesAndWait(), scFieldScriptWait() and sySynch().

Referenced by scInit().

Definition at line 1434 of file idejima.c.

scFelixWakeStartStep

void scFelixWakeStartStep(void)

Begins a step of Felix's waking: empty.

Referenced by scFelixWakeWaitForButton() and scIdejimaFelixWakes().

Definition at line 1738 of file idejima.c.

scFelixWakeEndStep

void scFelixWakeEndStep(void)

Ends a step of Felix's waking: empty.

Referenced by scFelixWakeWaitForButton() and scIdejimaFelixWakes().

Definition at line 1743 of file idejima.c.

scFelixWakeWaitForButton

void scFelixWakeWaitForButton(void)

Waits for a button, or 3 seconds.

References PerWork, scFelixWakeEndStep(), scFelixWakeStartStep(), Sint32 and sySynch().

Referenced by scIdejimaFelixWakes().

Definition at line 1748 of file idejima.c.

scIdejimaFelixWakes

void scIdejimaFelixWakes(void)

Felix wakes on the grass, stirring a little more at each button, gets up and is asked "Do you want to check yourself for injuries?"; Yes has him check his arms and then his legs, No has him walk about a bit.

References fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetSpriteFlags(), fdActorWaitForAnimationChange(), fdActorWalkToAndWait(), fdMapGridCenterOnFollowedPoint(), fdScriptClearFlag(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptShowMessage(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), MainRoutineStateWork, scFelixWakeEndStep(), scFelixWakeStartStep(), scFelixWakeWaitForButton(), scFieldActorJump(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptWait(), Sint32 and sySynch().

Referenced by scIdejimaLayDownTheOthers().

Definition at line 1765 of file idejima.c.

scInit

Sint32 scInit(void)

Starts the sea's ripple, then runs what the entrance taken calls for: the island run aground (after the tidal wave, or back from the world map, both making Daila's sanctum the place a defeat returns the party to), or one of the story's three cutscenes before it.

References fdScriptGetFlag(), gmPartyRestoreHpPp(), MainRoutineStateWork, scIdejimaApplyWaveLines(), scIdejimaBreakAwayFromGondowan(), scIdejimaFindFelixAndSheba(), scIdejimaLayDownTheOthers(), scIdejimaResetWaveLines(), scIdejimaRideTheTidalWave(), scIdejimaUpdateWaveLines(), Sint32 and sySetTickEvent().

Definition at line 1880 of file idejima.c.

scPrepareMap

Sint32 scPrepareMap(void)

References Sint32.

Definition at line 1913 of file idejima.c.

scIdejimaLieDown

void scIdejimaLieDown(Sint32 id)

Unused: lays an actor down, the reverse of scIdejimaGetUp.

References fdActorGet(), fdActorSetSpriteFlags() and Sint32.

Definition at line 1919 of file idejima.c.

Variables in detail

IdejimaExits

extern Uint32 IdejimaExits[]

Uint32 IdejimaExits[]

Referenced by scGetExits().

Definition at lines 131 and 2176 of file idejima.c.

IdejimaCues

extern CUE IdejimaCues[]

CUE IdejimaCues[]

Referenced by scGetCues().

Definition at lines 132 and 2203 of file idejima.c.

IdejimaCuesFromDoor

extern CUE IdejimaCuesFromDoor[]

CUE IdejimaCuesFromDoor[]

References scIdejimaEnterDoor().

Referenced by scGetCues().

Definition at lines 133 and 2207 of file idejima.c.

IdejimaCuesWake

extern CUE IdejimaCuesWake[]

CUE IdejimaCuesWake[]

References scIdejimaCatchUpWithFelix(), scIdejimaWakeJenna(), scIdejimaWakeKraden(), scIdejimaWakeSheba() and scIdejimaWonderWhereAlexHasGone().

Referenced by scGetCues().

Definition at lines 134 and 2214 of file idejima.c.

IdejimaPlacements

extern ACTOR_PLACE IdejimaPlacements[]

ACTOR_PLACE IdejimaPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 135 and 2186 of file idejima.c.

IdejimaStretchScript

extern Sint32 IdejimaStretchScript[]

Sint32 IdejimaStretchScript[]

References Sint32.

Referenced by scIdejimaCatchUpWithFelix().

Definition at lines 136 and 2113 of file idejima.c.

IdejimaKradenStepsAsideScript

extern Uint32 IdejimaKradenStepsAsideScript[]

Uint32 IdejimaKradenStepsAsideScript[]

Referenced by scIdejimaCatchUpWithFelix().

Definition at lines 137 and 2140 of file idejima.c.

IdejimaJoinTheLeaderScript

extern Uint32 IdejimaJoinTheLeaderScript[]

Uint32 IdejimaJoinTheLeaderScript[]

Referenced by scIdejimaCatchUpWithFelix().

Definition at lines 138 and 2153 of file idejima.c.

IdejimaGoAfterAlexScript

extern Uint32 IdejimaGoAfterAlexScript[]

Uint32 IdejimaGoAfterAlexScript[]

Referenced by scIdejimaWonderWhereAlexHasGone().

Definition at lines 139 and 2163 of file idejima.c.

IdejimaKradenToTheShipScript

extern Uint32 IdejimaKradenToTheShipScript[]

Uint32 IdejimaKradenToTheShipScript[]

Referenced by scIdejimaBreakAwayFromGondowan().

Definition at lines 140 and 1988 of file idejima.c.

IdejimaJennaToTheShipScript

extern Uint32 IdejimaJennaToTheShipScript[]

Uint32 IdejimaJennaToTheShipScript[]

Referenced by scIdejimaBreakAwayFromGondowan().

Definition at lines 141 and 1998 of file idejima.c.

IdejimaAlexLeadsTheWayScript

extern Uint32 IdejimaAlexLeadsTheWayScript[]

Uint32 IdejimaAlexLeadsTheWayScript[]

Referenced by scIdejimaFindFelixAndSheba().

Definition at lines 142 and 2008 of file idejima.c.

IdejimaKradenFollowsAlexScript

extern Uint32 IdejimaKradenFollowsAlexScript[]

Uint32 IdejimaKradenFollowsAlexScript[]

Referenced by scIdejimaFindFelixAndSheba().

Definition at lines 143 and 2021 of file idejima.c.

IdejimaJennaFollowsAlexScript

extern Uint32 IdejimaJennaFollowsAlexScript[]

Uint32 IdejimaJennaFollowsAlexScript[]

Referenced by scIdejimaFindFelixAndSheba().

Definition at lines 144 and 2036 of file idejima.c.

IdejimaKradenRunsToFelixScript

extern Uint32 IdejimaKradenRunsToFelixScript[]

Uint32 IdejimaKradenRunsToFelixScript[]

Referenced by scIdejimaFindFelixAndSheba().

Definition at lines 145 and 2052 of file idejima.c.

IdejimaJennaRunsToFelixScript

extern Uint32 IdejimaJennaRunsToFelixScript[]

Uint32 IdejimaJennaRunsToFelixScript[]

Referenced by scIdejimaFindFelixAndSheba().

Definition at lines 146 and 2060 of file idejima.c.

IdejimaJennaToTheShoreScript

extern Uint32 IdejimaJennaToTheShoreScript[]

Uint32 IdejimaJennaToTheShoreScript[]

Referenced by scIdejimaRideTheTidalWave().

Definition at lines 147 and 2068 of file idejima.c.

IdejimaShebaToTheShoreScript

extern Uint32 IdejimaShebaToTheShoreScript[]

Uint32 IdejimaShebaToTheShoreScript[]

Referenced by scIdejimaRideTheTidalWave().

Definition at lines 148 and 2079 of file idejima.c.

IdejimaKradenToTheShoreScript

extern Uint32 IdejimaKradenToTheShoreScript[]

Uint32 IdejimaKradenToTheShoreScript[]

Referenced by scIdejimaRideTheTidalWave().

Definition at lines 149 and 2090 of file idejima.c.

IdejimaFelixToTheShoreScript

extern Uint32 IdejimaFelixToTheShoreScript[]

Uint32 IdejimaFelixToTheShoreScript[]

Referenced by scIdejimaRideTheTidalWave().

Definition at lines 150 and 2101 of file idejima.c.

IdejimaWaveLines

Sint16 IdejimaWaveLines[2][160]

The wave scroll's two tables of BG3 row offsets, one for each tick in turn.

Referenced by scIdejimaApplyWaveLines() and scIdejimaUpdateWaveLines().

Definition at line 153 of file idejima.c.

IdejimaWavePhase

Sint32 IdejimaWavePhase

The tick count the wave scroll's phase follows.

References Sint32.

Referenced by scIdejimaResetWaveLines() and scIdejimaUpdateWaveLines().

Definition at line 155 of file idejima.c.

IdejimaWaveBuffer

Sint16 IdejimaWaveBuffer

Which of IdejimaWaveLines the next tick computes.

Referenced by scIdejimaApplyWaveLines(), scIdejimaResetWaveLines() and scIdejimaUpdateWaveLines().

Definition at line 157 of file idejima.c.

EmotePopTiltedScript

Uint32 EmotePopTiltedScript[]

An emote bubble popping up tilted; each scene that shows one keeps its own copy.

Referenced by scEmotePopTilted().

Definition at line 2242 of file idejima.c.