Alchemy
Loading...
Searching...
No Matches

vale.c File Reference

Vale's plaza and the paths around it in daytime: the game opens here three years after the storm with Isaac mending his roof (entrances 16 and 17), and the villagers talk of the story before the party leaves, after it has left and after its return from Kalay. More...

Go to the source code of this file.

Macros

#define VALE_GARET_REUNION_Z   827
#define VALE_SOUTH_VILLAGER_Z   889
#define DIRECTION_STEP(dx, dz)
 Pixel step by direction: X in the upper halfword, Z in the lower.

Enumerations

enum  HouseActor { ACTOR_BOARD = 23 , ACTOR_LAST_BOARD = 24 }
enum  { ANIM_HAMMER = 11 }

Functions

static void Vale_HaveJennaStopTheAlephDetour (void)
 Brings Jenna out to remind Isaac that Kraden is waiting.
static void Vale_AskAboutSneakingToAleph (const s32 *leaderActions, const s32 *villagerActions)
 Asks about the Aleph detour, then resumes each actor's response actions.
static void Vale_MoveActorAlongLowerZPath (s32 actorId, s32 approachAnimationId, s32 departureAnimationId, s32 resumeMotion)
 Traverses the passage toward lower Z, changing animations at its lip.
static void Vale_MoveActorAlongHigherZPath (s32 actorId, s32 approachAnimationId, s32 departureAnimationId, s32 resumeMotion)
 Traverses the passage toward higher Z and restores falling motion if requested.
static void SceneActor_ResetActorRun (s32 first, u32 count, s32 mode)
 Resets consecutive repair actors to their staging position or hides them.
static void Event_MendingTheRoof (void)
 Arriving by entrance 16, the game's opening: Isaac is mending the roof.
static void Event_RoofMended (void)
 Arriving by entrance 17 after the opening: Dora praises the mended roof.
static void Vale_UpdateGaretPaletteAndEffects (void)
 Cycles palettes on Garet and periodically spawns attached effects.
static void Vale_UpdateLeaderPaletteAndEffects (void)
 Cycles the leader palette and periodically spawns attached effects.
static void Vale_CycleVillagerNinePalette (void)
 Cycles actor 9 palette during the repair scene.
static void Vale_CycleFirstBoardPalette (void)
 Cycles the first board palette while its repair effect runs.
static void Vale_CycleSecondBoardPalette (void)
 Cycles the second board palette while its repair effect runs.
static void Vale_CycleActor25Palette (void)
 Cycles actor 25 palette during the repair scene.
static s32 Vale_HaveVillagerWatchTheLeader (union FieldObject *fieldObject)
static void Effect_ConfigureSpawnedParticle (union FieldObject *fieldObject)
 Emits one dust particle below the moving source actor.
static void Effect_SpawnRisingDustBurst (struct FieldActor *emitter)
 Shrinks and raises the emitter, scatters dust, then clears its motion targets.
static void Effect_UpdateParticlePosition (struct FieldActor *particle, s32 distance, s32 angle)
 Moves a particle outward in the horizontal plane without changing its height.
static void Event_SettleMovedObject (void)
 After Move or a push, record the object's column in group flags 0x314 to 0x316 and block the cell it now stands on.
static void Effect_PlayStepSound (void)
static void Vale_SynchronizeAlephVillagerPause (void)
 Pauses the Aleph villager while the corresponding event flag is set.
static void Vale_AdjustVillagerPriorityForLeaderHeight (void)
 Keeps raised villager priority consistent with the leader height.
static void Vale_FlashActorAndSpawnEffects (struct FieldActor *actor)
static void Vale_CycleActorPaletteAndSpawnEffects (struct FieldActor *actor)
static void Vale_CycleActorPalette (struct FieldActor *actor)
const struct SceneEntrance * Vale_GetEntrances (void)
const struct SceneRegion * Vale_GetRegions (void)
const u32 * Vale_GetExits (void)
const struct ScenePlacement * Vale_GetPlacements (void)
 Places the villagers for the story so far, or for the roof repair (entrance 16).
static void Event_CatchNut (void)
 Catch on the Nut hanging in the plaza: the party gets it.
static void Event_CatchNutAfterKalay (void)
 The same Nut after Kalay, where it is actor 20.
const struct SceneEvent * Vale_GetEvents (void)
 The villagers talk of the story so far.
static void Event_TalkAboutTheMayorAndTremors (void)
 Asks about the mayor before departure, or the tremors after returning.
static void Event_WarnAboutGoingBeyondKradensCottage (void)
 Warns about the mountain path, with a shorter repeat greeting.
static void Event_ArgueWithTheAngryVillager (void)
 A villager scolds Garet; afterwards the villager only threatens him.
static void Event_TalkAboutTheWeather (void)
 A villager talks of the weather, differently right after the roof repair.
static void Event_AskWhetherJennaHasReturned (void)
 Back from Kalay, a villager asks whether Jenna is back.
static void Event_ReactToAnotherTremor (void)
 Shakes the view before the villager reacts to another tremor.
static void Event_AskAboutTheLackOfTravelers (void)
 Asks about the quiet roads after the eruption.
static void Event_SetPathCellOverride (void)
 Walking onto the upper path: its collision cells change, remembered in FLAG_SCENE_TEMP_10.
static void Event_ClearPathCellOverride (void)
 Walking off the upper path restores its collision cells.
