Alchemy
Loading...
Searching...
No Matches

vale_home.c File Reference

Vale's village: its doors, the Psynergy Stone, the stormy night when the villagers send Isaac to the elders and he overhears the two surviving travelers, the villagers' farewell when the party sets out (entrance 12), and the village after the party's return from Kalay. More...

Go to the source code of this file.

Macros

#define FLAG_VALE_WELCOMED_HOME   0x302
 Back from Kalay, a villager has welcomed Isaac home.
#define FLAG_VALE_PSYNERGY_STONE_GONE_TOLD   0x306
 Back from Kalay, the villager searching for the Psynergy Stone has told Isaac it is gone.
#define VALE_HOME_TURN_AND_WAIT   ValeHome_TurnAndWaitValue

Enumerations

enum  ValeHomeActor { ACTOR_FIRST_TRAVELER = 23 , ACTOR_SECOND_TRAVELER = 24 , ACTOR_STORM_GARET = 25 }

Functions

static void Event_MeetSurvivingTravelers (void)
 On the stormy night, Isaac overhears the two travelers who survived Sol Sanctum.
static void ValeHome_FightTravelers (void)
 The travelers catch Isaac eavesdropping and fight; win or lose, the party returns by entrance 19.
static void Event_TravelersLeaveAfterBattle (void)
 After the battle the travelers leave Isaac and his companion lying in the storm, and the storm ends.
static void Event_DepartForQuest (void)
 The villagers give their supplies and farewells before the party leaves Vale.
static void Event_SayThenWait (s32 speaker, s32 frames)
static void ValeHome_FaceDirectionAndWait (s32 actorId, s32 facing, s32 frames)
static void ValeHome_FlashPsynergyPalette (struct FieldActor *actor)
 Flashes the caster's palette and emits paired effects every sixteen frames.
static void ValeHome_SpawnEffectPair (struct FieldActor *parent)
 Creates the two vertical Psynergy effects using the shared sprite tiles.
static void ValeHome_UpdateActor15Psynergy (void)
 Updates the levitating villager's Psynergy display.
static void ValeHome_UpdateActor17Psynergy (void)
 Updates the demonstrating villager's Psynergy display.
static void ValeHome_UpdateActor20Psynergy (void)
 Updates the palette of the levitated actor.
static void ValeHome_SetProgressFlagsAndExit (void)
 Arriving by entrance 99, a debug entrance: sets a preset of story flags, which differs by edition, and leaves by exit 40.
static void ValeHome_TurnAndWait (s32 actor, s32 facing, s32 frames)
static s32 ValeHome_TurnAndWaitValue (s32 actor, s32 facing, s32 frames)
const struct SceneEntrance * ValeHome_GetEntrances (void)
const struct SceneRegion * ValeHome_GetRegions (void)
const u32 * ValeHome_GetExits (void)
 Returns the stormy night's exits while FLAG_VALE_STORM is set, else the day's.
const struct ScenePlacement * ValeHome_GetPlacements (void)
 Selects the placements: the stormy night's, the farewell's (entrance 12), after Kalay, else the day's.
static void Event_UsePsynergyStone (void)
 Searching the Psynergy Stone restores the party's PP.
const struct SceneEvent * ValeHome_GetEvents (void)
 Selects the events: after Kalay, after the party has left, the farewell's (entrance 12), the stormy night's, else the day's.
static void Event_AskAboutMeditation (void)
 A villager asks whether Isaac meditates on the mountain each day.
static void Event_RecallThreeYearsAgo (void)
 A villager recalls the difficult time three years ago and asks Isaac about it.
static void Event_AskAboutTheTravelers (void)
 A villager asks whether the travelers went to meet the mayor.
static void Event_DemonstratePsynergy (void)
 Before the party sets out, a villager shows Isaac his Psynergy and shakes the ground; later he asks whether they worry about crossing the land so few.
static void Event_AskAboutJourney (void)
 A villager asks whether Isaac can use Psynergy, then about the Wise One, then about the journey.
static void Event_TalkAboutFallenStone (void)
 A villager tells how the stone fell, and the camera looks at it.
static void Event_DemonstrateLevitation (void)
 A villager with some Psynergy left lifts actor 20 into the air.
static void Event_TalkAboutHelping (void)
 On the stormy night, a villager tells Isaac which way the others went, or, once he has been sent to the elders, to help them.
static void Event_WelcomeIsaacHome (void)
 Back from Kalay, a villager welcomes Isaac home; later he only says this is Vale.
static void Event_PsynergyStoneIsGone (void)
 The villager searching the ground stops and tells Isaac the Psynergy Stone is gone.
static void Event_OpenDoorAndWalkThrough (s32 cellX, s32 cellZ, s32 x, s32 z)
 Opens a door's map cells and sends the leader through its threshold.
static void Event_OpenNorthwestDoor (void)
static void Event_OpenNortheastDoor (void)
 Opens the northeast doorway in two stages and walks inside.
static void Event_OpenCentralWestDoor (void)
 Enters through the western door in the village's middle row.
static void Event_OpenCentralEastDoor (void)
 Enters through the eastern door in the village's middle row.
static void Event_OpenSouthwestDoor (void)
static void Event_OpenWestEdgeDoor (void)
static void Event_OpenSoutheastDoor (void)
static void Event_LeaveThroughWestPassage (void)
 Leaves by the west passage: stepping on cell code 9 on the stormy night takes exit 8.
static void Event_LeaveThroughSouthPassage (void)
 Leaves by the south passage once the party has begun its journey.
static void Event_ClearFirstWhirlwindTarget (void)
 Whirlwind clears the first target (actor 8).
static void Event_ClearSecondWhirlwindTarget (void)
 Whirlwind clears the second target (actor 9).
static void Event_ClearThirdWhirlwindTarget (void)
 Whirlwind clears the third target (actor 10).
