Skip to Content
The Alchemy Project

Scene Overlays

This page is a guide to the games/tla/src/scene/ folder of the Alchemy project. Its compressed scene overlays script every town, dungeon, cutscene, and menu-like field screen in Golden Sun: The Lost Age.

Each C file here compiles with -Os into a compressed overlay. Together, these 109 gameplay overlays and the 5 debug overlays in Debug Mode & Test Rooms cover all 325 scenes of the game. Any file, such as daila.c, gives its NPCs, exits, interaction cues, and cutscenes directly in C.

The sections below cover the 7-stub entry table (including TLA's new scPrepareMap hook), real exit, cue, and door script examples, and notes on auto-clearing temp flags, shared puzzle code, and UI overlays. Conceptual context is given in World, Scenes & Maps.

The 7-stub entry table (entry.s)

Felix climbs the steps to Daila's Sanctum door, fading out of Daila and loading the Sanctum overlay
Felix climbs the steps to Daila's Sanctum door, fading out of Daila and loading the Sanctum overlay

Every overlay links entry.s (or a custom table under entry/) to expose 7 fixed-order stubs, adding scPrepareMap over TBS's 6:

  1. scInit: Setup before fade-in, such as restoring ice pillars or positioning story NPCs.
  2. scGetEntrances: Spawn coordinates, facing, and camera bounds. Paired doorways share one number across scenes in include/scene_exits.h: exit a of one scene enters entrance b of the other, and exit b leads back to a.
  3. scGetExits: Conditional (exitId → scene, entrance) rows, with EXIT_FLAG_NONE (-1) as an unconditional fallback.
  4. scGetActorPlacements: Placed NPC and object table (actor IDs 8+). Skipped conditional rows keep their IDs so numbering never shifts.
  5. scGetCues: Top-down first-match interaction table (CUE_TALK, CUE_STEP, CUE_EXAMINE, PSYNERGY_ON_ACTOR, CUE_EXIT, and similar triggers).
  6. scGetExitRegions: Map-edge exit checks.
  7. scPrepareMap (new in TLA): Runs immediately after map load and before camera setup (never on the World Map) to mutate loaded metatiles or palettes from story flags. For example, Daila clears Parch-dried puddles here, and Alhafra recolours four palette entries once Briggs is caught.

Globals use BSS_DATA in C in ROM order. Import tables generate from imports.inc.

Real TLA cue, exit, and script examples

Conditional exit chain with EXIT_FLAG_NONE (lemurian_ship.c):

SCENE_EXIT_UNLESS(LEMURIAN_SHIP_CABINS_LEMURIAN_SHIP_MAIN_DECK, LemurianShipMainDeck, LEMURIAN_SHIP_MAIN_DECK_LEMURIAN_SHIP_CABINS, FLAG_LEMURIA_REACHED),
SCENE_EXIT_UNLESS(LEMURIAN_SHIP_CABINS_LEMURIAN_SHIP_MAIN_DECK, LemuriaDock, LEMURIA_DOCK_LEMURIAN_SHIP_CABINS, FLAG_SHIP_AT_ATTEKA_INLET),
SCENE_EXIT_UNLESS(LEMURIAN_SHIP_CABINS_LEMURIAN_SHIP_MAIN_DECK, AttekaInlet, ATTEKA_INLET_WORLD_MAP_WEST, EXIT_FLAG_NONE),

Top-down cue rows (madra_drawbridge.c):

{CUE_TALK, ACTOR_EAST_GUARD, FLAG_OSENIA_PASSAGE_GRANTED,
 SCRIPT_REF(scMadraDrawbridgeAskGoingToOsenia)},
{CUE_TALK, ACTOR_EAST_GUARD, CONDITION_ALWAYS,
 MSGNO(MsgMadraMikasallaVillage)},

Door script (daila.c, reading RamHeapSlots->fieldState):

void scDailaEnterDoor(void)
{
    FIELD_STATE *state = RamHeapSlots->fieldState;

    fdScriptStart();
    fdScriptEndLastingPsynergy(0);
    fdActorSetSpeed(MainRoutineStateWork.leaderActorId, 0.5);
    fdActorSetSpritePriority(MainRoutineStateWork.leaderActorId, 2);
    fdActorGetById(MainRoutineStateWork.leaderActorId)->motionFlags = 0;
    sySoundPlay(SE_MAP_EXIT);
    fdActorSetAnimationById(MainRoutineStateWork.leaderActorId, ANIM_WALK);
    fdActorCenterAndWalk(MainRoutineStateWork.leaderActorId, 2, -6);
    fdScriptWait(10);
    syImportScriptSetExitRequest(state->stepCue);
    fdScriptFinishScreenTransition();
    fdScriptWaitTransitionTicks();
    fdScriptEnd();
}

Auto-clearing temp flags, shared/ helpers, and UI overlays

Frost cast on a puddle in Daila creates an ice pillar backed by a scene temp flag; entering a house and returning resets the puddle
Frost cast on a puddle in Daila creates an ice pillar backed by a scene temp flag; entering a house and…

Source files

src/scene/

FileDescription
airs_rock.cAir's Rock, the great purple rock in the desert south of Yampi, climbed from outside over three screens before the way inside opens.
airs_rock_inside.cInside Air's Rock, reached through the doorway the lightning opens at its top, with a golden door low on its cliff also leading into the great hall (airs_rock.c): the hall and the rooms around it, their doorways marked by coloured dots.
alhafra.cAlhafra, the port town of Osenia north of the Yampi Desert, where the tidal wave wrecked every ship but one sailboat, whose mast it broke.
alhafra_manor.cThe mayor of Alhafra's manor, where the party stays as his guests once Briggs is caught and hears in the night that Briggs has escaped (scAlhafraManorBriggsEscapes), with other people about once the boat's mast is cleared (FLAG_ALHAFRA_MAST_CLEARED).
alhafra_rooms.cInside Alhafra's houses, inn, shop and Sanctum, whose people are taking in neighbors who lost their homes to the tidal wave.
alhafran_cave.cThe Alhafran Cave under the town, in two scenes that share this overlay: the cave behind the rear entrance by the mayor's home, which the hungry boy's father lets the party into once they give the boy Large Bread (SceneIdAlhafranCave), and the town's jail with the caves beyond it (SceneIdAlhafraJail).
ancient_lemuria.cAncient Lemuria, the ruined shore before the hidden city, where the party lands after getting past Poseidon.
anemos_inner_sanctum.cThe Anemos Inner Sanctum, the hidden dungeon under Contigo, reached by Teleport from the circle in the middle of the town.
anemos_inner_sanctum_dullahan.cThe small stone rooms with dragon statues behind the doors at the head of the Anemos Sanctum's steps by Contigo's geoglyph, and in the same map the Inner Sanctum's last room, reached from its Dragon Skin and Orihalcon chests' rooms (SceneIdAnemosInnerSanctumDullahan).
ankohl_ruins.cThe 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.
apojii_islands.cThe Apojii Islands, at the edge of the world in the Eastern Sea, in three rooms of this overlay: the village round the spring where the Aqua Stone stands, which Douse wakes (scApojiiIslandsDouseAquaStone) to carry the party across the sea to Aqua Rock; its houses, with the inn and the general store, and beside them the Sea of Time Islet's house; and the islet among the falls where the Jupiter Djinni Haze waits (scApojiiIslandsHazeJoinsParty).
apojii_islands_cave.cThe cave of the Apojii Islands: four clumps of weeds on the walls of its south chamber, each scattered for good by Whirlwind.
aqua_rock.cAqua Rock's outside, the island south of the Apojii Islands, in two rooms of this overlay.
aqua_rock_inside.cAqua Rock's inner rooms, inside the rock on the island south of the Apojii Islands, which Felix enters from the rock's outer slopes.
atteka_inlet.cAtteka Inlet, where Felix ties up the Lemurian ship on the way to Contigo, in two scenes that share this overlay: the harbor, a sandy beach where the ship lies and the Wings of Anemos wait on their trestles (SceneIdAttekaInlet), and the grassy heights above it, with a house, the path north towards Contigo and the way west out to the world map (SceneIdAttekaInletGeode).
caverns.cThe four small caves that each keep a Summon's stone tablet, in four scenes that share this overlay.
champa.cChampa, the hungry seafaring village on the edge of Angara, its huts on cliffs and rafts about two waterfalls, whose people wait for Briggs to come home with food.
champa_cliff_caves.cThe caves in Champa's cliff, where the sailors and their families live, in four scenes of this overlay climbing the cliff level by level: the lowest caves, entered from the village by the mouth Briggs's sailors watch (SceneIdChampaCliffCavesLower); the homes above them (ChampaCliffCavesMiddle); the level with Obaba's door and Briggs's home (ChampaCliffCavesUpper); and at the top Obaba's forge room (ChampaCliffCavesForge).
champa_rooms.cThe houses of Champa, the village of Briggs's people on the cliffs of the Eastern Sea, as SceneIdChampaRooms, with the inn and the artifact shop.
champa_sanctum.cChampa's Sanctum, whose healer serves the party across the counter and otherwise talks of Briggs: the village's last hope until he sails from Alhafra, and after it the jewels that made Champa's people lazy.
clear.cThe File Screen overlay (SceneIdClear), the first thing the player sees after the title: the title logo, the file menu (new game, continue, copy, erase, the Battle Arena and Update) and what a new game asks.
contigo.cContigo, the village of the Jupiter clan north of Atteka Inlet, beside the crater below Jupiter Lighthouse, and the rooms of its overlay: the houses, shops, inn and Sanctum, the three game tents, and the Anemos geoglyph east of the village, where the villagers build the Wings of Anemos in front of the Anemos Sanctum.
daila.cDaila, the village in the north of Indra that Felix reaches first after the tidal wave, in two scenes that share this overlay.
daila_rooms.cDaila's rooms, in two scenes that share this overlay: the houses (DailaRoomsHouses) and the sanctuary (DailaRoomsSanctum).
dehkan_plateau.cThe Dehkan Plateau, the cliffs and caves Felix crosses after Daila on his way south to Madra, in six scenes that share this overlay, each of several screens.
eastern_alhafra.cEastern 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.
eastern_alhafra_ship.cBriggs's ship at Alhafra's eastern harbour: the cabin the party enters from the deck, the rooms down its stairs, and a back room behind a tall crate.
epilogue.cThe epilogue: the party's last words, line after line, each speaker's portrait standing in a grey and white border beside the line, over the ending's pictures, from "Finally!
gabomba_catacombs.cThe Gabomba Catacombs, the caves below the Gabomba Statue, which Felix reaches by the ladder down from inside the statue once Piers can cast Frost.
gabomba_statue.cInside the Gabomba Statue at Kibombo, the seven rooms of this overlay: halls of turning cogs and pinions that Felix rides and hops across.
gabomba_statue_chamber.cThe innermost rooms of the Gabomba Statue at Kibombo, three in this overlay: the small idol's chamber in the statue's head, the corridor with the lift, and the final chamber where the Great Gabomba speaks.
gaia_rock.cThe outside of Gaia Rock, the great rock near Izumo where the Serpent lives, in three areas of this overlay.
gaia_rock_inside.cGaia Rock's inside, under the great rock near Izumo where the Serpent lives, in five scenes of one overlay.
garoh.cGaroh, the village of werewolves that guards Air's Rock, in five scenes that share this overlay: the entrance from the world map (SceneIdGarohEntrance), the path up to the village (SceneIdGarohPath, whose chest holds the Hypnos Sword), the village itself (SceneIdGaroh), the tunnels under its houses (SceneIdGarohTunnels) and the cave behind the rock by the sanctum (SceneIdGarohWerewolfCave).
garoh_rooms.cInside Garoh's houses, in three scenes that share this overlay.
gondowan_cliffs.cThe Gondowan Cliffs, the maze of ledges, vines and slides west of Madra on the way to Kibombo, and the river channel below them (SceneIdGondowanCliffs and SceneIdGondowanCliffsPass, which share this overlay).
gondowan_cliffs_hideout.cThe hideout in the Gondowan Cliffs where four warriors from Kibombo camp round a fire, until Briggs is caught (FLAG_BRIGGS_CAUGHT).
idejima.cIdejima, the peninsula at the end of the road west of Venus Lighthouse, where the story of The Lost Age begins.
islet_cave.cThe Islet Cave, which the lonely turtle on the Sea of Time Islet opens once he has Li'l Turtle for a friend.
islets.cThe five small islets of the Eastern Sea, each a scene of its own in this one overlay, and the animal trade that leads from one to the next, every trade made by Mind Reading the animal.
izumo.cIzumo, the village of houses on stilts on the far eastern island of the Eastern Sea.
izumo_rooms.cInside Izumo's houses on stilts, one room each: two houses in the east, the inn, the shop, Kushinada's house, the Sanctum, and the hall of Susa's house in the north, which has a cast and a story of its own.
izumo_ruins.cThe Izumo Ruins, the grey caves under the ring of giant stones in Izumo, reached by the ladder Reveal shows in the ring's centre.
jupiter_lighthouse_aerie.cJupiter Lighthouse's aerie, the open top of the tower between its two archer statues, with the lid over the well guarded by two angels.
jupiter_lighthouse_aerie_beacon.cJupiter Lighthouse's aerie and its beacon: Karst and Agatio wait (scJupiterLighthouseKarstAndAgatioWait), the party casts the Jupiter Star into the well (scJupiterLighthouseCastTheJupiterStar) and the beacon is lit (scJupiterLighthouseBeaconIsLit); Karst and Agatio are fought three times, Jenna and Sheba coming to help (scJupiterLighthouseJennaJoinsTheFight, scJupiterLighthouseShebaJoinsTheFight), and Alex takes them down on the elevator whether the party wins (scJupiterLighthouseWeBeatThem) or loses (scJupiterLighthouseKarstAndAgatioRetreat).
jupiter_lighthouse_basement.cThe grey caves beneath Jupiter Lighthouse, reached by the teleporter in the sandy dead end of its grounds (SceneIdJupiterLighthouseBasement).
jupiter_lighthouse_central_room.cJupiter Lighthouse's central room, and north of it the room of the five grey blocks.
jupiter_lighthouse_cracked_floor.cRooms of Jupiter Lighthouse just below its aerie, on one map.
jupiter_lighthouse_entrance.cThe sandy grounds before Jupiter Lighthouse, reached from the world map at their south edge.
jupiter_lighthouse_ground_floor.cThe ground floor of Jupiter Lighthouse, inside its main gates.
jupiter_lighthouse_left_tower_lower.cThe lower rooms of Jupiter Lighthouse's left tower.
jupiter_lighthouse_locked_doors.cThe level of Jupiter Lighthouse above its central room, with the red and blue locked doors that lead out to the two towers.
jupiter_lighthouse_right_tower_lower.cThe lower rooms of Jupiter Lighthouse's right tower, past its stone archer statue.
jupiter_lighthouse_right_tower_upper.cThe upper rooms of Jupiter Lighthouse's right tower, the last before its top.
jupiter_lighthouse_side_halls.cThe rooms west and south of Jupiter Lighthouse's central room.
jupiter_lighthouse_terraces.cThe terraces high outside Jupiter Lighthouse, over the clouds, which link its main tower, by the red and blue doors, with its left and right towers.
jupiter_lighthouse_upper_hall.cThe hall of Jupiter Lighthouse where the lighthouse is woken, between the room of locked doors below and the cracked floor's room and the terraces above.
kandorean_temple.cThe Kandorean Temple of Master Poi, south-west of Daila, in nine rooms that share this overlay (SceneIdKandoreanTempleLifts to SceneIdKandoreanTemplePoi).
kibombo.cKibombo, the warriors' village below the Gabomba Statue, in the six rooms of this overlay: the village, its houses, shops, inn and Sanctum (scKibomboOpenWeaponShop, scKibomboOpenInn), and the grounds before the statue, each by day and on the ceremony night.
kibombo_mountains.cThe Kibombo Mountains, the pass the Kibombo warriors guard on the way to their village, in three rooms: the south pass with the Disk Axe chest, the north ledges above it where Waft hides, and the small cavern behind a bush.
lemuria.cLemuria, the hidden city beyond the Sea of Time, which Piers leads the party into.
lemuria_dock.cLemuria's dock, where the Lemurian ship ties up: Kraden steps off to wait by the ship and asks whether the party is ready to sail, and a door on the deck leads down into the ship's cabins.
lemuria_entrance.cThe channels among the cliffs where the party's ship comes into Lemuria.
lemuria_palace.cLemuria's palace.
lemuria_rooms.cThe rooms behind Lemuria's doors (SceneIdLemuriaRooms).
lemuria_spring.cThe Spring of Lemuria, up in the middle of the town past the man who offers the test of luck.
lemurian_ship.cThe Lemurian Ship below deck, at the East Indra Shore, in two scenes (SceneIdLemurianShipCabins and SceneIdLemurianShipAquaHydra) whose rooms are told apart by the entrance used.
lemurian_ship_deck.cThe Lemurian Ship, in two scenes: the East Indra Shore, where the ship lies moored below the cliffs (SceneIdLemurianShipMainDeck), and its deck at the tiller once it sails (SceneIdLemurianShipTiller).
lobby.cThe Battle Arena's lobby, The Broken Seal's arena reworked, reached from the File Screen's Battle mode.
loho.cLoho, the miners' village in the north of Gondowan, and its houses.
madra.cMadra, the walled town of eastern Gondowan that Felix reaches over the Dehkan Plateau.
madra_catacombs.cThe Madra Catacombs, a deserted village in a cave under the town.
madra_drawbridge.cThe Madra Drawbridge, east of Madra, where two guards keep the way into Osenia shut until Madra's elder gives the party permission.
madra_rooms.cInside Madra's buildings: the inn, the round sanctum, the houses, the elder's house with the Black Crystal on its mantel, the jail where Piers is held, and, as a second scene, the left cavern home in the cliff.
magma_rock.cMagma Rock's outside: the climb up the mountain across the river from Naribwe, past yellow statues that answer Burst, to the great fire on its top that hides the way down into it.
magma_rock_inside.cMagma Rock's inside, the rooms in the volcano that the great blast on its top opened.
mars_lighthouse_aerie.cMars Lighthouse's aerie, at the top of the last lighthouse: the party faces the Doom Dragon (scMarsLighthouseAerieFaceDoomDragon) and learns who the dragon was (scMarsLighthouseAerieFindWhoTheDragonWas), the three it was speak to the party as they lie dying (scMarsLighthouseAerieTalkToJennasMother and the talks after it), and the beacon is lit with the Mars Star (scMarsLighthouseAerieLightBeacon) before the Golden Sun rises (scMarsLighthouseAerieWatchGoldenSunRise).
mars_lighthouse_entrance.cThe Mars Lighthouse from its doors up to the dragons' hall: the steps outside in the storm and the frozen lower floors inside, in seven scenes that share this overlay.
mars_lighthouse_hall.cThe Mars Lighthouse's central hall, the four ledges in the rain that lead from it to the element towers, and the beacon ledge at the top of each tower, all sharing this overlay.
mars_lighthouse_star_room.cThe Mars Lighthouse's dragon hall, high in the frozen lighthouse, where two Flame Dragons sleep in a block of ice below a great dragon's head carved in the north wall, with the corridor and the small room that lead to it.
mars_lighthouse_towers.cThe Mars Lighthouse's four towers, one scene each in this overlay.
mercury_lighthouse.cThe base of Mercury Lighthouse in Imil, near the end of the game: as the last beacon, Mars Lighthouse's, is lit, two of Imil's children hear the voices of the heroes far away, glints of light rising round them.
mikasalla.cMikasalla, the village in the far south of Osenia, and the tunnels under it, in two scenes that share this overlay (SceneIdMikasalla, the village, and SceneIdMikasallaNorth, the tunnels).
mikasalla_rooms.cMikasalla's houses and, as a second scene, the sanctums of Mikasalla, the Apojii Islands and Yallam.
mt_aleph_summit.cThe summit of Mt.
naribwe.cNaribwe, the desert village south of the Kibombo Mountains.
naribwe_rooms.cThe insides of Naribwe's huts, behind the village's five doors.
northern_reaches.cThe Northern Reaches, the icy sea where a great wall of ice blocks the ship's way north to Prox.
osenia_cliffs.cThe Osenia Cliffs, across the Madra Drawbridge, where the wreck of a Champa ship lies on the shore and three people from Madra look it over until Piers has carried Gabomba's message.
prox.cProx, Felix's home in the frozen north, where Puelle's clan lives in poverty in the shadow of the Mars Lighthouse.
sea_of_time.cThe Sea of Time, the purple sea the Lemurian ship must cross to reach Lemuria, in two scenes: the great sea of swirls the ship sails into from the world map, and the last stretch before Lemuria, where Poseidon waits.
settlements.cFour small places the ship can put in at, sharing one overlay, each with its houses.
shaman_village.cShaman Village, in the middle of Hesperia, whose people will not talk to outsiders by Moapa's order; only the priest in the sanctum, in the cave on the east side, does.
shaman_village_cave.cThe Shaman Village Cave, on the way east from Hesperia to the Shaman Village.
shared/actor_aim_at_watched.c
shared/actor_animate.c
shared/actor_attach.c
shared/actor_blink.c
shared/actor_bob.c
shared/actor_create_silhouette.cCreating an actor as a black silhouette.
shared/actor_cycle_pictures.c
shared/actor_drop_and_wait.c
shared/actor_emit_mist.c
shared/actor_emit_ripples.c
shared/actor_emit_smoke.c
shared/actor_emit_smoke_unused.c
shared/actor_emit_sparkles.c
shared/actor_find_at_metatile.cFinding the actor that stands in a metatile.
shared/actor_flash_white.c
shared/actor_freeze.c
shared/actor_grow_down.c
shared/actor_grow_up.c
shared/actor_hide.c
shared/actor_hold_during_script.c
shared/actor_is_above.c
shared/actor_is_beside.c
shared/actor_is_facing_near.c
shared/actor_is_touching.c
shared/actor_launch_ahead.c
shared/actor_park.c
shared/actor_pop_question_marks.c
shared/actor_pop_up.c
shared/actor_pop_up_slow.c
shared/actor_raise_from_metatile.c
shared/actor_reset_scripted_for.c
shared/actor_roll_and_crumble.cA rolling fireball, which four Mars Lighthouse rooms keep a copy of.
shared/actor_scatter_crumbs.cThe crumbs a fireball throws off as it crumbles away (scActorRollAndCrumble), which three Mars Lighthouse rooms keep a copy of, over the flames' FLAME_HIT_STATE (scene/flame_throwers.h).
shared/actor_set_metatile_open.c
shared/actor_set_metatile_shape.c
shared/actor_set_sprite_priority.cSetting an actor's sprite priority by hand.
shared/actor_setup_scripted.c
shared/actor_setup_scripted_for.c
shared/actor_setup_scripted_part.c
shared/actor_spawn_wading_splash.c
shared/actor_start_scripted.c
shared/actor_steer_by_pad.c
shared/actor_step_to_watched.c
shared/actor_stop_at_push_target.c
shared/actor_stop_where_it_stands.cStopping an actor where it stands.
shared/actor_take_place_of.c
shared/actor_vent_bounce.cThe drift of a puff of mist a vent blows out, which Aqua Rock's inside and Taopo Swamp each include a copy of.
shared/actor_wait_to_land.c
shared/actor_wait_to_land_with_snd.c
shared/actor_wait_until_landed.cWaiting for an actor to stop rising or falling.
shared/actors_raise_metatiles.c
shared/actors_set_hidden.c
shared/actors_set_metatiles_open.c
shared/beam_start.c
shared/block_clear_metatiles.c
shared/block_push_onto.c
shared/blocks_mark_metatiles.c
shared/camera_jitter.c
shared/cracked_tile_crack.c
shared/cracked_tile_drop_in.c
shared/cracked_tile_fall.c
shared/cracked_tile_find.c
shared/cracked_tile_mask.cThe hole mask over the cracked tile the leader stands on, shared by the Jupiter and Mars Lighthouse rooms and the Anemos Inner Sanctum, each of which lists the metatiles its map watches in its own CrackedTiles.
shared/cracked_tile_place_landing.c
shared/cracked_tile_step.c
shared/crumbling_pillar.cThe crumbling and pounded pillars of the Izumo Ruins and Dehkan Plateau: lists of (actor, flag) or (actor, kind, flag) entries ended by ACTOR_LIST_END, placed from their flags and stepped on, struck or pounded until they fall.
shared/debris_script.cThe script of a thrown bit of rock, ice or earth, which the scenes that scatter debris keep a copy of: Gaia Rock's stone heads, Taopo Swamp's tremor, Mars Lighthouse's ice and rubble.
shared/dust.cThe dust a crumbling pillar throws up around the leader.
shared/dust_burst_script.cThe script of a cloud of dust that bursts from breaking stone (scDustBurst) and of a vent's puff, which the scenes with rubble and Taopo Swamp and Aqua Rock keep a copy of.
shared/dust_scatter.c
shared/dust_scatter_script.cThe script of a piece of rubble or a cloud of dust thrown out as stone breaks or a pillar crumbles, which Dehkan Plateau, the Izumo ruins, Magma Rock, the Trial Road and Tundaria Tower keep a copy of (scDustScatter).
shared/emote_pop_tilted.c
shared/field_effect_advance_motion_priority.cA field effect's motion each tick, drawn at the leader's priority.
shared/field_effect_advance_spin.cA field effect's motion and spin each tick.
shared/field_effect_duration_scripts.cThe three lifetimes scFieldEffectSpawn (field_effect_spawn.c) gives its effects through each scene's FieldEffectDurationScripts, which most scenes keep a copy of, as The Broken Seal's do (its shared/field_effect_duration_scripts.c).
shared/field_effect_set_sprite_priority.cSetting an effect's sprite priority by hand: the copy of actor_set_sprite_priority.c that comes with a late field-effect spawner.
shared/field_effect_spawn.cThe effect spawner each field overlay keeps its own copy of, the twin of The Broken Seal's EFFECT_SPAWN (scene/shared/field_effect_spawn.c).
shared/field_effect_wave_scroll.cA great whirlwind's sway (Air's Rock, Shaman Village): each screen line of BG0 is pushed side to side by a jittered sine wave, set line by line by HBlank DMA 0.
shared/field_rope_place.c
shared/fireball_carry_leader_if_hit.c
shared/flame_thrower_get_flags.c
shared/flame_thrower_is_active.c
shared/flame_thrower_send_backward.c
shared/flame_thrower_send_east.c
shared/flame_thrower_send_forward.c
shared/flame_thrower_send_spark.c
shared/flame_thrower_send_west.c
shared/flame_thrower_set.c
shared/flame_thrower_set_active.c
shared/flame_thrower_set_puffs_off_screen.c
shared/flame_thrower_update_spark.c
shared/flame_throwers_advance_counter.c
shared/flame_throwers_create.c
shared/flame_throwers_puff.cThe Mars Lighthouse flame throwers' puffs, which four of its rooms keep a copy of.
shared/flame_throwers_release_flame.c
shared/flame_throwers_set_stop.c
shared/flame_update_forward.c
shared/flame_update_sideways.c
shared/gaia_rock_cue_wall_metatile.cGaia Rock's climbing walls, which its outside and inside overlays keep a copy of.
shared/geyser_draw.c
shared/geyser_start.c
shared/geyser_update.c
shared/ground_particle_frames.cThe frames of the drops of rain fdGroundParticlesDraw moves about a doused stone, which the Apojii Islands and Aqua Rock keep a copy of.
shared/ground_particles_draw.c
shared/ground_particles_set_anchor.c
shared/ground_particles_start.c
shared/held_actor_raise_metatile.c
shared/ice_chips_spawn.c
shared/jupiter_lighthouse_finish_moving_block.c
shared/jupiter_lighthouse_load_palettes.cThe Jupiter Lighthouse rooms' palettes, which most of them keep a copy of.
shared/jupiter_lighthouse_place_raised_actors.c
shared/leader_center_in_metatile.c
shared/leader_check_crumbling_step.c
shared/leader_flow_with_stream.c
shared/leader_is_facing_north.c
shared/leader_knock_back.cThe leader is thrown back by the flames that struck them: they take the fall damage, blink, and are pushed metatile by metatile in the flames' direction, sliding over ice, until a wall, another actor or a ledge stops them.
shared/leader_lift.c
shared/leader_open_door_and_enter.c
shared/leader_rise_from_water.c
shared/leader_set_metatile_shape.c
shared/leader_sink_away.c
shared/leader_slide_on_ice.c
shared/leader_slide_on_ice_ahead.c
shared/leader_spin_away.c
shared/leader_stop_if_pending.c
shared/leader_walk_through_door_script.c
shared/lesson_scripts.cThe lesson at the heart of each Rock, which Air's Rock, Aqua Rock, Gaia Rock and Magma Rock keep a copy of: as the Adept reads the tablet, the tablet lifts off its stand and the Adept rises as the sparks circle in, and both settle back as the lesson ends.
shared/lesson_seeking_spark_script.c
shared/light_ring_tiles.cHalf a ring of light, which Contigo's sparkle and the Psynergy test room's rings draw twice, the second flipped, for a whole ring.
shared/light_sprites_add.c
shared/light_sprites_add_counted.c
shared/light_sprites_draw.c
shared/light_sprites_init_channel_pieces.c
shared/light_sprites_init_energy_block_glow.c
shared/light_sprites_init_path_glows.c
shared/list_count_entries.c
shared/magma_rock_ember_scripts.cThe scripts of the embers that fly up in Magma Rock, which its outside and its inside keep a copy of.
shared/map_metatile_fill.cFilling a rectangle of a map layer's metatiles with one collision code, as a pushed actor marks the metatiles it covers (push_target_push.c).
shared/map_metatile_fill_byte.cFilling a rectangle of a map layer's metatiles with one collision code.
shared/map_metatile_get.cA map metatile's collision code and attributes, read on a layer or from the metatile buffer.
shared/map_metatile_set.cscMapMetatileSetAttributes, the field engine's function that replaces a map metatile's collision code and attributes, as the scenes that change their metatiles keep a copy of it (Treasure Isle's unused): included at its place in each scene's overlay, after the field engine's map_metatile_get.c or before it as the ROM has it.
shared/map_metatile_set_shape.c
shared/mars_lighthouse_part_scripts.cThree actor scripts that four Mars Lighthouse rooms keep a copy of, in this order: a scripted part's, and the crumbs' and embers', which are the same.
shared/moai_add_water.c
shared/orb_rising_script.c
shared/orbit_spark_spawn.c
shared/orbit_update.c
shared/orbiter_spiral.c
shared/palette_cycle_fade.c
shared/palette_cycle_set_pauses_in_scripts.c
shared/palette_cycle_step.c
shared/particle_update_falling.c
shared/party_take_fall_damage.c
shared/pillar_lower_held_metatiles.c
shared/pillar_place.c
shared/pillar_raise.c
shared/pillar_restore.c
shared/pillar_restore_raised.c
shared/pillar_take_out_of_play.c
shared/position_distance.c
shared/position_distance_above.c
shared/position_flat_distance.c
shared/pound_sink_target.c
shared/prong_sparkle.c
shared/psynergy_test_exits.c
shared/push_kinds.cThe things the leader can push and the metatiles each covers, which the scenes with pushed things keep a copy of (PUSH_KINDS, scene/pushed_actor.h).
shared/push_leader_steps.cThe leader's step against a pushed thing for each of the sixteen facings, one metatile (16 pixels) along the nearest of the four directions, which the scenes with pushed things keep a copy of, as The Broken Seal's do (its shared/pushed_actor_direction_steps.c).
shared/push_target_fill_rectangle.c
shared/push_target_find_ahead.c
shared/push_target_find_stop.c
shared/push_target_push.c
shared/question_mark_pop.c
shared/ripple_script.cThe script of a ripple widening on the water over an actor (scActorEmitRipples), which the Apojii Islands' and Aqua Rock's overlays keep a copy of.
shared/rock_end_falling.c
shared/rock_spawn.c
shared/scene_create_actor.c
shared/scene_create_imported_actor.c
shared/scene_entrances_default.cThe entrance table of most overlays, which holds only the default entrance: at 172, 149, facing south, with no room bounds.
shared/scene_entrances_mapless.c
shared/scene_fade_in_and_clear_flag.c
shared/scene_freeze_puddle_into_pillar.c
shared/scene_set_arrival_flags.cscSetArrivalFlags, compiled inside each Jupiter Lighthouse scene that calls it and inside Mars Lighthouse towers, at its place in each overlay.
shared/scene_show_entrance_locked.c
shared/scroll_start_hblank.cThe start of a split screen, shared by the two scenes that draw one: SW Atteka Islet's falls and the Apojii Islands' water.
shared/ship_drop_shadow.c
shared/ship_take_flight.c
shared/slide_on_ice_angles.cThe headings the direction pad gives on ice, which the scenes with ice to slide on keep a copy of, both tables indexed by the pad's four bits ((PerWork.data >> 4) & 15: right, left, up, down); -1 where the keys held give no heading.
shared/slide_on_ice_from_edge.c
shared/smoke_drift.c
shared/smoke_spawn.c
shared/statue_find_under_burst.c
shared/statue_flash_under_burst.c
shared/stone_head_burst_out.c
shared/stone_head_place.c
shared/stone_head_rise_script.cThe script of a stone head bursting out of Gaia Rock's walls (scStoneHeadBurstOut), which its outside and inside keep a copy of.
shared/teleport_circle_colors.cThe colours of a Teleport circle and of its shimmer (shared/teleport_shimmer.c), which every scene with a circle keeps a copy of: seven palette entries, each a red, green and blue, ended by PALETTE_LIST_END.
shared/teleport_circle_palette.cThe palette of a Teleport circle, which every scene with a circle keeps a copy of: the seven background palette entries the circle is drawn in, its colours and its shimmer's (teleport_circle_colors.c), and the entries each step of the shimmer paints those colours into, so that they run round the circle (scPaletteSetColorsFade).
shared/teleport_shimmer.cThe Teleport circles' shimmer, which every scene with a circle keeps a copy of (Contigo, the Anemos Inner Sanctum, the Islet Cave, the Yampi Desert's cave and three of Mars Lighthouse's rooms): the circle's colours run round it, a palette cycle, as Teleport is cast and as the party arrives on a circle.
shared/tile_sprite_reset.c
shared/vent_advance_counter.c
shared/vent_is_blowing.c
shared/vent_set_gust.c
shared/vent_set_id.c
shared/vent_update.c
shared/vents_start.c
shared/whirlwind_carry_leader.c
shared/whirlwind_carry_leader_lower.c
shared/whirlwind_spawn.c
shared/whirlwind_update.c
shared/whirlwind_update_lower.c
shared/world_map_gauge.cThe Psynergy gauge over the leader as the ship flies, which the world map and the staff credits' overlays keep a copy of: its tiles redrawn for the party's PP, the event that drains it while A or B is held aloft, and its set-up and end.
shared/world_map_objects.cThe World Map's placed actors, which both the World Map's and the staff credits' overlays keep a copy of, included as text: the exit chosen by the side the leader approaches a place from, the event that shows the places' actors coming into view and releases those leaving it, and the sparks and particles about the ship.
shared/world_map_particle_script.c
shrine_of_the_sea_god.cThe Shrine of the Sea God east of Daila, in eleven rooms that share this overlay (SceneIdShrineOfTheSeaGodEntrance to SceneIdShrineOfTheSeaGodRightProng).
staff_credit.cThe staff credits, played over the world map after the farewell at Prox: each entrance is one stretch of the credits.
suhalla_gate.cThe Suhalla Gate, in the prologue: Jenna and Kraden cross it on their way to Idejima, while Alex holds back the soldiers behind them.
taopo_swamp.cTaopo Swamp, over the bridge west of Yallam: an optional dungeon of eleven rooms that share this overlay.
title.cThe title: the publisher's and Camelot's logos, the intro, and the starts it leads to, the prologue with Jenna or the game with Felix.
treasure_isle.cTreasure Isle, the island cave in the north-east corner of the world, its five rooms one overlay.
trial_road.cTrial Road, the mountain path above the Shaman Village where Moapa tests the party before he will hand over the Hover Jade.
tundaria_tower.cTundaria Tower, the frozen tower that holds the Center Prong, in seven maps that share this overlay (SceneIdTundariaTowerEntrance to SceneIdTundariaTowerBurstBrooch).
venus_lighthouse.cThe Venus Lighthouse, as the prologue opens on it: Felix moves a statue onto the floor switch with Psynergy and goes on alone, and Jenna and Kraden, doubting they should leave, meet Alex and set off for Idejima (SceneIdVenusLighthouse).
venus_lighthouse_entrance.cOutside the Venus Lighthouse, where the prologue hands the story to Jenna.
world_map.cThe World Map (SceneIdWorldMap), the perspective map that joins the areas, and the only scene of this overlay.
yallam.cYallam, the village near Taopo Swamp where Sunshine the blacksmith lives (its houses, inn and shops are in yallam_rooms.c).
yallam_rooms.cThe insides of Yallam's huts and shops.
yampi_desert.cThe Yampi Desert, between southern Osenia and Alhafra: twelve rooms on one overlay (SceneIdYampiDesertEntrance to SceneIdYampiDesertCavern).
yampi_desert_cave.cThe Yampi Desert Cave, the hidden dungeon behind the desert's sand slide: a Teleport circle leads on from the room the party comes in by, and in the rooms beyond the party pushes logs, sinks a stake with Pound, bursts pillars, slips under walls with Sand, Scoops up the Venus Djinni Crystal racing through the sand, and meets Valukar, the guardian of fire.

include/scene/

FileDescription
airs_rock.hWhat Air's Rock's outside (airs_rock.c) and inside (airs_rock_inside.c) share: the whirlwinds the statues breathe and the leader rides, and the outside's tables, scripts and scripts.
cycle_pictures.hThe field sprite scActorCyclePictures (scene/shared/actor_cycle_pictures.c) flashes white as an actor gathers power: Lunpa before he charges the door in Lemuria, and the leader as Hover wakes Jupiter Lighthouse.
dehkan_plateau.hDehkan Plateau's tables and scripts, and functions several scenes keep a copy of and declare from here (fdPoundSinkTarget, fdActorSetMetatileOpen, scFieldEffectSpawn).
dust.hDust and ground particles the scenes draw by hand.
falling_rocks.hFalling rocks and particles: the effects Prox, Magma Rock, Eastern Alhafra and Tundaria Tower each keep a copy of the code for.
flame_throwers.hThe state of the Mars Lighthouse rooms' flame throwers and of the fireballs that knock the leader back, or carry him along on a ride, when they hit him; it is kept in the inventory snapshot's spare space.
gabomba_statue.hThe rooms inside the Gabomba Statue (gabomba_statue.c): their scripts, and the functions of the cogs, the ladders, the offering's clock and the channel puzzle; with fdActorSetMetatileOpen and scActorsSetDrawn, which other scenes keep copies of.
gaia_rock.hWhat Gaia Rock's outside (gaia_rock.c) and inside (gaia_rock_inside.c) share.
ground_effects.hThe map state's ground effects byte as the scenes write it: its footprints and the kind of wading.
jupiter_lighthouse_aerie.hWhat Jupiter Lighthouse's rooms share (and Mars Lighthouse's towers, which copy some of their code): the aerie's angels, archers and well lid, the time the angels take to rise, and the calls the overlays make.
kibombo.hTwo of Kibombo's scripts: the vent by the statue shown uncovered, and Akafubu's Psynergy on the Black Crystal.
lemurian_ship.hThe Lemurian Ship's rooms: their tables, doors and set-ups, and the pillar Lift raises.
lighthouse_palettes.hHow the Jupiter Lighthouse rooms, and one Mars Lighthouse room that keeps a copy, load their cycling palette (shared/jupiter_lighthouse_load_palettes.c).
magma_rock.hWhat Magma Rock's outside (magma_rock.c) and inside (magma_rock_inside.c) share: where a statue's fire stops, the flag set while its Burst plays, and the outside's tables and scripts.
mars_lighthouse_aerie.hMars Lighthouse's aerie, where the Doom Dragon is fought and the beacon lit: its event functions, its actor scripts, and a byte view of a field sprite that the beacon's lighting reads.
mars_lighthouse_entrance.hMars Lighthouse's entrance: its scripts of fireballs, ice and teleport circles, and the teleport and cracked-tile functions other scenes keep a copy of and declare from here.
mars_lighthouse_shared.hWhat the Mars Lighthouse rooms with flame throwers share: the flag bytes of the crack the leader falls through, and the functions they call.
mars_lighthouse_star_room.hMars Lighthouse's star room: its torches, fireballs and the Mars Star, and the knock-back, flame and crack functions it shares with the rooms that keep copies of them.
orbit.hOrbiting actors and the sparks that circle and rise when learning a Psynergy (shared/orbiter_spiral.c, shared/orbit_spark_spawn.c, shared/orbit_update.c).
palette_cycle_places.hThe palette cycle fdPaletteCycleStep runs: BG palette CYCLE_PALETTE's colours from CYCLE_FIRST_COLOR take their places among CYCLE_PLACES one further every CYCLE_STEP_TICKS ticks.
pillar_stand_in.hThe stand-in actors of a room whose crumbling pillars all share one sprite's picture.
pushed_actor.hThe packed push step the scenes' push tables are written in, how many kinds of thing they push, and the target a push works out before rolling.
scene.hWhat every scene includes: the headers of the field's coordinates, sprites and map grid, the scenes' shared actors, effects and puzzles, and a few calls the overlays make through their import rows.
scene_actors.hThe views of actors, sprites, maps and script state that scenes read in their own way, and actor script helpers shared across towns.
scene_effects.hShared scene visual effects, particles, geysers, vents, smoke, lightning, whirlwinds, sparks and cached tile tables.
scene_puzzles.hDungeon and room puzzle structs, metatile keys, cracked-tile constants, traps, springs, doors and thawed map offsets shared by scenes.
script_check_spheres_overlap.hWhether two spheres overlap (fdCheckSpheresOverlap), from a script.
ship_flight.hThe ship's looks in flight, which the World Map and the staff credits each set through their own scActorSetFlightMode.
shrine_of_the_sea_god.hThe Shrine of the Sea God: its footprints and its scripts.
sparkle.hThe sparkle that rises round an object while it uses Psynergy in a script (Contigo, Mars Lighthouse's aerie, the Psynergy test): each scene keeps its own copy of the functions.
staff_credit.hWhat the world map and the staff credits share: the picture layer they draw over the map, and the placed actors' functions both overlays link.
title.hThe Golden Sun logo the title and the Clear scene show.
trial_road.hThe Trial Road's race progress, kept in the inventory snapshot, and the declarations the Trial Road shares with the Izumo Ruins and Magma Rock's inside: the calls their overlays make, some through their own import rows.
tundaria_tower.hDeclarations Tundaria Tower shares with Dehkan Plateau and Magma Rock's inside, whose pillars and rubble it copies: the field engine calls their overlays make, some through their own import rows.
whirlwind_catch.h