static void Event_EnterSanctum (void)
 Opens the sanctum door, walks inside and takes its scene exit.
static void Event_ApproachMtAleph (void)
 The mountain path: Jenna stops Isaac until Kraden has planned the visit.
static void Event_LeaveByNorthPath (void)
 The northern path toward Kraden's cottage.
static void Event_LeaveBySouthPath (void)
 The southern path toward Kraden's cottage.
static void Event_LeaveTowardHome (void)
 Leaves through the exit leading back to the house.
static void Event_EnterEastHouse (void)
 Animates the eastern house door before entering.
static void Event_EnterCentralHouse (void)
 Animates the central house door before entering.
static void Event_EnterIsaacsHouse (void)
 Isaac's house: after the party has left and before Kalay, Dora will not open.
static void Event_EnterSoutheastHouse (void)
 Opens the southeastern door and enters its interior.
static void Event_EnterFarSouthHouse (void)
 Opens the far southern door and enters its interior.
static void Event_EnterSouthwestHouse (void)
 Opens the southwestern door and enters its interior.
static void Event_WatchThePuppies (void)
 Pans down to the puppies and returns the camera to the leader.
static void Event_TurnBackFromThePuppies (void)
 Shows the puppies message from the opposite approach.
static void Event_EnterNorthernPassage (void)
 Changes the passage collision and moves through its northern end.
static void Event_ReturnThroughSouthernPassage (void)
 Moves back through the passage and restores its collision attributes.
static void Event_WarnAgainstSneakingUpMtAleph (void)
 A villager jumps out in front of Isaac, then keeps watching him.
static void Event_RepeatMtAlephWarningFromFirstApproach (void)
 Repeats the warning when the villager reaches the first pause.
static void Event_RepeatMtAlephWarningFromSecondApproach (void)
 Repeats the warning when the villager reaches the second pause.
static void Event_RepeatMtAlephWarningAtEitherPause (void)
 Chooses the warning approach matching the current villager pause.
static UNUSED void HouseScene_RunRepairMorning (void)
s32 Vale_Initialize (void)
 Arriving: play the roof mending (entrance 16) or its end (entrance 17, once), place the Nut and the movable object, and restore the paths' cells.
static void Event_GaretMeetsHisSister (void)
 Back from Kalay, Garet meets his sister.
static void Event_GaretAsksToProtectFamily (void)
 Back from Kalay, Garet asks a villager to protect his family.
static UNUSED void FieldScene_RunCompanionActorSequence (void)
static s32 Runtime_ComputeFixedPointDistance (s32 *first_position, s32 *second_position)
static s32 Vale_TestFacing (struct FieldActor *obj, struct FieldActor *target, s32 range, s32 force)
static void Event_PushObject (void)
 Pushing the movable object (actor 20; 21 after Kalay) moves it a cell.
static void Event_SearchTheLockedDoor (void)
 Tells the player that this door will not open.

Variables

s32 gStagedActor_DirectionSteps []
 Pixel step by direction: X in the upper halfword, Z in the lower.
u32 gStagedActor_FootprintKinds []
s32 gStagedActor_FootprintBounds []
s32 gValeActor22Actions []
s32 gLeaderHammerAction []
s32 gGaretAction []
s32 gJennaAction []
s32 gVillagerAction []
s32 gDustBurstScript []
struct SceneEntrance gVale_Entrances []
u32 gVale_Exits []
struct ScenePlacement gVale_Placements []
struct ScenePlacement gVale_PlacementsAfterLeaving []
struct ScenePlacement gVale_PlacementsAfterKalay []
struct ScenePlacement gVale_RepairPlacements []
struct SceneEvent gVale_Events []
struct SceneEvent gVale_EventsAfterLeaving []
struct SceneEvent gVale_EventsAfterKalay []
u16 gValeCellAnimC []
u16 gValeCellAnimA []
u16 gValeCellAnimB []
u16 gValeCellAnimD []
s32 gValeLeaderWalkActions []
s32 gValeActor22WalkActions []
s32 gValePairTableA []
s32 gValePairTableB []
s32 gValePairTableC []
s32 gValePairTableD []

Detailed Description

Vale's plaza and the paths around it in daytime: the game opens here three years after the storm with Isaac mending his roof (entrances 16 and 17), and the villagers talk of the story before the party leaves, after it has left and after its return from Kalay.

FLAG_SCENE_TEMP_02: the roof has just been mended. FLAG_SCENE_TEMP_04: Isaac is in the northern passage. FLAG_SCENE_TEMP_10: the upper path's cells are in place. FLAG_SCENE_TEMP_41: the villager watching Isaac is paused. Group flags 0x303 and 0x304: Garet has talked with his sister and with the villager he asks to protect his family. 0x305: set by an unused scene. 0x307: a villager asked about the lack of travelers. 0x308: the roof-mending end has played. 0x314 to 0x316: the movable object's column.

Definition in file vale.c.

Macro Definition Documentation

◆ VALE_GARET_REUNION_Z

#define VALE_GARET_REUNION_Z   827

Definition at line 61 of file vale.c.

Referenced by Event_RoofMended().

◆ VALE_SOUTH_VILLAGER_Z

#define VALE_SOUTH_VILLAGER_Z   889

Definition at line 67 of file vale.c.

◆ DIRECTION_STEP

#define DIRECTION_STEP ( dx,
dz )
Value:
(((dx) << 16) | ((dz) & 0xffff))

