31#include "text/msg_ids.h"
132 actor->
timer = countdown;
134 actor->
timer = countdown - 1;
581 message = MsgValeKyleAbleStop;
663 rockSprite = rock->sprite;
810 u16 priority = leader->sprite->image.priority;
914 if (leader->
z.
fixed <= 0x479ffff) {
961 message = MsgValeHuh;
1040 s32 agreedToLeaveBelongings;
1044 agreedToLeaveBelongings = 0;
1047 agreedToLeaveBelongings = 1;
1060 if (agreedToLeaveBelongings != 0) {
1070 leader->
z.
part.pixel);
1088 message = MsgValeHey;
1118 actor->
z.
part.pixel);
1137 if (initialLeader !=
NULL) {
1157 leader->
z.
part.pixel);
1174 if (leaderAtStart != 0) {
1191 if (leaderAtEnd != 0) {
1193 leaderAtEnd->
z.
part.pixel);
1222 if (actor !=
NULL) {
1258 for (i = 0; i < 40; i++) {
1279 movingActor->
y.
fixed = boulderHeight;
1280 movingActor->
targetY = boulderHeight;
1359 if (movingActor != 0) {
1361 movingActor->
z.
part.pixel);
1380 s32 animationParameter = mode - 1;
1383 animationParameter =
1390 s32 remainingEntries = count;
1394 entry->
param = animationParameter;
1397 }
while (remainingEntries != 0);
1399 animation->
dirty = 1;
1421 const s32 *pulseScript;
1436 actor->
timer = pulseDelay;
1449 actor->
timer = pulseDelay;
1460 actor->
timer = pulseDelay;
1733 northMessage = MsgValeGoLookNorth;
1766 helpMessage = MsgValeDontSupposeTwo;
1794 if (leader !=
NULL) {
1796 leader->
z.
part.pixel);
1805 const s32 *pulseScript;
1830 villager->
timer = pulseDelay;
1843 s32 automaticPriority;
1871 sprite = actor->sprite;
1875 sprite = leader->sprite;
1955 s32 horizontalPosition,
1956 s32 groundPosition) {
1957 object->x.fixed = horizontalPosition;
1958 object->y.fixed = horizontalPosition;
1959 object->targetX = horizontalPosition;
1960 object->targetY = horizontalPosition;
1961 object->z.fixed = groundPosition;
1962 object->targetZ = groundPosition;
1982 const s32 *entryActions;
1983 s32 stoppedVelocity;
1985 const s32 *lookAroundActions;
1987 const s32 *departureActions;
1991 actorVisual = actor->sprite;
1992 groupVisual = groupActor->sprite;
2036 lookingActor->
timer = random;
2037 stoppedVelocity = 0;
2087 groupActor->
scaleX = 0xcccc;
2088 groupActor->
scaleY = 0xcccc;
2102 currentActor->
velocityX = stoppedVelocity;
2104 currentActor->
velocityY = stoppedVelocity;
2106 currentActor->
velocityZ = stoppedVelocity;
2123 }
while ((
s16)actor->
work != 8);
2145 groupActor->
scaleX = 0x14000;
2146 groupActor->
scaleY = 0x14000;
2148 groupVisual->
scale = 0x14000;
2151 actor->
x.
fixed = resetValue;
2152 actor->
z.
fixed = resetValue;
2192 groupVisual = groupActor->sprite;
2196 groupActor->
facing = 0xd000;
2200 groupVisual = groupActor->sprite;
2204 groupActor->
facing = 0xb000;
2208 groupVisual = groupActor->sprite;
2212 groupActor->
facing = 0xb000;
2216 groupVisual = groupActor->sprite;
2353 sprite = glow->sprite;
2354 timer = &source->
timer;
2615 for (i = 0; i < 2; ++i) {
2621 sprite =
child->sprite;
2622 child->motionFlags = 0;
2624 child->linkedObject = parent;
2625 if (sprite !=
NULL) {
2644 effect->
update = Effect_AnimateVerticalNegative;
2645 effectSprite->
image.
priority = parent->sprite->image.priority;
2651 effectSprite->
image.
priority = parent->sprite->image.priority;
2652 effect->
update = Effect_AnimateVerticalPositive;
2935 {0,
CONDITION_ALWAYS, 167, 0, 1281,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
2936 {1,
CONDITION_ALWAYS, 257, 0, 456,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
2937 {2,
CONDITION_ALWAYS, 113, 0, 303,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
2938 {3,
CONDITION_ALWAYS, 27, 0, 621,
FACING_EAST, 0, -1, -1, -1, -1, 0},
2939 {4,
CONDITION_ALWAYS, 29, 0, 792,
FACING_EAST, 0, -1, -1, -1, -1, 0},
2940 {5,
CONDITION_ALWAYS, 458, 0, 1393,
FACING_WEST, 0, -1, -1, -1, -1, 0},
2941 {6,
CONDITION_ALWAYS, 406, 0, 743,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
2942 {7,
CONDITION_ALWAYS, 262, 0, 821,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
2943 {8,
CONDITION_ALWAYS, 340, 0, 904,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
2944 {9,
CONDITION_ALWAYS, 326, 0, 1142,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
2945 {10,
CONDITION_ALWAYS, 374, 0, 1254,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
2946 {11,
CONDITION_ALWAYS, 102, 0, 1222,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
2947 {12,
CONDITION_ALWAYS, 101, 0, 1216,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
2948 {13,
CONDITION_ALWAYS, 146, 0, 1193,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
2949 {15,
CONDITION_ALWAYS, 335, 0, 908,
FACING_NORTH, 0, -1, -1, -1, -1, 0},
2950 {16,
CONDITION_ALWAYS, 181, 0, 1273,
FACING_NORTHEAST, 0, -1, -1, -1, -1,
3051 MSGNO(MsgValeHangOnFelixHelpIsOn)},
3053 MSGNO(MsgValeDontLetGoFelix)},
3056 MSGNO(MsgValeMomDadFelixPleaseDontLeave)},
void Object_RefreshSelectorById(u32 objectId)
Waits, at most 300 frames, for an actor's script to reach its end (command 0x10).
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
Animated sprites: their layers, frames and colour modes, and the resource slots they draw from.
B5Context, the object context a battle routine reads; most of its fields are still unnamed.
s32 Object_InitializeMode(struct AnimationObject *state, s32 flags)
Calls through a function pointer, by argument count.
The task scheduler: tasks, their order and the scheduler's state.
void(*) SchedulerCallback(void)
struct FieldActor * Camera_GetEventObject(void)
The event command "get view centre": returns the camera object.
The engine calls the debug menus import, and their palette swatch tiles.
static s32 FieldScheduler_AddCallback(SchedulerCallback callback, s32 priority)
Registers a main-image scheduler callback.
Field effects, their scripts and the flags that spawn them.
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
#define SPEAKER_PORTRAIT_LEFT
u32 Math_RemainderUnsigned(u32 dividend, u32 divisor)
static s32 Event_OpenMessage(s32 speaker, s32 flags)
void Engine_ActorFaceActor(s32 actor, s32 target, s32 frames)
static void Actor_SetDestination(s32 actor, s32 x, s32 z)
static void Actor_FaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_ActorSetAnimationAndWait(s32 actor, s32 animation)
static void Map_AnimateCells(const u16 *steps, s32 destX, s32 destY)
#define SPEAKER_WINDOW_ABOVE
void Engine_ActorSetSpritePriority(s32 actor, s32 priority)
static void Event_ShowMessageAndWait(s32 speaker, s32 flags, s32 frames)
s32 Engine_EventChooseYesNo(s32 actor, s32 flags)
void Engine_MessageShowCentered(s32 message, s32 flags)
void Engine_ObjectSetPartPalettes(struct FieldActor *object, s32 palette)
void Engine_EventShowMessageAndWait(s32 speaker, s32 flags, s32 frames)
#define SPEAKER_PORTRAIT_RIGHT
void Engine_CameraSetSpeed(s32 speed, s32 acceleration)
static void Actor_WalkToAndWait(s32 actor, s32 x, s32 z)
static void Camera_SetSpeed(s32 speed, s32 acceleration)
void Engine_CameraMoveTo(s32 fixed_x, s32 fixed_y, s32 fixed_z, s32 pan)
void Engine_ActorJump(s32 actor, s32 height, s32 frames)
static void Actor_MoveToAndWait(s32 actor, s32 x, s32 z)
#define MAP_CELL_STEP(srcX, srcY, width, height, frames)
void Engine_ActorSetSpeed(s32 actor, s32 speed, s32 acceleration)
void Engine_ActorFaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_ActorSetDestination(s32 actor, s32 x, s32 z)
static void Actor_RunActionScriptAndWait(s32 actor, const s32 *script)
Runs a script, waiting at most 300 frames for its final command.
static void Map_CopyCellsTo(s32 srcX, s32 srcY, s32 destX, s32 destY, s32 width, s32 height)
void Engine_ActorWalkToAndWait(s32 actor, s32 x, s32 z)
static void Actor_FaceActor(s32 actor, s32 target, s32 frames)
#define SPEAKER_WINDOW_BELOW
static void ColorBuffer_ApplyTarget(s32 value, s32 mode)
static void Actor_WalkTo(s32 actor, s32 x, s32 z)
void Engine_EventWaitForScreen(void)
void Engine_ActorDestroy(s32 actor)
static void Actor_ShowEmote(s32 actor, s32 emote, s32 frames)
void Engine_EventOpenScreen(void)
s32 Engine_EventOpenMessage(s32 speaker, s32 flags)
void Engine_MapWaitWorkValuesBelow256(void)
void Engine_GameFlagSet(s32 flag)
void Engine_GameFlagClear(s32 flag)
void Engine_CameraWaitForMove(void)
static void Actor_SetActionScript(s32 actor, const s32 *script)
The engine encodes either a built-in action or an action-script address.
void Engine_ActorWaitForMove(s32 actor)
static void Map_CopyCellAttributes(s32 srcX, s32 srcY, s32 width, s32 height, s32 destX, s32 destY)
void Engine_ActorStop(s32 actor)
void Engine_ActorRunRepeatedMotion(s32 actor, s32 repeats)
void Engine_ActorWalkTo(s32 actor, s32 x, s32 z)
static void Event_ShowMessage(s32 speaker, s32 flags)
void Engine_ActorSetAttachedEffect(s32 actor, s32 effect)
static void Event_PlayCue(s32 cue)
static void Map_SetShake(s32 horizontal, s32 vertical, s32 decay)
Sets shake amplitudes in fixed-point pixels and the per-frame decay factor.
#define MAP_CELL_STEPS_END
static void Actor_SetChildValue(s32 actor, s32 value)
s32 Engine_GameFlagIsSet(s32 flag)
void Engine_MapAnimateCells(const u16 *steps, s32 destX, s32 destY)
void Engine_ActorStartRepeatedMotion(s32 actor, s32 repeats)
static s32 Event_AskYesNo(s32 speaker, s32 flags)
static void Actor_SetSpeed(s32 actor, s32 speed, s32 acceleration)
void Engine_MapRedraw(void)
static s32 Random_Next(void)
void Engine_ColorBufferInterpolate(s32 frames)
static void Camera_MoveTo(s32 fixed_x, s32 fixed_y, s32 fixed_z, s32 pan)
static void Actor_SetPosition(s32 actor, s32 fixed_x, s32 fixed_z)
void Engine_ActorFaceEachOther(s32 actor, s32 other, s32 frames)
void Engine_EventWait(s32 frames)
static void Actor_SetAttachedEffect(s32 actor, s32 effect)
static struct FieldActor * Actor_Get(s32 actor)
Field objects and actors, and the scene transition styles.
@ TRANSITION_BACKDROP_FADE
@ ACTOR_PRIORITY_UNDERFOOT
The depth sort treats it as 320 pixels higher on the screen.
@ ACTOR_PRIORITY_AUTOMATIC
The sprite takes its priority from the map cell under it.
#define ACTOR_NO_TARGET
A target coordinate that is not set: the object has no target.
#define SCENE_TRANSITION(style, variant)
@ ACTOR_FACES_MOTION
turns toward its velocity, 1/16 turn a frame
The scene table formats: entrances, exits, placements and events, and the macros that write them.
#define SCENE_EXITS(scene)
#define SCENE_EXIT(exit, scene, entrance)
#define EVENT_SCRIPT(script)
#define TOUCH_WALKING_INTO(facing)
#define PLACEMENT_SHARE_PREVIOUS_SPRITE
The scene service layer: one typed inline for each engine service a scene calls by its own name,...
static void Task_Wait(s32 frames)
static void Actor_Stop(s32 actor)
static void Actor_SetSpriteFlags(struct FieldActor *actor, s32 flags)
static void Actor_SetAnimation(s32 actor, s32 animation)
static void Event_Wait(s32 frames)
static s32 FieldScheduler_AddOrUpdateCallback(SchedulerCallback callback, s32 priority)
Calls the main-image scheduler through engine_call.h.
static void Actor_FaceEachOther(s32 actor, s32 other, s32 frames)
16.16 fixed-point constants, sine and cosine, and the library division.
#define Q16_ONE
One in the engine's signed 16.16 fixed-point format.
Game flags, named where their meaning is shown.
#define FLAG_SCENE_TEMP_05
#define FLAG_SHOW_LOCATION_NAME
#define FLAG_VALE_STORM_SECOND_ROCK_FELL
#define FLAG_VALE_STORM_RIVER_GATHERING_SEEN
Jenna came back to the river and the scene there ended with ValeStorm_ShowBoulderSweepingDownriver.
#define FLAG_VALE_STORM_FOURTH_ROCK_FELL
#define FLAG_VALE_STORM_HEARD_GARET
Isaac heard Garet struggling with his things.
#define FLAG_VALE_STORM_FIRST_ROCK_FELL
The four rocks that fall across the paths (actors 11 to 14).
#define FLAG_VALE_STORM_GARET_JOINED
#define FLAG_VALE_STORM_THIRD_MONSTER_FOUGHT
#define FLAG_VALE_STORM_MONSTER_FOUGHT
A monster was fought on the stormy night: Vale's music changes (song 23).
#define FLAG_VALE_BOULDER_FELL
#define FLAG_SCENE_TEMP_06
#define FLAG_VALE_STORM
The prologue's stormy night: lightning over Vale, the rockslide and the monsters loose in the village...
#define FLAG_KEEP_PARTY_POSITION
#define FLAG_VALE_STORM_BUMPED_INTO_VILLAGER
A villager running out of his house shoved Isaac.
#define FLAG_SCENE_TEMP_10
#define FLAG_VALE_STORM_GARET_LEFT
Garet ran off, leaving Isaac alone. "Isaac!".
#define FLAG_VALE_STORM_THIRD_ROCK_FELL
#define FLAG_VALE_STORM_SENT_TO_AID_ELDERS
On the stormy night, the villagers sent Isaac to aid the elders holding back the Boulder.
#define FLAG_VALE_STORM_SAW_RIVER_RESCUE
Isaac saw the villagers trying to pull Felix from the river.
#define FLAG_VALE_STORM_FOURTH_MONSTER_FOUGHT
#define FLAG_VALE_STORM_SENT_TO_PLAZA
Dora and Kyle sent Isaac to the plaza.
volatile u32 gFrameCount
Frames WaitFrames has finished.
BattleFxScene, the work of a battle or field Psynergy effect scene, and its arc objects.
GameState, the game's state: play time, coins, the scene and the leader's position,...
struct GameState gGameState
The work slots of gWorkSlot, read through their own names.
void * gEffectWork
Slot 56: points to a scene-specific structure.
The screen blend's globals and the graphics routines.
The main-image routines scene overlays import.
void Effect_SoundAndFlash(void)
void Map_SetLayerEntryFlag(u32 channelIndex)
Pauses tile animation channel channelIndex by setting its paused byte.
void Map_ClearLayerEntryFlag(u32 channelIndex)
Resumes tile animation channel channelIndex by clearing its paused byte.
The reel game's title lettering.
Field object scripts: one s32 command word, then its operands, as gScriptObject_CommandTable runs the...
#define SC_LABEL(n)
Branch destination.
#define SC_SET(w, v)
Write a work value.
#define SC_LOOP(n, to)
Repeat up to n times.
#define SC_POS(x, y, z)
Set position.
#define SC_SYNC
Wait for arrival.
#define SC_SE(n)
Sound effect.
#define SC_MOVE(x, y, z)
Move toward the target.
#define SC_WAIT(n)
Wait n frames.
#define SC_TOP
Script start.
#define SC_END
Return to the main script.
void Party_RemoveOwnerRestored(s32 unit)
Takes unit out of the party, fully restoring its HP and PP and curing its poison.
void Event_CallWithLastActiveObjectId(struct ScenePlacement *table)
Spawns the actors of a placement table after the last actor in use.
void Event_PrepareObjectAndApplyValue(s32 unit, s32 announce)
Adds unit to the party.
static s32 Scene_SquashAndStretch(struct ScriptInterpreter *interpreter)
An object script call, each frame: every 60 to 149 frames the actor squashes and stretches back to it...
void Field_RequestBattleFromEncounterTable(s32 zoneNo, s32 slotNo)
Sets up a battle with enemy group slot of encounter table zone.
void BattleFx_PlayQueuedSound(void)
Plays the sound BattleFx_SetQueuedSoundAndPlay remembered, if any.
void BattleFx_SetQueuedSoundAndPlay(s32 soundId)
Plays SE_298, then soundId (SE_289 for -1), and remembers soundId for BattleFx_PlayQueuedSound in the...
s32 Scheduler_RemoveCallback(SchedulerCallback callback)
Unschedules the task running callback: clears its routine and gives it order 0x7fff,...
The field object script interpreter and the operands its commands read.
Song and sound effect ids, indices into gSound_SongTable.
#define SE_JUMP
An actor jumps: ObjectMotion_Launch plays the high jump above 5 pixels a frame.
void Engine_ActorSetAnimation()
struct EventWork * gEventWork
void Engine_ActorSetPosition(u32 actor, s32 x, s32 z)
void Engine_EventEnd(void)
void Engine_AudioPlayCue()
void Engine_EventBegin(void)
void Engine_EventSetMessage()
void Engine_EventShowMessage()
Vale, its home, storm and Babi scenes, Sol Sanctum's eruption and Venus Lighthouse's aerie: Psynergy ...
void Scene_EndCutscenePsynergy(void)
Ends the cutscene's Psynergy and releases its effect work.
void Scene_BeginCutscenePsynergy(void)
Prepares the effect work and spark tiles of Move (ability 140) for the cutscene's Psynergy.
Vale's storm and Vale's homes: going indoors through a door.
static void Vale_RequestBackdropExit(s32 no)
Takes exit no in the backdrop fade over 16 frames, first stopping the storm's lightning while the sto...
One animation layer of a sprite: its animation id, frames, running script and timer.
u8 param
SpriteColorMode its pixels are drawn with; 0 when taken.
u8 * script
the running script; null when stopped (ANIM_CMD_END)
u8 frame
frame shown, frameBase plus the facing offset; 255 none
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
struct AnimationSpritePart image
u8 flags
bits: 1 outlined in ObjectSystemWork's edge and fill colours | 0 shadow drawn (set when created)
u8 slot
VRAM cache entry holding its tiles.
struct AnimationEntry * entries[4]
its layers; empty ones null
u8 count
layers in use, up to the last one present
s32 scale
16.16 fixed point, 0x10000 full size
u8 retainCacheEntry
Keeps the VRAM cache entry when it is released or off screen.
u8 dirty
nonzero redraws its pixels into VRAM when next drawn
u16 fullColor
256 colours; set for both parts when created
u16 tile
first sprite tile in VRAM
u16 priority
2 when created
The work of a Psynergy effect scene: its caster and target, where it takes place, the map state it re...
u16 tileSlot
resource entry holding the spark tiles
void * child
the target's object, or NULL
The running scene's event work: its placement and event tables, its actors, the triggers and exit it ...
s32 startTransition
SCENE_TRANSITION(style, variant).
s32 transitionFrames
frames
A field actor: a person or thing on the field with a position, motion toward a target,...
s16 timer
The parameter its action script reads (a follow distance or an angle to face), the player's frames to...
s32 speed
speed limit, 16.16 fixed-point pixels per frame
s32 targetX
16.16 fixed-point pixels; ACTOR_NO_TARGET when unset
u8 steeringFlags
ActorSteeringFlag bits.
u8 motionFlags
ActorMotionFlag bits; zero is free flight in 3D, and 3 is set on creation.
union FieldCoordinate x
16.16 fixed-point pixels
s32 targetZ
16.16 fixed-point pixels; ACTOR_NO_TARGET when unset
s32 velocityX
16.16 fixed-point pixels per frame
s32 bounce
The share of its falling speed kept as it bounces on landing, 16.16 fixed point (0x4000 when created)...
union FieldCoordinate y
16.16 fixed-point pixels
u8 priorityFlags
ActorPriorityFlag bits, read by the scrolling camera.
s32 terrainHeight
16.16 fixed-point pixels
s32 velocityY
16.16 fixed-point pixels per frame
u8 spriteStorageKind
Zero hides sprites; one draws a single sprite, two draws a group.
union FieldCoordinate z
16.16 fixed-point pixels
s32 acceleration
Added toward the target each frame, or taken off the speed when there is none, in 16....
s32 targetY
16.16 fixed-point pixels; ACTOR_NO_TARGET when unset
s32 scaleX
16.16 fixed point, 0x10000 full size
s32 scaleY
16.16 fixed point, 0x10000 full size
void(*) update(union FieldObject *object)
Called each frame before the object's script, while the object is live.
u16 work
The side of the player's next footprint (2 after a stop), or scene scratch.
u8 collisionFlags
bits: 7 refuses to move into a solid object | 4 nearer for Psynergy targets | 3 never a talk or Psyne...
s32 velocityZ
16.16 fixed-point pixels per frame
A scene entrance: where and facing which way the party arrives, and the camera's bounds there (-1 for...
A scene event: its kind and detail, the trigger it answers, its condition and its value (a message or...
An actor a scene places: its sprite, the condition for placing it, how it behaves,...
A scene's exit region: the box that, while its condition holds, takes the party leader out through it...
The prefix that command handlers read from a field object's 0x70-byte slot.
u16 offset
bytes from the start of OBJ VRAM
The system's routines and globals: interrupts, BIOS sound bias, random numbers and sleep.
Values that differ by patch level or language, chosen once for their code.
The integer types, TRUE, UNUSED and the fixed-address macros.
struct FieldCoordinate::@024321007066302143002254325121164243234242211074 part
s32 fixed
16.16 fixed-point pixels
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.
@ ACTOR_KYLE
Isaac's father (sprite 0x35, Kyle in vale_storm.c).
struct SceneEvent gValeStorm_Events[]
static void ValeStorm_RunRiverSearch(void)
Sends the searchers along the river and asks Isaac to help.
u8 gValeStorm_FrameModes[]
static void Event_TalkToGaret(void)
Talking to Garet: whether to leave his things behind, or, after the river, the Boulder.
s32 gValeStorm_ActorTwentySixScriptC[]
StormNightActor
The placed actors, numbered in the order of gValeStorm_Placements; the elders holding back the Boulde...
@ ACTOR_JENNA
"Oh no! My brother!"
@ ACTOR_JENNAS_PARENT_B
"Don't let go, Felix!"
@ ACTOR_EXHAUSTED_VILLAGER
Worn out from holding the Boulder: "I... I'll go!", then "It's no use.
@ ACTOR_SHOVING_VILLAGER
Runs out of his house and shoves Isaac. "Huh? Isaac?".
@ ACTOR_GARET
the young Garet's sprite, 0x13
@ ACTOR_GARETS_CHEST
The things Garet struggles to save.
@ ACTOR_JENNAS_PARENT_A
The pair at the river whom Jenna calls "Mom! Dad!".
@ ACTOR_BOULDER_GLOW
the light around the Boulder as it rolls
static void Event_LeaveByExit13(void)
Opens the door and goes in.
s32 ValeStorm_Initialize(void)
Restores the fallen rocks, the river scene and the Boulder from their flags, starts the storm,...
u16 gValeStorm_CellSteps4[]
static __inline__ void ValeStorm_PlayImpactBeat(s32 shakeAmplitude, s32 frames)
Shakes the scene at the impact cue and waits for the beat.
static void Event_WatchBoulderFall(void)
The Boulder falls toward Vale while the elders hold it with their Psynergy.
static void ValeStorm_CopyLeaderSpritePriority(void)
Keeps Garet and actor 8 at the leader sprite priority.
static void ValeStorm_ApplyRock11Collision(void)
Applies the collision cells left by rock 11.
static void ValeStorm_CycleObjectPalettes(struct FieldActor *actor)
Cycles six actor palettes on alternate frames.
static UNUSED void ValeStorm_OpenBackdropExit11(void)
Opens a door and takes exit 11, to ValeInteriors' entrance 1.
static void ValeStorm_FlickerGlowOffset(void)
Alternates the glow vertical offset on successive frames.
s32 gValeStorm_ActorNineteenScript[]
u16 gValeStorm_CellSteps3[]
static void Event_LeaveByExit1(void)
Stepping on cell code 2 requests exit 1, which has no table row.
static void ValeStorm_UpdateBoulderSceneEffects(void)
Updates the four boulder scene actors until the final reaction stops.
static void Event_LeaveByExit9(void)
Opens the door and goes in.
static void Event_WitnessRiverRescue(void)
At the river, Jenna cries out for her brother as the villagers try to save Felix.
u16 gValeStorm_CellSteps5[]
s32 gValeStorm_ActorTwentySixScriptB[]
@ STORM_CALLBACK_PRIORITY
static void Event_GaretJoinsIsaac(void)
Garet catches up and joins Isaac.
static void Event_WarnAboutMtAleph(void)
Garet warns where the path north leads.
static void Event_Rock11Falls(void)
Walking past: rock 11 falls across the path, and Garet, once with Isaac, says they cannot get around ...
static s32 ValeStorm_RerollHeadingOnCountdown(struct ScriptInterpreter *interpreter)
Chooses a new random heading whenever the actor countdown expires.
static void ValeStorm_ApplyRock14Collision(void)
Applies the collision cells left by rock 14.
static void Event_LeaveByExit10(void)
Opens the door and goes in.
u16 gValeStorm_CellSteps1[]
struct ScenePlacement gValeStorm_Placements[]
static void ValeStorm_GaretCommentsOnBlockedPath(s32 x, s32 y)
Brings Garet out to discuss a blocked path, then returns him to Isaac.
static void Event_LeaveByExit5(void)
Opens the door and goes in.
static void ValeStorm_ApplyRock12Collision(void)
Applies the collision cells left by rock 12.
const struct SceneRegion * ValeStorm_GetRegions(void)
static void Event_LeaveByExit12(void)
Opens the door and goes in.
static void ValeStorm_UpdatePulsingGlow(void)
Tracks the boulder and pulses its glow with the movement script phases.
static void Event_LeaveByExit6(void)
Isaac's first time at the door of exit 6: a villager runs out and shoves him; afterwards the door ope...
const struct SceneEntrance * ValeStorm_GetEntrances(void)
Returns where the party appears; entrance 15 is where Dora and Isaac run in from the south-west of Va...
static void Event_FightFourthMonster(void)
On the stormy night, another monster attacks (encounter 3 of table 12).
static void Event_LeaveByExit2(void)
Reached by stepping on cell code 5; takes exit 2, to ValeHome's entrance 8.
const u32 * ValeStorm_GetExits(void)
const struct ScenePlacement * ValeStorm_GetPlacements(void)
s32 gValeStorm_GatherPath22[]
static void Event_Rock13Falls(void)
Walking past: rock 13 falls down the path.
static void ValeStorm_SpawnEffectPair(struct FieldActor *parent)
Creates the two linked effects that travel in opposite vertical directions.
struct SceneEntrance gValeStorm_Entrances[]
s32 gValeStorm_ActorNineteenRiseScript[]
static void Event_VillagerAsksForHelp(void)
A villager who cannot move asks Isaac to get help. "I can't move...".
static void Event_Rock12Falls(void)
Walking past: rock 12 falls down the path.
static void Event_GaretCallsAfterIsaac(void)
Walking away from him, Garet calls after Isaac, asking whether he will just leave him there.
struct ScenePlacement gValeStorm_BoulderWatchers[]
static void Event_HearGaretStruggling(void)
Isaac hears Garet struggling with his things.
static void Event_SearchValuablesChest(void)
s32 gValeStorm_ActorTwentyTwoScript[]
static void Event_SearchBrokenDoor(void)
The door won't open: the impact knocked it off its hinges.
static void Event_LeaveByExit7(void)
Opens the door, unless Dora and Kyle left it open, and goes in.
s32 gValeStorm_ActorNineScriptD[]
s32 gValeStorm_ArriveScript[]
s32 gValeStorm_LookAroundScript[]
static void Event_LeaveByExit3(void)
Reached by stepping on cell code 3; takes exit 3, to Kraden's cottage (ValeKraden's entrance 1).
static void ValeStorm_MeetVillagerAtExit6(void)
Stops the leader at exit 6 for the first villager conversation.
u16 gValeStorm_CellSteps2[]
s32 gValeStorm_ActorTwentySixScriptA[]
s32 gValeStorm_ActorTwentyTwoScriptA[]
s32 gValeStorm_ActorEightScript[]
static void Event_LeaveByExit8(void)
Opens the door and goes in.
s32 gValeStorm_StormRunActions[]
static void ValeStorm_GaretLeavesIsaac(void)
Has Garet leave Isaac at the restored riverbank.
static void Event_GatherAfterRiverRescue(void)
Jenna comes back to the river, and the scene ends with the Boulder sweeping down it.
static void Storm_SetActorFrameMode(struct FieldActor *actor, s32 mode)
Applies an animation parameter to each active entry of a single sprite.
s32 gValeStorm_GatherPath0[]
s32 gValeStorm_LeaderScript[]
static void Event_Rock14Falls(void)
Walking past: rock 14 falls down the path.
s32 gValeStorm_GatherPath26[]
static void Event_DoraSendsIsaacToThePlaza(void)
Dora and Kyle come out into the storm with Isaac and send him to the plaza while they go to help.
static void ValeStorm_ShowBoulderSweepingDownriver(void)
Follows the boulder downriver, then restores the riverbank actors.
const struct SceneEvent * ValeStorm_GetEvents(void)
static void ValeStorm_CyclePaletteAndSpawnEffects(struct FieldActor *actor)
Cycles six palettes and emits paired effects at the shake interval.
static void Event_TalkAboutRescuingFelix(void)
A villager at the river talks of rescuing Felix.
static void ValeStorm_FlashLightning(void)
Flashes the scene layers before fading back to the storm palette.
StormNightPlaceFlag
Vale's place flags this scene keeps while the party is in Vale.
@ FLAG_VALE_STORM_KYLE_GREETED_ISAAC
Kyle has greeted Isaac at the river. "Oh, Isaac...".
@ FLAG_VALE_STORM_GARET_SAW_BLOCKED_PATH
Garet has said once that they cannot get around a fallen rock.
@ FLAG_VALE_STORM_VILLAGER_TRIED_TO_GO
The villager at the river tried to go for help and could not.
@ FLAG_VALE_STORM_THIRD_ROCK_PASSED
@ FLAG_VALE_STORM_SECOND_ROCK_PASSED
@ FLAG_VALE_STORM_FOURTH_ROCK_PASSED
@ FLAG_VALE_STORM_FIRST_ROCK_PASSED
The party has passed each rock's spot since coming to Vale, so its event does not play again.
static void ValeStorm_CycleBoulderPalette(void)
s32 gValeStorm_ActorNineScriptC[]
s32 gValeStorm_ActorNineScriptB[]
static void ValeStorm_FlashPaletteAndSpawnEffects(struct FieldActor *actor)
Flashes the actor palette and emits paired effects at the shake interval.
s32 gValeStorm_GatherPath8[]
static void ValeStorm_ApplyRock13Collision(void)
Applies the collision cells left by rock 13.
static void Event_LeaveByExit4(void)
Reached by stepping on cell code 4; takes exit 4, to Kraden's cottage (ValeKraden's entrance 2).
s32 gValeStorm_ActorTwentyScript[]
s32 gValeStorm_ActorNineScriptA[]
static UNUSED void ValeStorm_FlashBoulderSceneAnimationEntries(void)
Alternates four actors between the normal and flashing parameters.
static void ValeStorm_RebuildRiverbank(void)
Redraws the riverbank cells after the boulder has passed.
s32 gValeStorm_ActorTwentyTwoScriptB[]
u16 gValeStorm_CellSteps0[]
static void ValeStorm_RunCallOutSequence(void)
Resolves the belongings conversation and brings Garet into the party.
static void Event_FightThirdMonster(void)
On the stormy night, a monster attacks on the paths (encounter 2 of table 12).
static __inline__ void ValeStorm_PlaceActor(struct FieldActor *object, s32 horizontalPosition, s32 groundPosition)
Places an actor and its motion targets at the supplied coordinates.
s32 Resource_ResetEntry(u32 no)
Frees cache entry no: its blocks go back and the entry is marked free (offset 0xffff).
The sprite VRAM block cache and its owners.
struct VramBlockCacheEntry gVramBlockCache[]
void FieldFx_ResumeLightning(void)
Restarts the lightning: the next flash in 128 frames, repeating.
void FieldFx_StartLightning(void)
Starts the storm's lightning (FieldFx_UpdateLightning): builds the dark (0x10003) and lit (0x10005) p...
void FieldFx_StopLightning(void)
Stops the lightning: no flash for 0x7fff frames, and none after.
void FieldFx_LastLightning(void)
One last flash of lightning in 12 frames, then no more.