vale_kraden.c
The north of Vale around Kraden's cottage: the fence above the village, the path down to the plaza, and the cottage's gate.
games/tbs/src/scene/vale_kraden.c on GitHub
The north of Vale around Kraden's cottage: the fence above the village, the path down to the plaza, and the cottage's gate.
Functions
ValeKraden_GetPlacements
const struct ScenePlacement *ValeKraden_GetPlacements(void)
Returns the one placement table for every visit; ValeKraden_Initialize removes the actors a visit does not use.
ValeKraden_GetEvents
const struct SceneEvent *ValeKraden_GetEvents(void)
Selects the events for the current visit to Vale: after Kalay (FLAG_REACHED_KALAY), on the stormy night (FLAG_VALE_STORM), else the day the story begins.
ValeKraden_NodTogether
static __inline__ void ValeKraden_NodTogether(void)
Finishes the party's nod together before the next line of dialogue.
Used by Event_KradenPlansSanctumVisit.
ValeKraden_FacePartySouth
static __inline__ void ValeKraden_FacePartySouth(void)
Turns all three party members toward the strangers.
Used by Event_MeetSaturosAndMenardi.
ValeKraden_WalkTowardLeader
static __inline__ void ValeKraden_WalkTowardLeader(s32 companionId)
Starts a companion walking back to Isaac's current pixel position.
Used by Event_KradenSetsOff, Event_MeetSaturosAndMenardi.
Event_TalkToFenceOnlooker
static void Event_TalkToFenceOnlooker(void)
The child at the fence asks whether Isaac hears the growls beyond it; once the party has left Vale, he means to climb it someday.
Reached by talking to the onlooker at the fence (actor 12) in the day's events.
Used by gValeKraden_Events.
Event_KradenPlansSanctumVisit
static void Event_KradenPlansSanctumVisit(void)
Talking to Kraden outside his cottage: he talks Isaac, Garet and Jenna into a secret look at Sol Sanctum, then goes inside to prepare.
Reached by talking to Kraden (actor 13) in the day's events, until FLAG_SANCTUM_VISIT_PLANNED is set. Ends by taking exit 13 into the cottage (scene 8, entrance 22); the party comes back by entrance 10, where Event_KradenSetsOff goes on.
Used by gValeKraden_Events.
Event_KradenSetsOff
static void Event_KradenSetsOff(void)
Arriving by entrance 10, from the cottage: Kraden comes out ready, and everyone joins Isaac for the mountain. "This is our best bet." The mountain is Mt. Aleph.
Called by ValeKraden_Initialize on entrance 10 unless the party keeps its position. Sets FLAG_SANCTUM_VISIT_PLANNED and FLAG_SCENE_TEMP_42 (the gate stays open), and removes Kraden, Garet, Jenna, Saturos and Menardi.
Used by ValeKraden_Initialize.
Event_EnterCottage
static void Event_EnterCottage(void)
Walking into the cottage: the gate opens unless Kraden left it open.
Reached by walking north into cell code 3, by day and after Kalay; takes exit 3 into the cottage.
Used by gValeKraden_Events, gValeKraden_EventsAfterKalay.
Event_MeetSaturosAndMenardi
static void Event_MeetSaturosAndMenardi(void)
Walking past the two strangers: Isaac, Garet and Jenna overhear Saturos and Menardi, confront them and are warned off.
Reached by stepping on cell code 7 in the day's events; runs once, setting FLAG_MET_SATUROS_AND_MENARDI. Saturos and Menardi are left turning to watch the leader.
Used by gValeKraden_Events.
Event_OverhearKraden
static void Event_OverhearKraden(void)
Walking up to the cottage: Kraden paces, wondering aloud who the strangers were and what they know of Sol Sanctum and the Elemental Stars.
Reached by stepping on cell code 5 in the day's events; runs once, setting FLAG_OVERHEARD_KRADEN.
Used by gValeKraden_Events.
ValeKraden_Initialize
s32 ValeKraden_Initialize(void)
Places the actors for the storm or for the day, and plays the arrival from the cottage.
The scene's initialize entry. On the stormy night (FLAG_VALE_STORM) it starts the lightning, removes the day's people, lays the survivor by the fence (unless FLAG_VALE_ROCKSLIDE_SURVIVOR_ESCAPED) and blocks the cells the rockslide covers. By day it removes the rocks and Garet, runs Event_KradenSetsOff from entrance 10, removes Kraden and the strangers once FLAG_SANCTUM_VISIT_PLANNED is set, and places the cottage visitor after Kalay. Clears FLAG_SCENE_TEMP_42 when the party keeps its position.
Event_TalkToRockslideSurvivor
static void Event_TalkToRockslideSurvivor(void)
The man hurt in the rockslide asks whether he will die: yes, and he gives up; no, and he finds he is unhurt and runs off to the plaza.
Reached on the stormy night by talking to him (actor 11), or by stepping on cell code 20 until he has given up. Sets FLAG_VALE_ROCKSLIDE_SURVIVOR_GAVE_UP on yes, or FLAG_VALE_ROCKSLIDE_SURVIVOR_ESCAPED on no; once he has escaped it does nothing.
Used by gValeKraden_StormEvents.
Event_FightFirstMonster
static void Event_FightFirstMonster(void)
On the stormy night, a monster attacks by the broken fence.
Reached by stepping on cell code 10 until FLAG_VALE_STORM_FIRST_MONSTER_FOUGHT is set. Sets it and FLAG_VALE_STORM_MONSTER_FOUGHT, and starts encounter 0 of table 12.
Used by gValeKraden_StormEvents.
Event_FightSecondMonster
static void Event_FightSecondMonster(void)
On the stormy night, a second monster attacks by the broken fence.
Reached by stepping on cell code 11 until FLAG_VALE_STORM_SECOND_MONSTER_FOUGHT is set. Sets it and FLAG_VALE_STORM_MONSTER_FOUGHT, and starts encounter 1 of table 12.
Used by gValeKraden_StormEvents.
Event_TalkToCottageVisitor
static void Event_TalkToCottageVisitor(void)
After the party has reached Kalay, a villager at the cottage asks Isaac about his memories of it.
Reached by talking to the cottage visitor (actor 16) in the events after Kalay.
Used by gValeKraden_EventsAfterKalay.
Also, functions without a comment: ValeKraden_GetEntrances, ValeKraden_GetRegions, ValeKraden_GetExits.
Enumerations
ValeKradenActor
enum ValeKradenActor
| Value | = | |
|---|---|---|
ACTOR_WEST_ROCK | 9 | The west rock. "It's a huge rock that Isaac's strength can't even budge." |
ACTOR_EAST_ROCK | 10 | |
ACTOR_ROCKSLIDE_SURVIVOR | 11 | |
ACTOR_FENCE_ONLOOKER | 12 | |
ACTOR_KRADEN | 13 | |
ACTOR_SATUROS | 14 | |
ACTOR_MENARDI | 15 | |
ACTOR_COTTAGE_VISITOR | 16 |
Globals
gValeKraden_RockslideSurvivorEscapeActions
s32 gValeKraden_RockslideSurvivorEscapeActions[]
Leads the party away from the broken fence, then leaves the map.
Used by Event_TalkToRockslideSurvivor.
gValeKraden_RockslideSurvivorSwayActions
s32 gValeKraden_RockslideSurvivorSwayActions[]
Alternates the survivor's width and height while he lies by the fence.
Used by ValeKraden_Initialize, gValeKraden_Placements.
gValeKraden_FaceTargetActions
s32 gValeKraden_FaceTargetActions[]
Keeps a linked actor facing its current target.
Used by Event_MeetSaturosAndMenardi, Event_TalkToRockslideSurvivor, ValeKraden_Initialize.
Also, globals without a comment: gValeKraden_Entrances, gValeKraden_Exits, gValeKraden_Placements, gValeKraden_Events, gValeKraden_StormEvents, gValeKraden_EventsAfterKalay, gValeKraden_GateCells.