Pixel step by direction: X in the upper halfword, Z in the lower.

Definition at line 2847 of file vale.c.

Enumeration Type Documentation

◆ HouseActor

enum HouseActor
Enumerator
ACTOR_BOARD 
ACTOR_LAST_BOARD 

Definition at line 105 of file vale.c.

◆ anonymous enum

anonymous enum
Enumerator
ANIM_HAMMER 

Definition at line 107 of file vale.c.

Function Documentation

◆ Vale_HaveJennaStopTheAlephDetour()

void Vale_HaveJennaStopTheAlephDetour ( void )
static

Brings Jenna out to remind Isaac that Kraden is waiting.

Definition at line 383 of file vale.c.

Referenced by Event_ApproachMtAleph(), and Vale_HaveJennaStopTheAlephDetour().

◆ Vale_AskAboutSneakingToAleph()

void Vale_AskAboutSneakingToAleph ( const s32 * leaderActions,
const s32 * villagerActions )
static

Asks about the Aleph detour, then resumes each actor's response actions.

Definition at line 570 of file vale.c.

Referenced by Event_RepeatMtAlephWarningAtEitherPause(), Event_RepeatMtAlephWarningFromFirstApproach(), Event_RepeatMtAlephWarningFromSecondApproach(), and Vale_AskAboutSneakingToAleph().

◆ Vale_MoveActorAlongLowerZPath()

void Vale_MoveActorAlongLowerZPath ( s32 actorId,
s32 approachAnimationId,
s32 departureAnimationId,
s32 resumeMotion )
static

Traverses the passage toward lower Z, changing animations at its lip.

Definition at line 1489 of file vale.c.

Referenced by Event_EnterNorthernPassage(), Event_RoofMended(), HouseScene_RunRepairMorning(), and Vale_MoveActorAlongLowerZPath().

◆ Vale_MoveActorAlongHigherZPath()

void Vale_MoveActorAlongHigherZPath ( s32 actorId,
s32 approachAnimationId,
s32 departureAnimationId,
s32 resumeMotion )
static

Traverses the passage toward higher Z and restores falling motion if requested.

Definition at line 1525 of file vale.c.

Referenced by Event_ReturnThroughSouthernPassage(), Event_RoofMended(), HouseScene_RunRepairMorning(), and Vale_MoveActorAlongHigherZPath().

◆ SceneActor_ResetActorRun()

void SceneActor_ResetActorRun ( s32 first,
u32 count,
s32 mode )
static

Resets consecutive repair actors to their staging position or hides them.

Definition at line 1560 of file vale.c.

Referenced by HouseScene_RunRepairMorning(), and SceneActor_ResetActorRun().

◆ Event_MendingTheRoof()

void Event_MendingTheRoof ( void )
static

Arriving by entrance 16, the game's opening: Isaac is mending the roof.

"Three years later... Isaac! Haven't you finished mending the roof yet?"

Definition at line 1586 of file vale.c.

Referenced by Event_MendingTheRoof(), and Vale_Initialize().

◆ Event_RoofMended()

void Event_RoofMended ( void )
static

Arriving by entrance 17 after the opening: Dora praises the mended roof.

"Good job, Isaac. You patched it nicely."

Definition at line 1901 of file vale.c.

Referenced by Event_RoofMended(), and Vale_Initialize().

◆ Vale_UpdateGaretPaletteAndEffects()

void Vale_UpdateGaretPaletteAndEffects ( void )
static

Cycles palettes on Garet and periodically spawns attached effects.

Definition at line 2528 of file vale.c.

Referenced by Event_MendingTheRoof(), and Vale_UpdateGaretPaletteAndEffects().

◆ Vale_UpdateLeaderPaletteAndEffects()

void Vale_UpdateLeaderPaletteAndEffects ( void )
static

Cycles the leader palette and periodically spawns attached effects.

Definition at line 2533 of file vale.c.

Referenced by Event_RoofMended(), and Vale_UpdateLeaderPaletteAndEffects().

◆ Vale_CycleVillagerNinePalette()

void Vale_CycleVillagerNinePalette ( void )
static

Cycles actor 9 palette during the repair scene.

Definition at line 2538 of file vale.c.

Referenced by Event_MendingTheRoof(), and Vale_CycleVillagerNinePalette().

◆ Vale_CycleFirstBoardPalette()

void Vale_CycleFirstBoardPalette ( void )
static

Cycles the first board palette while its repair effect runs.

Definition at line 2543 of file vale.c.

Referenced by Event_RoofMended(), and Vale_CycleFirstBoardPalette().

◆ Vale_CycleSecondBoardPalette()

void Vale_CycleSecondBoardPalette ( void )
static

Cycles the second board palette while its repair effect runs.

Definition at line 2548 of file vale.c.

Referenced by Event_RoofMended(), and Vale_CycleSecondBoardPalette().

◆ Vale_CycleActor25Palette()

void Vale_CycleActor25Palette ( void )
static

Cycles actor 25 palette during the repair scene.

Definition at line 2553 of file vale.c.

Referenced by Event_RoofMended(), and Vale_CycleActor25Palette().

◆ Vale_HaveVillagerWatchTheLeader()

s32 Vale_HaveVillagerWatchTheLeader ( union FieldObject * fieldObject)
static

◆ Effect_ConfigureSpawnedParticle()