s32 ValeHome_Initialize (void)
 Arriving: hide the cleared Whirlwind targets, run entrances 97 to 99 (the return from the travelers' battle and two debug presets), and set up the storm, the farewell or the village after Kalay.
static void ValeHome_RejoinParty (s32 actorId)
 Walks a separate scene actor back to the leader, then hides it.
static void Event_SentToAidElders (void)
 On the stormy night, villagers send Isaac and his companion to aid the elders holding back the Boulder.
static void ValeHome_CyclePsynergyPaletteAndSpawnEffects (struct FieldActor *actor)
 Cycles six palette banks and emits the caster's paired effects.
static void ValeHome_CyclePsynergyPalette (struct FieldActor *actor)
 Cycles the levitated actor through six palette banks.

Variables

u32 gValeHome_Actor22ActionsHead []
s32 gValeHome_Actor22Actions []
s32 gValeHome_Actor24Actions []
s32 gValeHome_Actor23Actions []
s32 gValeHome_LeaderActions []
s32 gValeHome_Actor25Actions []
s32 gValeHome_Actor23BounceActions []
s32 gValeHome_Actor24BounceActions []
s32 gValeHome_FaceTargetActions []
s32 gValeHome_Actor30Actions []
s32 gValeHome_Actor31Actions []
s32 gValeHome_Actor11Actions []
s32 gValeHome_Actor12Actions []
s32 gValeHome_Actor0And1Actions []
s32 gValeHome_Actor21Actions []
s32 gValeHome_Actor17Actions []
s32 gValeHome_LeaderStepActions []
s32 gValeHome_Actor25StepActions []
struct SceneEntrance gValeHome_Entrances []
u32 gValeHome_Exits []
u32 gValeHome_StormExits []
struct ScenePlacement gValeHome_Placements []
struct ScenePlacement gValeHome_StormPlacements []
struct ScenePlacement gValeHome_DeparturePlacements []
struct ScenePlacement gValeHome_PlacementsAfterKalay []
struct SceneEvent gValeHome_Events []
struct SceneEvent gValeHome_StormEvents []
struct SceneEvent gValeHome_DepartureEvents []
struct SceneEvent gValeHome_EventsAfterLeaving []
struct SceneEvent gValeHome_EventsAfterKalay []
u16 gValeHome_DoorOpens []

Detailed Description

Vale's village: its doors, the Psynergy Stone, the stormy night when the villagers send Isaac to the elders and he overhears the two surviving travelers, the villagers' farewell when the party sets out (entrance 12), and the village after the party's return from Kalay.

Definition in file vale_home.c.

Macro Definition Documentation

◆ FLAG_VALE_WELCOMED_HOME

#define FLAG_VALE_WELCOMED_HOME   0x302

Back from Kalay, a villager has welcomed Isaac home.

Definition at line 52 of file vale_home.c.

Referenced by Event_WelcomeIsaacHome().

◆ FLAG_VALE_PSYNERGY_STONE_GONE_TOLD

#define FLAG_VALE_PSYNERGY_STONE_GONE_TOLD   0x306

Back from Kalay, the villager searching for the Psynergy Stone has told Isaac it is gone.

Definition at line 55 of file vale_home.c.

Referenced by Event_PsynergyStoneIsGone().

◆ VALE_HOME_TURN_AND_WAIT

#define VALE_HOME_TURN_AND_WAIT   ValeHome_TurnAndWaitValue

Definition at line 99 of file vale_home.c.

Referenced by Event_SentToAidElders().

Enumeration Type Documentation

◆ ValeHomeActor

Enumerator
ACTOR_FIRST_TRAVELER 

The two travelers who survived Sol Sanctum, Saturos and Menardi by their sprites (0x20 and 0x21, as in vale_kraden.c).

"Only the two of us survived..."

ACTOR_SECOND_TRAVELER 
ACTOR_STORM_GARET 

Garet as a child, who follows Isaac through the night. "Isaac! Wait!".

Definition at line 59 of file vale_home.c.

Function Documentation

◆ Event_MeetSurvivingTravelers()

void Event_MeetSurvivingTravelers ( void )
static

On the stormy night, Isaac overhears the two travelers who survived Sol Sanctum.

"Only the two of us survived..."

Called by ValeHome_Initialize on the stormy night once FLAG_VALE_STORM_GARET_LEFT is set; goes on into ValeHome_FightTravelers.

Definition at line 819 of file vale_home.c.

Referenced by Event_MeetSurvivingTravelers(), and ValeHome_Initialize().

◆ ValeHome_FightTravelers()

void ValeHome_FightTravelers ( void )
static

The travelers catch Isaac eavesdropping and fight; win or lose, the party returns by entrance 19.

"You must forget everything you heard."

Called by Event_MeetSurvivingTravelers. Starts encounter 4 of table 12 with both outcomes leading back to this scene's entrance 19, and sets FLAG_KEEP_MUSIC.

Definition at line 892 of file vale_home.c.

Referenced by Event_MeetSurvivingTravelers(), and ValeHome_FightTravelers().

◆ Event_TravelersLeaveAfterBattle()

void Event_TravelersLeaveAfterBattle ( void )
static

After the battle the travelers leave Isaac and his companion lying in the storm, and the storm ends.

Called by ValeHome_Initialize from entrance 19, after the battle, or 97. Clears FLAG_VALE_STORM and takes exit 9.

Definition at line 1003 of file vale_home.c.

Referenced by Event_TravelersLeaveAfterBattle(), and ValeHome_Initialize().

◆ Event_DepartForQuest()

void Event_DepartForQuest ( void )
static

The villagers give their supplies and farewells before the party leaves Vale.

Called by ValeHome_Initialize from entrance 12. Restores the party's HP and PP, gives a Herb and the Catch Beads (from Dora), and takes exit 10.

Definition at line 1088 of file vale_home.c.

Referenced by Event_DepartForQuest(), and ValeHome_Initialize().

◆ Event_SayThenWait()

void Event_SayThenWait ( s32 speaker,
s32 frames )
static

Definition at line 1435 of file vale_home.c.

◆ ValeHome_FaceDirectionAndWait()

◆ ValeHome_FlashPsynergyPalette()

void ValeHome_FlashPsynergyPalette ( struct FieldActor * actor)
static

Flashes the caster's palette and emits paired effects every sixteen frames.

Definition at line 1446 of file vale_home.c.

Referenced by Event_DemonstrateLevitation(), Event_DemonstratePsynergy(), and ValeHome_FlashPsynergyPalette().

◆ ValeHome_SpawnEffectPair()

void ValeHome_SpawnEffectPair ( struct FieldActor * parent)
static

Creates the two vertical Psynergy effects using the shared sprite tiles.

Definition at line 1480 of file vale_home.c.

Referenced by ValeHome_CyclePsynergyPaletteAndSpawnEffects(), ValeHome_FlashPsynergyPalette(), and ValeHome_SpawnEffectPair().

◆ ValeHome_UpdateActor15Psynergy()

void ValeHome_UpdateActor15Psynergy ( void )
static

Updates the levitating villager's Psynergy display.

A callback Event_DemonstrateLevitation adds while the villager lifts.

Definition at line 1535 of file vale_home.c.

Referenced by Event_DemonstrateLevitation(), and ValeHome_UpdateActor15Psynergy().

◆ ValeHome_UpdateActor17Psynergy()

void ValeHome_UpdateActor17Psynergy ( void )
static

Updates the demonstrating villager's Psynergy display.

A callback Event_DemonstratePsynergy adds while the ground shakes.

Definition at line 1542 of file vale_home.c.

Referenced by Event_DemonstratePsynergy(), and ValeHome_UpdateActor17Psynergy().

◆ ValeHome_UpdateActor20Psynergy()

void ValeHome_UpdateActor20Psynergy ( void )
static

Updates the palette of the levitated actor.

A callback Event_DemonstrateLevitation adds while actor 20 rises.

Definition at line 1549 of file vale_home.c.

Referenced by Event_DemonstrateLevitation(), and ValeHome_UpdateActor20Psynergy().

◆ ValeHome_SetProgressFlagsAndExit()

void ValeHome_SetProgressFlagsAndExit ( void )
static

Arriving by entrance 99, a debug entrance: sets a preset of story flags, which differs by edition, and leaves by exit 40.

Called by ValeHome_Initialize from entrance 99. Sets FLAG_NO_ENCOUNTERS and flag 0x16d; from the third patch the whole story up to Kalay, before it FLAG_TRET_DEFEATED and FLAG_KOLIMA_CURSE_LIFTED.

Definition at line 1559 of file vale_home.c.

Referenced by ValeHome_Initialize(), and ValeHome_SetProgressFlagsAndExit().

◆ ValeHome_TurnAndWait()

void ValeHome_TurnAndWait ( s32 actor,
s32 facing,
s32 frames )
inlinestatic

Definition at line 83 of file vale_home.c.

Referenced by Event_DepartForQuest(), and ValeHome_TurnAndWait().

◆ ValeHome_TurnAndWaitValue()

s32 ValeHome_TurnAndWaitValue ( s32 actor,
s32 facing,
s32 frames )
inlinestatic

Definition at line 93 of file vale_home.c.

Referenced by ValeHome_TurnAndWaitValue().

◆ ValeHome_GetEntrances()

const struct SceneEntrance * ValeHome_GetEntrances ( void )

Definition at line 104 of file vale_home.c.

Referenced by ValeHome_GetEntrances().

◆ ValeHome_GetRegions()

const struct SceneRegion * ValeHome_GetRegions ( void )

Definition at line 108 of file vale_home.c.

Referenced by ValeHome_GetRegions().

◆ ValeHome_GetExits()

const u32 * ValeHome_GetExits ( void )

Returns the stormy night's exits while FLAG_VALE_STORM is set, else the day's.

Definition at line 112 of file vale_home.c.

Referenced by ValeHome_GetExits().

◆ ValeHome_GetPlacements()

const struct ScenePlacement * ValeHome_GetPlacements ( void )

Selects the placements: the stormy night's, the farewell's (entrance 12), after Kalay, else the day's.

Definition at line 121 of file vale_home.c.

Referenced by ValeHome_GetPlacements().

◆ Event_UsePsynergyStone()

void Event_UsePsynergyStone ( void )
static

Searching the Psynergy Stone restores the party's PP.

Reached by searching cell code 100 in every table but the farewell's. Clears FLAG_NOTHING_HAPPENS.

Definition at line 138 of file vale_home.c.

Referenced by Event_UsePsynergyStone().

◆ ValeHome_GetEvents()

const struct SceneEvent * ValeHome_GetEvents ( void )

Selects the events: after Kalay, after the party has left, the farewell's (entrance 12), the stormy night's, else the day's.

Definition at line 152 of file vale_home.c.

Referenced by ValeHome_GetEvents().

◆ Event_AskAboutMeditation()

void Event_AskAboutMeditation ( void )
static

A villager asks whether Isaac meditates on the mountain each day.

Reached by talking to actor 23 on the day the story begins.

Definition at line 171 of file vale_home.c.

Referenced by Event_AskAboutMeditation().

◆ Event_RecallThreeYearsAgo()

void Event_RecallThreeYearsAgo ( void )
static

A villager recalls the difficult time three years ago and asks Isaac about it.

Reached by talking to actor 24 on the day the story begins.

Definition at line 183 of file vale_home.c.

Referenced by Event_RecallThreeYearsAgo().

◆ Event_AskAboutTheTravelers()

void Event_AskAboutTheTravelers ( void )
static

A villager asks whether the travelers went to meet the mayor.

Reached by talking to actor 15 on the day the story begins.

Definition at line 194 of file vale_home.c.

Referenced by Event_AskAboutTheTravelers().

◆ Event_DemonstratePsynergy()

void Event_DemonstratePsynergy ( void )
static

Before the party sets out, a villager shows Isaac his Psynergy and shakes the ground; later he asks whether they worry about crossing the land so few.

Reached by talking to actor 17 on the day the story begins and after the party has left. The display adds and removes the callback ValeHome_UpdateActor17Psynergy and shakes the map for three seconds.

Definition at line 208 of file vale_home.c.

Referenced by Event_DemonstratePsynergy().

◆ Event_AskAboutJourney()

void Event_AskAboutJourney ( void )
static

A villager asks whether Isaac can use Psynergy, then about the Wise One, then about the journey.

Reached by talking to actor 11 on the stormy night and after the party has left, and to actor 15 after Kalay; the story state picks the question.

Definition at line 279 of file vale_home.c.

Referenced by Event_AskAboutJourney().

◆ Event_TalkAboutFallenStone()

void Event_TalkAboutFallenStone ( void )
static

A villager tells how the stone fell, and the camera looks at it.

Reached by talking to actor 26 after the party has left Vale.

Definition at line 305 of file vale_home.c.

Referenced by Event_TalkAboutFallenStone().

◆ Event_DemonstrateLevitation()

void Event_DemonstrateLevitation ( void )
static

A villager with some Psynergy left lifts actor 20 into the air.

Reached by talking to actor 15 on the stormy night. Adds and removes the callbacks ValeHome_UpdateActor15Psynergy and ValeHome_UpdateActor20Psynergy.

Definition at line 328 of file vale_home.c.

Referenced by Event_DemonstrateLevitation().

◆ Event_TalkAboutHelping()

void Event_TalkAboutHelping ( void )
static

On the stormy night, a villager tells Isaac which way the others went, or, once he has been sent to the elders, to help them.

Reached by talking to actor 16 on the stormy night.

Definition at line 376 of file vale_home.c.

Referenced by Event_TalkAboutHelping().

◆ Event_WelcomeIsaacHome()

void Event_WelcomeIsaacHome ( void )
static

Back from Kalay, a villager welcomes Isaac home; later he only says this is Vale.

Reached by talking to actor 11 after Kalay. Sets FLAG_VALE_WELCOMED_HOME.

Definition at line 393 of file vale_home.c.

Referenced by Event_WelcomeIsaacHome().

◆ Event_PsynergyStoneIsGone()

void Event_PsynergyStoneIsGone ( void )
static

The villager searching the ground stops and tells Isaac the Psynergy Stone is gone.

Reached after Kalay by talking to actor 21, or by Mind Read on it until FLAG_VALE_PSYNERGY_STONE_GONE_TOLD is set; sets it and restarts the search.

Definition at line 410 of file vale_home.c.

Referenced by Event_PsynergyStoneIsGone().

◆ Event_OpenDoorAndWalkThrough()

void Event_OpenDoorAndWalkThrough ( s32 cellX,
s32 cellZ,
s32 x,
s32 z )
inlinestatic

Opens a door's map cells and sends the leader through its threshold.

Definition at line 437 of file vale_home.c.

Referenced by Event_OpenCentralEastDoor(), Event_OpenCentralWestDoor(), Event_OpenDoorAndWalkThrough(), Event_OpenNorthwestDoor(), Event_OpenSoutheastDoor(), Event_OpenSouthwestDoor(), and Event_OpenWestEdgeDoor().

◆ Event_OpenNorthwestDoor()

void Event_OpenNorthwestDoor ( void )
static

Definition at line 446 of file vale_home.c.

Referenced by Event_OpenNorthwestDoor().

◆ Event_OpenNortheastDoor()

void Event_OpenNortheastDoor ( void )
static

Opens the northeast doorway in two stages and walks inside.

Reached by walking north into cell code 2 after Kalay; the other tables have no door 2.

Definition at line 455 of file vale_home.c.

Referenced by Event_OpenNortheastDoor().

◆ Event_OpenCentralWestDoor()

void Event_OpenCentralWestDoor ( void )
static

Enters through the western door in the village's middle row.

Definition at line 468 of file vale_home.c.

Referenced by Event_OpenCentralWestDoor().

◆ Event_OpenCentralEastDoor()

void Event_OpenCentralEastDoor ( void )
static

Enters through the eastern door in the village's middle row.

Definition at line 474 of file vale_home.c.

Referenced by Event_OpenCentralEastDoor().

◆ Event_OpenSouthwestDoor()

void Event_OpenSouthwestDoor ( void )
static

Definition at line 479 of file vale_home.c.

Referenced by Event_OpenSouthwestDoor().

◆ Event_OpenWestEdgeDoor()

void Event_OpenWestEdgeDoor ( void )
static

Definition at line 484 of file vale_home.c.

Referenced by Event_OpenWestEdgeDoor().

◆ Event_OpenSoutheastDoor()

void Event_OpenSoutheastDoor ( void )
static

Definition at line 489 of file vale_home.c.

Referenced by Event_OpenSoutheastDoor().

◆ Event_LeaveThroughWestPassage()

void Event_LeaveThroughWestPassage ( void )
static

Leaves by the west passage: stepping on cell code 9 on the stormy night takes exit 8.

Definition at line 496 of file vale_home.c.

Referenced by Event_LeaveThroughWestPassage().

◆ Event_LeaveThroughSouthPassage()

void Event_LeaveThroughSouthPassage ( void )
static

Leaves by the south passage once the party has begun its journey.

Reached by stepping on cell code 8; takes exit 10 once FLAG_PARTY_LEFT_VALE is set, else does nothing.

Definition at line 505 of file vale_home.c.

Referenced by Event_LeaveThroughSouthPassage().

◆ Event_ClearFirstWhirlwindTarget()

void Event_ClearFirstWhirlwindTarget ( void )
static

Whirlwind clears the first target (actor 8).

Reached by Whirlwind on actor 8 by day, until it is cleared; sets FLAG_VALE_FIRST_WHIRLWIND_TARGET_CLEARED.

Definition at line 516 of file vale_home.c.

Referenced by Event_ClearFirstWhirlwindTarget().

◆ Event_ClearSecondWhirlwindTarget()

void Event_ClearSecondWhirlwindTarget ( void )
static

Whirlwind clears the second target (actor 9).

Reached by Whirlwind on actor 9 by day, until it is cleared; sets FLAG_VALE_SECOND_WHIRLWIND_TARGET_CLEARED.

Definition at line 524 of file vale_home.c.

Referenced by Event_ClearSecondWhirlwindTarget().

◆ Event_ClearThirdWhirlwindTarget()

void Event_ClearThirdWhirlwindTarget ( void )
static

Whirlwind clears the third target (actor 10).

Reached by Whirlwind on actor 10 by day, until it is cleared; sets FLAG_VALE_THIRD_WHIRLWIND_TARGET_CLEARED.

Definition at line 532 of file vale_home.c.

Referenced by Event_ClearThirdWhirlwindTarget().

◆ ValeHome_Initialize()

s32 ValeHome_Initialize ( void )

Arriving: hide the cleared Whirlwind targets, run entrances 97 to 99 (the return from the travelers' battle and two debug presets), and set up the storm, the farewell or the village after Kalay.

The scene's initialize entry. Entrance 98 sets FLAG_CHILDHOOD and takes exit 50; entrance 12 runs Event_DepartForQuest; entrance 19 (and 97) Event_TravelersLeaveAfterBattle; on the stormy night, once Garet has left Isaac (FLAG_VALE_STORM_GARET_LEFT), Event_MeetSurvivingTravelers. Once Isaac has been sent to the elders, it removes the villagers who sent him.

Definition at line 545 of file vale_home.c.

Referenced by ValeHome_Initialize().

◆ ValeHome_RejoinParty()

void ValeHome_RejoinParty ( s32 actorId)
inlinestatic

Walks a separate scene actor back to the leader, then hides it.

Definition at line 649 of file vale_home.c.

Referenced by Event_SentToAidElders(), and ValeHome_RejoinParty().

◆ Event_SentToAidElders()

void Event_SentToAidElders ( void )
static

On the stormy night, villagers send Isaac and his companion to aid the elders holding back the Boulder.

"Go aid the elders!"

Reached by stepping on cell code 20 on the stormy night, until FLAG_VALE_STORM_SENT_TO_AID_ELDERS is set; sets it.

Definition at line 667 of file vale_home.c.

Referenced by Event_SentToAidElders().

◆ ValeHome_CyclePsynergyPaletteAndSpawnEffects()

void ValeHome_CyclePsynergyPaletteAndSpawnEffects ( struct FieldActor * actor)
static

Cycles six palette banks and emits the caster's paired effects.

Definition at line 1459 of file vale_home.c.

Referenced by ValeHome_CyclePsynergyPaletteAndSpawnEffects(), ValeHome_UpdateActor15Psynergy(), and ValeHome_UpdateActor17Psynergy().

◆ ValeHome_CyclePsynergyPalette()

void ValeHome_CyclePsynergyPalette ( struct FieldActor * actor)
static

Cycles the levitated actor through six palette banks.

Definition at line 1470 of file vale_home.c.

Referenced by ValeHome_CyclePsynergyPalette(), and ValeHome_UpdateActor20Psynergy().

Variable Documentation

◆ gValeHome_Actor22ActionsHead

u32 gValeHome_Actor22ActionsHead[]
Initial value:
= {
0x1000000, 0x2020101, 0x3030302, 0x5040404, 0x6060505, 0x1000006, 0x3020201, 0x5040403,
}

Definition at line 1622 of file vale_home.c.

◆ gValeHome_Actor22Actions

s32 gValeHome_Actor22Actions[]
Initial value:
= {
SC_ARG(2),
SC_MOVE(PIXELS(214), 0, PIXELS(721)),
SC_ARG(1),
SC_WAIT(40),
SC_SE(153),
SC_ARG(2),
SC_MOVE(PIXELS(214), 0, PIXELS(763)),
SC_ARG(1),
}
#define PIXELS(value)
#define SC_SET(w, v)
Write a work value.
Definition objcmd.h:37
#define SC_SYNC
Wait for arrival.
Definition objcmd.h:17
#define SC_ARG(v)
Definition objcmd.h:44
#define SC_SE(n)
Sound effect.
Definition objcmd.h:46
#define SC_MOVE(x, y, z)
Move toward the target.
Definition objcmd.h:19
#define SC_WAIT(n)
Wait n frames.
Definition objcmd.h:16
#define SC_END
Return to the main script.
Definition objcmd.h:32
@ SW_MOTION
Definition objcmd.h:75
@ SW_VELOCITY_Y
Definition objcmd.h:65

Definition at line 1626 of file vale_home.c.

Referenced by Event_SentToAidElders().

◆ gValeHome_Actor24Actions

s32 gValeHome_Actor24Actions[]
Initial value:
= {
SC_SE(153),
SC_MOVE(PIXELS(114), PIXELS(144), PIXELS(360)),
SC_WAIT(10),
}
@ FACING_WEST
Definition field_scene.h:30
@ SW_ACCEL
Definition objcmd.h:68
@ SW_SPEED
Definition objcmd.h:67
@ SW_FACING
Definition objcmd.h:57

Definition at line 1642 of file vale_home.c.

Referenced by ValeHome_FightTravelers().

◆ gValeHome_Actor23Actions

s32 gValeHome_Actor23Actions[]
Initial value:

Definition at line 1654 of file vale_home.c.

Referenced by ValeHome_FightTravelers().

◆ gValeHome_LeaderActions

s32 gValeHome_LeaderActions[]
Initial value:

Definition at line 1666 of file vale_home.c.

Referenced by ValeHome_FightTravelers().

◆ gValeHome_Actor25Actions

s32 gValeHome_Actor25Actions[]
Initial value:

Definition at line 1678 of file vale_home.c.

Referenced by ValeHome_FightTravelers().

◆ gValeHome_Actor23BounceActions

s32 gValeHome_Actor23BounceActions[]
Initial value:
= {
SC_ARG(5),
SC_WAIT(10),
SC_ARG(6),
SC_SE(153),
SC_MOVE(PIXELS(65), 0, PIXELS(328)),
SC_WAIT(5),
SC_ARG(5),
SC_WAIT(10),
SC_ARG(6),
SC_SE(153),
SC_MOVE(PIXELS(31), 0, PIXELS(338)),
SC_WAIT(5),
SC_ARG(5),
SC_WAIT(10),
SC_ARG(6),
SC_SE(153),
SC_MOVE(0, 0, PIXELS(338)),
SC_POS(0, 0, 0),
}
#define SC_POS(x, y, z)
Set position.
Definition objcmd.h:18

Definition at line 1690 of file vale_home.c.

Referenced by Event_TravelersLeaveAfterBattle().

◆ gValeHome_Actor24BounceActions

s32 gValeHome_Actor24BounceActions[]
Initial value:
= {
SC_ARG(5),
SC_WAIT(10),
SC_ARG(6),
SC_MOVE(PIXELS(63), 0, PIXELS(374)),
SC_WAIT(5),
SC_ARG(5),
SC_WAIT(10),
SC_ARG(6),
SC_MOVE(PIXELS(17), 0, PIXELS(338)),
SC_WAIT(5),
SC_ARG(5),
SC_WAIT(10),
SC_ARG(6),
SC_SE(153),
SC_MOVE(0, 0, PIXELS(338)),
SC_POS(0, 0, 0),
}

Definition at line 1718 of file vale_home.c.

Referenced by Event_TravelersLeaveAfterBattle().

◆ gValeHome_FaceTargetActions

s32 gValeHome_FaceTargetActions[]
Initial value:
= {
SC_CALL(Scene_TurnTowardTarget),
}
#define SC_LOOP(n, to)
Repeat up to n times.
Definition objcmd.h:28
#define SC_FOREVER
Definition objcmd.h:14
#define SC_TOP
Script start.
Definition objcmd.h:13
#define SC_CALL(fn)
Definition objcmd.h:50

Definition at line 1744 of file vale_home.c.

Referenced by Event_DepartForQuest(), Event_SentToAidElders(), ValeHome_FightTravelers(), and ValeHome_Initialize().

◆ gValeHome_Actor30Actions

s32 gValeHome_Actor30Actions[]
Initial value:
= {
SC_MOVE(PIXELS(132), 0, PIXELS(636)),
SC_MOVE(PIXELS(171), 0, PIXELS(629)),
SC_MOVE(PIXELS(207), 0, PIXELS(627)),
SC_MOVE(PIXELS(235), 0, PIXELS(625)),
SC_MOVE(PIXELS(261), 0, PIXELS(574)),
SC_MOVE(PIXELS(327), 0, PIXELS(547)),
}

Definition at line 1749 of file vale_home.c.

Referenced by Event_DepartForQuest().

◆ gValeHome_Actor31Actions

s32 gValeHome_Actor31Actions[]
Initial value:
= {
SC_MOVE(PIXELS(271), 0, PIXELS(571)),
SC_MOVE(PIXELS(187), 0, PIXELS(577)),
SC_MOVE(PIXELS(154), 0, PIXELS(580)),
SC_MOVE(PIXELS(127), 0, PIXELS(543)),
SC_MOVE(PIXELS(139), 0, PIXELS(498)),
}

Definition at line 1765 of file vale_home.c.

Referenced by Event_DepartForQuest().

◆ gValeHome_Actor11Actions

s32 gValeHome_Actor11Actions[]
Initial value:
= {
SC_ARG(2),
SC_MOVE(PIXELS(137), 0, PIXELS(639)),
SC_MOVE(PIXELS(122), 0, PIXELS(692)),
SC_MOVE(PIXELS(141), 0, PIXELS(746)),
SC_MOVE(PIXELS(148), 0, PIXELS(770)),
SC_ARG(1),
}

Definition at line 1779 of file vale_home.c.

Referenced by Event_DepartForQuest().

◆ gValeHome_Actor12Actions

s32 gValeHome_Actor12Actions[]
Initial value:
= {
SC_ARG(2),
SC_MOVE(PIXELS(137), 0, PIXELS(639)),
SC_MOVE(PIXELS(122), 0, PIXELS(692)),
SC_MOVE(PIXELS(141), 0, PIXELS(746)),
SC_MOVE(PIXELS(164), 0, PIXELS(758)),
SC_ARG(1),
}

Definition at line 1795 of file vale_home.c.

Referenced by Event_DepartForQuest().

◆ gValeHome_Actor0And1Actions

s32 gValeHome_Actor0And1Actions[]
Initial value:
= {
SC_ARG(2),
SC_MOVE(PIXELS(216), 0, PIXELS(854)),
SC_MOVE(PIXELS(215), 0, PIXELS(921)),
SC_POS(0, 0, 0),
}

Definition at line 1811 of file vale_home.c.

Referenced by Event_DepartForQuest().

◆ gValeHome_Actor21Actions

s32 gValeHome_Actor21Actions[]
Initial value:
= {
SC_SET(SW_ACCEL, PIXELS(1) / 20),
SC_ARG(2),
SC_WANDER_HOME(0x40000, 0x80000, 0x100000),
SC_ARG(1),
SC_WAIT(20),
SC_ARG(2),
SC_WANDER_HOME(0x40000, 0x80000, 0x100000),
SC_ARG(1),
SC_WAIT(20),
SC_ARG(2),
SC_WANDER_HOME(0x40000, 0x80000, 0x100000),
SC_ARG(1),
SC_WAIT(60),
}
#define SC_LABEL(n)
Branch destination.
Definition objcmd.h:11
#define SC_WANDER_HOME(a, b, c)
Definition objcmd.h:25
#define SC_TO(n)
Definition objcmd.h:12
@ SW_COLLISION
Definition objcmd.h:79

Definition at line 1821 of file vale_home.c.

Referenced by Event_PsynergyStoneIsGone().

◆ gValeHome_Actor17Actions

s32 gValeHome_Actor17Actions[]
Initial value:
= {
SC_ARG(2),
SC_MOVE(PIXELS(148), 0, PIXELS(758)),
SC_MOVE(PIXELS(128), 0, PIXELS(709)),
SC_MOVE(PIXELS(129), 0, PIXELS(647)),
SC_ARG(1),
SC_POS(0, 0, 0),
}

Definition at line 1845 of file vale_home.c.

Referenced by Event_SentToAidElders().

◆ gValeHome_LeaderStepActions

s32 gValeHome_LeaderStepActions[]
Initial value:
= {
SC_ARG(2),
SC_MOVE(PIXELS(196), 0, PIXELS(774)),
SC_ARG(1),
}

Definition at line 1858 of file vale_home.c.

Referenced by Event_SentToAidElders().

◆ gValeHome_Actor25StepActions

s32 gValeHome_Actor25StepActions[]
Initial value:
= {
SC_ARG(2),
SC_MOVE(PIXELS(196), 0, PIXELS(790)),
SC_ARG(1),
}

Definition at line 1866 of file vale_home.c.

Referenced by Event_SentToAidElders().

◆ gValeHome_Entrances

struct SceneEntrance gValeHome_Entrances[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 248, 0, 295, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 1, CONDITION_ALWAYS, 248, 0, 295, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 2, CONDITION_ALWAYS, 352, 0, 308, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 3, CONDITION_ALWAYS, 230, 0, 423, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 4, CONDITION_ALWAYS, 374, 0, 435, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 5, CONDITION_ALWAYS, 200, 0, 562, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 6, CONDITION_ALWAYS, 102, 0, 627, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 7, CONDITION_ALWAYS, 358, 0, 678, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 8, CONDITION_ALWAYS, 27, 0, 338, FACING_EAST, 0, -1, -1, -1, -1, 0 },
{ 10, CONDITION_ALWAYS, 217, 0, 843, FACING_NORTH, 0, -1, -1, -1, -1, 0 },
{ 11, CONDITION_ALWAYS, 186, 0, 474, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 12, CONDITION_ALWAYS, 180, 0, 618, FACING_NORTH, 0, -1, -1, -1, -1, 0 },
{ 15, CONDITION_ALWAYS, 184, 0, 472, FACING_NORTH, 0, -1, -1, -1, -1, 0 },
{ 19, CONDITION_ALWAYS, 27, 0, 338, FACING_EAST, 0, -1, -1, -1, -1, 0 },
}
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44
@ FACING_NORTH
Definition field_scene.h:32
@ FACING_SOUTH
Definition field_scene.h:28

Definition at line 1874 of file vale_home.c.

Referenced by ValeHome_GetEntrances().

◆ gValeHome_Exits

u32 gValeHome_Exits[]
Initial value:
= {
SCENE_EXIT(1, 7, 8),
SCENE_EXIT(2, 8, 3),
SCENE_EXIT(3, 7, 3),
SCENE_EXIT(4, 7, 7),
SCENE_EXIT(5, 7, 4),
SCENE_EXIT(6, 8, 1),
SCENE_EXIT(7, 8, 4),
SCENE_EXIT(8, 4, 5),
SCENE_EXIT(9, 0, 1),
SCENE_EXIT(10, 2, 1),
SCENE_EXIT(11, 28, 5),
SCENE_EXIT(50, 8, 20),
SCENE_EXIT(40, 30, 1),
}
#define SCENE_EXITS(scene)
Definition field_scene.h:72
#define SCENE_EXIT(exit, scene, entrance)
Definition field_scene.h:73
#define SCENE_EXITS_END
Definition field_scene.h:77

Definition at line 1892 of file vale_home.c.

Referenced by ValeHome_GetExits().

◆ gValeHome_StormExits

u32 gValeHome_StormExits[]
Initial value:
= {
SCENE_EXIT(1, 7, 8),
SCENE_EXIT(2, 8, 3),
SCENE_EXIT(3, 7, 3),
SCENE_EXIT(4, 7, 7),
SCENE_EXIT(5, 7, 4),
SCENE_EXIT(6, 8, 1),
SCENE_EXIT(7, 8, 4),
SCENE_EXIT(8, 3, 5),
SCENE_EXIT(9, 0, 1),
}

Definition at line 1914 of file vale_home.c.

Referenced by ValeHome_GetExits().

◆ gValeHome_Placements

struct ScenePlacement gValeHome_Placements[]

Definition at line 1928 of file vale_home.c.

Referenced by ValeHome_GetPlacements().

◆ gValeHome_StormPlacements

struct ScenePlacement gValeHome_StormPlacements[]

Definition at line 1974 of file vale_home.c.

Referenced by ValeHome_GetPlacements().

◆ gValeHome_DeparturePlacements

struct ScenePlacement gValeHome_DeparturePlacements[]

Definition at line 2021 of file vale_home.c.

Referenced by ValeHome_GetPlacements().

◆ gValeHome_PlacementsAfterKalay

struct ScenePlacement gValeHome_PlacementsAfterKalay[]

Definition at line 2075 of file vale_home.c.

Referenced by ValeHome_GetPlacements().

◆ gValeHome_Events

struct SceneEvent gValeHome_Events[]
Initial value:
= {
{ EVENT_TALK, 13, CONDITION_ALWAYS, MSGNO(MsgValeQuietDay) },
{ EVENT_TALK, 14, CONDITION_ALWAYS, MSGNO(MsgValeKradenHadVisitors) },
{ EVENT_TALK, 11, CONDITION_ALWAYS, MSGNO(MsgValeChosenPeople) },
{ EVENT_TALK, 12, CONDITION_ALWAYS, MSGNO(MsgValeProudOfAdeptGrandfather) },
{ EVENT_TALK, 16, CONDITION_ALWAYS, MSGNO(MsgValePracticePsynergy) },
{ EVENT_TALK, 18, CONDITION_ALWAYS, MSGNO(MsgValeWalkToRecoverPsynergy) },
{ EVENT_TALK, 26, CONDITION_ALWAYS, MSGNO(MsgValeFoodStoredForWinter) },
}
@ ABILITY_WHIRLWIND
Definition ability_ids.h:13
#define SCENE_EVENTS_END
@ EVENT_TOUCH
@ EVENT_EXIT
@ EVENT_TALK
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define SEARCH(target)
#define TOUCH_WALKING_INTO(facing)
@ SEARCH_UNNAMED
#define FLAG_VALE_THIRD_WHIRLWIND_TARGET_CLEARED
Definition flags.h:504
#define FLAG_VALE_FIRST_WHIRLWIND_TARGET_CLEARED
Whirlwind cleared the three targets (actors 8 to 10) in the village.
Definition flags.h:502
#define FLAG_VALE_SECOND_WHIRLWIND_TARGET_CLEARED
Definition flags.h:503
static void Event_ClearFirstWhirlwindTarget(void)
Whirlwind clears the first target (actor 8).
Definition vale_home.c:516
static void Event_OpenCentralWestDoor(void)
Enters through the western door in the village's middle row.
Definition vale_home.c:468
static void Event_OpenCentralEastDoor(void)
Enters through the eastern door in the village's middle row.
Definition vale_home.c:474
static void Event_AskAboutTheTravelers(void)
A villager asks whether the travelers went to meet the mayor.
Definition vale_home.c:194
static void Event_OpenWestEdgeDoor(void)
Definition vale_home.c:484
static void Event_OpenSoutheastDoor(void)
Definition vale_home.c:489
static void Event_ClearThirdWhirlwindTarget(void)
Whirlwind clears the third target (actor 10).
Definition vale_home.c:532
static void Event_UsePsynergyStone(void)
Searching the Psynergy Stone restores the party's PP.
Definition vale_home.c:138
static void Event_OpenSouthwestDoor(void)
Definition vale_home.c:479
static void Event_AskAboutMeditation(void)
A villager asks whether Isaac meditates on the mountain each day.
Definition vale_home.c:171
static void Event_DemonstratePsynergy(void)
Before the party sets out, a villager shows Isaac his Psynergy and shakes the ground; later he asks w...
Definition vale_home.c:208
static void Event_LeaveThroughSouthPassage(void)
Leaves by the south passage once the party has begun its journey.
Definition vale_home.c:505
static void Event_RecallThreeYearsAgo(void)
A villager recalls the difficult time three years ago and asks Isaac about it.
Definition vale_home.c:183
static void Event_OpenNorthwestDoor(void)
Definition vale_home.c:446
static void Event_ClearSecondWhirlwindTarget(void)
Whirlwind clears the second target (actor 9).
Definition vale_home.c:524

Definition at line 2107 of file vale_home.c.

Referenced by ValeHome_GetEvents().

◆ gValeHome_StormEvents

struct SceneEvent gValeHome_StormEvents[]
Initial value:
= {
{ EVENT_TALK, 12, CONDITION_ALWAYS, MSGNO(MsgValeOldWomanCannotUsePsynergy) },
{ EVENT_TALK, 13, CONDITION_ALWAYS, MSGNO(MsgValeExhaustedFromFallingRocks) },
{ EVENT_TALK, 14, CONDITION_ALWAYS, MSGNO(MsgValeFelixFellInRiver) },
{ EVENT_TALK, 19, CONDITION_ALWAYS, MSGNO(MsgValeRaceAgainstTime) },
}
static void Event_LeaveThroughWestPassage(void)
Leaves by the west passage: stepping on cell code 9 on the stormy night takes exit 8.
Definition vale_home.c:496
static void Event_DemonstrateLevitation(void)
A villager with some Psynergy left lifts actor 20 into the air.
Definition vale_home.c:328
static void Event_AskAboutJourney(void)
A villager asks whether Isaac can use Psynergy, then about the Wise One, then about the journey.
Definition vale_home.c:279
static void Event_TalkAboutHelping(void)
On the stormy night, a villager tells Isaac which way the others went, or, once he has been sent to t...
Definition vale_home.c:376
static void Event_SentToAidElders(void)
On the stormy night, villagers send Isaac and his companion to aid the elders holding back the Boulde...
Definition vale_home.c:667

Definition at line 2135 of file vale_home.c.

Referenced by ValeHome_GetEvents().

◆ gValeHome_DepartureEvents

struct SceneEvent gValeHome_DepartureEvents[]
Initial value:
= {
}

Definition at line 2155 of file vale_home.c.

Referenced by ValeHome_GetEvents().

◆ gValeHome_EventsAfterLeaving

struct SceneEvent gValeHome_EventsAfterLeaving[]

Definition at line 2159 of file vale_home.c.

Referenced by ValeHome_GetEvents().

◆ gValeHome_EventsAfterKalay

struct SceneEvent gValeHome_EventsAfterKalay[]

Definition at line 2198 of file vale_home.c.

Referenced by ValeHome_GetEvents().

◆ gValeHome_DoorOpens

u16 gValeHome_DoorOpens[]
Initial value:
= {
MAP_CELL_STEP(0, 57, 2, 2, 1), MAP_CELL_STEP(0, 59, 2, 2, 1), MAP_CELL_STEP(2, 59, 2, 2, 1), MAP_CELL_STEPS_END,
}
#define MAP_CELL_STEP(srcX, srcY, width, height, frames)
Definition field_event.h:59
#define MAP_CELL_STEPS_END
Definition field_event.h:61

Definition at line 2239 of file vale_home.c.

Referenced by Event_OpenDoorAndWalkThrough().