src/scene/suhalla.c
Suhalla, the desert village of Gondowan at the edge of the Suhalla Desert. More…
#include "ability_ids.h"#include "flags.h"#include "item_ids.h"#include "battle/battle.h"#include "debug/debug.h"#include "field/script.h"#include "graphics/graphics.h"#include "text/msg_ids.h"
Macros
| Name | Description | |
|---|---|---|
#define | FLAG_SUHALLA_SPROUT_GROWN FLAG_SCENE_TEMP(0x01) | Growth has grown the sprout. |
Enumerations
| Name | Description | |
|---|---|---|
enum | SUHALLA_METATILE_BEHAVIOR { METATILE_BEHAVIOR_SUHALLA_WEST_EDGE, METATILE_BEHAVIOR_SUHAL … } | The metatile behaviors of the village's edges, each a way out onto the World Map. |
enum | SUHALLA_ACTOR_ID { ACTOR_MAN_THIS_IS_SUHALLA, ACTOR_WOMAN_ASKING_ABOUT_LALIVERO … } | Suhalla's people and its sprout, numbering the rows of both actor placement tables from ACTOR_FIRST_PLACED. |
Functions
| Name | Description | |
|---|---|---|
const SCENE_ENTRANCE * | scGetEntrances (void) | The six rooms share one entrance table. |
const SCENE_EXIT_REGION * | scGetExitRegions (void) | The scene has no exit regions: its regions entry returns none. |
const Uint32 * | scGetExits (void) | Both scenes share one exit table. |
const ACTOR_PLACE * | scGetActorPlacements (void) | Suhalla's people, who stand elsewhere after Babi's audience. |
static void | scSuhallaAskIfGoingToLalivero (Sint32 actorId) | The woman with fair hair, who wanders by the houses in the south, asks whether the party is trying to get to Lalivero, and answers yes or no. |
static void | scSuhallaAskIfBroughtBySandstorm (Sint32 actorId) | After Babi's audience, the old woman by the south-west house asks whether the sandstorm brought the party to Suhalla, and answers yes or no. |
static void | scSuhallaGrowSprout (void) | Growth on the sprout beside the inn's door, in the north-west of Suhalla, grows a green vine up the inn's wall (metatile (4, 9)). |
static void | scSuhallaEnterDoor (void) | Walking north into the door of the inn, or of the shop or one of the two houses along Suhalla's south side, opens it and takes the party inside. |
static void | scSuhallaEnterSanctumDoor (void) | Walking north into the Sanctum's arched double door, in the north of Suhalla inside the ring of water (metatile (15, 7)), opens it and takes the party into Suhalla's Sanctum. |
const CUE * | scGetCues (void) | Suhalla's doors, people, treasure and sprout, before or after Babi's audience. |
Sint32 | scInit (void) | Sets Suhalla up as the party enters: arriving from Babi's audience turns the village to its later people, and after a battle a vine Growth has grown stands again. |
Variables
| Name | Description | |
|---|---|---|
extern SCENE_ENTRANCE | SuhallaEntrances [] | |
extern Uint32 | SuhallaExits [] | |
extern ACTOR_PLACE | SuhallaActorPlacements [] | |
extern ACTOR_PLACE | SuhallaActorPlacementsLater [] | |
extern Sint16 | SuhallaDoorMetatiles [][2] | The top-left metatile each door's opening is drawn from, by its metatile behavior (the exit it leads to), two metatiles above where the leader walks into it. |
extern Uint16 | SuhallaDoorOpenSteps [] | |
extern Uint16 | SuhallaWideDoorOpenSteps [] | |
extern CUE | SuhallaCues [] | |
extern CUE | SuhallaCuesLater [] |
Description
Suhalla, the desert village of Gondowan at the edge of the Suhalla Desert. Isaac's party, with Iodem, reaches it from the west after the Gondowan Bridge, and leaves it eastward for the desert on the way to Lalivero.
Before Babi's audience after Colosso, the village talks of the sandstorms
that close the desert, of its distrust of Angara and of Sheba, the hostage.
After it, the village talks of the soldiers the storms caught on the way to
Babi Lighthouse, who lie in the house in the south-east corner
(timber_rooms_a.c), and a woman the sandstorms brought here stands by the
south-west house.
The people come in two sets, each an actor placement table and a cue table,
chosen by FLAG_BABI_SPOKE_AFTER_COLOSSO. The same people stand in the same
rows of both actor placement tables, so one enum names them; the woman the
sandstorms brought stands off the map until the audience.
Five doors lead indoors: the inn in the north-west (its door at metatile (8,
9)), the Sanctum's arched double door in the north, inside a ring of water
(metatile (15, 7)), and along the south the shop (metatile (5, 18)), the old
couple's house (metatile (13, 17)) and the house in the south-east corner
(metatile (18, 18)). Each opens as the leader walks north into it
(scSuhallaEnterDoor, scSuhallaEnterSanctumDoor). Their metatile behaviors are
their exits' numbers (SUHALLA_INN to SUHALLA_HOUSE_EAST).
The village's west, north and east edges lead out onto the World Map, and the
desert's sandstorms drop a caught party outside it (WORLD_MAP_SUHALLA).
A jar on the west edge just south of the way in holds 5 coins. The Lucky Medal is in a jar beside the Sanctum, reached by hopping over the water behind it, and the Hard Nut is in a chest farther on, in the north-west corner (metatile (1, 1)). Growth on the sprout beside the inn's door grows a vine up the inn's wall.
Its scene flag:
FLAG_SUHALLA_SPROUT_GROWN: Growth has grown the sprout. A return that keeps the party's position, as after a battle, draws it grown again.
Macros in detail
FLAG_SUHALLA_SPROUT_GROWN
#define FLAG_SUHALLA_SPROUT_GROWN FLAG_SCENE_TEMP(0x01)
Growth has grown the sprout.
A return that keeps the party's position draws it grown again.
Referenced by scInit(), scSuhallaGrowSprout(), SuhallaCues and SuhallaCuesLater.
Definition at line 61 of file suhalla.c.
Enumerations in detail
SUHALLA_METATILE_BEHAVIOR
enum SUHALLA_METATILE_BEHAVIOR
The metatile behaviors of the village's edges, each a way out onto the World Map.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_SUHALLA_WEST_EDGE | 10 | The west edge, where the party |
METATILE_BEHAVIOR_SUHALLA_NORTH_EDGE | comes in from the Gondowan Bridge. | |
METATILE_BEHAVIOR_SUHALLA_EAST_EDGE | The east edge, toward the Suhalla Desert. |
Definition at line 65 of file suhalla.c.
SUHALLA_ACTOR_ID
enum SUHALLA_ACTOR_ID
Suhalla's people and its sprout, numbering the rows of both actor placement
tables from ACTOR_FIRST_PLACED.
SuhallaActorPlacementsLater places the same people, by sprite, in the same
rows. Each note gives what they say before Babi's audience, then after it.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_MAN_THIS_IS_SUHALLA | ACTOR_FIRST_PLACED | A man with brown hair (SPRITE_YOUNG_MAN_WITH_BROWN_HAIR), who warns the party off the desert. Later he says "Welcome to Suhalla. I bet the sandstorms were terrible..." A woman with fair hair (SPRITE_WOMAN_WITH_FAIR_HAIR), who asks whether the party is trying to get to Lalivero (scSuhallaAskIfGoingToLalivero). |
ACTOR_WOMAN_ASKING_ABOUT_LALIVERO | Later she says "The desert is enveloped in sandstorms! It's frightening!" A bearded man in a white turban (SPRITE_MAN_IN_WHITE_TURBAN), who distrusts Angara for taking Sheba as a hostage. | |
ACTOR_MAN_NEVER_TRUSTING_ANGARA | Later he says "Soldiers from Tolbi were caught in the sandstorms, and nearly all perished!" A woman in a green dress (SPRITE_WOMAN_IN_GREEN_DRESS), placed off the map until Babi's audience. | |
ACTOR_WOMAN_BROUGHT_BY_SANDSTORMS | After it she is one of those the sandstorms have brought here. A bent old man with a cane (SPRITE_OLD_MAN_WITH_CANE), who speaks of the desert spirits. | |
ACTOR_OLD_MAN_ON_DESERT_SPIRITS | Later he says "This sandstorm is the fault of the Angarans!" An old woman with white hair | |
ACTOR_OLD_WOMAN_ON_SOUTHERN_GONDOWAN | (SPRITE_OLD_WOMAN), who doubts there is a way to southern Gondowan. Later she asks whether a sandstorm brought the party (scSuhallaAskIfBroughtBySandstorm). A small boy with fair hair (SPRITE_BOY_WITH_FAIR_HAIR), who would like to see Tolbi's festivals. | |
ACTOR_BOY_ON_TOLBI_FESTIVALS | Later he says "Why are the sandstorms attacking humans?" A little girl with orange pigtails (SPRITE_GIRL_WITH_PIGTAILS), who worries about the storms. | |
ACTOR_GIRL_SANDSTORMS_INCREASED | Later she says "Those soldiers kept mumbling about monsters..." | |
ACTOR_SPROUT | The sprout beside the inn's door, which Growth grows into a vine (scSuhallaGrowSprout). |
Definition at line 80 of file suhalla.c.
Functions in detail
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References SuhallaEntrances.
Definition at line 138 of file suhalla.c.
scGetExitRegions
const SCENE_EXIT_REGION *scGetExitRegions(void)
Definition at line 143 of file suhalla.c.
scGetExits
const Uint32 *scGetExits(void)
References SuhallaExits.
Definition at line 148 of file suhalla.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
Suhalla's people, who stand elsewhere after Babi's audience.
References gmFlagGet(), SuhallaActorPlacements and SuhallaActorPlacementsLater.
Definition at line 154 of file suhalla.c.
scSuhallaAskIfGoingToLalivero
static void scSuhallaAskIfGoingToLalivero(Sint32 actorId)
The woman with fair hair, who wanders by the houses in the south, asks whether the party is trying to get to Lalivero, and answers yes or no.
References fdScriptAskYesNoWithActorAnimation(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptWait() and Sint32.
Referenced by SuhallaCues.
Definition at line 165 of file suhalla.c.
scSuhallaAskIfBroughtBySandstorm
static void scSuhallaAskIfBroughtBySandstorm(Sint32 actorId)
After Babi's audience, the old woman by the south-west house asks whether the sandstorm brought the party to Suhalla, and answers yes or no.
References fdScriptAskYesNoWithActorAnimation(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptWait() and Sint32.
Referenced by SuhallaCuesLater.
Definition at line 188 of file suhalla.c.
scSuhallaGrowSprout
static void scSuhallaGrowSprout(void)
Growth on the sprout beside the inn's door, in the north-west of Suhalla, grows a green vine up the inn's wall (metatile (4, 9)).
The vine's metatile takes its attributes from a spare metatile off the drawn map, so it can be climbed.
References fdMapGridCopyMetatileAttributes() and gmFlagSet().
Referenced by scInit(), SuhallaCues and SuhallaCuesLater.
Definition at line 215 of file suhalla.c.
scSuhallaEnterDoor
static void scSuhallaEnterDoor(void)
Walking north into the door of the inn, or of the shop or one of the two houses along Suhalla's south side, opens it and takes the party inside.
The door is drawn open, the leader walks a step in, and the scene leaves by the exit numbered as the door's metatile behavior.
References fdActorWalkBy(), fdMapGridAnimateMetatiles(), Sint32, state, SuhallaDoorMetatiles, SuhallaDoorOpenSteps, syImportScriptSetExitRequest() and sySoundPlay().
Referenced by SuhallaCues and SuhallaCuesLater.
Definition at line 226 of file suhalla.c.
scSuhallaEnterSanctumDoor
static void scSuhallaEnterSanctumDoor(void)
Walking north into the Sanctum's arched double door, in the north of Suhalla inside the ring of water (metatile (15, 7)), opens it and takes the party into Suhalla's Sanctum.
It works as scSuhallaEnterDoor does, with a door two metatiles wide.
References fdActorWalkBy(), fdMapGridAnimateMetatiles(), Sint32, state, SuhallaDoorMetatiles, SuhallaWideDoorOpenSteps, syImportScriptSetExitRequest() and sySoundPlay().
Referenced by SuhallaCues and SuhallaCuesLater.
Definition at line 245 of file suhalla.c.
scGetCues
const CUE *scGetCues(void)
Suhalla's doors, people, treasure and sprout, before or after Babi's audience.
References gmFlagGet(), SuhallaCues and SuhallaCuesLater.
Definition at line 261 of file suhalla.c.
scInit
Sint32 scInit(void)
Sets Suhalla up as the party enters: arriving from Babi's audience turns the village to its later people, and after a battle a vine Growth has grown stands again.
References fdActorSetAnimation(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork, scSuhallaGrowSprout(), Sint32 and state.
Definition at line 273 of file suhalla.c.
Variables in detail
SuhallaEntrances
extern SCENE_ENTRANCE SuhallaEntrances[]
SCENE_ENTRANCE SuhallaEntrances[]
Referenced by scGetEntrances().
Definition at lines 48 and 294 of file suhalla.c.
SuhallaExits
extern Uint32 SuhallaExits[]
Uint32 SuhallaExits[]
Referenced by scGetExits().
Definition at lines 49 and 370 of file suhalla.c.
SuhallaActorPlacements
extern ACTOR_PLACE SuhallaActorPlacements[]
ACTOR_PLACE SuhallaActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 50 and 386 of file suhalla.c.
SuhallaActorPlacementsLater
extern ACTOR_PLACE SuhallaActorPlacementsLater[]
ACTOR_PLACE SuhallaActorPlacementsLater[]
Referenced by scGetActorPlacements().
Definition at lines 51 and 408 of file suhalla.c.
SuhallaDoorMetatiles
extern Sint16 SuhallaDoorMetatiles[][2]
Sint16 SuhallaDoorMetatiles[][2]
The top-left metatile each door's opening is drawn from, by its metatile behavior (the exit it leads to), two metatiles above where the leader walks into it. Then a door's opening, drawn in two steps, and the Sanctum's wide door's.
Referenced by scSuhallaEnterDoor() and scSuhallaEnterSanctumDoor().
Definition at lines 52 and 433 of file suhalla.c.
SuhallaDoorOpenSteps
extern Uint16 SuhallaDoorOpenSteps[]
Uint16 SuhallaDoorOpenSteps[]
Referenced by scSuhallaEnterDoor().
Definition at lines 53 and 436 of file suhalla.c.
SuhallaWideDoorOpenSteps
extern Uint16 SuhallaWideDoorOpenSteps[]
Uint16 SuhallaWideDoorOpenSteps[]
Referenced by scSuhallaEnterSanctumDoor().
Definition at lines 54 and 440 of file suhalla.c.
SuhallaCues
extern CUE SuhallaCues[]
CUE SuhallaCues[]
References scSuhallaAskIfGoingToLalivero(), scSuhallaEnterDoor(), scSuhallaEnterSanctumDoor() and scSuhallaGrowSprout().
Referenced by scGetCues().
Definition at lines 55 and 445 of file suhalla.c.
SuhallaCuesLater
extern CUE SuhallaCuesLater[]
CUE SuhallaCuesLater[]
References scSuhallaAskIfBroughtBySandstorm(), scSuhallaEnterDoor(), scSuhallaEnterSanctumDoor() and scSuhallaGrowSprout().
Referenced by scGetCues().