void Effect_ConfigureSpawnedParticle ( union FieldObject * fieldObject)
static

Emits one dust particle below the moving source actor.

Definition at line 2636 of file vale.c.

Referenced by Effect_ConfigureSpawnedParticle(), and Event_MendingTheRoof().

◆ Effect_SpawnRisingDustBurst()

void Effect_SpawnRisingDustBurst ( struct FieldActor * emitter)
static

Shrinks and raises the emitter, scatters dust, then clears its motion targets.

Definition at line 2669 of file vale.c.

Referenced by Effect_SpawnRisingDustBurst(), and Event_MendingTheRoof().

◆ Effect_UpdateParticlePosition()

void Effect_UpdateParticlePosition ( struct FieldActor * particle,
s32 distance,
s32 angle )
static

Moves a particle outward in the horizontal plane without changing its height.

Definition at line 2719 of file vale.c.

Referenced by Effect_SpawnRisingDustBurst(), and Effect_UpdateParticlePosition().

◆ Event_SettleMovedObject()

void Event_SettleMovedObject ( void )
static

After Move or a push, record the object's column in group flags 0x314 to 0x316 and block the cell it now stands on.

Definition at line 2746 of file vale.c.

Referenced by Event_PushObject(), Event_SettleMovedObject(), and Vale_Initialize().

◆ Effect_PlayStepSound()

void Effect_PlayStepSound ( void )
static

Definition at line 2773 of file vale.c.

Referenced by Effect_PlayStepSound(), and Event_RoofMended().

◆ Vale_SynchronizeAlephVillagerPause()

void Vale_SynchronizeAlephVillagerPause ( void )
static

Pauses the Aleph villager while the corresponding event flag is set.

Definition at line 2786 of file vale.c.

Referenced by Vale_Initialize(), and Vale_SynchronizeAlephVillagerPause().

◆ Vale_AdjustVillagerPriorityForLeaderHeight()

void Vale_AdjustVillagerPriorityForLeaderHeight ( void )
static

Keeps raised villager priority consistent with the leader height.

Definition at line 2804 of file vale.c.

Referenced by Vale_AdjustVillagerPriorityForLeaderHeight(), and Vale_Initialize().

◆ Vale_FlashActorAndSpawnEffects()

void Vale_FlashActorAndSpawnEffects ( struct FieldActor * actor)
static

Definition at line 2821 of file vale.c.

Referenced by Event_MendingTheRoof(), Event_RoofMended(), and Vale_FlashActorAndSpawnEffects().

◆ Vale_CycleActorPaletteAndSpawnEffects()

void Vale_CycleActorPaletteAndSpawnEffects ( struct FieldActor * actor)
static

◆ Vale_CycleActorPalette()

void Vale_CycleActorPalette ( struct FieldActor * actor)
static

◆ Vale_GetEntrances()

const struct SceneEntrance * Vale_GetEntrances ( void )

Definition at line 111 of file vale.c.

Referenced by Vale_GetEntrances().

◆ Vale_GetRegions()

const struct SceneRegion * Vale_GetRegions ( void )

Definition at line 113 of file vale.c.

Referenced by Vale_GetRegions().

◆ Vale_GetExits()

const u32 * Vale_GetExits ( void )

Definition at line 115 of file vale.c.

Referenced by Vale_GetExits().

◆ Vale_GetPlacements()

const struct ScenePlacement * Vale_GetPlacements ( void )

Places the villagers for the story so far, or for the roof repair (entrance 16).

Definition at line 119 of file vale.c.

Referenced by Vale_GetPlacements().

◆ Event_CatchNut()

void Event_CatchNut ( void )
static

Catch on the Nut hanging in the plaza: the party gets it.

Definition at line 131 of file vale.c.

◆ Event_CatchNutAfterKalay()

void Event_CatchNutAfterKalay ( void )
static

The same Nut after Kalay, where it is actor 20.

Definition at line 141 of file vale.c.

Referenced by Event_CatchNutAfterKalay().

◆ Vale_GetEvents()

const struct SceneEvent * Vale_GetEvents ( void )

The villagers talk of the story so far.

Definition at line 151 of file vale.c.

Referenced by Vale_GetEvents().

◆ Event_TalkAboutTheMayorAndTremors()

void Event_TalkAboutTheMayorAndTremors ( void )
static

Asks about the mayor before departure, or the tremors after returning.

Definition at line 160 of file vale.c.

Referenced by Event_TalkAboutTheMayorAndTremors().

◆ Event_WarnAboutGoingBeyondKradensCottage()

void Event_WarnAboutGoingBeyondKradensCottage ( void )
static

Warns about the mountain path, with a shorter repeat greeting.

Definition at line 174 of file vale.c.

Referenced by Event_WarnAboutGoingBeyondKradensCottage().

◆ Event_ArgueWithTheAngryVillager()

void Event_ArgueWithTheAngryVillager ( void )
static

A villager scolds Garet; afterwards the villager only threatens him.

"Garet, you make me so mad sometimes!"

Definition at line 195 of file vale.c.

Referenced by Event_ArgueWithTheAngryVillager().

◆ Event_TalkAboutTheWeather()

void Event_TalkAboutTheWeather ( void )
static

A villager talks of the weather, differently right after the roof repair.

Definition at line 219 of file vale.c.

Referenced by Event_TalkAboutTheWeather().

◆ Event_AskWhetherJennaHasReturned()

