The Suhalla Desert in three scenes. More...
Go to the source code of this file.
Macros | |
| #define | SUHALLA_REVEAL_PALETTE_COLOR (*(volatile u16 *)0x0500019e) |
Enumerations | |
| enum | { FLAG_FIRST_SCENE_STORM_DOUSED = 0x301 , FLAG_SECOND_SCENE_STORM_DOUSED = 0x311 , FLAG_STORMS_RISEN = 0x340 } |
| Storms doused in the first and second scenes, one flag per storm from the first; each storm stays away once doused. More... | |
| enum | { STORM_FIRST = 8 , STORM_FOURTH = 11 , STORM_LAST = 12 , STORM_CHASING = 12 , IODEM = 13 , REVEALED_OBJECT = 14 , DJINNI = 15 } |
| The actors this scene's code names, by their place in the placement tables. More... | |
| enum | { STORM_CAPTURE_FRAMES = 180 } |
| Frames a caught party spins before the storm carries it away. More... | |
| enum | { WORLD_MAP_STORM_DROP = 27 , WORLD_MAP_STORM_DROP_FOURTH = 77 } |
| Where a storm drops the party on the world map: the second scene's fourth storm drops it elsewhere. More... | |
Functions | |
| static void | SuhallaDesert_SetUpFirstSceneStorms (void) |
| The first scene's storms on entry: a doused storm counts as risen, the others start small (unless the party is coming back to where it stood), and the sand haze is faded in if a storm has risen before. | |
| static void | SuhallaDesert_SetUpSecondSceneStorms (void) |
| The second scene's storms on entry, as the first scene's; the fourth storm's first sprite part takes parameter 10, and once the chasing storm has been doused it is gone for good. | |
| void | QueueSceneSound (s32 cue) |
| static void | Event_FightDjinni (void) |
| Talking to the Djinni starts its battle. | |
| static s32 | SuhallaDesert_ClearActorSpriteAndCollisionFlags (struct ScriptInterpreter *interpreter) |
| A storm's placement script: clears its sprite and collision flags. | |
| static s32 | SuhallaDesert_ToggleActorActive (struct ScriptInterpreter *interpreter) |
| A storm's placement script: toggles its single-sprite storage. | |
| const struct SceneEntrance * | Scene_GetEntrances (void) |
| const struct SceneRegion * | Scene_GetRegions (void) |
| const u32 * | Scene_GetExits (void) |
| Where each exit of the three scenes leads. | |
| const struct ScenePlacement * | Scene_GetPlacements (void) |
| The storms, Iodem, and in the second scene the Djinni and what Reveal shows. | |
| static void | SuhallaDesert_UpdateCaptureTimer (void) |
| Each frame while caught: spins the leader, and counts down to raising event 99, the storm carrying the party away. | |
| static void | SuhallaDesert_CatchInStorm (s32 stormId) |
| The leader walks into a storm: drawn to its centre and lifted, the party spins until Douse stops the storm or it carries them away. | |
| static void | Event_CaughtByFirstStorm (void) |
| The leader walks into the first storm of the scene. | |
| static void | Event_CaughtBySecondStorm (void) |
| The leader walks into the second storm. | |
| static void | Event_CaughtByThirdStorm (void) |
| The leader walks into the third storm. | |
| static void | Event_CaughtByFourthStorm (void) |
| The leader walks into the fourth storm. | |
| static void | Event_CaughtByFifthStorm (void) |
| The leader walks into the first scene's fifth storm, or the chasing storm reaches the moving leader. | |
| static void | SuhallaDesert_RaiseStorm (s32 stormId) |
| As the party nears a storm it rises, growing to full size with the sand haze fading in the first time. | |
| static void | Event_FirstStormRises (void) |
| The party nears the first storm. | |
| static void | Event_SecondStormRises (void) |
| The party nears the second storm. | |
| static void | Event_ThirdStormRises (void) |
| The party nears the third storm. | |
| static void | Event_FourthStormRises (void) |
| The party nears the fourth storm. | |
| static void | Event_FifthStormRises (void) |
| The party nears the fifth storm. | |
| static void | Event_IodemAsksWhetherToPressOn (void) |
| Near the second scene's way out to the world map, once Iodem has heard the wounded soldiers: he steps out of the party. | |
| static s32 | SuhallaDesert_ChaseLeader (struct ScriptInterpreter *interpreter) |
| The chasing storm's script: it follows the leader, throwing up sand every eight frames, and catches a moving leader it comes within 8 pixels of (event 55). | |
| static void | Event_StormGivesChase (void) |
| In the second scene, until the chasing storm has been doused: it appears behind the party and gives chase. | |
| static void | Event_DouseCastAtStorm (void) |
| Douse cast at the storm that caught the leader: sets the Psynergy effect's child option (its meaning unknown). | |
| static void | Event_DouseStorm (s32 unused, s32 stormId) |
| Douse stops the storm that caught the leader: it is doused for good, and the monster in it attacks. | |
| static void | Event_StormCarriesPartyAway (void) |
| The spinning runs out: the storm rises into the sky with the party, the screen closes, and the party lands on the world map. | |
| static void | SuhallaDesert_PulseRevealPalette (void) |
| While Reveal lasts: one palette color pulses, brightening and dimming over 64 frames. | |
| static s32 | Event_RevealEnds (void) |
| Reveal ends, or a scene is entered: in the second scene, what Reveal showed is hidden again and the pulsing color is put back. | |
| static s32 | Event_RevealStarts (void) |
| Reveal in the second scene: the hidden object appears at 248, 712, map cells and the map object at 100 change, and a palette color pulses. | |
| const struct SceneEvent * | Scene_GetEvents (void) |
| The third scene's exits, or the storms, Iodem, treasure and Reveal of the first two. | |
| s32 | Scene_Initialize (void) |
| Sets a scene up as the party enters: a capture goes on spinning, Reveal's color is saved, and the first two scenes set up their storms. | |
Variables | |
| static u16 | sSuhallaDesertSavedColor |
| s32 | gEffectScript0 [] |
| s32 | gEffectScript1 [] |
| s32 | gEffectScript2 [] |
| const s32 * | gEffectScripts [] |
| s32 | gSuhallaDesertStormScript [] |
| s32 | gSuhallaDesertFourthStormScript [] |
| struct SceneEntrance | gSuhallaDesertEntrancesOther [] |
| struct SceneEntrance | gSuhallaDesertEntrances1 [] |
| struct SceneEntrance | gSuhallaDesertEntrances2 [] |
| struct SceneEntrance | gSuhallaDesertEntrances3 [] |
| u32 | gSuhallaDesertExits [] |
| struct ScenePlacement | gSuhallaDesertPlacementsOther [] |
| struct ScenePlacement | gSuhallaDesertPlacements1 [] |
| struct ScenePlacement | gSuhallaDesertPlacements2 [] |
| struct ScenePlacement | gSuhallaDesertPlacements3 [] |
| s32 | gSuhallaDesertChaseScript [] |
| struct SceneEvent | gSuhallaDesertEventsOther [] |
| struct SceneEvent | gSuhallaDesertEvents3 [] |
The Suhalla Desert in three scenes.
Sandstorms rise as the party nears them; one that catches the leader spins the party and, unless Douse stops it and its monster is fought, carries the party off to the world map. In the second scene one storm gives chase, and Reveal shows what the sand hides. Travelling with the party, Iodem warns of the storms, and, once he has heard the wounded soldiers in Suhalla, asks whether to search on for Sheba or press on to Lalivero.
Definition in file suhalla_desert.c.
| #define SUHALLA_REVEAL_PALETTE_COLOR (*(volatile u16 *)0x0500019e) |
Definition at line 90 of file suhalla_desert.c.
Referenced by Event_RevealEnds(), Scene_Initialize(), and SuhallaDesert_PulseRevealPalette().
| anonymous enum |
Storms doused in the first and second scenes, one flag per storm from the first; each storm stays away once doused.
| Enumerator | |
|---|---|
| FLAG_FIRST_SCENE_STORM_DOUSED | |
| FLAG_SECOND_SCENE_STORM_DOUSED | |
| FLAG_STORMS_RISEN | A storm has risen: the sand haze stays faded in. |
Definition at line 60 of file suhalla_desert.c.
| anonymous enum |
The actors this scene's code names, by their place in the placement tables.
Definition at line 68 of file suhalla_desert.c.
| anonymous enum |
Frames a caught party spins before the storm carries it away.
| Enumerator | |
|---|---|
| STORM_CAPTURE_FRAMES | |
Definition at line 79 of file suhalla_desert.c.
| anonymous enum |
Where a storm drops the party on the world map: the second scene's fourth storm drops it elsewhere.
| Enumerator | |
|---|---|
| WORLD_MAP_STORM_DROP | |
| WORLD_MAP_STORM_DROP_FOURTH | |
Definition at line 83 of file suhalla_desert.c.
|
static |
The first scene's storms on entry: a doused storm counts as risen, the others start small (unless the party is coming back to where it stood), and the sand haze is faded in if a storm has risen before.
Definition at line 677 of file suhalla_desert.c.
Referenced by Scene_Initialize(), and SuhallaDesert_SetUpFirstSceneStorms().
|
static |
The second scene's storms on entry, as the first scene's; the fourth storm's first sprite part takes parameter 10, and once the chasing storm has been doused it is gone for good.
Definition at line 721 of file suhalla_desert.c.
Referenced by Scene_Initialize(), and SuhallaDesert_SetUpSecondSceneStorms().
| void QueueSceneSound | ( | s32 | cue | ) |
|
static |
Talking to the Djinni starts its battle.
Definition at line 98 of file suhalla_desert.c.
Referenced by Event_FightDjinni(), and Event_FightDjinni().
|
static |
A storm's placement script: clears its sprite and collision flags.
Definition at line 103 of file suhalla_desert.c.
Referenced by SuhallaDesert_ClearActorSpriteAndCollisionFlags().
|
static |
A storm's placement script: toggles its single-sprite storage.
Definition at line 113 of file suhalla_desert.c.
Referenced by SuhallaDesert_ToggleActorActive().
| const struct SceneEntrance * Scene_GetEntrances | ( | void | ) |
Definition at line 119 of file suhalla_desert.c.
| const struct SceneRegion * Scene_GetRegions | ( | void | ) |
Definition at line 134 of file suhalla_desert.c.
| const u32 * Scene_GetExits | ( | void | ) |
Where each exit of the three scenes leads.
Both scenes share one exit table.
Definition at line 137 of file suhalla_desert.c.
| const struct ScenePlacement * Scene_GetPlacements | ( | void | ) |
The storms, Iodem, and in the second scene the Djinni and what Reveal shows.
Definition at line 140 of file suhalla_desert.c.
|
static |
Each frame while caught: spins the leader, and counts down to raising event 99, the storm carrying the party away.
Definition at line 157 of file suhalla_desert.c.
Referenced by Scene_Initialize(), SuhallaDesert_CatchInStorm(), and SuhallaDesert_UpdateCaptureTimer().
|
static |
The leader walks into a storm: drawn to its centre and lifted, the party spins until Douse stops the storm or it carries them away.
Definition at line 179 of file suhalla_desert.c.
Referenced by Event_CaughtByFifthStorm(), Event_CaughtByFirstStorm(), Event_CaughtByFourthStorm(), Event_CaughtBySecondStorm(), Event_CaughtByThirdStorm(), and SuhallaDesert_CatchInStorm().
|
static |
The leader walks into the first storm of the scene.
Definition at line 223 of file suhalla_desert.c.
Referenced by Event_CaughtByFirstStorm().
|
static |
The leader walks into the second storm.
Definition at line 228 of file suhalla_desert.c.
Referenced by Event_CaughtBySecondStorm().
|
static |
The leader walks into the third storm.
Definition at line 233 of file suhalla_desert.c.
Referenced by Event_CaughtByThirdStorm().
|
static |
The leader walks into the fourth storm.
Definition at line 238 of file suhalla_desert.c.
Referenced by Event_CaughtByFourthStorm().
|
static |
The leader walks into the first scene's fifth storm, or the chasing storm reaches the moving leader.
Definition at line 244 of file suhalla_desert.c.
Referenced by Event_CaughtByFifthStorm().
|
static |
As the party nears a storm it rises, growing to full size with the sand haze fading in the first time.
The first time a storm rises with Iodem in the party, he steps out and warns of the sandstorms: "If we don't get past here, we'll never make it to Babi Lighthouse."
Definition at line 252 of file suhalla_desert.c.
Referenced by Event_FifthStormRises(), Event_FirstStormRises(), Event_FourthStormRises(), Event_SecondStormRises(), Event_ThirdStormRises(), and SuhallaDesert_RaiseStorm().
|
static |
The party nears the first storm.
Definition at line 335 of file suhalla_desert.c.
Referenced by Event_FirstStormRises().
|
static |
The party nears the second storm.
Definition at line 340 of file suhalla_desert.c.
Referenced by Event_SecondStormRises().
|
static |
The party nears the third storm.
Definition at line 345 of file suhalla_desert.c.
Referenced by Event_ThirdStormRises().
|
static |
The party nears the fourth storm.
Definition at line 350 of file suhalla_desert.c.
Referenced by Event_FourthStormRises().
|
static |
The party nears the fifth storm.
Definition at line 355 of file suhalla_desert.c.
Referenced by Event_FifthStormRises().
|
static |
Near the second scene's way out to the world map, once Iodem has heard the wounded soldiers: he steps out of the party.
"Sheba is nowhere to be found. Should we search the desert once more or press on to Lalivero?" Whatever the answer, Iodem decides to go on to Tolbi's guard gate ahead and leave the search to its soldiers, and rejoins the party.
Definition at line 364 of file suhalla_desert.c.
Referenced by Event_IodemAsksWhetherToPressOn().
|
static |
The chasing storm's script: it follows the leader, throwing up sand every eight frames, and catches a moving leader it comes within 8 pixels of (event 55).
Definition at line 416 of file suhalla_desert.c.
Referenced by SuhallaDesert_ChaseLeader().
|
static |
In the second scene, until the chasing storm has been doused: it appears behind the party and gives chase.
Definition at line 472 of file suhalla_desert.c.
Referenced by Event_StormGivesChase().
|
static |
Douse cast at the storm that caught the leader: sets the Psynergy effect's child option (its meaning unknown).
Definition at line 482 of file suhalla_desert.c.
Referenced by Event_DouseCastAtStorm().
Douse stops the storm that caught the leader: it is doused for good, and the monster in it attacks.
The second scene's fourth and chasing storms hold other monsters.
Definition at line 490 of file suhalla_desert.c.
Referenced by Event_DouseStorm().
|
static |
The spinning runs out: the storm rises into the sky with the party, the screen closes, and the party lands on the world map.
Definition at line 526 of file suhalla_desert.c.
Referenced by Event_StormCarriesPartyAway().
|
static |
While Reveal lasts: one palette color pulses, brightening and dimming over 64 frames.
Definition at line 569 of file suhalla_desert.c.
Referenced by Event_RevealEnds(), Event_RevealStarts(), and SuhallaDesert_PulseRevealPalette().
|
static |
Reveal ends, or a scene is entered: in the second scene, what Reveal showed is hidden again and the pulsing color is put back.
Definition at line 586 of file suhalla_desert.c.
Referenced by Event_RevealEnds(), and Scene_Initialize().
|
static |
Reveal in the second scene: the hidden object appears at 248, 712, map cells and the map object at 100 change, and a palette color pulses.
Definition at line 614 of file suhalla_desert.c.
Referenced by Event_RevealStarts().
| const struct SceneEvent * Scene_GetEvents | ( | void | ) |
The third scene's exits, or the storms, Iodem, treasure and Reveal of the first two.
Definition at line 636 of file suhalla_desert.c.
| s32 Scene_Initialize | ( | void | ) |
Sets a scene up as the party enters: a capture goes on spinning, Reveal's color is saved, and the first two scenes set up their storms.
Sets up whichever scene is being entered and runs its arrival events.
Definition at line 645 of file suhalla_desert.c.
|
static |
Definition at line 88 of file suhalla_desert.c.
Referenced by Event_RevealEnds(), and Scene_Initialize().
| s32 gEffectScript0[] |
Definition at line 773 of file suhalla_desert.c.
| s32 gEffectScript1[] |
| s32 gEffectScript2[] |
| const s32* gEffectScripts[] |
Definition at line 788 of file suhalla_desert.c.
| s32 gSuhallaDesertStormScript[] |
Definition at line 794 of file suhalla_desert.c.
| s32 gSuhallaDesertFourthStormScript[] |
Definition at line 800 of file suhalla_desert.c.
| struct SceneEntrance gSuhallaDesertEntrancesOther[] |
Definition at line 806 of file suhalla_desert.c.
Referenced by Scene_GetEntrances().
| struct SceneEntrance gSuhallaDesertEntrances1[] |
Definition at line 811 of file suhalla_desert.c.
Referenced by Scene_GetEntrances().
| struct SceneEntrance gSuhallaDesertEntrances2[] |
Definition at line 817 of file suhalla_desert.c.
Referenced by Scene_GetEntrances().
| struct SceneEntrance gSuhallaDesertEntrances3[] |
Definition at line 825 of file suhalla_desert.c.
Referenced by Scene_GetEntrances().
| u32 gSuhallaDesertExits[] |
Definition at line 833 of file suhalla_desert.c.
Referenced by Scene_GetExits().
| struct ScenePlacement gSuhallaDesertPlacementsOther[] |
Definition at line 841 of file suhalla_desert.c.
Referenced by Scene_GetPlacements().
| struct ScenePlacement gSuhallaDesertPlacements1[] |
Definition at line 846 of file suhalla_desert.c.
Referenced by Scene_GetPlacements().
| struct ScenePlacement gSuhallaDesertPlacements2[] |
Definition at line 862 of file suhalla_desert.c.
Referenced by Scene_GetPlacements().
| struct ScenePlacement gSuhallaDesertPlacements3[] |
Definition at line 882 of file suhalla_desert.c.
Referenced by Scene_GetPlacements().
| s32 gSuhallaDesertChaseScript[] |
Definition at line 886 of file suhalla_desert.c.
Referenced by Event_StormGivesChase().
| struct SceneEvent gSuhallaDesertEventsOther[] |
Definition at line 891 of file suhalla_desert.c.
Referenced by Scene_GetEvents().
| struct SceneEvent gSuhallaDesertEvents3[] |
Definition at line 943 of file suhalla_desert.c.
Referenced by Scene_GetEvents().