void Event_AskWhetherJennaHasReturned ( void )
static

Back from Kalay, a villager asks whether Jenna is back.

Definition at line 231 of file vale.c.

Referenced by Event_AskWhetherJennaHasReturned().

◆ Event_ReactToAnotherTremor()

void Event_ReactToAnotherTremor ( void )
static

Shakes the view before the villager reacts to another tremor.

Definition at line 241 of file vale.c.

Referenced by Event_ReactToAnotherTremor().

◆ Event_AskAboutTheLackOfTravelers()

void Event_AskAboutTheLackOfTravelers ( void )
static

Asks about the quiet roads after the eruption.

Definition at line 254 of file vale.c.

Referenced by Event_AskAboutTheLackOfTravelers().

◆ Event_SetPathCellOverride()

void Event_SetPathCellOverride ( void )
static

Walking onto the upper path: its collision cells change, remembered in FLAG_SCENE_TEMP_10.

Definition at line 267 of file vale.c.

Referenced by Event_SetPathCellOverride(), Event_SetPathCellOverride(), Vale_Initialize(), and ValeStorm_Initialize().

◆ Event_ClearPathCellOverride()

void Event_ClearPathCellOverride ( void )
static

Walking off the upper path restores its collision cells.

Definition at line 273 of file vale.c.

Referenced by Event_ClearPathCellOverride(), Event_ClearPathCellOverride(), and ValeStorm_ShowBoulderSweepingDownriver().

◆ Event_EnterSanctum()

void Event_EnterSanctum ( void )
static

Opens the sanctum door, walks inside and takes its scene exit.

Definition at line 279 of file vale.c.

Referenced by Event_EnterSanctum().

◆ Event_ApproachMtAleph()

void Event_ApproachMtAleph ( void )
static

The mountain path: Jenna stops Isaac until Kraden has planned the visit.

The path leads to Mt. Aleph; Jenna says "Kraden is waiting for us".

Definition at line 288 of file vale.c.

Referenced by Event_ApproachMtAleph().

◆ Event_LeaveByNorthPath()

void Event_LeaveByNorthPath ( void )
static

The northern path toward Kraden's cottage.

Definition at line 298 of file vale.c.

Referenced by Event_LeaveByNorthPath().

◆ Event_LeaveBySouthPath()

void Event_LeaveBySouthPath ( void )
static

The southern path toward Kraden's cottage.

Definition at line 304 of file vale.c.

Referenced by Event_LeaveBySouthPath().

◆ Event_LeaveTowardHome()

void Event_LeaveTowardHome ( void )
static

Leaves through the exit leading back to the house.

Definition at line 310 of file vale.c.

Referenced by Event_LeaveTowardHome().

◆ Event_EnterEastHouse()

void Event_EnterEastHouse ( void )
static

Animates the eastern house door before entering.

Definition at line 316 of file vale.c.

Referenced by Event_EnterEastHouse().

◆ Event_EnterCentralHouse()

void Event_EnterCentralHouse ( void )
static

Animates the central house door before entering.

Definition at line 324 of file vale.c.

Referenced by Event_EnterCentralHouse(), Event_EnterCentralHouse(), and Event_EnterCentralHouse().

◆ Event_EnterIsaacsHouse()

void Event_EnterIsaacsHouse ( void )
static

Isaac's house: after the party has left and before Kalay, Dora will not open.

"My Isaac would keep his promise... Go away."

Definition at line 333 of file vale.c.

Referenced by Event_EnterIsaacsHouse().

◆ Event_EnterSoutheastHouse()

void Event_EnterSoutheastHouse ( void )
static

Opens the southeastern door and enters its interior.

Definition at line 359 of file vale.c.

Referenced by Event_EnterSoutheastHouse(), Event_EnterSoutheastHouse(), and Event_EnterSoutheastHouse().

◆ Event_EnterFarSouthHouse()

void Event_EnterFarSouthHouse ( void )
static

Opens the far southern door and enters its interior.

Definition at line 367 of file vale.c.

Referenced by Event_EnterFarSouthHouse().

◆ Event_EnterSouthwestHouse()

void Event_EnterSouthwestHouse ( void )
static

Opens the southwestern door and enters its interior.

Definition at line 375 of file vale.c.

Referenced by Event_EnterSouthwestHouse().

◆ Event_WatchThePuppies()

void Event_WatchThePuppies ( void )
static

Pans down to the puppies and returns the camera to the leader.

Definition at line 423 of file vale.c.

Referenced by Event_WatchThePuppies().

◆ Event_TurnBackFromThePuppies()

void Event_TurnBackFromThePuppies ( void )
static

Shows the puppies message from the opposite approach.

Definition at line 471 of file vale.c.

Referenced by Event_TurnBackFromThePuppies().

◆ Event_EnterNorthernPassage()

void Event_EnterNorthernPassage ( void )
static

Changes the passage collision and moves through its northern end.

Definition at line 489 of file vale.c.

Referenced by Event_EnterNorthernPassage().

◆ Event_ReturnThroughSouthernPassage()

void Event_ReturnThroughSouthernPassage ( void )
static

Moves back through the passage and restores its collision attributes.

Definition at line 498 of file vale.c.

Referenced by Event_ReturnThroughSouthernPassage().

◆ Event_WarnAgainstSneakingUpMtAleph()

void Event_WarnAgainstSneakingUpMtAleph ( void )
static

A villager jumps out in front of Isaac, then keeps watching him.

"You're not planning on sneaking up to Mt. Aleph...?"

Definition at line 508 of file vale.c.

Referenced by Event_WarnAgainstSneakingUpMtAleph().

◆ Event_RepeatMtAlephWarningFromFirstApproach()

void Event_RepeatMtAlephWarningFromFirstApproach ( void )
static

Repeats the warning when the villager reaches the first pause.

Definition at line 560 of file vale.c.

Referenced by Event_RepeatMtAlephWarningFromFirstApproach().

◆ Event_RepeatMtAlephWarningFromSecondApproach()

void Event_RepeatMtAlephWarningFromSecondApproach ( void )
static

Repeats the warning when the villager reaches the second pause.

Definition at line 609 of file vale.c.

Referenced by Event_RepeatMtAlephWarningFromSecondApproach().

◆ Event_RepeatMtAlephWarningAtEitherPause()

void Event_RepeatMtAlephWarningAtEitherPause ( void )
static

Chooses the warning approach matching the current villager pause.

Definition at line 619 of file vale.c.

Referenced by Event_RepeatMtAlephWarningAtEitherPause().

◆ HouseScene_RunRepairMorning()

UNUSED void HouseScene_RunRepairMorning ( void )
static

Definition at line 632 of file vale.c.

Referenced by HouseScene_RunRepairMorning().

◆ Vale_Initialize()

s32 Vale_Initialize ( void )

Arriving: play the roof mending (entrance 16) or its end (entrance 17, once), place the Nut and the movable object, and restore the paths' cells.

Definition at line 1179 of file vale.c.

Referenced by Vale_Initialize().

◆ Event_GaretMeetsHisSister()

void Event_GaretMeetsHisSister ( void )
static

Back from Kalay, Garet meets his sister.

"Ah! It's been a while... You're back?" ("Sis...").

Definition at line 1302 of file vale.c.

Referenced by Event_GaretMeetsHisSister().

◆ Event_GaretAsksToProtectFamily()

void Event_GaretAsksToProtectFamily ( void )
static

Back from Kalay, Garet asks a villager to protect his family.

"WHATEVER YOU DO, you must protect the family while I'm gone."

Definition at line 1377 of file vale.c.

Referenced by Event_GaretAsksToProtectFamily().

◆ FieldScene_RunCompanionActorSequence()

UNUSED void FieldScene_RunCompanionActorSequence ( void )
static

Definition at line 1453 of file vale.c.

Referenced by FieldScene_RunCompanionActorSequence().

◆ Runtime_ComputeFixedPointDistance()

s32 Runtime_ComputeFixedPointDistance ( s32 * first_position,
s32 * second_position )
static

Definition at line 2557 of file vale.c.

Referenced by Runtime_ComputeFixedPointDistance(), and Vale_TestFacing().

◆ Vale_TestFacing()

s32 Vale_TestFacing ( struct FieldActor * obj,
struct FieldActor * target,
s32 range,
s32 force )
static

Definition at line 2569 of file vale.c.

Referenced by Vale_HaveVillagerWatchTheLeader(), and Vale_TestFacing().

◆ Event_PushObject()

void Event_PushObject ( void )
static

Pushing the movable object (actor 20; 21 after Kalay) moves it a cell.

Definition at line 2731 of file vale.c.

◆ Event_SearchTheLockedDoor()

void Event_SearchTheLockedDoor ( void )
static

Tells the player that this door will not open.

Definition at line 2779 of file vale.c.

Referenced by Event_SearchTheLockedDoor().

Variable Documentation

◆ gStagedActor_DirectionSteps

s32 gStagedActor_DirectionSteps[]
Initial value:
= {
DIRECTION_STEP(0, 16), DIRECTION_STEP(-16, 0), DIRECTION_STEP(-16, 0),
DIRECTION_STEP(-16, 0), DIRECTION_STEP(-16, 0), DIRECTION_STEP(0, -16),
DIRECTION_STEP(0, -16), DIRECTION_STEP(0, -16), DIRECTION_STEP(0, -16),
}
#define DIRECTION_STEP(dx, dz)
Pixel step by direction: X in the upper halfword, Z in the lower.

Pixel step by direction: X in the upper halfword, Z in the lower.

Definition at line 2849 of file vale.c.

◆ gStagedActor_FootprintKinds

u32 gStagedActor_FootprintKinds[]
Initial value:
= {
207, 205, 228, 229, 298, 297,
}

Definition at line 2859 of file vale.c.

◆ gStagedActor_FootprintBounds

s32 gStagedActor_FootprintBounds[]
Initial value:
= {
-32, -8, 32, 8,
-8, -32, 8, 32,
-32, -16, 32, 0,
-8, -32, 8, 32,
-32, -8, 32, 8,
-8, -32, 8, 32,
}

Definition at line 2863 of file vale.c.

◆ gValeActor22Actions

s32 gValeActor22Actions[]

◆ gLeaderHammerAction

s32 gLeaderHammerAction[]
Initial value:
= {
SC_WAIT(12),
SC_SET(SW_SCALE_Y, 0x10000),
SC_WAIT(12),
}
#define SC_LABEL(n)
Branch destination.
Definition objcmd.h:11
#define SC_SET(w, v)
Write a work value.
Definition objcmd.h:37
#define SC_LOOP(n, to)
Repeat up to n times.
Definition objcmd.h:28
#define SC_FOREVER
Definition objcmd.h:14
#define SC_ADD(w, v)
Definition objcmd.h:38
#define SC_WAIT(n)
Wait n frames.
Definition objcmd.h:16
#define SC_TOP
Script start.
Definition objcmd.h:13
#define SC_END
Return to the main script.
Definition objcmd.h:32
@ SW_SCALE_Y
Definition objcmd.h:63

Definition at line 2961 of file vale.c.

Referenced by Event_MendingTheRoof(), Event_RoofMended(), and HouseScene_RunRepairMorning().

◆ gGaretAction

s32 gGaretAction[]
Initial value:
= {
SC_ARG(2),
SC_MOVE(PIXELS(300), 0, PIXELS(880)),
SC_MOVE(PIXELS(300), 0, PIXELS(904)),
SC_ARG(1),
SC_SET(SW_FACING, 0xd000),
}
#define PIXELS(value)
#define SC_SYNC
Wait for arrival.
Definition objcmd.h:17
#define SC_ARG(v)
Definition objcmd.h:44
#define SC_MOVE(x, y, z)
Move toward the target.
Definition objcmd.h:19
@ SW_FACING
Definition objcmd.h:57

Definition at line 2971 of file vale.c.

Referenced by Event_RoofMended(), and HouseScene_RunRepairMorning().

◆ gJennaAction

s32 gJennaAction[]
Initial value:
= {
SC_ARG(2),
SC_MOVE(PIXELS(300), 0, PIXELS(904)),
SC_MOVE(PIXELS(321), 0, PIXELS(904)),
SC_ARG(1),
SC_SET(SW_FACING, 0xd000),
}

Definition at line 2982 of file vale.c.

Referenced by Event_RoofMended(), and HouseScene_RunRepairMorning().

◆ gVillagerAction

s32 gVillagerAction[]
Initial value:
= {
SC_ARG(1),
SC_POS(PIXELS(266), 0, PIXELS(1230)),
SC_SET(SW_SCALE_X, 0x1999),
SC_SET(SW_SCALE_Y, 0x1999),
SC_WAIT(1),
SC_ADD(SW_SCALE_Y, 0x147a),
SC_WAIT(1),
SC_LOOP(24, SC_TO(1)),
SC_POS(0, 0, 0),
SC_WAIT(1),
}
#define SC_POS(x, y, z)
Set position.
Definition objcmd.h:18
#define SC_TO(n)
Definition objcmd.h:12
@ SW_SCALE_X
Definition objcmd.h:62

Definition at line 2993 of file vale.c.

Referenced by FieldScene_RunCompanionActorSequence().

◆ gDustBurstScript

s32 gDustBurstScript[]
Initial value:
= {
SC_SET(SW_SPEED, 0x1000),
SC_ARG(0),
SC_WAIT(10),
}
#define SC_FREE
Release.
Definition objcmd.h:43
@ SW_SPEED
Definition objcmd.h:67

Definition at line 3009 of file vale.c.

Referenced by Effect_ConfigureSpawnedParticle(), and Effect_SpawnRisingDustBurst().

◆ gVale_Entrances

struct SceneEntrance gVale_Entrances[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 167, 0, 1281, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 1, CONDITION_ALWAYS, 256, 0, 440, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 2, CONDITION_ALWAYS, 113, 0, 303, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 3, CONDITION_ALWAYS, 38, 0, 636, FACING_EAST, 0, -1, -1, -1, -1, 0 },
{ 4, CONDITION_ALWAYS, 29, 0, 792, FACING_EAST, 0, -1, -1, -1, -1, 0 },
{ 5, CONDITION_ALWAYS, 458, 0, 1393, FACING_WEST, 0, -1, -1, -1, -1, 0 },
{ 6, CONDITION_ALWAYS, 406, 0, 743, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 7, CONDITION_ALWAYS, 262, 0, 821, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 8, CONDITION_ALWAYS, 340, 0, 904, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 9, CONDITION_ALWAYS, 326, 0, 1142, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 10, CONDITION_ALWAYS, 374, 0, 1254, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 11, CONDITION_ALWAYS, 102, 0, 1222, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 16, CONDITION_ALWAYS, 400, 0, 852, FACING_NORTH, 0, -1, -1, -1, -1, 0 },
{ 17, CONDITION_ALWAYS, 400, 0, 852, FACING_NORTH, 0, -1, -1, -1, -1, 0 },
}
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44
@ FACING_EAST
Definition field_scene.h:26
@ FACING_NORTH
Definition field_scene.h:32
@ FACING_SOUTH
Definition field_scene.h:28
@ FACING_WEST
Definition field_scene.h:30

Definition at line 3018 of file vale.c.

Referenced by Vale_GetEntrances().

◆ gVale_Exits

u32 gVale_Exits[]
Initial value:
= {
SCENE_EXIT(1, 19, 1),
SCENE_EXIT(2, 5, 8),
SCENE_EXIT(3, 6, 1),
SCENE_EXIT(4, 6, 2),
SCENE_EXIT(5, 7, 6),
SCENE_EXIT(6, 7, 5),
SCENE_EXIT(7, 8, 6),
SCENE_EXIT(8, 7, 2),
SCENE_EXIT(9, 7, 1),
SCENE_EXIT(10, 7, 2),
SCENE_EXIT(11, 9, 1),
SCENE_EXIT(12, 4, 17),
}
#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 3036 of file vale.c.

Referenced by Vale_GetExits().

◆ gVale_Placements

struct ScenePlacement gVale_Placements[]

Definition at line 3053 of file vale.c.

Referenced by Vale_GetPlacements().

◆ gVale_PlacementsAfterLeaving

struct ScenePlacement gVale_PlacementsAfterLeaving[]

Definition at line 3099 of file vale.c.

Referenced by Vale_GetPlacements().

◆ gVale_PlacementsAfterKalay

struct ScenePlacement gVale_PlacementsAfterKalay[]

Definition at line 3145 of file vale.c.

Referenced by Vale_GetPlacements().

◆ gVale_RepairPlacements

struct ScenePlacement gVale_RepairPlacements[]
Initial value:

Definition at line 3179 of file vale.c.

Referenced by Vale_GetPlacements().

◆ gVale_Events

struct SceneEvent gVale_Events[]

Definition at line 3201 of file vale.c.

Referenced by Vale_GetEvents().

◆ gVale_EventsAfterLeaving

struct SceneEvent gVale_EventsAfterLeaving[]

Definition at line 3242 of file vale.c.

Referenced by Vale_GetEvents().

◆ gVale_EventsAfterKalay

struct SceneEvent gVale_EventsAfterKalay[]

Definition at line 3292 of file vale.c.

Referenced by Vale_GetEvents().

◆ gValeCellAnimC

u16 gValeCellAnimC[]
Initial value:
= {
MAP_CELL_STEP(0, 98, 2, 2, 2),
MAP_CELL_STEP(2, 98, 2, 2, 2),
}
#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 3340 of file vale.c.

Referenced by Event_EnterSanctum().

◆ gValeCellAnimA

u16 gValeCellAnimA[]
Initial value:
= {
MAP_CELL_STEP(0, 96, 2, 2, 2),
MAP_CELL_STEP(2, 96, 2, 2, 2),
}

Definition at line 3346 of file vale.c.

Referenced by Event_EnterEastHouse(), Event_EnterIsaacsHouse(), and Event_EnterSouthwestHouse().

◆ gValeCellAnimB

u16 gValeCellAnimB[]
Initial value:
= {
MAP_CELL_STEP(4, 98, 2, 2, 2),
MAP_CELL_STEP(4, 98, 2, 2, 2),
}

Definition at line 3352 of file vale.c.

Referenced by Event_EnterCentralHouse(), and Event_EnterSoutheastHouse().

◆ gValeCellAnimD

u16 gValeCellAnimD[]
Initial value:
= {
MAP_CELL_STEP(4, 96, 2, 2, 2),
MAP_CELL_STEP(4, 96, 2, 2, 2),
}

Definition at line 3358 of file vale.c.

Referenced by Event_EnterFarSouthHouse().

◆ gValeLeaderWalkActions

s32 gValeLeaderWalkActions[]
Initial value:
= {
SC_ARG(5), SC_MOVE(PIXELS(199), 0, PIXELS(446)),
SC_SYNC, SC_MOVE(PIXELS(215), 0, PIXELS(472)),
SC_SYNC, SC_MOVE(PIXELS(239), 0, PIXELS(461)),
}

Definition at line 3364 of file vale.c.

Referenced by Event_WarnAgainstSneakingUpMtAleph().

◆ gValeActor22WalkActions

s32 gValeActor22WalkActions[]
Initial value:
= {
SC_ARG(2), SC_MOVE(PIXELS(199), 0, PIXELS(446)),
SC_SYNC, SC_MOVE(PIXELS(215), 0, PIXELS(472)),
SC_SYNC, SC_MOVE(PIXELS(239), 0, PIXELS(461)),
}

Definition at line 3372 of file vale.c.

Referenced by Event_WarnAgainstSneakingUpMtAleph().

◆ gValePairTableA

s32 gValePairTableA[]
Initial value:
= {
SC_SET(SW_SPEED, 0x20000),
SC_SET(SW_ACCEL, 0x20000),
SC_ARG(5),
SC_MOVE(PIXELS(224), 0, PIXELS(458)),
SC_MOVE(PIXELS(256), 0, PIXELS(458)),
SC_MOVE(PIXELS(256), 0, PIXELS(474)),
SC_ARG(1),
SC_WAIT(5),
SC_WAIT(5),
}
@ FACING_NORTHWEST
Definition field_scene.h:31
@ SW_ACCEL
Definition objcmd.h:68

Definition at line 3380 of file vale.c.

Referenced by Event_RepeatMtAlephWarningFromFirstApproach().

◆ gValePairTableB

s32 gValePairTableB[]
Initial value:
= {
SC_SET(SW_SPEED, 0x18000),
SC_SET(SW_ACCEL, 0x10000),
SC_ARG(2),
SC_MOVE(PIXELS(216), 0, PIXELS(458)),
SC_MOVE(PIXELS(256), 0, PIXELS(456)),
SC_ARG(1),
SC_WAIT(5),
SC_WAIT(5),
}
@ FACING_SOUTHEAST
Definition field_scene.h:27

Definition at line 3398 of file vale.c.

Referenced by Event_RepeatMtAlephWarningAtEitherPause(), and Event_RepeatMtAlephWarningFromFirstApproach().

◆ gValePairTableC

s32 gValePairTableC[]

◆ gValePairTableD

s32 gValePairTableD[]