Go to the source code of this file.
Data Structures | |
| struct | SparkleFrame |
| One frame of a sparkle: its height offset and tile (fxdata.c). More... | |
Macros | |
| #define | DJINN_NO_HOP 0x800 |
| Field_RequestDjinnBattle's flag: the Djinni does not hop first. | |
| #define | ACTOR_ACTION_IDLE 1 |
| #define | ACTOR_ACTION_FOLLOW_LINKED_OBJECT 5 |
| #define | ACTOR_ACTION_FACE_SELECTED_ACTOR 6 |
| #define | ACTOR_ACTION_RESET 7 |
| Clears child and collision flags, then returns to the idle script. | |
Enumerations | |
| enum | FieldKind { FIELD_KIND_MOVE = 1 , FIELD_KIND_MIND_READ = 2 , FIELD_KIND_PLY = 3 , FIELD_KIND_FORCE = 4 , FIELD_KIND_DOUSE = 5 , FIELD_KIND_FROST = 6 , FIELD_KIND_LIFT = 7 , FIELD_KIND_REVEAL = 8 , FIELD_KIND_HALT = 9 , FIELD_KIND_CLOAK = 10 , FIELD_KIND_CARRY = 11 , FIELD_KIND_GROWTH = 12 , FIELD_KIND_CATCH = 13 , FIELD_KIND_WHIRLWIND = 14 , FIELD_KIND_RETREAT = 15 , FIELD_KIND_AVOID = 16 } |
| A field Psynergy's effect, as the field kind: the type column of games/tbs/src/game/actions.tsv, named for the abilities that have it. More... | |
Functions | |
| void | Event_UpdateDebugSkip (void) |
| Debug only: while debug mode is on, R makes every event wait (FieldEvent_WaitFrames) end at once and L restores normal waits. | |
| void | FieldEvent_WaitFrames (s32 frames) |
| The event command "wait": waits the requested frames, unless debug fast forward (Event_UpdateDebugSkip) is on. | |
| void | Leader_StopMoving (void) |
| Stops the leader where it stands: no horizontal velocity, the normal walking speed (1.0) and acceleration (0.5), no destination, and the standing pose, or the climbing pose (12) while the leader is on a climbable wall. | |
| void | FieldEvent_Begin (void) |
| The event command "begin event": closes any timed notice, stops the leader, resets the message and timing state, and starts the debug fast-forward callback with the leader as the message speaker. | |
| void | FieldEvent_End (void) |
| Ends an event: stops the debug fast-forward callback, gives the camera back to the leader and refreshes FLAG_LURE_CAP (GameFlag_RefreshLureCap). | |
| void | Event_NoOpHookA (void) |
| Nothing calls it. | |
| void | Event_NoOpHook (void) |
| An empty hook; it does nothing in the released game. | |
| void | Event_RunObjectHookAndWait (struct ScenePlacement *table) |
| Respawns the scene's actors from a placement table and waits one frame for them to appear. | |
| void | Event_CallWithLastActiveObjectId (struct ScenePlacement *table) |
| Spawns the actors of a placement table after the last actor in use. | |
| void | Event_SetSceneEvents (const struct SceneEvent *events) |
| Sets the scene's event table, which the field checks as the leader moves: writes work->events. | |
| void | Event_PrepareObjectAndApplyValue (s32 unit, s32 announce) |
| Adds unit to the party. | |
| void | Event_PrepareTwoObjectsAndApply (s32 first, s32 second) |
| Adds two units to the party and announces them together. | |
| s32 | Event_ValidatePackedId (u32 shortcut) |
| Checks an L or R button shortcut, packed as the member in bits 10 to 13 and the Psynergy in bits 0 to 9. | |
| void | Event_ClearInvalidPackedValues (void) |
| Clears each button shortcut whose Psynergy can no longer be cast: zeroes gGameState.firstShortcut or secondShortcut. | |
| void | Party_RemoveOwnerRestored (s32 unit) |
| Takes unit out of the party, fully restoring its HP and PP and curing its poison. | |
| s32 | Party_CheckItemLimit (s32 item) |
| Checks whether the party can carry one more of item: each member carries at most 30 of one item. | |
| s32 | PartyInventory_GiveItem (s32 item, s32 unused) |
| The event command "give item": gives item to the first party member with room for it and says so. | |
| s32 | Inventory_TryAddAndReturnOwner (s32 item, s32 unused, s32 unit) |
| Gives item to one party member. | |
| void | Inventory_NoOpCallback (void) |
| An empty function; nothing in ☀️ calls it. | |
| void | Inventory_ReservedNoOp (void) |
| An empty function; nothing in ☀️ calls it. | |
| void | Actor_WaitForAnimationEnd (s32 actor, s32 animation) |
| Waits, at most 90 frames, for an actor's animation to stop being animation: the actor has finished a one-off animation such as a nod. | |
| s32 | Event_AskYesNoWithActorAnimation (s32 actor, s32 forceBottom) |
| The event command "choose yes or no": once the message on screen has been read, asks yes or no below it, or above it when the message windows reach past row 15 or forceBottom is set. | |
| s32 | Menu_AskYesNo (s32 atBottom) |
| Asks yes or no at the top of the screen, or at the bottom with atBottom set. | |
| void | Party_LearnAbility (s32 unit, s32 ability) |
| Teaches unit the Psynergy ability and says so with its jingle, waiting for the player to read it. | |
| void | Event_StartScreenTransition (void) |
| The event command "open screen": starts the event's screen transition and sets work->transitionActive. | |
| void | Event_FinishScreenTransition (void) |
| The event command "close screen": finishes the event's screen transition and clears work->transitionActive. | |
| void | Event_WaitTransitionFrames (void) |
| The event command "wait for screen": waits as long as the transition runs (work->transitionFrames). | |
| void | Event_SetDestination (s32 scene, s32 entrance) |
| Makes the event leave for the given entrance of the given scene: raises the exit request 999 and writes gGameState.scene and entrance. | |
| void | Event_SetSavedDestination (u16 scene, u16 entrance) |
| Makes the event leave and records scene and entrance as the saved destination. | |
| void | Event_SetExitRequest (u16 request) |
| The event command "request exit": sets the field's exit request (999 leaves for gGameState's scene and entrance). | |
| void | Field_RequestBattleFromEncounterTable (s32 zoneNo, s32 slotNo) |
| Sets up a battle with enemy group slot of encounter table zone. | |
| void | Field_RequestDjinnBattle (s32 flag, s32 no) |
| Sets up the battle with Djinni number no. | |
| void | Event_SetNextDestination (s32 scene, s32 entrance) |
| Sets the scene and entrance that the field goes to next (gGameState.nextScene and nextEntrance). | |
| void | Event_SetDefeatDestination (s32 scene, s32 entrance) |
| Sets where the party wakes up after losing a battle (gGameState.defeatScene and defeatEntrance). | |
| void | Event_RequestDestination (u16 scene, u16 entrance) |
| Makes the event leave for entrance entrance of scene scene: sets gGameState.scene and entrance and raises the exit request EXIT_NONE (999), so the scene loop leaves on its next pass. | |
| void | BattleFx_SetQueuedSoundAndPlay (s32 soundId) |
| Plays SE_298, then soundId (SE_289 for -1), and remembers soundId for BattleFx_PlayQueuedSound in the field work's queuedSound. | |
| void | BattleFx_PlayQueuedSound (void) |
| Plays the sound BattleFx_SetQueuedSoundAndPlay remembered, if any. | |
| struct FieldActor * | Object_GetById (s32 actor) |
| Returns an actor, or NULL if it does not exist. | |
| void | ObjectMotion_SetSpeedParameters (u32 objectId, s32 speedLimit, s32 acceleration) |
| The event command "set actor speed": its top speed and acceleration, 16.16 pixels per frame. | |
| void | ObjectMotion_EnableActionAndSetCallback (u32 objectId, s32 action) |
| Gives an actor an action script (ObjectMotion_SetActionCallback) and lets it run: sets bit 0 of its actionFlags. | |
| void | ObjectMotion_EnableActionAndResetMotion (u32 objectId) |
| The event command "stop actor": stops its action and puts it back under event control (dispatch script 6), setting bit 0 of its actionFlags. | |
| void | Object_LinkObjectAndSetCallback (u32 objectId, u32 linkedObjectId) |
| Makes an actor follow another (the linked action script): writes its linkedObject. | |
| void | Object_RefreshSelectorById (u32 objectId) |
| Waits, at most 300 frames, for an actor's script to reach its end (command 0x10). | |
| void | Object_SetActionCallbackAndRefreshById (u32 objectId, s32 action) |
| Accepts a built-in action number or script address; waits up to 300 frames. | |
| void | ObjectMotion_ResetAndSetPosition (u32 objectId, s32 x, s32 z) |
| The event command "set actor destination": the actor heads for (x, z), in pixels, keeping its current animation. | |
| void | ObjectMotion_SetPositionAndCommit (u32 objectId, s32 x, s32 z) |
| The event command "move actor and wait": as ObjectMotion_ResetAndSetPosition, then waits (at most 600 frames) for the actor to arrive. | |
| void | ObjectMotion_ResetAndSetPositionInMode2 (u32 objectId, s32 x, s32 z) |
| The event command "walk actor to": the actor walks (animation 2) toward (x, z), in pixels. | |
| void | ObjectMotion_SetPositionAndReset (u32 objectId, s32 x, s32 z) |
| The event command "walk actor to and wait": walks the actor to (x, z), in pixels, waits for it to arrive and stands it still (animation 1). | |
| void | ObjectMotion_CenterOnColumn (u32 objectId, s32 priority, s32 zOffset) |
| The event command "center actor and walk": walks the actor sideways to the middle of its 16-pixel column, sets its sprite priority to priority (ObjectMotion_SetActionVariant), then sends it zOffset pixels along z. | |
| void | ObjectMotion_OffsetPositionAndResetMotion (u32 objectId, s32 xOffset, s32 zOffset) |
| The event command "set actor destination offset": the actor heads (xOffset, zOffset) pixels from where it stands. | |
| void | ObjectMotion_OffsetPositionAndReset (u32 objectId, s32 xOffset, s32 zOffset) |
| Walks the actor (animation 2) (xOffset, zOffset) pixels from where it stands. | |
| void | ObjectMotion_CommitPositionAndActivate (u32 objectId, s32 xOffset, s32 zOffset) |
| Walks the actor (xOffset, zOffset) pixels, waits for it to arrive and stands it still. | |
| void | Motion_LaunchFromFocusedObject (u32 objectId, s32 xOffset, s32 zOffset, s32 action) |
| Places an actor on the leader and sends it walking (xOffset, zOffset) pixels away at speed 0.6 and acceleration 0.3, through the launch script; the actor then takes action action. | |
| void | ObjectMotion_CommitCurrentPositionAndActivate (u32 objectId) |
| The event command "wait for actor": waits (at most 600 frames) for the actor to arrive and stands it still. | |
| void | ObjectMotion_SetHorizontalPositionWithTerrain (u32 objectId, s32 x, s32 z) |
| The event command "set actor position": puts the actor at (x, z), 16.16 pixels, at rest. | |
| void | ObjectMotion_SetPositionWithTerrain (u32 objectId, s32 x, s32 y, s32 z) |
| Puts the actor at (x, y, z), 16.16 pixels, at rest; an actor that follows the ground (flag 1) is raised by the terrain height there. | |
| void | Object_SetModeById (u32 objectId, s32 animation) |
| The event command "set actor animation" (1 stands, 2 walks, 3 nods, 4 shakes the head and so on). | |
| void | Object_SetActionById (u32 objectId, s32 steps) |
| Sets the animation timer steps of each of an actor's sprites (AnimationObjects_SetActiveTimerSteps). | |
| void | ObjectMotion_WaitForAnimationChange (u32 objectId) |
| Waits, at most 90 frames, for an actor's animation to change. | |
| void | Motion_SetModeAndWaitAnimation (u32 objectId, s32 animation) |
| The event command "set actor animation and wait": plays the animation and waits for it to end. | |
| void | ObjectMotion_NoOp (void) |
| An empty function, reached only through an unnamed veneer in the object bank's far-call table; nothing in ☀️ names it. | |
| void | ObjectMotion_Launch (u32 objectId, s32 speed, s32 frames) |
| The event command "actor jump": throws the actor upward at speed pixels per frame with a jump sound (a higher one above 5), then waits frames frames. | |
| void | ObjectMotion_SetVariantCallback (u32 objectId, s32 count) |
| The event command "start repeated motion": the actor squashes and springs back count times (1 to 3), through gObjectMotion_VariantScripts. | |
| void | Motion_SetVarCbAndRefresh (u32 objectId, s32 count) |
| The event command "run repeated motion": as ObjectMotion_SetVariantCallback, then waits for it to end. | |
| void | FieldFx_UpdateParticleLinearMotion (union FieldObject *fieldObject) |
| Moves a dust puff of FieldFx_SpawnBurstParticle: it drifts with its x and z velocity (kept in speed and acceleration), which drag slows by 1/18 and 1/16 each frame, and rises 1/64 pixel a frame. | |
| void | FieldFx_SpawnBurstParticle (struct FieldActor *source, s32 param) |
| Kicks up a dust puff (object 222) where source stands: it flies off toward the back at 0.5 to 1.4 pixels a frame and sideways at up to 1.4, with one of two animations. | |
| void | Actor_JumpDownLedge (s32 actor, s32 pose, s32 param) |
| Makes an actor jump down off a ledge in front of it (the field runs it for the leader when the player presses down at a ledge): it shows pose for 10 frames, hops, spins round while sinking 28 pixels with a dust puff every other frame (none when param is -1), then jumps 16 pixels forward and lands. | |
| void | ObjectMotion_SetAngleToward (s32 firstId, s32 secondId, s32 wait) |
| The event command "actor face actor": turns the first actor at once to face the second, then waits wait frames. | |
| void | Object_LinkPair (s32 firstId, s32 secondId, s32 wait) |
| The event command "actors face each other": turns two actors toward each other, then waits wait frames. | |
| void | FacingObject_TurnPairToFaceEachOther (struct FacingObject *firstObject, struct FacingObject *secondObject) |
| Turns two actors to face each other, at most 1/16 turn a frame each, until both do (at most 60 frames). | |
| void | ObjectTable_DestroyById (s32 index) |
| The event command "destroy actor": releases the actor and frees its slot, writing NULL to its place in the field work's actor table. | |
| void | ObjectTable_DestroyNoOp (void) |
| void | ObjectGroup_ConfigureChildValue (s32 objectId, s32 param) |
| The event command "set actor sprite param": gives every sprite part of the actor param (ObjectGroup_SetChildValue). | |
| void | ObjectGroup_ApplyIndexedChildValue (union FieldObject *fieldObject) |
| Per-frame hook of a blinking actor: sets its sprite parts' param from gObjectGroup_BlinkChildValues (7 for two frames out of eight, otherwise 0). | |
| void | ObjectGroup_SetChildValue (struct FieldActor *actor, s32 param) |
| Sets the param byte of every animated part of an actor's sprite. | |
| void | Object_SetTargetAndCallback (u32 objectId, s32 targetId, const void *script) |
| Links an actor to the actor in the low 8 bits of targetId and starts script on it. | |
| s32 | ObjectMotion_StepAngle (struct ObjectRuntime *object) |
| Script step that turns an actor toward the angle kept in its action: the whole way when within 1/16 turn, otherwise 1/32 turn. | |
| void | Object_ResetTargetAndSetMode1 (u32 objectId) |
| Clears an actor's destination, puts it under event control and stands it still. | |
| void | ObjectMotion_ArmCallback (s32 objectId, s32 angle, s32 wait) |
| The event command "actor face direction": the actor turns toward angle (0x10000 a full turn; ObjectMotion_StepAngle), then the event waits wait frames. | |
| void | ObjectMotion_SetActionVariant (s32 objectId, s32 priority) |
| The event command "set actor sprite priority": fixes the priority of the actor's sprite, which then no longer follows its depth: clears ACTOR_PRIORITY_AUTOMATIC. | |
| void | ObjectVisual_CopyAttributes (u32 targetId, u32 sourceId) |
| Makes the target actor's sprite show the source actor's graphics (its VRAM block and tile). | |
| void | ObjectVisual_ReservedNoOp (void) |
| void | Event_SetMessageId (s32 message) |
| The event command "set message": the number of the event's next message, written to work->message. | |
| s32 | ObjectTable_ReadActiveValue (s32 actor) |
| Returns the sprite (the first animation's id) of the actor in the low 12 bits of actor, or -1 if there is no such animated actor. | |
| s32 | ObjectTable_FindActiveByValue (s32 sprite) |
| Returns the first scene actor (8 to 65) showing sprite, or -1. | |
| struct UiWindow * | UiText_OpenMessageAtObject (s32 actor, s32 unused) |
| The event command "open message": opens the event's current message in a speech window next to the speaking actor, with the speaker's portrait beside it when it has one, and moves on to the next message. | |
| void | FieldEvent_ShowMessageAndWait (s32 actor, s32 flags) |
| The event command "show message": opens the current message at actor (UiText_OpenMessageAtObject) and waits until it has been read. | |
| void | BattlePres_RunActionThenWaitIfModeZero (s32 actor, s32 flags, s32 wait) |
| The event command "show message and wait": shows the message, then waits wait frames. | |
| s32 | FieldEvent_AskYesNoAndShowResponse (s32 actor, s32 flags) |
| The event command "ask yes or no": opens the question at actor, lets the leader answer, then shows the next message for yes or the one after it for no. | |
| void | BattleEventRuntime_EmptyCallback (void) |
| void | Event_ShowSpeakerMessage (s32 speaker) |
| A speaker-message entry point retained by its overlay veneer, with no current scene caller. | |
| void | ObjectTable_CallRefreshHook (s32 unused0, s32 unused1, s32 x, s32 y) |
| Retained by its overlay veneer; no current caller establishes the coordinates forwarded to Event_ShowMessageAtPosition. | |
| void | Event_ShowMessageAtPosition (s32 unused0, s32 unused1, s32 x, s32 y) |
| A retained coordinate-message entry point: waits for the message and advances the event's message index. | |
| void | ObjectTable_RunIfActive (s32 actor) |
| Closes the portrait of an actor's sprite, if it has one. | |
| void | Battle_ShowPairedUnitWorkAndWait (s32 first, s32 firstX, s32 firstY, s32 firstPortraitX, s32 firstPortraitY, s32 second, s32 secondX, s32 secondY, s32 secondPortraitX, s32 secondPortraitY) |
| The event command "show two messages and wait": two actors speak at once, each message at its own (x, y) with its portrait at (portraitX, portraitY), all in tiles. | |
| void | Ui_SetMessageVoiceFromActor (s32 actor) |
| Sets the voice of the messages that follow to that of actor's sprite, at the rate the message speed option picks (gUi_RenderResultValues). | |
| void | Camera_FollowActor (s32 actor, s32 keepPosition) |
| The event command "camera follow actor": the camera (the event's view centre) follows actor. | |
| void | Camera_SetSpeedParameters (s32 speedLimit, s32 acceleration) |
| The event command "camera set speed": the camera's top speed and acceleration, 16.16 pixels per frame. | |
| void | Camera_MoveWithinMapBounds (s32 requestedX, s32 requestedY, s32 requestedZ, s32 glide) |
| The event command "camera move to": sends the camera to the requested axes, 16.16 pixels (-1 keeps that axis), kept far enough inside the map that the screen never shows past its edge. | |
| void | Object_PlaceCurrentWithinCameraBounds (s32 actor, s32 glide) |
| The event command "camera move to actor": Camera_MoveWithinMapBounds to the actor's x and z. | |
| void | Camera_WaitForArrival (void) |
| The event command "camera wait for move": waits (at most 600 frames) for the camera to arrive, then 2 frames more. | |
| struct FieldActor * | Camera_GetEventObject (void) |
| The event command "get view centre": returns the camera object. | |
| void | Camera_FollowObject (struct ObjectRuntime *target, s32 keepCurrentPosition) |
| Makes the camera follow target; unless keepCurrentPosition is set it jumps there at once. | |
| void | Map_SetViewBounds (s32 minX, s32 minY, s32 maxX, s32 maxY) |
| The event command "set view bounds": the camera keeps the screen inside these map coordinates (Camera_MoveWithinMapBounds). | |
| s32 | FieldFx_StepRatioTransition (void) |
| void | BattleFx_ScheduleRatioTransition (s32 zoom, s32 frames) |
| Starts a zoom to zoom (16.16) over frames frames, on the world map (event mode 3) only. | |
| void | Event_WaitForZoomTransition (void) |
| Waits for a zoom transition to end (on the world map only, at most 300 frames). | |
| s32 | BattleFx_CopyLinkedObjectPosition (union FieldObject *fieldObject) |
| void | BattleFx_SpawnLinked (s32 actor, s32 emote, s32 wait) |
| The event command "actor show emote": shows an emote bubble (object 21) over an actor, then waits wait frames. | |
| void | BattleFx_ConfigureLinkedObject (s32 actor, s32 flags) |
| The event command "actor set attached effect": with mode (the low 2 bits) 0 removes the object attached to an actor; 1 attaches one (object 209, animation 1) that stays until removed; 2 shows a one-off one (animation 2) that ends by itself. | |
| s32 | Object_ClearChildAndCollisionFlags (void *obj) |
| Script step: clears an object's sprite flags and its collision flags. | |
| s32 | ObjectMotion_MoveTowardTarget (struct ObjectRuntime *object) |
| Script step of action 5: follows the linked object. | |
| s32 | ObjectMotion_TurnTowardLinkedTarget (struct ObjectRuntime *object) |
| Script step of action 6: turns the object toward its linked object, at most 1/16 turn a frame. | |
| void | ObjectMotion_SetActionCallback (struct ObjectRuntime *object, s32 action) |
| Starts an actor's action script: 1 to 4 the fixed action scripts, 5 follow the linked object, 6 face the leader, 7 reset. | |
| struct ObjectRuntime * | Object_FindNearestFacingTarget (struct ObjectRuntime *self, s32 sprite) |
| Finds the nearest animated object to self within 40 pixels and 48 pixels of height, ignoring objects more than 3/16 turn to either side once they are over 23 pixels away. | |
| s32 | Field_TryJumpForward (void) |
| Makes the leader jump two tiles forward, over the tile in front, when the map allows it (Map_CheckObjectStep). | |
| s32 | Field_ClimbDown (void) |
| Climbing down (the player presses down at a climbable wall). | |
| s32 | Field_ClimbUp (void) |
| Climbing up (the player presses up at a climbable wall). | |
| s32 | Object_GetScreenPosition (s32 objectId, s32 *position) |
| Finds where an actor is on screen: position[0] and position[1] receive its x and y in pixels, y at the top of its sprite. | |
| void | ObjectEffect_ReservedNoOp941DC (void) |
| s32 | Field_StartEncounterTransition (s32 unused) |
| Starts the transition into a random battle: plays the scene's battle cue and the encounter sounds, closes the screen and flashes the backdrop white, fading it to black over 16 frames. | |
| void | ObjectEffect_PrepareContextEffect (s32 animation) |
| Starts the leader's animation for leaving through an exit: centres it on its tile, at the tile's south edge, stops it and plays animation over 18 frames. | |
| void | ObjectEffect_BeginContextEffect26 (void) |
| Leaves through an exit of kind 0x20 (animation 26); flag 0x120 makes the next scene play the matching arrival (ObjectEffect_RunPendingFlagEvent). | |
| void | ObjectEffect_BeginContextEffect25 (void) |
| Leaves through an exit of kind 0x30 (animation 25), recorded in flag 0x121. | |
| void | ObjectEffect_EndContextEffect (s32 animation) |
| Plays the leader's arrival animation through an exit: centred on its tile at the tile's north edge, the leader plays animation for 30 frames, loses the extra sprite part and walks 8 pixels south. | |
| s32 | ObjectEffect_RunPendingFlagEvent (void) |
| Plays the leader's arrival for the way the last scene was left: through an exit of kind 0x20 (flag 0x120, animation 24, returns 1) or 0x30 (flag 0x121, animation 23, returns 2), or falling in from 160 pixels above (flag 0x122, returns 3). | |
| void | DisplayScroll_ArmHBlankDma (void) |
| Scheduler callback for the wavy background: restarts DMA 0 each frame to copy the current page's BG1 to BG3 scroll offsets into the scroll registers one scanline at a time. | |
| void | DisplayScroll_BuildAndSwapHBlankPage (void) |
| Scheduler callback for the wavy background: fills the hidden page with each scanline's BG3, BG2 and BG1 offsets, the scroll plus a sine wave for x and for y (an axis with no step stays flat), then shows that page. | |
| void | DisplayScroll_DisarmHBlankDma (void) |
| Stops the wavy background: removes its two callbacks and stops DMA 0. | |
| void | FieldFx_UpdateGroundParticles (void) |
| Scheduler callback: animates the ground particles. | |
| void | FieldFx_UpdateLightning (void) |
| Scheduler callback for the storm: every 150 to 550 frames lightning flashes the palette three times (5 frames apart) with a thunderclap, louder with loud set. | |
| void | FieldFx_StartGroundParticles (void) |
| Starts the ground particles (FieldFx_UpdateGroundParticles) with sound 170: loads their tiles and puts 32 of them under the leader with staggered timers, drawn semi-transparent. | |
| void | FieldMotes_Update (void) |
| Scheduler callback: the floating motes. | |
| void | FieldMotes_Start (void) |
| Starts the floating motes (FieldMotes_Update): loads their tiles and puts 32 of them under the leader with staggered timers, drawn semi-transparent. | |
| void | FieldEffect_UpdateSparkles (void) |
| Scheduler callback: the sparkles. | |
| void | FieldEffect_InitSparkles (void) |
| Starts the sparkles (FieldEffect_UpdateSparkles): loads their tiles and clears the 32 sparkles. | |
| void | FieldFx_StartLightning (void) |
| Starts the storm's lightning (FieldFx_UpdateLightning): builds the dark (0x10003) and lit (0x10005) palettes and their 12-step fade, and arms the first flash in 600 frames, repeating. | |
| 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. | |
| void | FieldFx_ResumeLightning (void) |
| Restarts the lightning: the next flash in 128 frames, repeating. | |
| void | BattleFx_StartBufferBlend (s32 from, s32 to) |
| Flashes the palette once, 120 frames from now, from palette from to palette to (BattleFx_BuildBuffer modes), with the storm's flash callback. | |
| void | ObjectMotion_MoveHalfwayTowardTarget (union FieldObject *fieldObject) |
| Update hook shared by the Djinni battle-start and Mercury afterimages. | |
| void | Djinn_RunBattleStartHop (s32 djinniId) |
| A Djinni's battle start: the Djinni (actor id) bounces twice, turns to face the leader, hops back 16 pixels three times, then leaps 64 pixels at the party trailing eight afterimages tinted for its element. | |
| void | Djinn_JoinParty (s32 slot, s32 element, s32 djinn) |
| A Djinni joins the party: djinn (0 to 19) of element goes to the member with the fewest Djinn, or to no one and only its flag while FLAG_DJINN_TUTORIAL is set. | |
| void | FieldObject_PlaceSceneActors (void) |
| Puts a Djinni's actor back where its battle started from: for a pending Djinni battle (pendingDjinnEvent 300 to 380, FLAG_KEEP_PARTY_POSITION set, the battle over) the scene actor placed for that Djinni (condition = its flag) goes back to its placement, or 32 pixels north of the leader when the event has 0x800 set. | |
| void | Djinn_ResolvePendingEvent () |
| void | BattleFx_UpdateAllSlots (void) |
| Scheduler callback: updates the 24 effect slots. | |
| void | BattleFx_InitializeSlots (void) |
| Allocates and clears the effect slots (heap block 56) and starts their update callback. | |
| void | BattleFx_ClearActiveSlotsAndScheduleUpdates (void) |
| Stops the effect slots: removes their callback, frees every slot still in use and releases their heap block. | |
| void | BattleFx_AdvanceSpinAngle (union FieldObject *fieldObject) |
| Per-frame update: spins an object 1/8 turn a frame. | |
| void | BattleFx_RunAngledApproachPhases (struct EffectSlot *particle) |
| Effect slot callback of a Jupiter Djinni's light particles: each circles its centre while it widens for 60 frames, circles 40, drifts toward a point 20 pixels over the leader for 40, closes in for 60 and is freed. | |
| void | Djinn_RunJupiterJoinEffect (s32 djinniId) |
| A Jupiter Djinni joins the party: it bounces three times, spins, leaps out of sight and bursts into 24 light particles that circle and close in on the leader, who turns to the camera and plays animation 28. | |
| void | BattleFx_SetObjectAlternatingWords (union FieldObject *fieldObject) |
| Per-frame update: makes an object pulse, switching its scale between the two values of gBattleFx_PulseScales every 4 frames. | |
| void | BattleFx_AdvanceAngleWithRamp (union FieldObject *fieldObject) |
| Per-frame update: spins an object ever faster, from 1/16 turn a frame up to 1/8. | |
| void | BattleEffect_UpdatePhasedRadialParticle (struct EffectSlot *effect) |
| Effect slot callback of a Mars Djinni's sparks. | |
| void | Djinn_RunMarsJoinEffect (s32 djinniId) |
| A Mars Djinni joins the party: it turns to the camera, bounces three times, spins ever faster and shrinks away in a fountain of 24 sparks (BattleEffect_UpdatePhasedRadialParticle). | |
| void | BattleFx_UpdateDescendingOrbitObject (union FieldObject *fieldObject) |
| Per-frame update of a Venus Djinni's falling motes: each circles the leader on a shrinking spiral (radius timer * 0.4 pixels) while it sinks a pixel a frame, and is released 20 pixels above the leader's feet. | |
| void | BattleFx_UpdateRadialSpread (struct EffectSlot *effect) |
| Effect slot callback of a Venus Djinni's particles: each starts on screen at a random point 10 to 20 pixels round the leader and flies 120 pixels up the screen, over and over (states 0 and 1); set to 2, it is freed once it arrives. | |
| void | BattleFx_RunVenusDjinnCapture (s32 djinniId) |
| A Venus Djinni joins the party: it hops twice, spins and leaps, then shrinks away; the leader turns to the camera and plays animation 28 while 24 particles rise round it (BattleFx_UpdateRadialSpread). | |
| void | BattleFx_UpdateRandomTargetParticle (struct EffectSlot *effect) |
| Effect slot callback of a Mercury Djinni's droplets: each falls from 100 pixels above to a random point near the leader (state 0), and where it lands splashes 12 pixels in a random direction with SE_143. | |
| void | BattleFx_HalveDistanceToTarget (union FieldObject *fieldObject) |
| Per-frame update of an afterimage: closes half the distance to the object it is linked to. | |
| void | BattleFx_RunMercuryDjinnCapture (s32 djinniId) |
| A Mercury Djinni joins the party: the screen is tinted blue, the Djinni bounces twice and hops three times ever higher, then rises 120 pixels out of sight trailing eight afterimages. | |
| void | Field_DispatchTypeHandler (s32 kind) |
| Runs one step of the current Psynergy effect: 0 casts it with no target, 1 casts it on its target (secondObjectId), 2 finishes it and 3 runs its kind's extra handler. | |
| void | BattleFx_Run (void) |
| Casts the current Psynergy effect with no target: runs the body of its kind (scene->fieldKind). | |
| void | BattleFx_DispatchRequestKind (void) |
| Casts the current Psynergy effect on its target (secondObjectId): runs the handler of its kind. | |
| void | BattleFx_ClearChildValueOnMismatch (void) |
| Finishes the current effect when it is Mind Read: ends the effect and lets its target move again, unless the target is the object kept stopped. | |
| void | FieldEvent_RunTypeHandler (void) |
| The extra handler of Reveal, Cloak and Avoid: what each does when it ends. | |
| s32 | Field_RunEventAction (const void *event, s32 param, s32 target) |
| Runs the event tied to an effect: a result below 0x10000 is a message, shown at target; a larger one is a routine, called with param and target (through r3). | |
| void | ObjectGroup_ApplyRandomChildValues (union FieldObject *fieldObject) |
| Per-frame update: sets every part of an object's sprite to param frame % 6, which cycles its colours. | |
| void | Motion_SetTargetPositionFromMagnitudeAngle (struct ObjectRuntime *object, s32 magnitude, s32 angle) |
| Sends an object toward the point magnitude (16.16 pixels) away from it in direction angle: sets its move target. | |
| s32 | ResourceTable_CountFreeBlocks (void) |
| Counts the free blocks (owner 0xff) of the 512 resource blocks. | |
| struct AnimationObject * | Sprite_ShareVramCache (struct AnimationObject *sourceSprite, struct AnimationObject *sharedSprite) |
| Makes sourceSprite share sharedSprite's VRAM block, releasing its own; with no sharedSprite it keeps its block. | |
| struct ObjectRuntime * | Object_Spawn (s32 kind, s32 x, s32 y, s32 z) |
| Creates an object for an effect, at the caster's ground height, with sprite priority 0 and animation 1. | |
| void | ObjectGroup_SetActionForOthers (struct ObjectRuntime *except, s32 state, s32 value) |
| Sets the movement state and animation timer steps of every object but the player's and except. | |
| void | FieldFx_UpdateScaledArcObjectA (union FieldObject *fieldObject) |
| Per-frame update of arc A: over 32 frames it swells and shrinks again (scale sin(frame / 64 turn)) while it rises a pixel a frame on the object it follows, 9 pixels in front of it and up to 5 pixels further while small. | |
| void | FieldFx_UpdateScaledArcObjectB (union FieldObject *fieldObject) |
| Per-frame update of arc B: arc A upside down, 16 pixels in front of the object and up to 5 pixels nearer while small. | |
| void | BattleFx_SpawnScaledArcObjects (struct FieldActor *linked) |
| Spawns the two swelling arcs (object 26) on an object, A and B (B upside down); they follow it for 32 frames. | |
| void | BattleFx_FlickerObjectAndTick (union FieldObject *fieldObject) |
| Per-frame update: flashes an object between sprite param 7 and 0 every 2 frames and spawns the swelling arcs on it every 16. | |
| void | FieldFx_CycleObjectValueByCounter (union FieldObject *fieldObject) |
| Per-frame update: cycles an object through sprite params 0 to 5, one step every 2 frames, and spawns the swelling arcs on it every 16. | |
| void | BattleFx_UpdateAllEffectSlots (void) |
| Scheduler callback: updates the 24 effect slots. | |
| void | BattleFx_LoadActionEffectResources (s32 abilityId, s32 mode) |
| Prepares the work of the Psynergy effect for ability (heap slot 56) and loads its spark tiles. | |
| void | BattleFx_SetupObjectPair (s32 userId, s32 targetId) |
| Records the caster and the target of an effect. | |
| void | EffectRuntime_StopCurrentObject (void) |
| Stops the caster's per-frame hook and restores its colours. | |
| void | BattleEffect_CleanupSceneObjects (void) |
| Ends a Psynergy effect: frees the effect slots still in use and, unless another effect is being resolved, waits (at most 30 frames) for the swelling arcs to end, stops the slot callback, releases the effect's tiles, restores the map's shake, plays the queued sound and releases the effect's work. | |
| void | EventObject_Initialize (void) |
| Starts casting: the caster takes its casting pose (animation 20) and stops. | |
| void | BattleEffect_InitializeSharedScene (void) |
| Saves the palettes for the effect (once, unless an effect is already shown) and fades them toward one of the eight effect colours (gBattleFx_TargetColors), picked by the frame counter or forced by flags 0x148 to 0x14f, over 8 frames. | |
| void | BattleFx_PrepareBufferInterpolation (void) |
| Fades the palettes back from an effect's colours to the saved ones (or to palette 0x10001 while an effect is shown) over 8 frames. | |
| void | Camera_WorldToScreen (struct EffectVector *position) |
| Converts a world position (16.16 pixels) to the screen: x and z receive the screen's x and y and y becomes 0. | |
| void | RunSceneTransitionEffect (s32 x, s32 y) |
| Starts the wave effect of caster sourceId on target targetId: fades the palettes toward a hue that shifts with the frame counter, and starts its per-frame update (FieldFx_UpdateMindReadWave) after 8 frames. | |
| void | BattleFx_FinishSceneAndReleaseHeapBlock (void) |
| Stops the wave effect: restores the caster's colours and the palettes and releases the effect's work. | |
| void | FieldFx_UpdateMindReadWave (void) |
| Scheduler callback of the wave effect: once its delay has run out, writes the next page of scanline offsets (a sine wave of 4 pixels either way), steps the colour fade and the hue, keeps the caster's colours lit, and every 60 frames sends three particles (object 281) from the target to the caster, with sound 130. | |
| void | BattleFx_ArmBg0HBlankDma (void) |
| Scheduler callback: restarts the HBlank DMA that writes BG0's horizontal scroll for each scanline from the wave's shown page. | |
| void | BattleFx_AdvanceHueCycle (void) |
| Moves the wave's hue on 4 degrees and works out its colour, each channel 4 to 11. | |
| void | FieldFx_ComputeHueChannels (s32 hue, s32 *r, s32 *g, s32 *b) |
| Works out red, green and blue (0 to 31 each, 16.16) for a hue in degrees (16.16). | |
| s32 | BattleFx_HueChannelRamp (s32 angle, s32 low, s32 high) |
| One colour channel's strength at a hue angle: rising from 0 to 60 degrees, high from 60 to 180, falling from 180 to 240, low elsewhere. | |
| s32 | Fixed_Remainder (s32 value, s32 divisor) |
| The 16.16 remainder of value divided by divisor (0 for a zero divisor). | |
| void | BattleFx_SetCallbackWhenTargetUnset (union FieldObject *fieldObject) |
| Per-frame update: once the object has arrived (no destination left), runs the script for untargeted objects. | |
| void | Ui_FillBank15PaletteGrey (void) |
| Turns colours 1 and 3 to 12 of BG palette 15 grey and starts the BG0 scanline scroll (BattleFx_ArmBg0HBlankDma). | |
| void | Ui_SetBank15PaletteAndClearRenderMode (void) |
| Stops the BG0 scanline scroll and restores BG palette 15. | |
| s32 | Input_GetDpadAngle (u32 unused) |
| Returns the direction of the d-pad (0x10000 a full turn): right 0, down 0x4000, left 0x8000, up 0xc000; 0xffff when none or a diagonal is held. | |
| void | BattleFx_UpdateItemBreakFragment (union FieldObject *fieldObject) |
| Per-frame update of a broken item's main fragment: turns it toward the object it is linked to, at most 1/16 turn a frame, and sheds a particle (object 0x11d) round it. | |
| void | BattleFx_SteerPushedTarget (s32 targetId) |
| Puts the pushing hand beside the target and pushes the target 16 pixels the way the d-pad points, for as long as the player pushes; A, B, L or R end it. | |
| void | BattleFx_UpdateOrbitAndReturn (struct EffectSlot *slot) |
| Effect slot callback of a particle that flies 30 pixels out from where it started, comes back and is freed. | |
| void | FieldFx_RunMove (void) |
| Shows the broken item beside the caster for 30 frames, then turns it into particles. | |
| void * | BattleFx_StartItemBreak (void *object) |
| Spawns the broken item (object 215) 16 pixels above object and moves it 16 pixels the way object faces (to the nearest quarter turn), with 8 particles round it. | |
| void | BattleFx_SnapScaleToFull (struct MotionObject *obj) |
| Per-frame update: grows an object's scale by 1/16 a frame up to full size and fixes its position. | |
| void | UpdateRisingParticleBurst (void *object) |
| Per-frame update: the object spins as it rises for 31 frames, shrinks, and bursts into 8 particles. | |
| void | ObjectDispatch_ApplyValueToKind200Children (s32 value) |
| Passes value (as animation timer steps) to every one of the 64 objects whose first sprite part shows sprite 200. | |
| void | FieldEffect_WatchLeaderDistance (void) |
| Scheduler callback of the timed effect (kind 8): asks for it to end once the leader is 60 pixels from its centre or its time has run out. | |
| void | FieldFx_RunReveal (void) |
| Starts a screen transition centred on the leader, runs the matching event if there is one, and puts markers round the leader. | |
| void | ResetSceneTransitionEffect (void) |
| Ends Reveal if it is running: stops its watch, brings the colours back from black over 30 frames and runs stage 4 of the Psynergy event. | |
| void | FieldFx_RunGrowthOnTarget (s32 unused) |
| Particles round the target, which takes the sprite priority of the ground under it. | |
| void | FieldFx_RunGrowth (void) |
| The particles, then five falling objects 4 to 10 pixels round the effect's position. | |
| void | BattleEffect_SpawnBurstParticleField (void) |
| Sends 24 particles, one every 2 frames, from in front of the caster to points round the effect's position. | |
| void | FieldFx_RunLiftOnTarget (s32 unused) |
| An object appears 32 pixels to either side, each moves 14 pixels in, and they lift the target 32 pixels with them. | |
| struct MotionObject * | BattleFx_SpawnItemBreakMode3 (s32 x, s32 y, s32 z, s32 angle) |
| Spawns object 215 and grows it, spinning, from a quarter to full size over 24 frames; angle is the way it faces once grown. | |
| void | BattleFx_UpdateRadialBurst (struct EffectSlot *slot) |
| Effect slot callback of a particle that scatters 25 pixels from its origin in a random direction, then gathers beside the main object and is freed. | |
| s32 | SpawnHeavyImpactEffect (struct ScriptInterpreter *interpreter) |
| A heavy impact: places object 0x11b 32 pixels below the source and scatters 12 shards from it. | |
| void | FieldFx_RunForceOnTarget (s32 unused) |
| Runs Force cast on a target, through FieldFx_RunForce. | |
| void | FieldFx_RunForce (void) |
| A shot appears in front of the caster, grows and flies forward with three afterimages; what it hits (scene->child) is pushed 16 pixels. | |
| void | BattleFx_UpdateOrbitingParticleMain (union FieldObject *fieldObject) |
| Per-frame update: flashes (animation 2) for 2 frames in every 8. | |
| void | BattleFx_UpdateOrbitingParticleFade (union FieldObject *fieldObject) |
| Per-frame update: shrinks by 1/16 a frame and is released at 1/16. | |
| void | BattleFx_UpdateOrbitingParticleLeft (union FieldObject *fieldObject) |
| Spirals anticlockwise at twice the frames left in pixels, then fades. | |
| void | BattleFx_UpdateOrbitingParticleRight (union FieldObject *fieldObject) |
| Per-frame update: as BattleFx_UpdateOrbitingParticleLeft, clockwise. | |
| void | FieldFx_RunFrostOnTarget (s32 unused) |
| Runs Frost cast on a target. | |
| void | FieldFx_RunFrost (void) |
| 16 particles spiral in on the effect's position and make the target flash 16 times; without childOption the target takes mode 2. | |
| void | BattleFx_SwayParticle (union FieldObject *fieldObject) |
| Per-frame update: sways 4 pixels either side of anchorX, once every 128 frames. | |
| void | BattleFx_UpdateShrinkingOrbitObject (union FieldObject *fieldObject) |
| Per-frame update: spirals in on a point 10 pixels above the effect's position, at a radius of as many pixels as frames are left; released when timer reaches 0. | |
| void | BattleFx_RunSparkEmitter (union FieldObject *fieldObject) |
| Per-frame update: sways 6 pixels either side (a 64-frame cycle) 16 pixels above the effect's position, and every 3 frames sheds a spark that sways as it slowly falls. | |
| void | FieldFx_RunPlyOnTarget (s32 unused) |
| Runs FieldFx_RunPly, then stops the caster's hook. | |
| void | FieldFx_RunPly (void) |
| Eight particles spiral into the centre, where one appears, sheds sparks and flies far away. | |
| void | FieldFx_CheckCloakTile (void) |
| Scheduler callback of Cloak: when the tile under the leader is not CLOAK_TILE, requests CLOAK_END. | |
| void | FieldFx_EndCloak (void) |
| Ends Cloak: stops the tile check and makes the leader blink back into sight, clearing cloaked. | |
| void | FieldFx_ResumeCloakCheck (void) |
| Starts the Cloak tile check if the leader is hidden. | |
| void | FieldFx_StartCloak (void) |
| The leader blinks 10 times and hides (cloaked set), and the tile check starts; where the leader cannot hide it shows again at once. | |
| void | FieldFx_SpawnRandomAngleTriplet (union FieldObject *fieldObject) |
| Per-frame update of a falling particle: on reaching altitude, it scatters three small particles. | |
| void | BattleFx_UpdateDriftingFallObject (union FieldObject *fieldObject) |
| Per-frame update: drifts from side to side as it slowly falls, and is released on reaching the ground. | |
| void | FieldFx_RunDouseOnTarget (s32 unused) |
| Runs Douse cast on a target, through FieldFx_RunDouse. | |
| void | FieldFx_RunDouse (void) |
| An orb of light rises from 16 pixels above the target to 32 pixels above the destination (80 with variant) over 10 frames, growing as it goes, rains particles, and returns. | |
| void | BattleFx_SpawnFallingParticles (void) |
| Per-frame update: drops one particle round the lifted object, 8 to 24 pixels above it and 0 to 48 pixels away in a random direction. | |
| void | BattleFx_SteerLiftedTarget (s32 targetId) |
| Two hands lift it to 24 pixels above the ground; the d-pad moves it 16 pixels at a time and A, B, L or R drops it where it is. | |
| struct MotionObject * | BattleFx_SpawnItemBreakMode1 (s32 x, s32 y, s32 z, s32 angle) |
| Spawns object 215 with the item break sound, in animation 1, and grows it, spinning, from a quarter to full size over 24 frames; angle is the way it faces once grown. | |
| void | FieldFx_UpdateParticleMotionAndScale (union FieldObject *object) |
| Per-frame update of a particle: moves by its velocity, slowing its x and z velocity a little, and changes its scale and spin. | |
| void | BattleFx_SpawnRadialParticleRing (struct MotionObject *origin) |
| Spawns 17 particles that spread from origin in a flat ring, their x velocity 1.5 times their z velocity, so the ring is wider than deep as the field is drawn. | |
| void | BattleFx_WanderAroundAnchor (union FieldObject *fieldObject) |
| Per-frame update: wanders away from the anchor, 2 to 3 pixels a frame, now and then turning sharply; after 101 frames it hands over to the common particle script. | |
| void | BattleFx_CircleAnchor (union FieldObject *fieldObject) |
| Per-frame update: circles the anchor at 8 pixels; after 121 frames it starts to wander (BattleFx_WanderAroundAnchor). | |
| void | BattleFx_ShrinkObjectScaleUntilHalf (union FieldObject *fieldObject) |
| Shrinks a scene-selected Whirlwind target each frame; below half size, moves it to the origin, stops it and removes the update. | |
| void | FieldFx_RunWhirlwindOnTarget (s32 unused) |
| Runs Whirlwind using the target already stored in the effect scene. | |
| void | FieldFx_RunWhirlwind (void) |
| An orb is carried from the caster to 4 pixels above the effect's position over 10 frames, growing from 0.25. | |
| void | BattleFx_UpdateRadialCamera (struct EffectSlot *effect) |
| Effect slot callback: state 0 heads for a point 40 to 70 pixels from where the particle appeared; state 1 waits to arrive, then goes on to 2; state 2 heads for a point 4 pixels round 8 pixels above the effect's position on screen; state 3 frees the slot on arrival. | |
| void | BattleFx_MarkChildAndRunFallbackTransition (s32 unused) |
| Pauses the target (scene->child) and runs BattleEffect_RunFallbackObjectTransition. | |
| void | BattleEffect_RunFallbackObjectTransition (void) |
| Throws an object from the caster to the effect's position over 10 frames and scatters it into 16 particles. | |
| void | BattleEffect_SetRandomTableValueOnObject (union FieldObject *fieldObject) |
| Per-frame update of a paused object: gives its sprite one of the table's eight params at random. | |
| void | BattleEffect_PauseObject (s32 actorId) |
| Pauses object id, keeping its per-frame update and, if it is animated, its first animation's param in gGameState. | |
| void | BattleFx_ResumeObject (s32 actorId) |
| Resumes object id with the update and param kept by BattleEffect_PauseObject. | |
| s32 | BattleFx_FilterObjectIdByFlags (s32 id) |
| Returns id, or -1 (no target) when the current effect's definition has flags 0xff. | |
| void | FieldFx_RunCatchOnTarget (s32 unused) |
| Abilities: Catch (field kind 13), cast on a target. | |
| void | FieldFx_RunCatch (void) |
| Carries object 215 from 16 pixels above the caster to the goal in 10 steps, growing from a quarter to full size, presses down 20 pixels moving child to (-9, -9), rises 19.5 pixels and shrinks back. | |
| void | FieldFx_UpdateSpinAngle (union FieldObject *fieldObject) |
| Per-frame update: spins by 0x1000 + timer * 0x50 a frame, speeding up (timer counts up) until timer * 0x50 reaches 0x1000. | |
| void | BattleFx_UpdateDescendingObject (union FieldObject *fieldObject) |
| Per-frame update: spins 1/8 turn a frame as it shrinks, rising a pixel a frame; released once its scale falls below 0x3000. | |
| void | BattleFx_UpdateRadialLaunch (struct EffectSlot *slot) |
| Effect slot callback: a particle flies 120 pixels from the main object's screen position (8 pixels lower) in a direction within 1/8 turn of up the screen. | |
| void | FieldFx_RunRetreat (void) |
| Spins the main object and shrinks it while 24 particles fly out, one a frame. | |
| void | BattleFx_UpdateDescendingParticlePositiveArc (union FieldObject *fieldObject) |
| Per-frame update of a falling arc: grows toward full size as it falls 2 pixels a frame on the object it follows, 9 pixels in front of it and up to 5 pixels further while small; released 10 pixels above the ground (4 on the clear screen). | |
| void | BattleFx_UpdateDescendingParticleNegativeArc (union FieldObject *fieldObject) |
| As BattleFx_UpdateDescendingParticlePositiveArc for the arc drawn upside down, 16 pixels in front of the object and up to 5 pixels nearer. | |
| void | BattleFx_SpawnDescendingArcParticles (struct FieldActor *arc) |
| Spawns a pair of falling arcs (one upside down) on arc. | |
| void | FieldFx_BlinkAvoidCaster (void) |
| End of the effect: switches the caster's display flags between 3 and 1 on a 5-frame cycle. | |
| void | BattleFx_UpdatePairedArcSpawner (union FieldObject *fieldObject) |
| The caster during the effect: sheds a pair of falling arcs every 5 frames (7 on the world map), and spins in phase 1. | |
| void | FieldEvent_ShowStatusMessage (void) |
| Avoid (or the Sacred Feather) has worn off, and the game says so. | |
| void | FieldFx_RunAvoid (void) |
| The caster spins and flashes, then blinks, and encounters are kept away until Avoid wears off. | |
| void | EffectSlot_Update (struct EffectSlot *effect) |
| Updates one effect slot: counts its age, runs its callback (after any delay), moves it and draws it. | |
| void | BattleFx_DrawScaledObject (struct EffectSlot *object) |
| Draws an effect slot's sprite at its screen position and scale, when it is near the screen. | |
| void | EffectSlot_UpdateMotion (struct EffectSlot *effect) |
| Moves an effect slot toward its target, turning at most maxTurnStep a frame when limitTurnStep is set and speeding up by acceleration to maxSpeed. | |
| u32 | EffectSlot_HasPendingTarget (struct EffectSlot *effect) |
| Returns nonzero while an effect slot that stops at its target still has one (it has not arrived), 0 once it has arrived or when it never stops. | |
| void | EffectSlot_SetPosition (struct EffectSlot *effect, s32 x, s32 z) |
| Places an effect slot at (x, z), at rest with no target. | |
| void | EffectSlot_SetObjectMode (struct EffectSlot *effect, s32 mode) |
| Sets the animation of an effect slot's sprite. | |
| void | EffectSlot_SetCallback (struct EffectSlot *effect, EffectCallback callback) |
| Gives an effect slot its per-frame callback, starting at state 0. | |
| void | EffectSlot_Initialize (struct EffectSlot *effect, s32 kind, s32 x, s32 z) |
| Fills an effect slot with a new sprite of kind at (x, z): stopping at its target, top speed 2, acceleration and scale 1, drawn, animation 1. | |
| void | BattleFx_ClearOwnedSlot (struct EffectSlot *slot) |
| Frees an effect slot and its sprite. | |
| void | BattleFx_SetupResourcesAndWindow (void) |
| Sets up the world map screen: the marker tiles and their OAM entries, the cursor where the leader is on the map (or mid-screen when the place is not on it), and the place-name window. | |
| void | BattleFx_CleanupResourcesAndWindow (void) |
| Closes the world map screen: returns its VRAM blocks and removes the place-name window. | |
| void | Map_UpdateWorldMapMarkers (void) |
| Scheduler callback of the world map screen: shows a marker at each place whose flag is set, moves the cursor with the d-pad (to the current place while L or R is held) and shows the name of the marker nearest the cursor. | |
| void | Map_ShowWorldMap (s32 picture) |
| Borrows the map-cell buffer for the still map until A or B closes it. | |
| void | Field_UpdateObjectVisibilityBounds (void) |
| On the world map, shows only the scene actors within 320 pixels sideways, 600 above and 400 below the camera. | |
| void | BattleFx_RunVisibilityTransition (void) |
| On the world map, zooms the view out (0x9d89) while L is held, then back. | |
Variables | |
| const struct SparkleFrame | gFieldFx_SparkleFrames [32] |
| {dy, tile} | |
| #define DJINN_NO_HOP 0x800 |
Field_RequestDjinnBattle's flag: the Djinni does not hop first.
Definition at line 76 of file psynergy_effects.h.
Referenced by Event_MeetCorona(), Event_MeetHail(), Event_MeetVine(), and Field_RequestDjinnBattle().
| #define ACTOR_ACTION_IDLE 1 |
Definition at line 93 of file psynergy_effects.h.
Referenced by Event_EntranceGuardThrowsPartyOut(), Event_FreezeThirdPool(), Event_MendingTheRoof(), Event_RoofMended(), Event_SentriesThrowPartyOut(), HouseScene_RunRepairMorning(), LunpaFortress_FirstPatrolThrowsPartyOut(), LunpaFortress_GuardThrowsPartyOut(), Sanctum_RequestQuestAcceptance(), Scene_Initialize(), SolSanctumElementalStarRoom_EnterStarRoom(), SolSanctumElementalStarRoom_LineUpFollowers(), Xian_MoveAsideForWaterCarrier(), and Xian_TalkToWaterCarrier().
| #define ACTOR_ACTION_FOLLOW_LINKED_OBJECT 5 |
Definition at line 94 of file psynergy_effects.h.
| #define ACTOR_ACTION_FACE_SELECTED_ACTOR 6 |
Definition at line 95 of file psynergy_effects.h.
| #define ACTOR_ACTION_RESET 7 |
Clears child and collision flags, then returns to the idle script.
Definition at line 97 of file psynergy_effects.h.
| enum FieldKind |
A field Psynergy's effect, as the field kind: the type column of games/tbs/src/game/actions.tsv, named for the abilities that have it.
The effect scene keeps it as its animation.
Definition at line 16 of file psynergy_effects.h.
| void Event_UpdateDebugSkip | ( | void | ) |
Debug only: while debug mode is on, R makes every event wait (FieldEvent_WaitFrames) end at once and L restores normal waits.
Runs as a scheduler callback for the length of an event (FieldEvent_Begin).
Definition at line 38 of file events.c.
Referenced by Event_UpdateDebugSkip(), FieldEvent_Begin(), and FieldEvent_End().
| void FieldEvent_WaitFrames | ( | s32 | frames | ) |
The event command "wait": waits the requested frames, unless debug fast forward (Event_UpdateDebugSkip) is on.
Scene scripts reach it as Engine_EventWait (the WAIT command); this object's actor, message, camera and climbing commands wait through it too.
Definition at line 55 of file events.c.
Referenced by BattleFx_SpawnLinked(), BattlePres_RunActionThenWaitIfModeZero(), Camera_WaitForArrival(), Field_ClimbDown(), Field_ClimbUp(), Field_SearchTile(), FieldEvent_WaitFrames(), Object_LinkPair(), ObjectEffect_RunPendingFlagEvent(), ObjectMotion_ArmCallback(), ObjectMotion_Launch(), and ObjectMotion_SetAngleToward().
| void Leader_StopMoving | ( | void | ) |
Stops the leader where it stands: no horizontal velocity, the normal walking speed (1.0) and acceleration (0.5), no destination, and the standing pose, or the climbing pose (12) while the leader is on a climbable wall.
Called by FieldEvent_Begin, by Field_RunScene before it handles several requests, by Field_UsePsynergy, Scene_TalkToActor, Field_CheckExitRegions and the world map's zoom (BattleFx_RunVisibilityTransition).
Definition at line 67 of file events.c.
Referenced by BattleFx_RunVisibilityTransition(), Event_GaretRefusesToLeave(), Field_CheckExitRegions(), Field_RunScene(), Field_SearchTile(), Field_UsePsynergy(), FieldEvent_Begin(), Leader_StopMoving(), and Scene_TalkToActor().
| void FieldEvent_Begin | ( | void | ) |
The event command "begin event": closes any timed notice, stops the leader, resets the message and timing state, and starts the debug fast-forward callback with the leader as the message speaker.
Scene scripts reach it as Engine_EventBegin (EV_BEGIN); the field's item, Psynergy, Djinni, Retreat and climbing events open with it too. Clears the field work's name window, fastForward and messageWindow, sets transitionFrames to 16 and the speaker to the leader.
Definition at line 91 of file events.c.
Referenced by Djinn_JoinParty(), Djinn_RunBattleStartHop(), Field_ClimbDown(), Field_ClimbUp(), Field_RunEventAction(), Field_SearchTile(), Field_TryJumpForward(), Field_UseItem(), FieldEvent_Begin(), FieldFx_RunRetreat(), Scene_RunRaisedEvent(), Scene_RunTouchOrExit(), and Scene_TalkToActor().
| void FieldEvent_End | ( | void | ) |
Ends an event: stops the debug fast-forward callback, gives the camera back to the leader and refreshes FLAG_LURE_CAP (GameFlag_RefreshLureCap).
Scene scripts reach it as Engine_EventEnd (EV_END), and every event that opens with FieldEvent_Begin closes with it.
Definition at line 120 of file events.c.
Referenced by Djinn_JoinParty(), Djinn_RunBattleStartHop(), Field_ClimbDown(), Field_ClimbUp(), Field_RunEventAction(), Field_SearchTile(), Field_TryJumpForward(), Field_UseItem(), FieldEvent_End(), Scene_RunRaisedEvent(), Scene_RunTouchOrExit(), and Scene_TalkToActor().
| void Event_NoOpHookA | ( | void | ) |
| void Event_NoOpHook | ( | void | ) |
An empty hook; it does nothing in the released game.
Only Event_RunObjectHookAndWait calls it.
Definition at line 131 of file events.c.
Referenced by Event_NoOpHook(), and Event_RunObjectHookAndWait().
| void Event_RunObjectHookAndWait | ( | struct ScenePlacement * | table | ) |
Respawns the scene's actors from a placement table and waits one frame for them to appear.
Reached only through an unnamed veneer in the object bank's far-call table; nothing in ☀️ names it.
Definition at line 136 of file events.c.
Referenced by Event_RunObjectHookAndWait().
| void Event_CallWithLastActiveObjectId | ( | struct ScenePlacement * | table | ) |
Spawns the actors of a placement table after the last actor in use.
Called by the Kolima, Kalay and Tolbi ship scene scripts to bring actors in during a scene.
Definition at line 148 of file events.c.
Referenced by Event_AskAboutNewAdepts(), Event_CallWithLastActiveObjectId(), Event_WatchBoulderFall(), Kalay_WatchTourGroupDeparture(), Kolima_Initialize(), TolbiShipDeck_ArriveAtTolbi(), TolbiShipDeck_DepartWithParty(), TolbiShipDeck_JumpIntoKrakenBattle(), TolbiShipDeck_MonsterLandsOnDeck(), TolbiShipDeck_MonstersAttackCrew(), TolbiShipDeck_MonstersBoard(), TolbiShipDeck_ReturnFromIsland(), TolbiShipDeck_SetUpAfterKraken(), TolbiShipDeck_SetUpAtAnchor(), TolbiShipDeck_SetUpUnderSail(), TolbiShipDeck_SightLand(), TolbiShipDeck_SightSeaMonsters(), TolbiShipDeck_ThankForKraken(), TolbiShipInteriors_RunSceneCommand(), TolbiShipMast_AnnounceLand(), TolbiShipMast_RunAvastScene(), TolbiShipMast_RunLandingSequence(), and TolbiShipMast_ShowMonsters().
| void Event_SetSceneEvents | ( | const struct SceneEvent * | events | ) |
Sets the scene's event table, which the field checks as the leader moves: writes work->events.
Altin Peak's scene script calls it as Event_LoadAreaScript.
Definition at line 155 of file events.c.
Referenced by Event_SetSceneEvents().
Adds unit to the party.
With announce nonzero it also shows <name> joined your party. (Party_ShowJoinedMessage, which receives announce too). Called by six scene scripts as a character joins (Vale, the Vault, Goma Cave and Mercury Lighthouse among them).
Definition at line 165 of file events.c.
Referenced by Event_GaretJoinsIsaac(), Event_IvanRejoins(), Event_MeetSurvivingTravelers(), Event_PrepareObjectAndApplyValue(), MercuryLighthouse_MiaJoinsAfterRescue(), Scene_Initialize(), ValeStorm_RunCallOutSequence(), and VaultInteriors_IvanJoinsRodSearch().
Adds two units to the party and announces them together.
Vale's scene script calls it twice, as Engine_PartyAddMembers.
Definition at line 175 of file events.c.
Referenced by Event_PrepareTwoObjectsAndApply().
Checks an L or R button shortcut, packed as the member in bits 10 to 13 and the Psynergy in bits 0 to 9.
Returns 0 if it can still be cast, -1 for no such party member, -2 when that member is not in the party and -3 when the member no longer knows the Psynergy. Only Event_ClearInvalidPackedValues calls it.
Definition at line 186 of file events.c.
Referenced by Event_ClearInvalidPackedValues(), and Event_ValidatePackedId().
| void Event_ClearInvalidPackedValues | ( | void | ) |
Clears each button shortcut whose Psynergy can no longer be cast: zeroes gGameState.firstShortcut or secondShortcut.
Called whenever the party or what it knows may have changed: by Party_RemoveOwnerRestored, Inventory_Discard, and the field menu's item, Psynergy and Djinn screens.
Definition at line 203 of file events.c.
Referenced by Event_ClearInvalidPackedValues(), Field_ProcessStep(), and Party_RemoveOwnerRestored().
| void Party_RemoveOwnerRestored | ( | s32 | unit | ) |
Takes unit out of the party, fully restoring its HP and PP and curing its poison.
If no member left standing has HP, the leader is given 1 HP so the party is never left all down. Called by the scene scripts where a member leaves: Vale in the storm, the Vault, and Sol Sanctum.
Definition at line 214 of file events.c.
Referenced by Event_IvanStaysBehind(), Party_RemoveOwnerRestored(), SolSanctumElementalStarRoom_EnterStarRoom(), SolSanctumEruption_PlayHostageScene(), ValeStorm_ShowBoulderSweepingDownriver(), and VaultInteriors_ReturnStolenGoods().
Checks whether the party can carry one more of item: each member carries at most 30 of one item.
When they are all full, says Isaac's party cannot carry any more <item>s... and Isaac threw the <item> as far away as possible. and returns -1; otherwise returns 0. Field_RunScene calls it before it gives gGameState.pendingItem with PartyInventory_GiveItem.
Definition at line 248 of file events.c.
Referenced by Field_RunScene(), and Party_CheckItemLimit().
The event command "give item": gives item to the first party member with room for it and says so.
When every bag is full, the player picks an item to drop to make room, or drops the new item instead (not allowed for an indispensable one). Returns the member who received the item, or -1 when it was left behind. Scene scripts reach it as Engine_PartyGiveItem (about 24 of them); Field_RunScene gives the pending item and the debug test menu gives items through it. The field work's message is restored afterwards.
Definition at line 275 of file events.c.
Referenced by Field_RunScene(), and PartyInventory_GiveItem().
Gives item to one party member.
Returns unit, or -1 if its bag is full. Reached only through an unnamed veneer in the object bank's far-call table; nothing in ☀️ names it.
Definition at line 376 of file events.c.
Referenced by Inventory_TryAddAndReturnOwner().
| void Inventory_NoOpCallback | ( | void | ) |
An empty function; nothing in ☀️ calls it.
Definition at line 383 of file events.c.
Referenced by Inventory_NoOpCallback().
| void Inventory_ReservedNoOp | ( | void | ) |
An empty function; nothing in ☀️ calls it.
Definition at line 386 of file events.c.
Referenced by Inventory_ReservedNoOp().
Waits, at most 90 frames, for an actor's animation to stop being animation: the actor has finished a one-off animation such as a nod.
Only actors drawn as an animation object (animationKind 1) are waited for. Called by Event_AskYesNoWithActorAnimation.
Definition at line 392 of file events.c.
Referenced by Actor_WaitForAnimationEnd(), and Event_AskYesNoWithActorAnimation().
The event command "choose yes or no": once the message on screen has been read, asks yes or no below it, or above it when the message windows reach past row 15 or forceBottom is set.
The speaker nods (animation 3) at yes and shakes its head (animation 4) at no. Returns 0 for yes, 1 for no. Scene scripts reach it as Engine_EventChooseYesNo (about 54 of them); the link lobby and FieldEvent_AskYesNoAndShowResponse call it too.
Definition at line 416 of file events.c.
Referenced by Event_AskYesNoWithActorAnimation(), and FieldEvent_AskYesNoAndShowResponse().
Asks yes or no at the top of the screen, or at the bottom with atBottom set.
Returns 0 for yes, 1 for no. Called by PartyInventory_GiveItem, Field_UseItem, Field_UsePsynergy and the cleared game's menu.
Definition at line 468 of file events.c.
Referenced by Field_UseItem(), Field_UsePsynergy(), Menu_AskYesNo(), PartyInventory_GiveItem(), and SaveMenu_Run().
Teaches unit the Psynergy ability and says so with its jingle, waiting for the player to read it.
The message is <unit> learned <ability>. Fuchin Temple's scene script calls it.
Definition at line 475 of file events.c.
Referenced by FuchinTemple_RunHamasRevealLesson(), and Party_LearnAbility().
| void Event_StartScreenTransition | ( | void | ) |
The event command "open screen": starts the event's screen transition and sets work->transitionActive.
Scene scripts reach it as Engine_EventOpenScreen; the inn, the title, cleared-game and link lobby menus and Map_ShowWorldMap call it too.
Definition at line 488 of file events.c.
Referenced by Event_StartScreenTransition(), and Map_ShowWorldMap().
| void Event_FinishScreenTransition | ( | void | ) |
The event command "close screen": finishes the event's screen transition and clears work->transitionActive.
Scene scripts reach it as Engine_EventCloseScreen; the inn, the cleared-game menu and Map_ShowWorldMap call it too.
Definition at line 499 of file events.c.
Referenced by Event_FinishScreenTransition(), and Map_ShowWorldMap().
| void Event_WaitTransitionFrames | ( | void | ) |
The event command "wait for screen": waits as long as the transition runs (work->transitionFrames).
Scene scripts reach it as Engine_EventWaitForScreen.
Definition at line 509 of file events.c.
Referenced by Event_WaitTransitionFrames(), and Map_ShowWorldMap().
Makes the event leave for the given entrance of the given scene: raises the exit request 999 and writes gGameState.scene and entrance.
Called by the title, cleared-game and link lobby menus, the debug battle command and five scene scripts (the Lemurian ship and the world map among them).
Definition at line 517 of file events.c.
Referenced by Event_FinishAirborneTravel(), Event_SetDestination(), Event_StormCarriesPartyAway(), LinkLobby_LeaveArena(), SaveMenu_Run(), SetSail(), Title_Run(), TretTreeInteriors_EnterRoom(), TretTreeInteriors_StepOnCrackedFloor(), VenusLighthouseAerie_EruptBeacon(), WorldMap_Initialize(), and WorldMap_ShowEndingScene().
Makes the event leave and records scene and entrance as the saved destination.
Reached only through an unnamed veneer in the object bank's far-call table; nothing in ☀️ names it.
Definition at line 526 of file events.c.
Referenced by Event_SetSavedDestination().
| void Event_SetExitRequest | ( | u16 | request | ) |
The event command "request exit": sets the field's exit request (999 leaves for gGameState's scene and entrance).
Scene scripts reach it as Engine_EventRequestExit (about 61 of them).
Definition at line 536 of file events.c.
Referenced by Event_SetExitRequest().
Sets up a battle with enemy group slot of encounter table zone.
On the world map (mode 3) the terrain under the leader picks the battle backdrop. Sets the field work's battle request, which the scene loop then handles, and the battle cue; zone 98's first slot also sets gGameState.special to the Aerie's storm backdrop. About 35 scenes reach it through Field_RequestBattleFromEncounterTableFar, and the lobby calls it directly.
Definition at line 14 of file requests.c.
Referenced by AltinPeak_FightRoom1Beast(), AltinPeak_FightRoom3Beast(), AltinPeak_FightRoom5Beast(), AltinPeak_StartHydrosBattle(), Event_ConfrontSaturosAndMenardi(), Event_DouseStorm(), Event_DouseTravelMarker(), Event_EnterGuardedRoom(), Event_FightFinalGuards(), Event_FightFirstMonster(), Event_FightFourthMonster(), Event_FightSecondMonster(), Event_FightThirdMonster(), Event_FightTret(), Event_FreeRooferAndConfrontThieves(), Event_ReachArena(), Event_ReachArena(), Event_ReachArena(), FallIntoPit(), Field_RequestBattleFromEncounterTable(), FightSandMonster(), LinkLobby_EnterBattle(), MercuryLighthouseAerie_ConfrontSaturos(), MercuryLighthouseEntrance_FightLizardMan(), MogallForest_FirstArea_ApeAttacks(), MogallForest_KillerApeAttacks(), MogallForest_ThirdArea_ApeAttacks(), TolbiShipDeck_JumpIntoKrakenBattle(), TolbiShipInteriors_FightMonstersInHold(), ValeHome_FightTravelers(), VaultInteriors_ConfrontThievesAgain(), VenusLighthouseAerie_CombineSaturosAndMenardi(), and WorldMap_ShowDjinnTutorial().
Sets up the battle with Djinni number no.
The low 8 bits of flag are the Djinni's actor, which hops first unless DJINN_NO_HOP is set. Djinn are numbered 20 to an element (Djinn_ResolvePendingEvent). Sets gGameState.pendingDjinnEvent and the field work's battle request. About 20 scenes reach it through Field_RequestDjinnBattleFar.
Definition at line 35 of file requests.c.
Referenced by AltinPeak_TalkToDjinni(), AltmillerCave_StartDjinnBattle(), BabiLighthouse_StartDjinnBattle(), Event_FightDjinni(), Event_FightDjinni(), Event_FightForge(), Event_MeetCorona(), Event_MeetHail(), Event_MeetVine(), Event_TalkToBreeze(), Field_RequestDjinnBattle(), Fuchin_StartDjinnBattle(), MercuryLighthouse_StartDjinnBattle(), and MogallForest_StartDjinnBattle().
Sets the scene and entrance that the field goes to next (gGameState.nextScene and nextEntrance).
About 30 scenes and the lobby reach it through Event_SetNextDestinationFar.
Definition at line 61 of file requests.c.
Referenced by AltinPeak_FightRoom1Beast(), AltinPeak_FightRoom3Beast(), AltinPeak_FightRoom5Beast(), AltinPeak_StartHydrosBattle(), Event_ConfrontSaturosAndMenardi(), Event_EnterGuardedRoom(), Event_FightFinalGuards(), Event_FightTret(), Event_FreeRooferAndConfrontThieves(), Event_ReachArena(), Event_ReachArena(), Event_ReachArena(), Event_SetNextDestination(), FightSandMonster(), LinkLobby_EnterBattle(), MercuryLighthouseAerie_ConfrontSaturos(), MercuryLighthouseEntrance_FightLizardMan(), MogallForest_KillerApeAttacks(), TolbiShipDeck_JumpIntoKrakenBattle(), TolbiShipInteriors_FightMonstersInHold(), TolbiSpring_OfferLuckyDice(), TolbiSpring_OfferLuckyWheels(), ValeHome_FightTravelers(), VaultInteriors_ConfrontThievesAgain(), and VenusLighthouseAerie_CombineSaturosAndMenardi().
Sets where the party wakes up after losing a battle (gGameState.defeatScene and defeatEntrance).
The scenes before scripted battles (Colosso, the Vault, Vale, the Aerie) and the lobby reach it through Event_SetDefeatDestinationFar.
Definition at line 70 of file requests.c.
Referenced by Event_ConfrontSaturosAndMenardi(), Event_FreeRooferAndConfrontThieves(), Event_ReachArena(), Event_ReachArena(), Event_ReachArena(), Event_SetDefeatDestination(), LinkLobby_EnterBattle(), ValeHome_FightTravelers(), VaultInteriors_ConfrontThievesAgain(), and VenusLighthouseAerie_CombineSaturosAndMenardi().
Makes the event leave for entrance entrance of scene scene: sets gGameState.scene and entrance and raises the exit request EXIT_NONE (999), so the scene loop leaves on its next pass.
Only Tolbi's spring reaches it, through Event_RequestDestinationFar.
Definition at line 79 of file requests.c.
Referenced by Event_RequestDestination(), TolbiSpring_OfferLuckyDice(), and TolbiSpring_OfferLuckyWheels().
| void BattleFx_SetQueuedSoundAndPlay | ( | s32 | soundId | ) |
Plays SE_298, then soundId (SE_289 for -1), and remembers soundId for BattleFx_PlayQueuedSound in the field work's queuedSound.
About 30 scenes reach it through the far alias, and the ground particles (weather.c) queue SE_170 with it.
Definition at line 90 of file requests.c.
Referenced by AltinPeak_StartSpitting(), BattleFx_SetQueuedSoundAndPlay(), FieldFx_StartGroundParticles(), Kalay_PrepareTunnel(), Kalay_StartWindowTransition(), Kalay_UpdateTunnelEmitters(), LamakanDesert_Initialize(), MercuryLighthouse_Initialize(), MercuryLighthouseEntrance_Initialize(), Scene_Initialize(), Scene_RunEntrySetup(), SolSanctumEntrance_RestoreInteriorState(), SolSanctumLunaSolRooms_Initialize(), SolSanctumLunaSolRooms_ShowFloatingEye(), SolSanctumStatue_Initialize(), Vale_Initialize(), ValeStorm_Initialize(), VenusLighthouse_AnimateEastTileWave(), VenusLighthouse_AnimatePairedTileWaves(), VenusLighthouse_AnimateWestTileWave(), Village_ApplyWaterLevel(), Village_ScareOffBeast(), and Xian_Initialize().
| void BattleFx_PlayQueuedSound | ( | void | ) |
Plays the sound BattleFx_SetQueuedSoundAndPlay remembered, if any.
Called by scenes, by the event runner (object/events.c), by setup.c and by an actor's landing (actor_commands.c).
Definition at line 102 of file requests.c.
Referenced by Actor_JumpDownLedge(), AltinPeak_FlipRoom3Switch(), AltinPeak_FlipRoom5Switch(), AltinPeak_FlipRoom6Switch(), AltinPeak_FlipRoom7Switch(), AltinPeak_RideLog(), BattleEffect_CleanupSceneObjects(), BattleFx_PlayQueuedSound(), Event_DoraSendsIsaacToThePlaza(), Event_IvanRejoins(), Event_MonkLetsPartyIntoGrotto(), Event_PushWestPillar(), Event_Rock11Falls(), Event_Rock12Falls(), Event_Rock13Falls(), Event_Rock14Falls(), Event_WatchBoulderFall(), Event_WitnessRiverRescue(), Field_SearchTile(), Kalay_PushTunnelBlock(), LamaTemple_RunHamasFarewell(), MercuryLighthouse_ArriveWithSparks(), MercuryLighthouse_PlyOpensWaterfallPassage(), SceneActor_MoveAndRedraw(), StagedActor_AdvancePair(), ValeStorm_MeetVillagerAtExit6(), ValeStorm_RunRiverSearch(), ValeStorm_ShowBoulderSweepingDownriver(), VenusLighthouse_ArriveThroughSparkPassage(), VenusLighthouse_LandWithRadialDust(), VenusLighthouse_PushAdjacentBlock(), Xian_StrikeTrainingTreeWithForce(), Xian_TalkToKungFuStudent(), and Xian_TalkToWaterCarrier().
| struct FieldActor * Object_GetById | ( | s32 | actor | ) |
Returns an actor, or NULL if it does not exist.
Scene scripts reach it through Actor_Get and OBJ_GET; it is the far-callable form of ObjectTable_Get that the other banks use.
Definition at line 10 of file actor_commands.c.
Referenced by Actor_Get(), Actor_JumpDownLedge(), AlpineCrossing_FeizhiArrives(), AlpineCrossing_FreezePuddle(), AlpineCrossing_GrowSprout(), AlpineCrossing_LiftBoulder(), AlpineCrossing_PrepareFrost(), AltinPeak_AwardFrostJewelAndDrain(), AltinPeak_CelebrateHydrosVictory(), AltinPeak_DrainFirstWater(), AltinPeak_FreezeRoom1Puddle(), AltinPeak_FreezeRoom1WidePuddle(), AltinPeak_FreezeRoom5Puddle(), AltinPeak_FreezeRoom6Puddle(), AltinPeak_FreezeRoom7Puddle(), AltinPeak_FreezeRoom7SecondPuddle(), AltinPeak_FreezeRoom7ThirdPuddle(), AltinPeak_MarkActorTerrainCell(), AltinPeak_PlaceBlockUnderLeader(), AltinPeak_PushRoom7Block(), AltinPeak_ReadFallingRockSign(), AltinPeak_RestoreBlockAutomaticPriority(), AltinPeak_RestoreRoom1(), AltinPeak_RestoreRoom10(), AltinPeak_RestoreRoom9(), AltinPeak_RideLog(), AltinPeak_RollLog(), AltinPeak_SettleRoom7Block(), AltinPeak_ShadowFollowBoulder(), AltinPeak_ShowFirstBeastRoute(), AltinPeak_ShowSecondBeastRoute(), AltinPeak_UpdateFrostPillarPriority(), AltmillerCave_CheckFrostTargetCollision(), AltmillerCave_FreezePuddle(), AltmillerCave_HopSelectedActor(), AltmillerCave_Initialize(), AltmillerCave_MatchLeaderPriority(), AltmillerCave_MeetInvisibleBabi(), AltmillerCave_PlaceLight(), AltmillerCave_SpinLights(), AltmillerCave_UpdateMovedObstacle(), BabiLighthouse_AdvanceNearbyPair(), BabiLighthouse_ClimbDownOrAdvancePair(), BabiLighthouse_ClimbOrAdvancePair(), BabiLighthouse_FallToExit(), BabiLighthouse_JumpFromLedge(), BabiLighthouse_LandWithParticles(), BabiLighthouse_RefreshMovableBlockTiles(), BabiLighthouse_RegroupPartyMember(), BabiLighthouse_SetupScene(), BabiLighthouse_UpdateMovedBlock(), BattleEffect_UpdatePhasedRadialParticle(), BattleFx_FinishSceneAndReleaseHeapBlock(), BattleFx_PlayCueAndStartEmitterOnTarget(), BattleFx_RunAngledApproachPhases(), BattleFx_RunMercuryDjinnCapture(), BattleFx_RunVenusDjinnCapture(), BattleFx_SetupResourcesAndWindow(), BattleFx_SteerPushedTarget(), BattleFx_UpdateDescendingOrbitObject(), BattleFx_UpdateRadialSpread(), BattleFx_UpdateRandomTargetParticle(), Beast_HopAway(), Bilibin_RestoreRaisedEntrance(), Bilibin_RestoreRiverActors(), Bilibin_UpdateRiverBlockCells(), Bilibin_UpdateRiverEffect(), Bilibin_UpdateVillageBlockCells(), BilibinCave_RestoreDouseSection(), BilibinCave_UpdateFrostTargetFromMovableActors(), BilibinInteriors_Initialize(), Clear_LoadBackground(), ColosseumEntrance_AnnounceFinals(), ColosseumEntrance_EscortToEastExit(), ColosseumEntrance_EscortToWestExit(), ColosseumEntrance_ShowClearedTrial(), ColosseumEntrance_ShowFailedTrial(), Colosso_AskDoneCheering(), Colosso_AskReadyToRace(), Colosso_FadeInCompetitor(), Colosso_FindActorAhead(), Colosso_OfferCheeringSpot(), Colosso_RestoreCompetitor(), Colosso_ShowItemIcon(), Colosso_StartRaceGauge(), Colosso_TakePlaceForMatch(), Colosso_UpdatePathRival(), ColossoLog_CollectFinishEquipment(), ColossoLog_Initialize(), ColossoLog_IntroduceFinalCourse(), ColossoLog_PlayPostBattleReunion(), ColossoLog_PushActorAhead(), ColossoLog_UpdateEastEndCollision(), ColossoLogRollingStage_CheckObstacleDestination(), ColossoLogRollingStage_RaiseLinkedSceneEffect(), ColossoLogRollingStage_SceneTask(), ColossoLogRollingStage_SpawnPeriodicParticle(), ColossoRiver_CollectFinishItem(), ColossoRiver_ExplainFinalsRules(), ColossoRiver_Initialize(), ColossoRiver_MarkCourseTerrain(), ColossoRiver_MoveActorPairByOffset(), ColossoRiver_PlaceFinishItemAboveActor(), ColossoRiver_PushObjectAhead(), ColossoWall_ApproachFinishAndTakeItem(), ColossoWall_Initialize(), ColossoWall_IntroduceSecondFinals(), ColossoWall_MovePusherAndLog(), ColossoWall_PushAdjacentObstacle(), ColossoWall_PushBlockToCell(), ColossoWall_RaiseLinkedSceneEffect(), ColossoWall_RollLogToCell(), ColossoWall_UpdateMovingPlatforms(), ColossoWall_UpdateRollingLogCollision(), CrossboneIsle_DrawHorizontalBlockFootprint(), CrossboneIsle_DrawVerticalBlockFootprint(), CrossboneIsle_MoveSelectedActorAndBlock(), CrossboneIsle_RedrawHorizontalBlockRoute(), CrossboneIsle_RedrawVerticalBlockRoute(), CrossboneIsle_RestoreMovedRoomBlock(), CrossboneIsle_SpawnBlockMovedBurst(), CrossboneIslePillarRooms_DrawRaisedFootprint(), CrossboneIslePillarRooms_FreezePool(), CrossboneIslePillarRooms_InitializePillarPriority(), CrossboneIslePillarRooms_LowerActorToLedge(), CrossboneIslePillarRooms_PrepLoweredActor(), CrossboneIslePillarRooms_QueryFootprint(), CrossboneIslePillarRooms_RestoreFlaggedPillar(), CrossboneIslePillarRooms_RestoreGroundFootprint(), CrossboneIslePillarRooms_ShrinkPillar(), CrossboneIslePillarRooms_SortPillarActors(), CrossboneIslePillarRooms_SpawnUnusedLeaderParticle(), CrossboneIslePillarRooms_TryJumpAcrossPillar(), CrossboneIslePillarRooms_UpdateActorPriority(), CrossboneIslePillarRooms_UpdateFrozenPoolPriority(), CrossboneIslePillarRooms_UpdateLeaderPriority(), CrossboneIslePlatformRooms_CheckFifthPursuerTrigger(), CrossboneIslePlatformRooms_CheckFirstPursuerTrigger(), CrossboneIslePlatformRooms_CheckSecondPursuerTrigger(), CrossboneIslePlatformRooms_FaceBaneTowardLeader(), CrossboneIslePlatformRooms_FollowSecondBlock(), CrossboneIslePlatformRooms_InitializeScene2(), CrossboneIslePlatformRooms_InitializeScene3(), CrossboneIslePlatformRooms_PositionSecondBlockMapObject(), CrossboneIslePlatformRooms_RepaintFourthAndFifthBlockCells(), CrossboneIslePlatformRooms_RestoreEastUnderfootCell(), CrossboneIslePlatformRooms_RestoreFirstBlockTerrain(), CrossboneIslePlatformRooms_RestoreMiddleUnderfootCell(), CrossboneIslePlatformRooms_RestoreThirdBlockEastCell(), CrossboneIslePlatformRooms_RestoreThirdBlockWestCell(), CrossboneIslePlatformRooms_RestoreWestUnderfootCell(), CrossboneIslePlatformRooms_TrackPursuerColumn(), CrossboneIslePlatformRooms_UpdateBlockPriorities(), CrossboneIslePlatformRooms_UseBlueKey(), Djinn_RunBattleStartHop(), Djinn_RunJupiterJoinEffect(), Djinn_RunMarsJoinEffect(), EnterDoor(), Event_ApproachSuspects(), Event_AskWhetherIvanWentToLunpa(), Event_AudienceWithMcCoy(), Event_BaneFirstEscape(), Event_BaneKeepsAway(), Event_BaneLastEscape(), Event_BaneSecondEscape(), Event_BlockCenterTriggerCells(), Event_BlockLeftTriggerCell(), Event_BlockRightTriggerCell(), Event_BlowAwayBushA(), Event_BlowAwayBushB(), Event_CarryBlockAcrossGap(), Event_CarryBlockPastWall(), Event_CarryFloatingBlock(), Event_CenterStatueMoved(), Event_CheckAheadFacingNorth(), Event_CheckAheadFacingSouth(), Event_CheckCrateMoved(), Event_CloakFades(), Event_ConfrontSaturosAndMenardi(), Event_CrowdRecognizesIsaac(), Event_DemonstrateLevitation(), Event_DemonstratePsynergy(), Event_DepartForQuest(), Event_DiscussSuspiciousGuests(), Event_DodgeFifthPursuer(), Event_DodgeFirstPursuer(), Event_DodgeFourthPursuer(), Event_DodgeSecondPursuer(), Event_DodgeThirdPursuer(), Event_DoraWakesIsaac(), Event_DouseBeginsOnPillar(), Event_DousePipe(), Event_DouseStorm(), Event_DouseTravelMarker(), Event_EnterJail(), Event_EnterJail(), Event_EnterNortheastHouse(), Event_EnterNortheastHouse(), Event_EnterNorthHouse(), Event_EnterNorthHouse(), Event_EnterNyunpasHall(), Event_EnterSparklingPassage(), Event_EnterWaterfallGrotto(), Event_FallThroughFloor(), Event_FightTret(), Event_FinalsBegin(), Event_FlipWaterSwitch(), Event_ForceSidewalkBlock(), Event_ForceTree(), Event_FreezeDousePuddle(), Event_FreezeEastLowerTarget(), Event_FreezeEastTarget(), Event_FreezeEastUpperTarget(), Event_FreezeFarEastTarget(), Event_FreezeHiddenPuddle(), Event_FreezeInnerWestLowerTarget(), Event_FreezeOnScales(), Event_FreezePuddle(), Event_FreezePuddleA(), Event_FreezePuddleB(), Event_FreezeThirdPool(), Event_FreezeWestLowerTarget(), Event_FreezeWestTarget(), Event_FreezeWestUpperTarget(), Event_FrostBeginsOnThirdPool(), Event_FrostRaisesPillar(), Event_GaretAsksToProtectFamily(), Event_GaretComesHome(), Event_GaretJoinsIsaac(), Event_GaretMeetsHisSister(), Event_GatherAfterRiverRescue(), Event_GrowPlant11(), Event_GrowPlant12(), Event_GrowPlant13(), Event_GrowPlant14(), Event_GuardsArrestParty(), Event_HopDownLedge(), Event_HopDownStep(), Event_HopEast(), Event_HopEast(), Event_HopNorth(), Event_HopNorth(), Event_HopNorthUnlessAtCell30x52(), Event_HopSouth(), Event_HopSouth(), Event_HopSouthOrPushBlocks(), Event_HopWest(), Event_HopWest(), Event_HopWestUnlessAtCell32x50(), Event_HurryToThePlaza(), Event_InnerBlock1Moved(), Event_InnerBlock2Moved(), Event_InnerBlock3Moved(), Event_InnerBlock4Moved(), Event_InnerBlock5Moved(), Event_InnerBlock6Moved(), Event_IodemRejoins(), Event_IvanRejoins(), Event_JillGivesHardNut(), Event_JumpAcrossGap(), Event_JumpAcrossRoofGap(), Event_JumpGapWest(), Event_JumpOrPushRoom4Pillar(), Event_JumpToNextPillar(), Event_KiteKeepsAway(), Event_KnockDownObstacle(), Event_KradenFindsHall(), Event_KradenPlansSanctumVisit(), Event_KradenSeesLunaPictureChange(), Event_KradenSetsOff(), Event_KradenStopsPartyLeaving(), Event_LandOnPillar(), Event_LiftCarryBlock(), Event_LookAheadOrPushFirstBlock(), Event_McCoyRewardsParty(), Event_MeetFlint(), Event_MeetIvan(), Event_MeetSaturosAndMenardi(), Event_MendingTheRoof(), Event_MonkLetsPartyIntoGrotto(), Event_MoveBlock(), Event_MoveBlockOntoSwitch(), Event_MoveBlockTowardWall(), Event_MoveCarryBlock(), Event_MoveDepthBlock(), Event_MoveEastObjectIntoHole(), Event_MoveEastPillar(), Event_MoveEastPillar(), Event_MoveFirstObject(), Event_MoveGateBlock(), Event_MoveLadyStatue(), Event_MovePillar(), Event_MovePillarSwitchBlock(), Event_MoveSecondObject(), Event_MoveSinkingPillar(), Event_MoveStone(), Event_MoveStump(), Event_MoveStump(), Event_MoveSwitchBlock(), Event_MoveTree(), Event_MoveWestObjectIntoHole(), Event_MoveWestPillar(), Event_MoveWestPillar(), Event_NyunpaOffersTest(), Event_OpenDoorAndLeave(), Event_OpenFourthBlueDoor(), Event_OpenThirdBlueDoor(), Event_OuterLeftBlockMoved(), Event_OuterRightBlockMoved(), Event_OverhearKraden(), Event_PassNorthWallOpening(), Event_PassSouthWallOpening(), Event_PityIvan(), Event_PresentRewardChests(), Event_PsynergyStoneIsGone(), Event_PullJillFromRiver(), Event_PushActorAhead(), Event_PushBlock(), Event_PushBlock(), Event_PushCenterStatueNorth(), Event_PushFirstBlock(), Event_PushLeftBeamStatueNorth(), Event_PushLeftBeamStatueSouth(), Event_PushObject(), Event_PushObjectNorth(), Event_PushObjectOffLedge(), Event_PushObjectOverEdge(), Event_PushOrClimbDown(), Event_PushPipeworksBlock(), Event_PushRightBeamStatueNorth(), Event_PushRightBeamStatueSouth(), Event_PushStumpOver(), Event_PushTreeByHand(), Event_ReadCorneredSuspectsMinds(), Event_ReadDogMind(), Event_ReadMindAndWelcomeIsaacBack(), Event_ReadMindOnDodonpa(), Event_ReadMindOnIvan(), Event_ReadMindOnScaredGrownUps(), Event_ReadMindOnWealth(), Event_ReadMindOnWinter(), Event_ReconsiderQuest(), Event_RepeatMtAlephWarningAtEitherPause(), Event_RepeatMtAlephWarningFromFirstApproach(), Event_RepeatMtAlephWarningFromSecondApproach(), Event_RevealEnds(), Event_RevealStarts(), Event_RideLog(), Event_RideMovingSidewalk(), Event_RiseToElementalStarRoom(), Event_Rock11Falls(), Event_Rock12Falls(), Event_Rock14Falls(), Event_RollLogEastWest(), Event_RollLogNorthSouth(), Event_RollLongLog(), Event_RoofMended(), Event_SaveMovedRockColumns(), Event_SentToAidElders(), Event_SetBlockOnBalance(), Event_SetLeaderAsEffectTarget(), Event_SettleMovedObject(), Event_SettleRocks(), Event_SettleRocks(), Event_SetWeightOnScales(), Event_SinkPillarA(), Event_SinkPillarB(), Event_SlideBlock10North(), Event_SlideBlock10South(), Event_SlideBlock11East(), Event_SlideBlock11West(), Event_SlideBlock12East(), Event_SlideBlock12West(), Event_SlideBlock13East(), Event_SlideBlock13West(), Event_SlideBlock14East(), Event_SlideBlock14West(), Event_SlideBlock15East(), Event_SlideBlock15West(), Event_SlideBlock16East(), Event_SlideBlock16West(), Event_SlideBlock17North(), Event_SlideBlock17South(), Event_SlideBlock18North(), Event_SlideBlock18South(), Event_SlideBlock19East(), Event_SlideBlock19West(), Event_SlideBlock8North(), Event_SlideBlock8South(), Event_SlideBlock9North(), Event_SlideBlock9South(), Event_StartMovingSinkingPillar(), Event_StartRising(), Event_SteadyPillars(), Event_StepOffScales(), Event_StepOnEastWallSwitch(), Event_StepOnFloorSwitch(), Event_StepOnScales(), Event_StepOnWallSwitch(), Event_StepOnWestWallSwitch(), Event_StopRising(), Event_StormCarriesPartyAway(), Event_SuspectedLeaderDodges(), Event_SuspectedThiefDodges(), Event_TakeMarsStar(), Event_TalkAboutRescuingFelix(), Event_TalkOfHammetsCaravan(), Event_TalkToArmorMerchant(), Event_TalkToArmorMerchant(), Event_TalkToArmorMerchant(), Event_TalkToArmorShopkeeper(), Event_TalkToArmorShopkeeper(), Event_TalkToAzart(), Event_TalkToEastGuard(), Event_TalkToFreeClimbAttendant(), Event_TalkToHealer(), Event_TalkToInnkeeper(), Event_TalkToInnkeeper(), Event_TalkToInnkeeper(), Event_TalkToInnkeeper(), Event_TalkToInnkeeper(), Event_TalkToInnkeeper(), Event_TalkToItemMerchant(), Event_TalkToItemMerchant(), Event_TalkToItemMerchant(), Event_TalkToItemShopkeeper(), Event_TalkToItemShopkeeper(), Event_TalkToJumpingStudent(), Event_TalkToMiniMazeAttendant(), Event_TalkToMovingSidewalkAttendant(), Event_TalkToPipeworksAttendant(), Event_TalkToPriest(), Event_TalkToRockslideSurvivor(), Event_TalkToScalesAttendant(), Event_TalkToShopkeeper(), Event_TalkToTemplePriest(), Event_TalkToTravelingPriest(), Event_TalkToWallAttendant(), Event_TalkToWeaponMerchant(), Event_TalkToWeaponMerchant(), Event_TalkToWeaponMerchant(), Event_TalkToWeaponShopkeeper(), Event_TalkToWeaponShopkeeper(), Event_ThankForCapturingThieves(), Event_TouchThirdBlock(), Event_TravelersLeaveAfterBattle(), Event_UpdateFirstBlockTerrain(), Event_UpdateMovedRockCell(), Event_UpdateSecondBlockTerrain(), Event_UpdateThirdBlockTerrain(), Event_UseBlackOrb(), Event_UseLadder(), Event_UseRedKey(), Event_VillagerAsksForHelp(), Event_VisitSickDora(), Event_WarnAboutMtAleph(), Event_WarnAgainstSneakingUpMtAleph(), Event_WatchBoulderFall(), Event_WatchThePuppies(), Event_WishEldersWereBrave(), Event_WitnessCheersForgeCaught(), Event_WitnessRiverRescue(), FallIntoPit(), Field_ClimbDown(), Field_ClimbUp(), Field_TryJumpForward(), Field_UpdateObjectVisibilityBounds(), FieldFx_UpdateMindReadWave(), FieldScene_BuildDescriptorAndInstallTask(), FieldScene_FindActorRegion(), FieldScene_RedrawActorFootprint(), FieldScene_RunEntrySetup(), Fuchin_FollowLeaderWithLight(), Fuchin_PlacePlatformAtCell(), FuchinTemple_AnimateRevealLesson(), FuchinTemple_FaceLeader(), FuchinTemple_FehSeesChi(), FuchinTemple_FeizhiLeavesForHsu(), FuchinTemple_NyunpaTeachesKi(), FuchinTemple_RunHamasRevealLesson(), FuchinTemple_SpawnGrottoEntryParticle(), FuchinTemple_SpawnNyunpasParticles(), FuchinTemple_StudentExplainsChiRules(), FuchinTemple_StudentsSeeTreeFall(), FuchinTemple_StudentWalksAroundTree(), FuchinTemple_ToppleTreeEast(), FuchinTemple_ToppleTreeNorth(), FuchinTemple_ToppleTreeSouth(), FuchinTemple_ToppleTreeWest(), Garet_StepOnDeck(), GomaCaveEntrance_LeapStump(), GomaCavePillar_SettleEastPillar(), GomaCavePillar_SpawnFragment(), GomaCavePillar_SpawnStumpDust(), GomaCaveWaterway_LeapStump(), GondowanCave_RunSpinningLeap(), HammetPalace_HammetsHomecoming(), HammetPalace_SetUpEntrance(), HeatGauge_CountStep(), Houses_PlaceSheltering(), Houses_TalkToInnkeeper(), Imil_Initialize(), Imil_LeaveDjinnRoom(), Imil_LeaveNorth(), Imil_MeetMiaAtOldCouplesHouse(), Imil_MiaSaysFarewellToApprentices(), Imil_MoveSnowmanToChimney(), Imil_OpenDoorAndExit(), Imil_TalkToApprentice(), Imil_TalkToArmorMerchant(), Imil_TalkToInnkeeper(), Imil_TalkToItemMerchant(), Imil_TalkToOldMan(), Imil_TalkToWeaponMerchant(), Imil_UpdateMapLayerByLeaderPosition(), Imil_WalkTowardDjinni(), Ivan_StepOnDeck(), Kalay_AlternateGuidesPacing(), Kalay_AskAboutCaveAccess(), Kalay_DisableLeaderAutomaticPriority(), Kalay_EnableLeaderAutomaticPriority(), Kalay_EnterPalace(), Kalay_FreezeFrostTarget(), Kalay_OpenDoorAndExit(), Kalay_PrepareCave(), Kalay_PrepareTown(), Kalay_PrepareTunnel(), Kalay_PushTunnelBlock(), Kalay_StartTouristFidgeting(), Kalay_StartTrackingLeader(), Kalay_TalkToArmorMerchant(), Kalay_TalkToItemMerchant(), Kalay_TalkToWeaponMerchant(), Kalay_UpdateNutOrbit(), Kalay_UpdateTunnelPassages(), KalayInteriors_OpenDoorAndExit(), KalayInteriors_TalkToInnkeeper(), KalayInteriors_TalkToPriest(), KalayTolbiDocks_GaretSeesTheKaragol(), KalayTolbiDocks_PassengersConfrontTourGuide(), KalayTolbiDocks_PrepareTolbiDocks(), KalayTolbiDocks_RemindBoardShip(), KalayTolbiDocks_SettleBlock(), KalayTolbiDocks_UpdateBlockCells(), Kolima_AnimateSwitchOrExit(), Kolima_Initialize(), Kolima_SetProtectiveFieldHeight(), Kolima_ShowBridgeCollapse(), Kolima_TalkToHealer(), Kolima_WalkThroughExit(), Kolima_WitnessForestCurse(), KolimaForest_HopEast(), KolimaForestBend_Initialize(), KolimaForestBend_RollLog(), KolimaForestBridge_FlickerBarriers(), KolimaForestBridge_Initialize(), KolimaForestBridge_PushLog(), KolimaForestBridge_WitnessForestCurse(), KolimaForestRiver_Initialize(), KolimaForestRiver_PushLog(), KolimaForestTree_Initialize(), KolimaForestTree_RejectHermesWater(), KolimaInteriors_Initialize(), KolimaInteriors_TalkToArmorMerchant(), KolimaInteriors_TalkToInnkeeper(), KolimaInteriors_TalkToItemMerchant(), KolimaInteriors_TalkToWeaponMerchant(), LamaTemple_EnterHamasRoom(), LamaTemple_TalkToHealer(), Leader_FaceFeizhi(), Leader_FacesCounter(), Leader_GetSide(), Leader_StepOnDeck(), LemurianShip_SetupScene(), LiftBlock(), LinkLobby_PollPeerReady(), LinkLobby_ReportWinTallies(), Lunpa_KickUpLeaderDust(), Lunpa_UpdateIcePillarDrawOrder(), Lunpa_WatchForUncloakedParty(), LunpaFortress_CheckGuardDoorApproach(), LunpaFortress_CheckOuterDoorApproach(), LunpaFortress_IsGuardNearViewCenter(), LunpaFortress_IsLeaderInGuardHorizontalSight(), LunpaFortress_IsLeaderInGuardVerticalSight(), LunpaFortress_IsLeaderInOuterPatrolSafeZone(), LunpaFortress_IsLeaderInPatrolSafeZone(), LunpaFortress_IsLeaderNearGuard(), LunpaFortress_IsLeaderOutsideUpperHall(), LunpaFortress_IsLeaderPassingPatrollingGuard(), LunpaFortress_LowerColumn(), MeetSandMonster(), MercuryLighthouse_ArriveWithSparks(), MercuryLighthouse_EnterRisingPassage(), MercuryLighthouse_Initialize(), MercuryLighthouse_LeaveThroughPassage(), MercuryLighthouse_MiaJoinsAfterRescue(), MercuryLighthouse_MiaOpensEntranceWithPly(), MercuryLighthouse_MiaSensesSomeoneInside(), MercuryLighthouse_MoveStoneDoorBlocks(), MercuryLighthouse_OpenGateWithMovedBlock(), MercuryLighthouse_OpenMovedBlockCrossing(), MercuryLighthouse_OpenStairGateWithMovedBlock(), MercuryLighthouse_PressGateFloorSwitch(), MercuryLighthouse_PressStairFloorSwitch(), MercuryLighthouse_RaiseActorWithSparks(), MercuryLighthouse_SprayAboveStatue(), MercuryLighthouse_StartStatueSlide(), MercuryLighthouse_SyncBlockFlags(), MercuryLighthouse_WalkLeaderIn(), MercuryLighthouseAerie_AlexAppears(), MercuryLighthouseAerie_CallLift(), MercuryLighthouseAerie_ConfrontSaturos(), MercuryLighthouseAerie_FlickerBeacon(), MercuryLighthouseAerie_Initialize(), MercuryLighthouseAerie_JumpToPlatform(), MercuryLighthouseAerie_LowerLift(), MercuryLighthouseAerie_PartyArrives(), MercuryLighthouseAerie_RaiseLift(), MercuryLighthouseAerie_SaturosAndAlexWarpIn(), MercuryLighthouseAerie_SaturosAndAlexWarpOut(), MercuryLighthouseAerie_SettlePlatforms(), MercuryLighthouseAerie_StepOntoPlatform(), MercuryLighthouseEntrance_ActivateWithPly(), MercuryLighthouseEntrance_LizardManBlocksLeader(), MercuryLighthouseEntrance_LizardManBlocksMia(), MercuryLighthouseEntrance_MiaEntersLighthouse(), MercuryLighthouseEntrance_MiaWatchesLeader(), Mia_StepOnDeck(), MogallForest_ApeLeadsToKillerApe(), MogallForest_FirstArea_ApeAttacks(), MogallForest_FirstArea_EastApeShowsWay(), MogallForest_FirstArea_JumpNorth(), MogallForest_FirstArea_JumpSouth(), MogallForest_FirstArea_NorthApeShowsWay(), MogallForest_FirstArea_PushLog(), MogallForest_HopActorTo(), MogallForest_Initialize(), MogallForest_KillerApeAttacks(), MogallForest_SecondArea_EastApeShowsWay(), MogallForest_SecondArea_NorthApeShowsWay(), MogallForest_SecondArea_PushLog(), MogallForest_SecondArea_SouthApeShowsWay(), MogallForest_SecondArea_UpdateMovableObstacle(), MogallForest_SpawnPuffRing(), MogallForest_ThirdArea_ApeAttacks(), MogallForest_ThirdArea_CentralApeShowsWay(), MogallForest_ThirdArea_EastApeShowsWay(), MogallForest_ThirdArea_JumpWest(), MogallForest_ThirdArea_UpdateNorthObstacle(), MogallForest_ThirdArea_UpdateSouthObstacle(), MogallForest_ThirdArea_WestApeShowsWay(), MogallForest_TryJumpLeaderTo(), Motion_LaunchFromFocusedObject(), Object_GetById(), Object_LinkObjectAndSetCallback(), ObjectMotion_SetActionCallback(), ObjectVisual_CopyAttributes(), OverlayObject_ResetMotionFields(), Pillar_SortAgainstLeader(), ReceiveBlackOrb(), ReportToFaran(), Sanctum_FaceActorNamedByTimer(), Sanctum_HideHealerAfterimage(), Sanctum_IsLeaderFacingHealer(), Sanctum_MatchLeaderPriority(), Sanctum_ReceiveWiseOnesMission(), Sanctum_ReenactSolSanctum(), Sanctum_RequestQuestAcceptance(), Sanctum_ShowHealerAfterimage(), Sanctum_SpawnActorSpark(), Sanctum_SpawnOrbitingEffect(), Sanctum_UpdateHealerAfterimage(), Scene_FloatNut(), Scene_Initialize(), Scene_RunEntrySetup(), Scene_TalkToActor(), SceneActor_FindNearestSlotOfKindF2(), SceneActor_MoveAndRedraw(), SceneActor_PlacePairAtOffset(), SceneActor_ResetActorRun(), SceneActor_SetFlagBitByRelativeDepth(), SceneActor_SwapPositionsByDepth(), SceneEffect_SpawnNineRadialEffects(), SceneEffect_SpawnParticleEveryFourthFrame(), SetSail(), Ship_UpdateSwell(), SlideDownDune(), SolSanctum_StartFloatingLights(), SolSanctumElementalStarRoom_AlexTakesStars(), SolSanctumElementalStarRoom_AnimateAlexTeleport(), SolSanctumElementalStarRoom_DemandElementalStars(), SolSanctumElementalStarRoom_EnterStarRoom(), SolSanctumElementalStarRoom_Initialize(), SolSanctumElementalStarRoom_LineUpFollowers(), SolSanctumElementalStarRoom_UnmaskFelix(), SolSanctumEntrance_InspectInnerStatues(), SolSanctumEntrance_IntroduceSanctum(), SolSanctumEntrance_KradenSuspectsHiddenPassage(), SolSanctumEntrance_RestoreInteriorState(), SolSanctumEruption_PlaceBeforeStar(), SolSanctumEruption_PlayHostageScene(), SolSanctumEruption_RaiseAndShrinkActor(), SolSanctumEruption_SpawnEffectPair(), SolSanctumEruption_StepEmbers(), SolSanctumEruption_ThrowEruptionRing(), SolSanctumEruption_UpdateWiseOnePalette(), SolSanctumLunaSolRooms_IntroduceSolAndLunaRooms(), SolSanctumLunaSolRooms_ShowFloatingEye(), SolSanctumStatue_ExplainStatuePuzzle(), SolSanctumStatue_Initialize(), SolSanctumStatue_IsActorAtCell(), SolSanctumStatue_MoveUnusedNorthwestStatue(), SolSanctumStatue_OpenSeal(), SolSanctumStatue_PushStatue(), SolSanctumStatue_RunSealOpenedSequence(), StagedActor_AdvancePair(), StagedActor_RunStepEffect(), SuhallaDesert_CatchInStorm(), SuhallaDesert_ChaseLeader(), SuhallaDesert_RaiseStorm(), SuhallaDesert_SetUpFirstSceneStorms(), SuhallaDesert_SetUpSecondSceneStorms(), SuhallaDesert_UpdateCaptureTimer(), TalkToShopkeeper32(), Title_Run(), Tolbi_ApplyEntryState(), Tolbi_CopyLeaderPriority(), Tolbi_EnterDoor(), Tolbi_FreezePuddle(), Tolbi_GrowSprout(), Tolbi_KidStopForTarget(), Tolbi_MeetSearchingSoldiers(), Tolbi_TalkToOlderBrother(), Tolbi_TalkToYoungerSibling(), Tolbi_UpdateKid(), TolbiInteriors_ApplyEntryState(), TolbiInteriors_EnterDoor(), TolbiInteriors_TalkToArmorShopkeeper(), TolbiInteriors_TalkToItemShopkeeper(), TolbiInteriors_TalkToPriest(), TolbiInteriors_TalkToWeaponShopkeeper(), TolbiShipDeck_ApplyEntryState(), TolbiShipDeck_CatchCrewmanFromEast(), TolbiShipDeck_CatchCrewmanFromWest(), TolbiShipDeck_DepartFromKalay(), TolbiShipDeck_DepartWithParty(), TolbiShipDeck_JumpIntoKrakenBattle(), TolbiShipDeck_LeapAtOuranos(), TolbiShipDeck_LeapAtSean(), TolbiShipDeck_MonsterLandsOnDeck(), TolbiShipDeck_MonstersAttackCrew(), TolbiShipDeck_MonstersBoard(), TolbiShipDeck_OfferToScoutIsland(), TolbiShipDeck_PlaceLeaderOnDeck(), TolbiShipDeck_PlacePassengersAgreedToRow(), TolbiShipDeck_PlaceWaitingPassengers(), TolbiShipDeck_RestOars(), TolbiShipDeck_RowersDisembark(), TolbiShipDeck_SetUpAfterKraken(), TolbiShipDeck_SetUpAtAnchor(), TolbiShipDeck_SetUpOars(), TolbiShipDeck_SetUpUnderSail(), TolbiShipDeck_ShowOar(), TolbiShipDeck_SightLand(), TolbiShipDeck_SightSeaMonsters(), TolbiShipDeck_SwingOar(), TolbiShipDeck_TalkToWaitingPassenger21(), TolbiShipDeck_TalkToWaitingPassenger24(), TolbiShipDeck_ThankForKraken(), TolbiShipDeck_WatchCrewDecideToSail(), TolbiShipInteriors_AskForReplacementOarsmen(), TolbiShipInteriors_AskPassenger12ToRow(), TolbiShipInteriors_AskPassenger9ToRow(), TolbiShipInteriors_AskToRow(), TolbiShipInteriors_InstallRowingDeckActors(), TolbiShipInteriors_IntroduceReplacementOarsman(), TolbiShipInteriors_IsSpotFree(), TolbiShipInteriors_NoticeShipRocking(), TolbiShipInteriors_PaceCabin(), TolbiShipInteriors_PlaceActor(), TolbiShipInteriors_ReachIsland(), TolbiShipInteriors_RejoinParty(), TolbiShipInteriors_ReportMonstersBelowdecks(), TolbiShipInteriors_ReturnLuckyAnchor(), TolbiShipInteriors_RunSceneCommand(), TolbiShipInteriors_SetSeatActorCollision(), TolbiShipInteriors_SetUpCabin(), TolbiShipInteriors_StepBesideLeader(), TolbiShipInteriors_TalkToPriest(), TolbiShipInteriors_WatchPacer(), TolbiShipInteriors_WatchWarriorsStormOff(), TolbiShipMast_AnnounceLand(), TolbiShipMast_Initialize(), TolbiShipMast_InitializeDriftingActor(), TolbiShipMast_RunAvastScene(), TolbiShipMast_RunLandingSequence(), TolbiShipMast_SetupVisibleLeaderLookout(), TolbiShipMast_ShowMonsters(), TolbiSpring_Initialize(), TolbiSpring_InitializeTossSimulation(), TolbiSpring_RunToss(), TolbiSpring_SetActorAppearance(), TolbiSpring_SetSpriteStorageKind(), TolbiSpring_UpdateTossSimulation(), TretTreeBranch_ShiftLeaderAndCameraByCells(), TretTreeInteriors_EnterRoom(), TretTreeInteriors_PlayPostBattleConversation(), TretTreeInteriors_RunLandingDustScene(), TretTreeInteriors_StepOnCrackedFloor(), TunnelRuins_DropBlockOnStack(), TunnelRuins_HopLeaderTo(), TunnelRuins_Initialize(), TunnelRuins_MarkPushPillarCells(), TunnelRuins_PuddleFollowsPillar(), TunnelRuins_RideBlockBelow(), TunnelRuins_SettleBalance(), TunnelRuins_UpdateBlockCells(), TunnelRuins_UpdateFirstPillarCells(), TunnelRuins_UpdateSecondPillarCells(), TunnelRuins_UpdateTrackedActor(), Vale_AdjustVillagerPriorityForLeaderHeight(), Vale_AskAboutSneakingToAleph(), Vale_CycleActor25Palette(), Vale_CycleFirstBoardPalette(), Vale_CycleSecondBoardPalette(), Vale_CycleVillagerNinePalette(), Vale_HaveJennaStopTheAlephDetour(), Vale_HaveVillagerWatchTheLeader(), Vale_Initialize(), Vale_MoveActorAlongHigherZPath(), Vale_MoveActorAlongLowerZPath(), Vale_SynchronizeAlephVillagerPause(), Vale_UpdateGaretPaletteAndEffects(), Vale_UpdateLeaderPaletteAndEffects(), ValeBabi_CyclePaletteWithoutParticles(), ValeBabi_CyclePaletteWithParticles(), ValeBabi_Initialize(), ValeCave_ApplyEntryState(), ValeCave_CenterActorOnCell(), ValeCave_FaceActorTowardLeader(), ValeCave_SinkObjectWithParticles(), ValeHome_FightTravelers(), ValeHome_Initialize(), ValeHome_RejoinParty(), ValeHome_UpdateActor15Psynergy(), ValeHome_UpdateActor17Psynergy(), ValeHome_UpdateActor20Psynergy(), ValeInteriors_Initialize(), ValeInteriors_SpawnDriftingSprite(), ValeKraden_Initialize(), ValeKraden_WalkTowardLeader(), ValeStorm_CopyLeaderSpritePriority(), ValeStorm_CycleBoulderPalette(), ValeStorm_FlashBoulderSceneAnimationEntries(), ValeStorm_FlickerGlowOffset(), ValeStorm_GaretCommentsOnBlockedPath(), ValeStorm_Initialize(), ValeStorm_RunCallOutSequence(), ValeStorm_ShowBoulderSweepingDownriver(), ValeStorm_UpdateBoulderSceneEffects(), ValeStorm_UpdatePulsingGlow(), Vault_JumpActorToAndWait(), Vault_OpenDoorwayAndEnter(), Vault_ShowThought(), Vault_SpawnDriftingEffect(), Vault_UpdateBoneProximityFlag(), Vault_UpdateRoofComplainerProximity(), Vault_UpdateWalkingVillager(), VaultCave_IsNorthernBlockOnSwitch(), VaultCave_IsSouthernBlockOnSwitch(), VaultCave_PushBlockAhead(), VaultCave_ResetFallingObjectAtActorCell(), VaultCave_StartFrostControlledFalls(), VaultCave_StartTimedFalls(), VaultCave_UpdateFrostControlledFallingObjects(), VaultCave_UpdateFrostTargetPriorities(), VaultCave_UpdateTimedFallingObjects(), VaultCave_UseAutomaticFrostPriorities(), VaultCave_UseUnderfootFrostPriorities(), VaultInteriors_AdvanceSuspectRoute(), VaultInteriors_DefeatThieves(), VaultInteriors_DiscussMindReading(), VaultInteriors_FaceSuspectsTowardLeader(), VaultInteriors_IvanJoinsRodSearch(), VaultInteriors_LoseToThieves(), VaultInteriors_ResetSuspectRoutes(), VaultInteriors_ReturnStolenGoods(), VaultInteriors_SetPartyImagePriority(), VaultRevisit_JumpActorToAndWait(), VenusLighthouse_AnimateEastTileWave(), VenusLighthouse_AnimatePairedTileWaves(), VenusLighthouse_AnimateWestTileWave(), VenusLighthouse_FollowSupportingBlockHeight(), VenusLighthouse_LowerFloatingBlocks(), VenusLighthouse_PrepareStandingActor(), VenusLighthouse_PushAdjacentBlock(), VenusLighthouse_RaiseLeaderWithSpray(), VenusLighthouse_StackFloatingBlock(), VenusLighthouse_StepActorWithDust(), VenusLighthouse_VisitPillarActors(), VenusLighthouseAerie_EnterAndConfrontAntagonists(), VenusLighthouseAerie_EruptBeacon(), VenusLighthouseAerie_Initialize(), VenusLighthouseAerie_PlayShebasFall(), VenusLighthouseAerie_StageShebasFall(), VenusLighthouseAerie_UpdateBeamActors(), VenusLighthouseAerie_UpdateRisingOrbit(), VenusLighthouseAerie_UpdateShebaPalette(), VenusLighthouseAerie_UpdateUpperOrbit(), Village_ApplyWaterLevel(), Village_CheckBlockMoved(), Village_EnterDoor(), Village_TalkToThirstyVillager(), Village_WalkThroughDoorway(), WorldMap_BoardBunzasWagon(), WorldMap_CompleteTransfer(), WorldMap_DepartWithTravelers(), WorldMap_DisembarkCarriage(), WorldMap_Initialize(), WorldMap_PlayLighthouseTransition(), WorldMap_RunBlackOrbScene(), WorldMap_RunOpeningRise(), WorldMap_SelectExitByX(), WorldMap_SelectExitByZ(), WorldMap_ShowEndingScene(), WorldMap_SpawnActorEightPuff(), WorldMap_StartAirborneTravel(), WorldMap_StartTransitionEffect(), WorldMap_TransferToExit102(), WorldMap_TransferToExit103(), WorldMap_TransferToExit104(), WorldMap_TransferToExit106(), WorldMap_TransferToTolbiShipInteriors(), WorldMap_UpdateAirborneTravelTimer(), WorldMap_UpdateLocationContacts(), WorldMap_UpdateTransferredActorLanding(), Xian_FreezeSpilledWater(), Xian_Initialize(), Xian_JumpOverSpilledWater(), Xian_MoveAsideForWaterCarrier(), Xian_RotateTrainingTree(), Xian_SpawnTrainingParticles(), Xian_StrikeTrainingTreeWithForce(), Xian_TalkToKungFuStudent(), Xian_TalkToWaterCarrier(), Xian_UpdateFrozenPuddleLayer(), Xian_UpdatePuddlePriority(), Xian_WalkThroughExit(), Xian_WatchWaterCarrierPath(), and XianInteriors_GetLeaderFacing().
The event command "set actor speed": its top speed and acceleration, 16.16 pixels per frame.
Writes the actor's speedLimit and acceleration. Scene scripts reach it as Engine_ActorSetSpeed (OBJ_SPEED, Actor_SetSpeed).
Definition at line 21 of file actor_commands.c.
Referenced by Motion_LaunchFromFocusedObject(), and ObjectMotion_SetSpeedParameters().
Gives an actor an action script (ObjectMotion_SetActionCallback) and lets it run: sets bit 0 of its actionFlags.
Scene scripts reach it as Engine_ActorEnableActionCallback (Actor_SetActionScript and Actor_SetBuiltinAction).
Definition at line 35 of file actor_commands.c.
Referenced by ObjectMotion_EnableActionAndSetCallback().
| void ObjectMotion_EnableActionAndResetMotion | ( | u32 | objectId | ) |
The event command "stop actor": stops its action and puts it back under event control (dispatch script 6), setting bit 0 of its actionFlags.
Scene scripts reach it as Engine_ActorStop (Actor_Stop), about 22 of them.
Definition at line 49 of file actor_commands.c.
Referenced by AltinPeak_ShowSecondBeastRoute(), and ObjectMotion_EnableActionAndResetMotion().
Makes an actor follow another (the linked action script): writes its linkedObject.
Called by the Colosso log scene script, and by Altmiller Cave's as Engine_ActorFollow.
Definition at line 63 of file actor_commands.c.
Referenced by BabiPalace_MeetBabiAfterColosso(), Colosso_OfferCheeringSpot(), ColossoLog_Initialize(), ColossoLog_PlayPostBattleReunion(), ColossoRiver_Initialize(), ColossoWall_Initialize(), Event_DepartForQuest(), and Object_LinkObjectAndSetCallback().
| void Object_RefreshSelectorById | ( | u32 | objectId | ) |
Waits, at most 300 frames, for an actor's script to reach its end (command 0x10).
Called by Motion_SetVarCbAndRefresh, the climbing events and about 28 scene scripts.
Definition at line 77 of file actor_commands.c.
Referenced by AlpineCrossing_FeizhiArrives(), AltmillerCave_RestoreBabiAndInviteParty(), BabiPalace_RestInPalaceBeds(), Event_ApproachSuspects(), Event_DepartForQuest(), Event_DoraWakesIsaac(), Event_FreeRooferAndConfrontThieves(), Event_HurryToThePlaza(), Event_JumpDown(), Event_McCoyRewardsParty(), Event_MoveGateBlock(), Event_ReachArena(), Event_ReachArena(), Event_ReachArena(), Event_ReturnFromMtAleph(), Event_SentToAidElders(), Event_SuspectedLeaderDodges(), Event_SuspectedThiefDodges(), Event_TalkToStartledResident(), Event_WarnAgainstSneakingUpMtAleph(), Event_WatchBoulderFall(), Field_ClimbDown(), Imil_MeetMiaAtOldCouplesHouse(), Kalay_WatchTourGroupDeparture(), Kolima_WitnessForestCurse(), KolimaForestBridge_WitnessForestCurse(), KolimaForestTree_RestoreTret(), MercuryLighthouse_MoveStoneDoorBlocks(), Motion_SetVarCbAndRefresh(), Object_RefreshSelectorById(), Sanctum_ReenactSolSanctum(), SetSail(), TolbiShipDeck_MonstersBoard(), TolbiShipDeck_RowersDisembark(), TolbiShipInteriors_WatchWarriorsStormOff(), Vale_AskAboutSneakingToAleph(), ValeStorm_RunRiverSearch(), ValeStorm_ShowBoulderSweepingDownriver(), VaultInteriors_ResetSuspectRoutes(), VaultInteriors_ReturnStolenGoods(), VenusLighthouseAerie_PlayShebasFall(), WorldMap_DepartWithTravelers(), Xian_StrikeTrainingTreeWithForce(), and Xian_TalkToKungFuStudent().
Accepts a built-in action number or script address; waits up to 300 frames.
Starts a built-in action or supplied script, then waits up to 300 frames for its script to end.
Accepts a built-in action number or script address; waits up to 300 frames.
Scene script calls use Actor_RunActionScriptAndWait.
Definition at line 86 of file actor_commands.c.
Referenced by Actor_RunActionScriptAndWait(), and Object_SetActionCallbackAndRefreshById().
The event command "set actor destination": the actor heads for (x, z), in pixels, keeping its current animation.
Clears its movementState. Scene scripts reach it as Engine_ActorSetDestination (Actor_SetDestination).
Definition at line 101 of file actor_commands.c.
Referenced by ObjectMotion_ResetAndSetPosition().
The event command "move actor and wait": as ObjectMotion_ResetAndSetPosition, then waits (at most 600 frames) for the actor to arrive.
Scene scripts reach it as Engine_ActorMoveToAndWait (Actor_MoveToAndWait); the climbing events call it too.
Definition at line 115 of file actor_commands.c.
Referenced by Field_ClimbDown(), Field_ClimbUp(), Field_TryJumpForward(), and ObjectMotion_SetPositionAndCommit().
The event command "walk actor to": the actor walks (animation 2) toward (x, z), in pixels.
Scene scripts reach it as Engine_ActorWalkTo (OBJ_WALK, Actor_WalkTo); the link lobby calls it too.
Definition at line 129 of file actor_commands.c.
Referenced by ObjectMotion_ResetAndSetPositionInMode2().
The event command "walk actor to and wait": walks the actor to (x, z), in pixels, waits for it to arrive and stands it still (animation 1).
Scene scripts reach it as Engine_ActorWalkToAndWait (Actor_WalkToAndWait).
Definition at line 143 of file actor_commands.c.
Referenced by ObjectMotion_SetPositionAndReset().
The event command "center actor and walk": walks the actor sideways to the middle of its 16-pixel column, sets its sprite priority to priority (ObjectMotion_SetActionVariant), then sends it zOffset pixels along z.
Kalay's interiors reach it as Engine_ActorCenterAndWalk.
Definition at line 160 of file actor_commands.c.
Referenced by FieldObjectMotion_CenterOnColumn(), and ObjectMotion_CenterOnColumn().
The event command "set actor destination offset": the actor heads (xOffset, zOffset) pixels from where it stands.
Scene scripts reach it as Engine_ActorSetDestinationOffset (Actor_SetDestinationOffset); Motion_LaunchFromFocusedObject calls it too.
Definition at line 194 of file actor_commands.c.
Referenced by Motion_LaunchFromFocusedObject(), and ObjectMotion_OffsetPositionAndResetMotion().
Walks the actor (animation 2) (xOffset, zOffset) pixels from where it stands.
Scene scripts reach it as Engine_ActorWalkBy (Actor_WalkBy); ObjectMotion_CommitPositionAndActivate calls it too.
Definition at line 209 of file actor_commands.c.
Referenced by ObjectMotion_CommitPositionAndActivate(), and ObjectMotion_OffsetPositionAndReset().
Walks the actor (xOffset, zOffset) pixels, waits for it to arrive and stands it still.
Scene scripts reach it as Engine_ActorWalkByAndWait (Actor_WalkByAndWait); the Lemurian ship calls it by name.
Definition at line 225 of file actor_commands.c.
Referenced by FieldObjectMotion_CommitPositionAndActivate(), ObjectMotion_CommitPositionAndActivate(), and SetSail().
Places an actor on the leader and sends it walking (xOffset, zOffset) pixels away at speed 0.6 and acceleration 0.3, through the launch script; the actor then takes action action.
Called by the Lemurian ship, Babi Lighthouse and Lalivero scene scripts.
Definition at line 240 of file actor_commands.c.
Referenced by BabiLighthouse_ExplainTruthDoor(), FieldMotion_LaunchFromFocusedObject(), Motion_LaunchFromFocusedObject(), ReceiveBlackOrb(), and SetSail().
| void ObjectMotion_CommitCurrentPositionAndActivate | ( | u32 | objectId | ) |
The event command "wait for actor": waits (at most 600 frames) for the actor to arrive and stands it still.
Scene scripts reach it as Engine_ActorWaitForMove (Actor_WaitForMove); the link lobby and the climbing events call it too.
Definition at line 265 of file actor_commands.c.
Referenced by Field_ClimbDown(), Field_ClimbUp(), and ObjectMotion_CommitCurrentPositionAndActivate().
The event command "set actor position": puts the actor at (x, z), 16.16 pixels, at rest.
An actor that follows the ground (flag 1) keeps its height above the terrain at the new place. Clears its velocity and targets. Scene scripts reach it as Engine_ActorSetPosition (OBJ_POS_SET, Actor_SetPosition); Motion_LaunchFromFocusedObject calls it too.
Definition at line 279 of file actor_commands.c.
Referenced by Motion_LaunchFromFocusedObject(), and ObjectMotion_SetHorizontalPositionWithTerrain().
Puts the actor at (x, y, z), 16.16 pixels, at rest; an actor that follows the ground (flag 1) is raised by the terrain height there.
Nothing in ☀️ calls it.
Definition at line 319 of file actor_commands.c.
Referenced by ObjectMotion_SetPositionWithTerrain().
The event command "set actor animation" (1 stands, 2 walks, 3 nods, 4 shakes the head and so on).
Scene scripts reach it as Engine_ActorSetAnimation (OBJ_MODE, Actor_SetAnimation); Event_AskYesNoWithActorAnimation and Motion_SetModeAndWaitAnimation call it too.
Definition at line 355 of file actor_commands.c.
Referenced by Event_AskYesNoWithActorAnimation(), Motion_SetModeAndWaitAnimation(), and Object_SetModeById().
Sets the animation timer steps of each of an actor's sprites (AnimationObjects_SetActiveTimerSteps).
Called by the Tolbi ship and Lamakan Desert scene scripts.
Definition at line 365 of file actor_commands.c.
Referenced by ColosseumEntrance_InitializeContestants(), Event_FallThroughFloor(), FallIntoPit(), Object_SetActionById(), TolbiShipInteriors_PoseSceneActor(), and TolbiShipInteriors_RunSceneCommand().
| void ObjectMotion_WaitForAnimationChange | ( | u32 | objectId | ) |
Waits, at most 90 frames, for an actor's animation to change.
Only an actor drawn as an animation object (animationKind 1) is waited for. Called by Motion_SetModeAndWaitAnimation, a few scene scripts and the debug level screen.
Definition at line 376 of file actor_commands.c.
Referenced by Event_FreezeThirdPool(), Event_HopDownStep(), Motion_SetModeAndWaitAnimation(), ObjectMotion_WaitForAnimationChange(), Sanctum_RequestQuestAcceptance(), TolbiShipInteriors_RunSceneCommand(), VaultInteriors_PlayAnimationAndWait(), and VenusLighthouseAerie_EnterAndConfrontAntagonists().
The event command "set actor animation and wait": plays the animation and waits for it to end.
Scene scripts reach it as Engine_ActorSetAnimationAndWait (Actor_SetAnimationAndWait).
Definition at line 401 of file actor_commands.c.
Referenced by Motion_SetModeAndWaitAnimation().
| void ObjectMotion_NoOp | ( | void | ) |
An empty function, reached only through an unnamed veneer in the object bank's far-call table; nothing in ☀️ names it.
Definition at line 408 of file actor_commands.c.
Referenced by ObjectMotion_NoOp().
The event command "actor jump": throws the actor upward at speed pixels per frame with a jump sound (a higher one above 5), then waits frames frames.
Sets bit 1 of the actor's motion flags and its velocityY. Scene scripts reach it as Engine_ActorJump (Actor_Jump), about 40 of them; the scenes of Djinn joining the party (djinni.c and the four element parts) call it too.
Definition at line 416 of file actor_commands.c.
Referenced by BattleFx_RunMercuryDjinnCapture(), BattleFx_RunVenusDjinnCapture(), Djinn_RunBattleStartHop(), Djinn_RunJupiterJoinEffect(), Event_DepartForQuest(), and ObjectMotion_Launch().
The event command "start repeated motion": the actor squashes and springs back count times (1 to 3), through gObjectMotion_VariantScripts.
Scene scripts reach it as Engine_ActorStartRepeatedMotion (Actor_StartRepeatedMotion).
Definition at line 442 of file actor_commands.c.
Referenced by Motion_SetVarCbAndRefresh(), and ObjectMotion_SetVariantCallback().
The event command "run repeated motion": as ObjectMotion_SetVariantCallback, then waits for it to end.
Scene scripts reach it as Engine_ActorRunRepeatedMotion (Actor_RunRepeatedMotion); the scenes of Djinn joining the party call it too.
Definition at line 461 of file actor_commands.c.
Referenced by BattleFx_RunMercuryDjinnCapture(), Djinn_RunBattleStartHop(), Djinn_RunJupiterJoinEffect(), Djinn_RunMarsJoinEffect(), and Motion_SetVarCbAndRefresh().
| void FieldFx_UpdateParticleLinearMotion | ( | union FieldObject * | fieldObject | ) |
Moves a dust puff of FieldFx_SpawnBurstParticle: it drifts with its x and z velocity (kept in speed and acceleration), which drag slows by 1/18 and 1/16 each frame, and rises 1/64 pixel a frame.
Runs each frame as the puff's update hook.
Definition at line 470 of file actor_commands.c.
Referenced by FieldFx_SpawnBurstParticle(), and FieldFx_UpdateParticleLinearMotion().
| void FieldFx_SpawnBurstParticle | ( | struct FieldActor * | source, |
| s32 | param ) |
Kicks up a dust puff (object 222) where source stands: it flies off toward the back at 0.5 to 1.4 pixels a frame and sideways at up to 1.4, with one of two animations.
A nonzero param is given to its sprite parts (ObjectGroup_SetChildValue). Only Actor_JumpDownLedge calls it.
Definition at line 502 of file actor_commands.c.
Referenced by Actor_JumpDownLedge(), and FieldFx_SpawnBurstParticle().
Makes an actor jump down off a ledge in front of it (the field runs it for the leader when the player presses down at a ledge): it shows pose for 10 frames, hops, spins round while sinking 28 pixels with a dust puff every other frame (none when param is -1), then jumps 16 pixels forward and lands.
The landing plays the queued sound (BattleFx_PlayQueuedSound). Called by Field_RunPushTileEvent for a ledge (collision code 0xfc) with pose 6 and param 0.
Definition at line 549 of file actor_commands.c.
Referenced by Actor_JumpDownLedge(), Field_RunPushTileEvent(), and FieldBattleFx_RunRisingObjectSequence().
The event command "actor face actor": turns the first actor at once to face the second, then waits wait frames.
Writes the first actor's angle. Scene scripts reach it as Engine_ActorFaceActor (OBJ_FACE, Actor_FaceActor); the link lobby calls it too.
Definition at line 609 of file actor_commands.c.
Referenced by ObjectMotion_SetAngleToward().
The event command "actors face each other": turns two actors toward each other, then waits wait frames.
Scene scripts reach it as Engine_ActorFaceEachOther (Actor_FaceEachOther); Scene_TalkToActor turns the leader and the actor spoken to with it.
Definition at line 625 of file actor_commands.c.
Referenced by Event_RiseToElementalStarRoom(), Object_LinkPair(), and Scene_TalkToActor().
| void FacingObject_TurnPairToFaceEachOther | ( | struct FacingObject * | firstObject, |
| struct FacingObject * | secondObject ) |
Turns two actors to face each other, at most 1/16 turn a frame each, until both do (at most 60 frames).
Only Object_LinkPair calls it.
Definition at line 637 of file actor_commands.c.
Referenced by FacingObject_TurnPairToFaceEachOther(), and Object_LinkPair().
| void ObjectTable_DestroyById | ( | s32 | index | ) |
The event command "destroy actor": releases the actor and frees its slot, writing NULL to its place in the field work's actor table.
Scene scripts reach it as Engine_ActorDestroy (about 14 of them).
Definition at line 696 of file actor_commands.c.
Referenced by ObjectTable_DestroyById().
| void ObjectTable_DestroyNoOp | ( | void | ) |
Definition at line 717 of file actor_commands.c.
Referenced by ObjectTable_DestroyNoOp().
The event command "set actor sprite param": gives every sprite part of the actor param (ObjectGroup_SetChildValue).
With bit 0x100 set the actor blinks instead (ObjectGroup_ApplyIndexedChildValue, every frame); any other param also ends a blink, clearing the actor's hook. Scene scripts reach it as Engine_ActorSetChildValue (Actor_SetChildValue).
Definition at line 724 of file actor_commands.c.
Referenced by ObjectGroup_ConfigureChildValue().
| void ObjectGroup_ApplyIndexedChildValue | ( | union FieldObject * | fieldObject | ) |
Per-frame hook of a blinking actor: sets its sprite parts' param from gObjectGroup_BlinkChildValues (7 for two frames out of eight, otherwise 0).
ObjectGroup_ConfigureChildValue installs it.
Definition at line 744 of file actor_commands.c.
Referenced by ObjectGroup_ApplyIndexedChildValue(), and ObjectGroup_ConfigureChildValue().
| void ObjectGroup_SetChildValue | ( | struct FieldActor * | actor, |
| s32 | param ) |
Sets the param byte of every animated part of an actor's sprite.
Scenes set 0 or 15, and alternate the two to make an actor flash. Marks the sprite dirty. Called by ObjectGroup_ConfigureChildValue, FieldFx_SpawnBurstParticle and about 40 scene script sites.
Definition at line 775 of file actor_commands.c.
Referenced by AltinPeak_DriftSpray(), AltinPeak_InitSpray(), AltinPeak_SparkleIce(), CrossboneIslePillarRooms_SetChildValueFromTimer(), FieldFx_SpawnBurstParticle(), Fuchin_CreateForegroundActor(), Fuchin_SetDustPalette(), FuchinTemple_AlternateLessonChildEffect(), GomaCavePillar_FinishFragment(), GomaCavePillar_SpawnFragment(), Imil_InitializeRisingEffect(), Imil_SwayAndSpark(), ImilFuchinFalls_SpawnDust(), Kalay_SpawnTunnelParticle(), Kolima_FlickerCurseDust(), Kolima_UpdateTimedAppearance(), KolimaForestBridge_TwinkleGroundSparkle(), MercuryLighthouseAerie_FlickerBeacon(), MogallForest_CopyTimerToChild(), ObjectGroup_ConfigureChildValue(), ObjectGroup_SetChildValue(), OverlayObject_CreateConfiguredObject(), OverlayObject_PrepareObject(), SolSanctumEruption_StepEmbers(), Spray_Drift(), Spray_Initialize(), TolbiShipInteriors_LayFlat(), VenusLighthouse_ConfigurePassageEffect(), VenusLighthouse_PulseChildEffect(), VenusLighthouse_RestoreScriptedChildValues(), VenusLighthouse_UpdateChildFromTimer(), VenusLighthouseAerie_SpawnSideOrbitParticles(), VenusLighthouseAerie_SpawnUpperOrbitParticles(), VenusLighthouseAerie_UpdateBeaconRise(), WorldMap_SpawnActorEightPuff(), and Xian_Initialize().
Links an actor to the actor in the low 8 bits of targetId and starts script on it.
Unless ACTOR_LINK_KEEP_MOTION is set it takes action 40 and the target's top speed with twice its acceleration, to keep up with it. Called by Vale's, Bilibin's, Imil's, Kolima's and McCoy's palace scene scripts, among others.
Definition at line 802 of file actor_commands.c.
Referenced by Event_TalkToDora(), FieldObject_SetTargetAndCallback(), and Object_SetTargetAndCallback().
| s32 ObjectMotion_StepAngle | ( | struct ObjectRuntime * | object | ) |
Script step that turns an actor toward the angle kept in its action: the whole way when within 1/16 turn, otherwise 1/32 turn.
Returns the turn made, 0 once the actor faces that way. gObjectMotion_StepAngleScript and gObjectMotion_LaunchScript run it through their script command 34.
Definition at line 823 of file actor_commands.c.
Referenced by ObjectMotion_StepAngle().
| void Object_ResetTargetAndSetMode1 | ( | u32 | objectId | ) |
Clears an actor's destination, puts it under event control and stands it still.
Reached only through an unnamed veneer in the object bank's far-call table; nothing in ☀️ names it.
Definition at line 844 of file actor_commands.c.
Referenced by Object_ResetTargetAndSetMode1().
The event command "actor face direction": the actor turns toward angle (0x10000 a full turn; ObjectMotion_StepAngle), then the event waits wait frames.
Writes the angle to the actor's action. Scene scripts reach it as Engine_ActorFaceDirection (OBJ_DIR, Actor_FaceDirection); the Djinni, Retreat and climbing events and Actor_JumpDownLedge call it too.
Definition at line 861 of file actor_commands.c.
Referenced by Actor_JumpDownLedge(), BattleFx_RunMercuryDjinnCapture(), BattleFx_RunVenusDjinnCapture(), Djinn_RunBattleStartHop(), Djinn_RunJupiterJoinEffect(), Djinn_RunMarsJoinEffect(), Field_ClimbDown(), FieldFx_RunRetreat(), and ObjectMotion_ArmCallback().
The event command "set actor sprite priority": fixes the priority of the actor's sprite, which then no longer follows its depth: clears ACTOR_PRIORITY_AUTOMATIC.
Scene scripts reach it as Engine_ActorSetSpritePriority (Actor_SetSpritePriority); ObjectMotion_CenterOnColumn calls it too.
Definition at line 877 of file actor_commands.c.
Referenced by ObjectMotion_CenterOnColumn(), and ObjectMotion_SetActionVariant().
Makes the target actor's sprite show the source actor's graphics (its VRAM block and tile).
Neither actor is checked for NULL. Called by the Tolbi ship deck's scene script.
Definition at line 892 of file actor_commands.c.
Referenced by ObjectVisual_CopyAttributes(), TolbiShipDeck_RestOars(), and TolbiShipDeck_SwingOar().
| void ObjectVisual_ReservedNoOp | ( | void | ) |
Definition at line 909 of file actor_commands.c.
Referenced by ObjectVisual_ReservedNoOp().
| void Event_SetMessageId | ( | s32 | message | ) |
The event command "set message": the number of the event's next message, written to work->message.
Scene scripts reach it as Engine_EventSetMessage (MESSAGE_SET); the field's talk, touch, item and Psynergy events call it too.
Definition at line 915 of file actor_commands.c.
Referenced by Event_SetMessageId(), Field_RunEventAction(), Field_UseItem(), Scene_RunRaisedEvent(), Scene_RunTouchOrExit(), and Scene_TalkToActor().
Returns the sprite (the first animation's id) of the actor in the low 12 bits of actor, or -1 if there is no such animated actor.
The message commands (messages.c) call it to find the speaker's portrait and voice.
Definition at line 922 of file actor_commands.c.
Referenced by Battle_ShowPairedUnitWorkAndWait(), FieldEvent_ShowMessageAndWait(), ObjectTable_ReadActiveValue(), ObjectTable_RunIfActive(), Ui_SetMessageVoiceFromActor(), and UiText_OpenMessageAtObject().
Returns the first scene actor (8 to 65) showing sprite, or -1.
Reached only through an unnamed veneer in the object bank's far-call table; nothing in ☀️ names it.
Definition at line 949 of file actor_commands.c.
Referenced by ObjectTable_FindActiveByValue().
The event command "open message": opens the event's current message in a speech window next to the speaking actor, with the speaker's portrait beside it when it has one, and moves on to the next message.
The low 12 bits of actor are the speaker (0 to 7, a party member, speaks from the leader); its high bits place the windows: 0x1000 portrait on the left, 0x2000 on the right, 0x4000 message above the speaker, 0x8000 never above. Returns the message window.
Definition at line 24 of file messages.c.
Referenced by FieldEvent_AskYesNoAndShowResponse(), FieldEvent_ShowMessageAndWait(), SetSail(), SolSanctumStatue_ExplainStatuePuzzle(), and UiText_OpenMessageAtObject().
The event command "show message": opens the current message at actor (UiText_OpenMessageAtObject) and waits until it has been read.
The message closes by itself after 600 frames, or at once while Select, L, R and A are all held.
Definition at line 248 of file messages.c.
Referenced by BattlePres_RunActionThenWaitIfModeZero(), Field_RunEventAction(), Field_UseItem(), FieldEvent_AskYesNoAndShowResponse(), FieldEvent_ShowMessageAndWait(), Scene_RunRaisedEvent(), Scene_RunTouchOrExit(), and Scene_TalkToActor().
The event command "show message and wait": shows the message, then waits wait frames.
Definition at line 283 of file messages.c.
Referenced by BattlePres_RunActionThenWaitIfModeZero(), and SolSanctumElementalStarRoom_DemandElementalStars().
The event command "ask yes or no": opens the question at actor, lets the leader answer, then shows the next message for yes or the one after it for no.
Returns 0 for yes, 1 for no.
Definition at line 291 of file messages.c.
Referenced by FieldEvent_AskYesNoAndShowResponse().
| void BattleEventRuntime_EmptyCallback | ( | void | ) |
Definition at line 311 of file messages.c.
Referenced by BattleEventRuntime_EmptyCallback().
| void Event_ShowSpeakerMessage | ( | s32 | speaker | ) |
A speaker-message entry point retained by its overlay veneer, with no current scene caller.
Records the speaker, waits for the message unless fast-forwarding, and advances the message index. XXX: this and Event_ShowMessageAtPosition apply a 32-unit offset and 312/220 limits before calling a window service that takes tiles. A caller establishing the intended position would settle its units and conversion.
Definition at line 319 of file messages.c.
Referenced by Event_ShowSpeakerMessage().
Retained by its overlay veneer; no current caller establishes the coordinates forwarded to Event_ShowMessageAtPosition.
Definition at line 392 of file messages.c.
Referenced by ObjectTable_CallRefreshHook().
A retained coordinate-message entry point: waits for the message and advances the event's message index.
Its placement units are unresolved, as in Event_ShowSpeakerMessage.
Definition at line 399 of file messages.c.
Referenced by Event_ShowMessageAtPosition(), and ObjectTable_CallRefreshHook().
| void ObjectTable_RunIfActive | ( | s32 | actor | ) |
Closes the portrait of an actor's sprite, if it has one.
Definition at line 425 of file messages.c.
Referenced by ObjectTable_RunIfActive().
| void Battle_ShowPairedUnitWorkAndWait | ( | s32 | first, |
| s32 | firstX, | ||
| s32 | firstY, | ||
| s32 | firstPortraitX, | ||
| s32 | firstPortraitY, | ||
| s32 | second, | ||
| s32 | secondX, | ||
| s32 | secondY, | ||
| s32 | secondPortraitX, | ||
| s32 | secondPortraitY ) |
The event command "show two messages and wait": two actors speak at once, each message at its own (x, y) with its portrait at (portraitX, portraitY), all in tiles.
Waits for A, B, L or R, then closes both.
Definition at line 436 of file messages.c.
Referenced by Battle_ShowPairedUnitWorkAndWait().
| void Ui_SetMessageVoiceFromActor | ( | s32 | actor | ) |
Sets the voice of the messages that follow to that of actor's sprite, at the rate the message speed option picks (gUi_RenderResultValues).
With 0x80000000 the messages are silent.
Definition at line 483 of file messages.c.
Referenced by Event_DoraWakesIsaac(), Kalay_WatchTourGroupDeparture(), TolbiShipDeck_MonsterLandsOnDeck(), TolbiShipDeck_MonstersAttackCrew(), TolbiShipDeck_MonstersBoard(), TolbiShipInteriors_ReportMonstersBelowdecks(), TolbiShipInteriors_TurnBackFromStairs(), and Ui_SetMessageVoiceFromActor().
The event command "camera follow actor": the camera (the event's view centre) follows actor.
Unless keepPosition is set it jumps there at once and, off the world map, the map is redrawn around it.
Definition at line 10 of file camera.c.
Referenced by Camera_FollowActor(), FieldEvent_End(), and ObjectEffect_RunPendingFlagEvent().
The event command "camera set speed": the camera's top speed and acceleration, 16.16 pixels per frame.
Definition at line 36 of file camera.c.
Referenced by Camera_SetSpeedParameters().
The event command "camera move to": sends the camera to the requested axes, 16.16 pixels (-1 keeps that axis), kept far enough inside the map that the screen never shows past its edge.
With glide 0 the camera jumps there at once; otherwise it travels at its own speed.
Definition at line 47 of file camera.c.
Referenced by Camera_MoveWithinMapBounds(), FieldFx_RunRetreat(), Object_PlaceCurrentWithinCameraBounds(), and ObjectEffect_RunPendingFlagEvent().
The event command "camera move to actor": Camera_MoveWithinMapBounds to the actor's x and z.
Definition at line 113 of file camera.c.
Referenced by Event_MovePillarSwitchBlock(), and Object_PlaceCurrentWithinCameraBounds().
| void Camera_WaitForArrival | ( | void | ) |
The event command "camera wait for move": waits (at most 600 frames) for the camera to arrive, then 2 frames more.
Definition at line 125 of file camera.c.
Referenced by Camera_WaitForArrival(), Event_MeetSurvivingTravelers(), Event_SentToAidElders(), and ValeHome_FightTravelers().
| struct FieldActor * Camera_GetEventObject | ( | void | ) |
The event command "get view centre": returns the camera object.
Definition at line 133 of file camera.c.
Referenced by AltinPeak_AwardFrostJewelAndDrain(), Camera_GetEventObject(), Event_CarryFloatingBlock(), Event_DepartForQuest(), Event_GaretComesHome(), Event_MeetSurvivingTravelers(), Event_SetBlockOnBalance(), Imil_MiaSaysFarewellToApprentices(), Kalay_HammetReturnsToPalace(), TolbiShipInteriors_RunSceneCommand(), TolbiShipMast_SetupHiddenLeaderLookout(), ValeStorm_ShowBoulderSweepingDownriver(), and Village_TalkToThirstyVillager().
| void Camera_FollowObject | ( | struct ObjectRuntime * | target, |
| s32 | keepCurrentPosition ) |
Makes the camera follow target; unless keepCurrentPosition is set it jumps there at once.
Definition at line 141 of file camera.c.
Referenced by Camera_FollowObject().
The event command "set view bounds": the camera keeps the screen inside these map coordinates (Camera_MoveWithinMapBounds).
Definition at line 13 of file view.c.
Referenced by FieldMap_SetViewBounds(), and Map_SetViewBounds().
| s32 FieldFx_StepRatioTransition | ( | void | ) |
Definition at line 30 of file view.c.
Referenced by BattleFx_ScheduleRatioTransition(), and FieldFx_StepRatioTransition().
Starts a zoom to zoom (16.16) over frames frames, on the world map (event mode 3) only.
Definition at line 69 of file view.c.
Referenced by BattleFx_RunVisibilityTransition(), BattleFx_ScheduleRatioTransition(), Event_MeetFlint(), Event_UseBlackOrb(), WorldMap_DepartWithTravelers(), WorldMap_MoveActorEightToExit(), WorldMap_RunBlackOrbScene(), WorldMap_RunOpeningRise(), WorldMap_ShowDjinnTutorial(), and WorldMap_ShowEndingScene().
| void Event_WaitForZoomTransition | ( | void | ) |
Waits for a zoom transition to end (on the world map only, at most 300 frames).
Definition at line 94 of file view.c.
Referenced by Event_MeetFlint(), Event_WaitForZoomTransition(), WorldMap_ShowDjinnTutorial(), and WorldMap_ShowEndingScene().
| s32 BattleFx_CopyLinkedObjectPosition | ( | union FieldObject * | fieldObject | ) |
Definition at line 119 of file view.c.
Referenced by BattleFx_ConfigureLinkedObject(), BattleFx_CopyLinkedObjectPosition(), and BattleFx_SpawnLinked().
The event command "actor show emote": shows an emote bubble (object 21) over an actor, then waits wait frames.
The low 4 bits of emote pick the bubble's animation (6 also plays sound 110); with 0x100 the bubble takes sprite priority 1, otherwise the actor's.
Definition at line 148 of file view.c.
Referenced by BattleFx_SpawnLinked().
The event command "actor set attached effect": with mode (the low 2 bits) 0 removes the object attached to an actor; 1 attaches one (object 209, animation 1) that stays until removed; 2 shows a one-off one (animation 2) that ends by itself.
With 0x100 the object takes sprite priority 1, otherwise the actor's.
Definition at line 211 of file view.c.
Referenced by BattleFx_ConfigureLinkedObject(), and Field_ProcessStep().
| s32 Object_ClearChildAndCollisionFlags | ( | void * | obj | ) |
Script step: clears an object's sprite flags and its collision flags.
Definition at line 8 of file actor_motion.c.
Referenced by Object_ClearChildAndCollisionFlags().
| s32 ObjectMotion_MoveTowardTarget | ( | struct ObjectRuntime * | object | ) |
Script step of action 5: follows the linked object.
While at least action pixels away the object walks toward it (a step of 16 / action of the distance, in 16-pixel units); closer, it stands.
Definition at line 17 of file actor_motion.c.
Referenced by ObjectMotion_MoveTowardTarget().
| s32 ObjectMotion_TurnTowardLinkedTarget | ( | struct ObjectRuntime * | object | ) |
Script step of action 6: turns the object toward its linked object, at most 1/16 turn a frame.
Definition at line 56 of file actor_motion.c.
Referenced by ObjectMotion_TurnTowardLinkedTarget().
| void ObjectMotion_SetActionCallback | ( | struct ObjectRuntime * | object, |
| s32 | action ) |
Starts an actor's action script: 1 to 4 the fixed action scripts, 5 follow the linked object, 6 face the leader, 7 reset.
Any other value is itself the script to run.
Definition at line 82 of file actor_motion.c.
Referenced by Event_SpawnObjectTable(), Object_LinkObjectAndSetCallback(), Object_SetActionCallbackAndRefreshById(), ObjectMotion_EnableActionAndSetCallback(), ObjectMotion_SetActionCallback(), and Scene_TalkToActor().
| struct ObjectRuntime * Object_FindNearestFacingTarget | ( | struct ObjectRuntime * | self, |
| s32 | sprite ) |
Finds the nearest animated object to self within 40 pixels and 48 pixels of height, ignoring objects more than 3/16 turn to either side once they are over 23 pixels away.
Returns it if it shows sprite, otherwise NULL.
Definition at line 117 of file actor_motion.c.
Referenced by Field_TryJumpForward(), and Object_FindNearestFacingTarget().
| s32 Field_TryJumpForward | ( | void | ) |
Makes the leader jump two tiles forward, over the tile in front, when the map allows it (Map_CheckObjectStep).
On a platform object (sprite 207 or 205) the platform plays its animation 7 and the leader bobs down 2 pixels and back. Each jump adds two tiles to work->walkingDistance, as walking them would, and the leader keeps jumping while it lands on another jump spot (collision 0xf9). Returns 0 after a jump, -1 when the leader cannot jump.
Called by Field_RunPushTileEvent when the leader has pushed against a jump spot (0xf9 or 0xfe) for more than 12 frames, and by the gap jumps of Goma Cave's pillar and Kolima Forest's bend, which import it. Moves the leader, and takes the field over between FieldEvent_Begin and FieldEvent_End.
Definition at line 25 of file climbing.c.
Referenced by Event_JumpGapWest(), Field_RunPushTileEvent(), Field_TryJumpForward(), and KolimaForestBend_JumpSouth().
| s32 Field_ClimbDown | ( | void | ) |
Climbing down (the player presses down at a climbable wall).
On the ground, when the cell south of the leader's is the same climbable cell, the leader turns round, grabs the wall and climbs down onto it (climbing pose 13). While climbing, the leader lets go and drops to the ground. Returns 0, or -1 when there is nothing to climb or the way is blocked.
Called by Field_RunPushTileEvent for a climbing spot (0xfd) with Down held, and imported by the scenes with ladders and climbable walls (Babi's Lighthouse, Crossbone Isle, Tolbi's ship and others). Sets gGameState.movementMode: 1 while the leader is on the wall, 0 off it.
Definition at line 119 of file climbing.c.
Referenced by BabiLighthouse_ClimbDownOrAdvancePair(), BabiLighthouse_ClimbOrAdvancePair(), Event_PushFirstBlock(), Event_PushOrClimbDown(), Event_UseLadder(), Field_ClimbDown(), Field_RunPushTileEvent(), and TolbiShipMast_ClimbDownLadder().
| s32 Field_ClimbUp | ( | void | ) |
Climbing up (the player presses up at a climbable wall).
On the ground, when the cell north of the leader's is the same climbable cell, the leader jumps onto the wall and holds on (climbing pose 12). While climbing, the leader climbs over the top onto the ground. Returns 0, or -1 when there is nothing to climb or the way is blocked.
Called by Field_RunPushTileEvent for a climbing spot (0xfd) with Up held, and imported by the scenes with ladders and climbable walls (Babi's Lighthouse, Colosso, Crossbone Isle and others). Sets gGameState.movementMode as Field_ClimbDown does.
Definition at line 196 of file climbing.c.
Referenced by BabiLighthouse_ClimbOrAdvancePair(), Event_ClimbUp(), Event_PushFirstBlock(), Event_TalkToFreeClimbAttendant(), Event_TalkToWallAttendant(), Event_UseLadder(), Field_ClimbUp(), Field_RunPushTileEvent(), and TolbiShipMast_Initialize().
Finds where an actor is on screen: position[0] and position[1] receive its x and y in pixels, y at the top of its sprite.
Returns 0, or -1 if there is no such actor. Called by the message window code in messages.c to place a speaker's bubble, and through Object_GetScreenPositionFar by the window frames to open a message window above or below the leader.
Definition at line 12 of file context.c.
Referenced by Event_ShowSpeakerMessage(), Object_GetScreenPosition(), and UiText_OpenMessageAtObject().
| void ObjectEffect_ReservedNoOp941DC | ( | void | ) |
Definition at line 51 of file context.c.
Referenced by ObjectEffect_ReservedNoOp941DC().
Starts the transition into a random battle: plays the scene's battle cue and the encounter sounds, closes the screen and flashes the backdrop white, fading it to black over 16 frames.
Called by Field_RunScene when it handles work->battle; clears work->transitionActive once the screen is closed.
Definition at line 62 of file context.c.
Referenced by Field_RunScene(), and Field_StartEncounterTransition().
| void ObjectEffect_PrepareContextEffect | ( | s32 | animation | ) |
Starts the leader's animation for leaving through an exit: centres it on its tile, at the tile's south edge, stops it and plays animation over 18 frames.
The leader's sprite gains a second part (metadata 27) for it. Called by the two ObjectEffect_BeginContextEffect functions below.
Definition at line 101 of file context.c.
Referenced by ObjectEffect_BeginContextEffect25(), ObjectEffect_BeginContextEffect26(), and ObjectEffect_PrepareContextEffect().
| void ObjectEffect_BeginContextEffect26 | ( | void | ) |
Leaves through an exit of kind 0x20 (animation 26); flag 0x120 makes the next scene play the matching arrival (ObjectEffect_RunPendingFlagEvent).
Called by the exit handling in events.c, after it plays SE_128.
Definition at line 131 of file context.c.
Referenced by ObjectEffect_BeginContextEffect26(), and Scene_RunTouchOrExit().
| void ObjectEffect_BeginContextEffect25 | ( | void | ) |
Leaves through an exit of kind 0x30 (animation 25), recorded in flag 0x121.
Called by the exit handling in events.c, after it plays SE_129.
Definition at line 138 of file context.c.
Referenced by ObjectEffect_BeginContextEffect25(), and Scene_RunTouchOrExit().
| void ObjectEffect_EndContextEffect | ( | s32 | animation | ) |
Plays the leader's arrival animation through an exit: centred on its tile at the tile's north edge, the leader plays animation for 30 frames, loses the extra sprite part and walks 8 pixels south.
Called by ObjectEffect_RunPendingFlagEvent; frees the sprite part ObjectEffect_PrepareContextEffect registered.
Definition at line 148 of file context.c.
Referenced by ObjectEffect_EndContextEffect(), and ObjectEffect_RunPendingFlagEvent().
| s32 ObjectEffect_RunPendingFlagEvent | ( | void | ) |
Plays the leader's arrival for the way the last scene was left: through an exit of kind 0x20 (flag 0x120, animation 24, returns 1) or 0x30 (flag 0x121, animation 23, returns 2), or falling in from 160 pixels above (flag 0x122, returns 3).
Returns 0 when there is nothing to play. Called by Field_RunScene as the scene fades in, which waits out the fade itself only when this returns 0. Clears the flag it acts on.
Definition at line 181 of file context.c.
Referenced by Field_RunScene(), and ObjectEffect_RunPendingFlagEvent().
| void DisplayScroll_ArmHBlankDma | ( | void | ) |
Scheduler callback for the wavy background: restarts DMA 0 each frame to copy the current page's BG1 to BG3 scroll offsets into the scroll registers one scanline at a time.
The first line is written directly; the DMA writes three words at each HBlank from then on.
Definition at line 11 of file wave_scroll.c.
| void DisplayScroll_BuildAndSwapHBlankPage | ( | void | ) |
Scheduler callback for the wavy background: fills the hidden page with each scanline's BG3, BG2 and BG1 offsets, the scroll plus a sine wave for x and for y (an axis with no step stays flat), then shows that page.
Definition at line 44 of file wave_scroll.c.
| void DisplayScroll_DisarmHBlankDma | ( | void | ) |
Stops the wavy background: removes its two callbacks and stops DMA 0.
Definition at line 123 of file wave_scroll.c.
Referenced by DisplayScroll_DisarmHBlankDma(), and Reveal_ShowSecrets().
| void FieldFx_UpdateGroundParticles | ( | void | ) |
Scheduler callback: animates the ground particles.
Each plays a 16-frame animation (gFieldFx_GroundParticleFrames, 5 halfwords a frame: x and y offsets, tile, shape and size) on a random spot of ground within 128 pixels of the leader, then starts again elsewhere. They freeze while flag 0x166 is set.
Definition at line 12 of file weather.c.
Referenced by FieldFx_StartGroundParticles(), and FieldFx_UpdateGroundParticles().
| void FieldFx_UpdateLightning | ( | void | ) |
Scheduler callback for the storm: every 150 to 550 frames lightning flashes the palette three times (5 frames apart) with a thunderclap, louder with loud set.
Flag 0x166 holds the next flash back.
Definition at line 61 of file weather.c.
Referenced by BattleFx_StartBufferBlend(), FieldFx_StartLightning(), and FieldFx_UpdateLightning().
| void FieldFx_StartGroundParticles | ( | void | ) |
Starts the ground particles (FieldFx_UpdateGroundParticles) with sound 170: loads their tiles and puts 32 of them under the leader with staggered timers, drawn semi-transparent.
Definition at line 105 of file weather.c.
Referenced by FieldFx_StartGroundParticles(), and ValeHome_Initialize().
| void FieldMotes_Update | ( | void | ) |
Scheduler callback: the floating motes.
Each mote appears on the ground within 128 pixels of the leader (at most 8 new ones a frame), rises a pixel a frame, ever faster for its last 90 frames, jittering sideways and changing tiles as it ages, and lasts 120 frames or until it leaves the screen. They freeze while flag 0x166 is set.
Definition at line 160 of file weather.c.
Referenced by FieldMotes_Start(), and FieldMotes_Update().
| void FieldMotes_Start | ( | void | ) |
Starts the floating motes (FieldMotes_Update): loads their tiles and puts 32 of them under the leader with staggered timers, drawn semi-transparent.
Definition at line 226 of file weather.c.
Referenced by FieldMotes_Start().
| void FieldEffect_UpdateSparkles | ( | void | ) |
Scheduler callback: the sparkles.
Now and then (1 frame in 256) a sparkle appears on the ground within 128 pixels of the leader, and up to three more follow on the same spot, each 4 frames shorter. Each plays gFieldFx_SparkleFrames, flipping every other frame. No new bursts start while the work's stopped is set; flag 0x166 freezes them.
Definition at line 277 of file weather.c.
Referenced by FieldEffect_InitSparkles(), and FieldEffect_UpdateSparkles().
| void FieldEffect_InitSparkles | ( | void | ) |
Starts the sparkles (FieldEffect_UpdateSparkles): loads their tiles and clears the 32 sparkles.
Definition at line 374 of file weather.c.
Referenced by FieldEffect_InitSparkles(), and SolSanctumEruption_Initialize().
| void FieldFx_StartLightning | ( | void | ) |
Starts the storm's lightning (FieldFx_UpdateLightning): builds the dark (0x10003) and lit (0x10005) palettes and their 12-step fade, and arms the first flash in 600 frames, repeating.
Definition at line 425 of file weather.c.
Referenced by Event_DoraSendsIsaacToThePlaza(), Event_DoraWakesIsaac(), Event_HurryToThePlaza(), FieldFx_StartLightning(), ValeBabi_Initialize(), ValeHome_Initialize(), ValeInteriors_Initialize(), ValeKraden_Initialize(), and ValeStorm_Initialize().
| void FieldFx_StopLightning | ( | void | ) |
Stops the lightning: no flash for 0x7fff frames, and none after.
Definition at line 442 of file weather.c.
Referenced by Event_TravelersLeaveAfterBattle(), FieldFx_StopLightning(), Vale_RequestBackdropExit(), ValeBabi_CloseScreenAndExit(), ValeInteriors_RequestWindowExit(), and ValeStorm_ShowBoulderSweepingDownriver().
| void FieldFx_LastLightning | ( | void | ) |
One last flash of lightning in 12 frames, then no more.
Definition at line 450 of file weather.c.
Referenced by Event_DoraSendsIsaacToThePlaza(), Event_DoraWakesIsaac(), Event_HurryToThePlaza(), Event_ReturnFromMtAleph(), Event_TravelersLeaveAfterBattle(), FieldFx_LastLightning(), ValeBabi_Initialize(), ValeInteriors_Initialize(), and ValeStorm_ShowBoulderSweepingDownriver().
| void FieldFx_ResumeLightning | ( | void | ) |
Restarts the lightning: the next flash in 128 frames, repeating.
Definition at line 458 of file weather.c.
Referenced by Event_DoraSendsIsaacToThePlaza(), Event_DoraWakesIsaac(), Event_MeetSurvivingTravelers(), Event_TravelersLeaveAfterBattle(), FieldFx_ResumeLightning(), ValeBabi_Initialize(), ValeHome_Initialize(), ValeInteriors_Initialize(), ValeStorm_Initialize(), and ValeStorm_ShowBoulderSweepingDownriver().
Flashes the palette once, 120 frames from now, from palette from to palette to (BattleFx_BuildBuffer modes), with the storm's flash callback.
Definition at line 467 of file weather.c.
Referenced by BattleFx_StartBufferBlend(), and Event_ReturnFromMtAleph().
| void ObjectMotion_MoveHalfwayTowardTarget | ( | union FieldObject * | fieldObject | ) |
Update hook shared by the Djinni battle-start and Mercury afterimages.
Definition at line 8 of file djinni.c.
Referenced by Djinn_RunBattleStartHop(), and ObjectMotion_MoveHalfwayTowardTarget().
| void Djinn_RunBattleStartHop | ( | s32 | djinniId | ) |
A Djinni's battle start: the Djinni (actor id) bounces twice, turns to face the leader, hops back 16 pixels three times, then leaps 64 pixels at the party trailing eight afterimages tinted for its element.
Definition at line 17 of file djinni.c.
Referenced by Djinn_RunBattleStartHop(), and Field_RequestDjinnBattle().
A Djinni joins the party: djinn (0 to 19) of element goes to the member with the fewest Djinn, or to no one and only its flag while FLAG_DJINN_TUTORIAL is set.
Unless slot is -1, the Djinni's actor slot first plays its element's capture effect and is freed. Ends with <Djinni> joined <member>.
Definition at line 124 of file djinni.c.
Referenced by Djinn_JoinParty(), Djinn_ResolvePendingEvent(), Event_BaneJoins(), Event_GustJoins(), Event_MeetFlint(), Event_TalkToKite(), Event_TalkToVenusDjinni(), Imil_RecruitDjinni(), Kalay_RecruitDjinn(), KalayTolbiDocks_RecruitVenusDjinni(), Kolima_RecruitDjinni(), TalkToSmog(), TalkToTorch(), TestRooms_GiveDjinniForTesting(), Tolbi_JoinEmber(), and Xian_RecruitVillageDjinni().
| void FieldObject_PlaceSceneActors | ( | void | ) |
Puts a Djinni's actor back where its battle started from: for a pending Djinni battle (pendingDjinnEvent 300 to 380, FLAG_KEEP_PARTY_POSITION set, the battle over) the scene actor placed for that Djinni (condition = its flag) goes back to its placement, or 32 pixels north of the leader when the event has 0x800 set.
Definition at line 168 of file djinni.c.
Referenced by Field_RunScene(), and FieldObject_PlaceSceneActors().
| void Djinn_ResolvePendingEvent | ( | ) |
| void BattleFx_UpdateAllSlots | ( | void | ) |
Scheduler callback: updates the 24 effect slots.
Definition at line 257 of file djinni.c.
Referenced by BattleFx_ClearActiveSlotsAndScheduleUpdates(), BattleFx_InitializeSlots(), BattleFx_UpdateAllSlots(), and Djinn_ResolvePendingEvent().
| void BattleFx_InitializeSlots | ( | void | ) |
Allocates and clears the effect slots (heap block 56) and starts their update callback.
Definition at line 261 of file djinni.c.
Referenced by AltmillerCave_ReleaseWallBurst(), BattleFx_InitializeSlots(), BattleFx_RunMercuryDjinnCapture(), BattleFx_RunVenusDjinnCapture(), Djinn_ResolvePendingEvent(), Djinn_RunJupiterJoinEffect(), and Djinn_RunMarsJoinEffect().
| void BattleFx_ClearActiveSlotsAndScheduleUpdates | ( | void | ) |
Stops the effect slots: removes their callback, frees every slot still in use and releases their heap block.
Definition at line 271 of file djinni.c.
Referenced by AltmillerCave_ReleaseWallBurst(), BattleFx_ClearActiveSlotsAndScheduleUpdates(), BattleFx_RunMercuryDjinnCapture(), BattleFx_RunVenusDjinnCapture(), Djinn_ResolvePendingEvent(), Djinn_RunJupiterJoinEffect(), and Djinn_RunMarsJoinEffect().
| void BattleFx_AdvanceSpinAngle | ( | union FieldObject * | fieldObject | ) |
Per-frame update: spins an object 1/8 turn a frame.
Definition at line 287 of file djinni.c.
Referenced by BattleFx_AdvanceSpinAngle(), BattleFx_RunVenusDjinnCapture(), Djinn_ResolvePendingEvent(), and Djinn_RunJupiterJoinEffect().
| void BattleFx_RunAngledApproachPhases | ( | struct EffectSlot * | particle | ) |
Effect slot callback of a Jupiter Djinni's light particles: each circles its centre while it widens for 60 frames, circles 40, drifts toward a point 20 pixels over the leader for 40, closes in for 60 and is freed.
Definition at line 295 of file djinni.c.
Referenced by BattleFx_RunAngledApproachPhases(), Djinn_ResolvePendingEvent(), and Djinn_RunJupiterJoinEffect().
| void Djinn_RunJupiterJoinEffect | ( | s32 | djinniId | ) |
A Jupiter Djinni joins the party: it bounces three times, spins, leaps out of sight and bursts into 24 light particles that circle and close in on the leader, who turns to the camera and plays animation 28.
Definition at line 10 of file jupiter.c.
Referenced by Djinn_JoinParty(), Djinn_ResolvePendingEvent(), and Djinn_RunJupiterJoinEffect().
| void BattleFx_SetObjectAlternatingWords | ( | union FieldObject * | fieldObject | ) |
Per-frame update: makes an object pulse, switching its scale between the two values of gBattleFx_PulseScales every 4 frames.
Definition at line 86 of file jupiter.c.
Referenced by BattleFx_SetObjectAlternatingWords(), Djinn_ResolvePendingEvent(), and Djinn_RunMarsJoinEffect().
| void BattleFx_AdvanceAngleWithRamp | ( | union FieldObject * | fieldObject | ) |
Per-frame update: spins an object ever faster, from 1/16 turn a frame up to 1/8.
Definition at line 97 of file jupiter.c.
Referenced by BattleFx_AdvanceAngleWithRamp(), Djinn_ResolvePendingEvent(), and Djinn_RunMarsJoinEffect().
| void BattleEffect_UpdatePhasedRadialParticle | ( | struct EffectSlot * | effect | ) |
Effect slot callback of a Mars Djinni's sparks.
States 0 and 1 repeat: the spark flies 120 pixels up the screen (give or take 3/32 turn) from its origin and starts over. Set to 2, it stops where it arrives; 40 frames later, states 3 and 4 swarm it round a point 20 pixels over the leader. Set to 5, it is freed once it arrives.
Definition at line 117 of file jupiter.c.
Referenced by BattleEffect_UpdatePhasedRadialParticle(), Djinn_ResolvePendingEvent(), and Djinn_RunMarsJoinEffect().
| void Djinn_RunMarsJoinEffect | ( | s32 | djinniId | ) |
A Mars Djinni joins the party: it turns to the camera, bounces three times, spins ever faster and shrinks away in a fountain of 24 sparks (BattleEffect_UpdatePhasedRadialParticle).
The leader turns to the camera and plays animation 28, the sparks swarm the leader, who pulses for 100 frames, and the sparks vanish. Called by Djinn_JoinParty for a Mars Djinni, which then clears the Djinni's actor slot. Uses all 24 effect slots, tints the field palette red and fades it back at the end.
Definition at line 14 of file mars.c.
Referenced by Djinn_JoinParty(), Djinn_ResolvePendingEvent(), and Djinn_RunMarsJoinEffect().
| void BattleFx_UpdateDescendingOrbitObject | ( | union FieldObject * | fieldObject | ) |
Per-frame update of a Venus Djinni's falling motes: each circles the leader on a shrinking spiral (radius timer * 0.4 pixels) while it sinks a pixel a frame, and is released 20 pixels above the leader's feet.
Set by BattleFx_RunVenusDjinnCapture in venus.c.
Definition at line 143 of file mars.c.
Referenced by BattleFx_RunVenusDjinnCapture(), BattleFx_UpdateDescendingOrbitObject(), and Djinn_ResolvePendingEvent().
| void BattleFx_UpdateRadialSpread | ( | struct EffectSlot * | effect | ) |
Effect slot callback of a Venus Djinni's particles: each starts on screen at a random point 10 to 20 pixels round the leader and flies 120 pixels up the screen, over and over (states 0 and 1); set to 2, it is freed once it arrives.
Set by BattleFx_RunVenusDjinnCapture in venus.c; a particle that starts on an odd frame plays SE_144.
Definition at line 174 of file mars.c.
Referenced by BattleFx_RunVenusDjinnCapture(), BattleFx_UpdateRadialSpread(), and Djinn_ResolvePendingEvent().
| void BattleFx_RunVenusDjinnCapture | ( | s32 | djinniId | ) |
A Venus Djinni joins the party: it hops twice, spins and leaps, then shrinks away; the leader turns to the camera and plays animation 28 while 24 particles rise round it (BattleFx_UpdateRadialSpread).
Then 24 motes spiral down onto the leader from 120 pixels above (BattleFx_UpdateDescendingOrbitObject) and 8 sparks burst from the leader. Called by Djinn_JoinParty for a Venus Djinni, which then clears the Djinni's actor slot. Uses all 24 effect slots, tints the field palette green and fades it back at the end.
Definition at line 15 of file venus.c.
Referenced by BattleFx_RunVenusDjinnCapture(), Djinn_JoinParty(), and Djinn_ResolvePendingEvent().
| void BattleFx_UpdateRandomTargetParticle | ( | struct EffectSlot * | effect | ) |
Effect slot callback of a Mercury Djinni's droplets: each falls from 100 pixels above to a random point near the leader (state 0), and where it lands splashes 12 pixels in a random direction with SE_143.
In state 1 it then falls again 6 frames later (back to state 0); once BattleFx_RunMercuryDjinnCapture sets state 2, its next splash is its last (state 3, which frees it).
Definition at line 163 of file venus.c.
Referenced by BattleFx_RunMercuryDjinnCapture(), BattleFx_UpdateRandomTargetParticle(), and Djinn_ResolvePendingEvent().
| void BattleFx_HalveDistanceToTarget | ( | union FieldObject * | fieldObject | ) |
Per-frame update of an afterimage: closes half the distance to the object it is linked to.
Set on the Mercury Djinni's afterimages by BattleFx_RunMercuryDjinnCapture.
Definition at line 220 of file venus.c.
Referenced by BattleFx_HalveDistanceToTarget(), BattleFx_RunMercuryDjinnCapture(), and Djinn_ResolvePendingEvent().
| void BattleFx_RunMercuryDjinnCapture | ( | s32 | djinniId | ) |
A Mercury Djinni joins the party: the screen is tinted blue, the Djinni bounces twice and hops three times ever higher, then rises 120 pixels out of sight trailing eight afterimages.
The leader turns to the camera and plays animation 28 while 24 droplets rain round it, one a frame (BattleFx_UpdateRandomTargetParticle); then the colours return.
Definition at line 14 of file mercury.c.
Referenced by BattleFx_RunMercuryDjinnCapture(), Djinn_JoinParty(), and Djinn_ResolvePendingEvent().
| void Field_DispatchTypeHandler | ( | s32 | kind | ) |
Runs one step of the current Psynergy effect: 0 casts it with no target, 1 casts it on its target (secondObjectId), 2 finishes it and 3 runs its kind's extra handler.
Exported as Field_DispatchTypeHandlerFar; Goma Cave's entrance imports it and passes 1 to play Whirlwind on the stump's ivy from its own event.
Definition at line 15 of file dispatch.c.
Referenced by Djinn_ResolvePendingEvent(), Field_DispatchTypeHandler(), and GomaCaveEntrance_WhirlwindOnStumpIvy().
| void BattleFx_Run | ( | void | ) |
Casts the current Psynergy effect with no target: runs the body of its kind (scene->fieldKind).
Called by Field_UsePsynergy when no scene event names a target (FLAG_PSYNERGY_TARGET clear), by Field_UseItem for an item with a field action, and by Field_DispatchTypeHandler(0). Halt also moves gGameState.pausedObject to the actor it stops.
Definition at line 35 of file dispatch.c.
Referenced by BattleFx_Run(), Djinn_ResolvePendingEvent(), Field_DispatchTypeHandler(), Field_UseItem(), and Field_UsePsynergy().
| void BattleFx_DispatchRequestKind | ( | void | ) |
Casts the current Psynergy effect on its target (secondObjectId): runs the handler of its kind.
Called by Field_UsePsynergy when a scene event names the target (FLAG_PSYNERGY_TARGET still set after the before event), and by Field_DispatchTypeHandler(1). Clears scene->enabled first: that is how the runners BattleFx_Run shares (Force, Frost, Ply, Whirlwind, Catch) tell that a scene event decides what happens to the target. Halt also moves gGameState.pausedObject to the target.
Definition at line 127 of file dispatch.c.
Referenced by BattleFx_DispatchRequestKind(), Djinn_ResolvePendingEvent(), Field_DispatchTypeHandler(), and Field_UsePsynergy().
| void BattleFx_ClearChildValueOnMismatch | ( | void | ) |
Finishes the current effect when it is Mind Read: ends the effect and lets its target move again, unless the target is the object kept stopped.
Called by Field_UsePsynergy after the after event, and by Field_DispatchTypeHandler(2): Mind Read is the one kind whose effect stays up through the after event, the conversation it reads.
Definition at line 202 of file dispatch.c.
Referenced by BattleFx_ClearChildValueOnMismatch(), Djinn_ResolvePendingEvent(), Field_DispatchTypeHandler(), and Field_UsePsynergy().
| void FieldEvent_RunTypeHandler | ( | void | ) |
The extra handler of Reveal, Cloak and Avoid: what each does when it ends.
Called by Field_RunPsynergyEvents, which ends a Psynergy that runs out by itself, and by Field_DispatchTypeHandler(3).
Definition at line 216 of file dispatch.c.
Referenced by Djinn_ResolvePendingEvent(), Field_DispatchTypeHandler(), Field_RunPsynergyEvents(), and FieldEvent_RunTypeHandler().
Runs the event tied to an effect: a result below 0x10000 is a message, shown at target; a larger one is a routine, called with param and target (through r3).
Afterwards, with FLAG_NOTHING_HAPPENS set, says "But nothing happens.". Returns 0.
Called by Field_UsePsynergy and Field_RunPsynergyEvents for the before and after events, and by Force, Frost and Reveal for the events of their own phases.
Definition at line 242 of file dispatch.c.
Referenced by Djinn_ResolvePendingEvent(), Field_RunEventAction(), Field_RunPsynergyEvents(), Field_UsePsynergy(), FieldFx_RunForce(), FieldFx_RunFrost(), FieldFx_RunReveal(), and ResetSceneTransitionEffect().
| void ObjectGroup_ApplyRandomChildValues | ( | union FieldObject * | fieldObject | ) |
Per-frame update: sets every part of an object's sprite to param frame % 6, which cycles its colours.
Assigned to the target while Move, Lift, Carry or Retreat holds it.
Definition at line 270 of file dispatch.c.
Referenced by BattleFx_SteerLiftedTarget(), BattleFx_SteerPushedTarget(), Djinn_ResolvePendingEvent(), FieldFx_RunLiftOnTarget(), FieldFx_RunRetreat(), and ObjectGroup_ApplyRandomChildValues().
| void Motion_SetTargetPositionFromMagnitudeAngle | ( | struct ObjectRuntime * | object, |
| s32 | magnitude, | ||
| s32 | angle ) |
Sends an object toward the point magnitude (16.16 pixels) away from it in direction angle: sets its move target.
Carry, Lift, Douse, Move and the Djinni's hop into battle throw things this way.
Definition at line 308 of file dispatch.c.
Referenced by BattleFx_RunVenusDjinnCapture(), BattleFx_StartItemBreak(), BattleFx_SteerLiftedTarget(), Djinn_ResolvePendingEvent(), Djinn_RunBattleStartHop(), FieldFx_RunLiftOnTarget(), FieldFx_RunPly(), FieldFx_SpawnRandomAngleTriplet(), Motion_SetTargetPositionFromMagnitudeAngle(), SpawnHeavyImpactEffect(), and UpdateRisingParticleBurst().
| s32 ResourceTable_CountFreeBlocks | ( | void | ) |
Counts the free blocks (owner 0xff) of the 512 resource blocks.
BattleFx_LoadActionEffectResources subtracts this from VRAM_BLOCK_COUNT to record the blocks already occupied before the effect starts.
Definition at line 324 of file dispatch.c.
Referenced by BattleFx_LoadActionEffectResources(), Djinn_ResolvePendingEvent(), and ResourceTable_CountFreeBlocks().
| struct AnimationObject * Sprite_ShareVramCache | ( | struct AnimationObject * | sourceSprite, |
| struct AnimationObject * | sharedSprite ) |
Makes sourceSprite share sharedSprite's VRAM block, releasing its own; with no sharedSprite it keeps its block.
Retains the shared cache entry and returns the sprite whose block is shared from now on (sharedSprite, or sourceSprite when there was none), or NULL for no sourceSprite. Chains of afterimages pass one block along this way. Each sprite retains the entry so releasing an afterimage cannot free graphics still used by the others. Sprite teardown leaves the shared entry for the caller to release.
Definition at line 346 of file dispatch.c.
Referenced by BattleFx_RunMercuryDjinnCapture(), Djinn_ResolvePendingEvent(), Djinn_RunBattleStartHop(), FieldFx_RunForce(), FieldFx_RunPly(), KolimaForestTree_SpawnOrbitSparks(), Sprite_ShareVramCache(), and TretTreeInteriors_SpawnSwirlSparks().
| struct ObjectRuntime * Object_Spawn | ( | s32 | kind, |
| s32 | x, | ||
| s32 | y, | ||
| s32 | z ) |
Creates an object for an effect, at the caster's ground height, with sprite priority 0 and animation 1.
An object without animation is released and NULL returned. The effects spawn their orbs, hands and particles through it, and check for NULL: the object table may be full.
Definition at line 371 of file dispatch.c.
Referenced by BattleEffect_RunFallbackObjectTransition(), BattleEffect_SpawnBurstParticleField(), BattleFx_RunSparkEmitter(), BattleFx_RunVenusDjinnCapture(), BattleFx_SpawnFallingParticles(), BattleFx_SpawnItemBreakMode1(), BattleFx_SpawnItemBreakMode3(), BattleFx_StartItemBreak(), BattleFx_SteerLiftedTarget(), BattleFx_UpdateItemBreakFragment(), Djinn_ResolvePendingEvent(), FieldFx_RunCatch(), FieldFx_RunDouse(), FieldFx_RunForce(), FieldFx_RunFrost(), FieldFx_RunGrowth(), FieldFx_RunPly(), FieldFx_RunWhirlwind(), FieldFx_SpawnRandomAngleTriplet(), ItemDisplay_EmitSparkles(), Object_Spawn(), RevealMarker_EmitSparkles(), SpawnHeavyImpactEffect(), and UpdateRisingParticleBurst().
| void ObjectGroup_SetActionForOthers | ( | struct ObjectRuntime * | except, |
| s32 | state, | ||
| s32 | value ) |
Sets the movement state and animation timer steps of every object but the player's and except.
EventObject_Initialize stops them (state 1, speed 0) while an effect plays and lets them go again (state 0, speed 0x10).
Definition at line 395 of file dispatch.c.
Referenced by Djinn_ResolvePendingEvent(), EventObject_Initialize(), and ObjectGroup_SetActionForOthers().
| void FieldFx_UpdateScaledArcObjectA | ( | union FieldObject * | fieldObject | ) |
Per-frame update of arc A: over 32 frames it swells and shrinks again (scale sin(frame / 64 turn)) while it rises a pixel a frame on the object it follows, 9 pixels in front of it and up to 5 pixels further while small.
Definition at line 11 of file arcs.c.
Referenced by BattleEffect_CleanupSceneObjects(), BattleFx_SpawnScaledArcObjects(), Djinn_ResolvePendingEvent(), and FieldFx_UpdateScaledArcObjectA().
| void FieldFx_UpdateScaledArcObjectB | ( | union FieldObject * | fieldObject | ) |
Per-frame update of arc B: arc A upside down, 16 pixels in front of the object and up to 5 pixels nearer while small.
Definition at line 36 of file arcs.c.
Referenced by BattleEffect_CleanupSceneObjects(), BattleFx_SpawnScaledArcObjects(), Djinn_ResolvePendingEvent(), and FieldFx_UpdateScaledArcObjectB().
| void BattleFx_SpawnScaledArcObjects | ( | struct FieldActor * | linked | ) |
Spawns the two swelling arcs (object 26) on an object, A and B (B upside down); they follow it for 32 frames.
Definition at line 88 of file arcs.c.
Referenced by BattleFx_FlickerObjectAndTick(), BattleFx_SpawnScaledArcObjects(), Djinn_ResolvePendingEvent(), and FieldFx_CycleObjectValueByCounter().
| void BattleFx_FlickerObjectAndTick | ( | union FieldObject * | fieldObject | ) |
Per-frame update: flashes an object between sprite param 7 and 0 every 2 frames and spawns the swelling arcs on it every 16.
Definition at line 134 of file arcs.c.
Referenced by BattleFx_FlickerObjectAndTick(), Djinn_ResolvePendingEvent(), and EventObject_Initialize().
| void FieldFx_CycleObjectValueByCounter | ( | union FieldObject * | fieldObject | ) |
Per-frame update: cycles an object through sprite params 0 to 5, one step every 2 frames, and spawns the swelling arcs on it every 16.
Definition at line 148 of file arcs.c.
Referenced by Djinn_ResolvePendingEvent(), EventObject_Initialize(), and FieldFx_CycleObjectValueByCounter().
| void BattleFx_UpdateAllEffectSlots | ( | void | ) |
Scheduler callback: updates the 24 effect slots.
Definition at line 8 of file setup.c.
Referenced by BattleEffect_CleanupSceneObjects(), BattleFx_LoadActionEffectResources(), BattleFx_UpdateAllEffectSlots(), and Djinn_ResolvePendingEvent().
Prepares the work of the Psynergy effect for ability (heap slot 56) and loads its spark tiles.
Called again while an effect resolves, it only switches the ability.
Definition at line 13 of file setup.c.
Referenced by BattleFx_LoadActionEffectResources(), Djinn_ResolvePendingEvent(), Field_RunPsynergyEvents(), Field_UseItem(), Field_UsePsynergy(), and GomaCaveEntrance_WhirlwindOnStumpIvy().
Records the caster and the target of an effect.
With no target, the effect takes place 16 pixels in front of the caster (facing to the nearest quarter turn).
Definition at line 56 of file setup.c.
Referenced by BattleFx_LoadActionEffectResources(), BattleFx_Run(), BattleFx_SetupObjectPair(), Djinn_ResolvePendingEvent(), Field_RunPsynergyEvents(), Field_UsePsynergy(), and GomaCaveEntrance_WhirlwindOnStumpIvy().
| void EffectRuntime_StopCurrentObject | ( | void | ) |
Stops the caster's per-frame hook and restores its colours.
Definition at line 94 of file setup.c.
Referenced by BattleFx_SteerPushedTarget(), Djinn_ResolvePendingEvent(), EffectRuntime_StopCurrentObject(), EventObject_Initialize(), Field_RunPsynergyEvents(), Field_UsePsynergy(), FieldFx_RunPlyOnTarget(), and GomaCaveEntrance_WhirlwindOnStumpIvy().
| void BattleEffect_CleanupSceneObjects | ( | void | ) |
Ends a Psynergy effect: frees the effect slots still in use and, unless another effect is being resolved, waits (at most 30 frames) for the swelling arcs to end, stops the slot callback, releases the effect's tiles, restores the map's shake, plays the queued sound and releases the effect's work.
Definition at line 110 of file setup.c.
Referenced by AltinPeak_BeastFreezesWidePuddle(), BattleEffect_CleanupSceneObjects(), Djinn_ResolvePendingEvent(), Event_MeetFlint(), Field_RunPsynergyEvents(), Field_UseItem(), Field_UsePsynergy(), Imil_MiaCastsPlyOnOldMan(), Kolima_FinishReadingThoughts(), MercuryLighthouseAerie_AlexCastsPly(), Scene_EndCutscenePsynergy(), ValeBabi_DemonstrateCatch(), and VaultInteriors_EndMindRead().
| void EventObject_Initialize | ( | void | ) |
Starts casting: the caster takes its casting pose (animation 20) and stops.
Unless the effect is silent the caster flashes with a sound; unless it is quiet, the ability's name is shown while every other object stands still. With flag 0x140 the caster's colours keep cycling and it takes pose 21; otherwise the caster's hook stops.
Definition at line 186 of file setup.c.
Referenced by Djinn_ResolvePendingEvent(), EventObject_Initialize(), Field_UsePsynergy(), and GomaCaveEntrance_WhirlwindOnStumpIvy().
| void BattleEffect_InitializeSharedScene | ( | void | ) |
Saves the palettes for the effect (once, unless an effect is already shown) and fades them toward one of the eight effect colours (gBattleFx_TargetColors), picked by the frame counter or forced by flags 0x148 to 0x14f, over 8 frames.
Definition at line 236 of file setup.c.
Referenced by BattleEffect_InitializeSharedScene(), BattleEffect_RunFallbackObjectTransition(), BattleEffect_SpawnBurstParticleField(), BattleFx_SteerLiftedTarget(), BattleFx_SteerPushedTarget(), Djinn_ResolvePendingEvent(), FieldFx_RunCatch(), FieldFx_RunDouse(), FieldFx_RunForce(), FieldFx_RunFrost(), FieldFx_RunLiftOnTarget(), FieldFx_RunMove(), FieldFx_RunPly(), FieldFx_RunRetreat(), FieldFx_RunWhirlwind(), and RunSceneTransitionEffect().
| void BattleFx_PrepareBufferInterpolation | ( | void | ) |
Fades the palettes back from an effect's colours to the saved ones (or to palette 0x10001 while an effect is shown) over 8 frames.
Definition at line 275 of file setup.c.
Referenced by BattleEffect_RunFallbackObjectTransition(), BattleFx_FinishSceneAndReleaseHeapBlock(), BattleFx_PrepareBufferInterpolation(), BattleFx_SteerLiftedTarget(), BattleFx_SteerPushedTarget(), Djinn_ResolvePendingEvent(), FieldFx_RunCatch(), FieldFx_RunDouse(), FieldFx_RunForce(), FieldFx_RunFrost(), FieldFx_RunGrowth(), FieldFx_RunGrowthOnTarget(), FieldFx_RunLiftOnTarget(), FieldFx_RunMove(), FieldFx_RunPly(), FieldFx_RunRetreat(), and FieldFx_RunWhirlwind().
| void Camera_WorldToScreen | ( | struct EffectVector * | position | ) |
Converts a world position (16.16 pixels) to the screen: x and z receive the screen's x and y and y becomes 0.
The world map uses its perspective projection.
Definition at line 293 of file setup.c.
Referenced by AltmillerCave_ReleaseWallBurst(), BattleEffect_RunFallbackObjectTransition(), BattleEffect_UpdatePhasedRadialParticle(), BattleFx_RunAngledApproachPhases(), BattleFx_RunMercuryDjinnCapture(), BattleFx_RunVenusDjinnCapture(), BattleFx_UpdateRadialBurst(), BattleFx_UpdateRadialCamera(), BattleFx_UpdateRadialLaunch(), BattleFx_UpdateRadialSpread(), BattleFx_UpdateRandomTargetParticle(), Camera_WorldToScreen(), Djinn_ResolvePendingEvent(), Djinn_RunJupiterJoinEffect(), Djinn_RunMarsJoinEffect(), FieldFx_RunForce(), and FieldFx_RunRetreat().
Starts the wave effect of caster sourceId on target targetId: fades the palettes toward a hue that shifts with the frame counter, and starts its per-frame update (FieldFx_UpdateMindReadWave) after 8 frames.
Abilities: Mind Read (field kind 2).
Definition at line 27 of file mind_read.c.
Referenced by BattleFx_DispatchRequestKind(), BattleFx_Run(), Djinn_ResolvePendingEvent(), Event_PullJillFromRiver(), and RunSceneTransitionEffect().
| void BattleFx_FinishSceneAndReleaseHeapBlock | ( | void | ) |
Stops the wave effect: restores the caster's colours and the palettes and releases the effect's work.
Definition at line 47 of file mind_read.c.
Referenced by BattleFx_ClearChildValueOnMismatch(), BattleFx_FinishSceneAndReleaseHeapBlock(), and Djinn_ResolvePendingEvent().
| void FieldFx_UpdateMindReadWave | ( | void | ) |
Scheduler callback of the wave effect: once its delay has run out, writes the next page of scanline offsets (a sine wave of 4 pixels either way), steps the colour fade and the hue, keeps the caster's colours lit, and every 60 frames sends three particles (object 281) from the target to the caster, with sound 130.
Definition at line 65 of file mind_read.c.
Referenced by BattleFx_FinishSceneAndReleaseHeapBlock(), Djinn_ResolvePendingEvent(), FieldFx_UpdateMindReadWave(), and RunSceneTransitionEffect().
| void BattleFx_ArmBg0HBlankDma | ( | void | ) |
Scheduler callback: restarts the HBlank DMA that writes BG0's horizontal scroll for each scanline from the wave's shown page.
Definition at line 145 of file mind_read.c.
Referenced by BattleFx_ArmBg0HBlankDma(), Djinn_ResolvePendingEvent(), Ui_FillBank15PaletteGrey(), and Ui_SetBank15PaletteAndClearRenderMode().
| void BattleFx_AdvanceHueCycle | ( | void | ) |
Moves the wave's hue on 4 degrees and works out its colour, each channel 4 to 11.
Definition at line 161 of file mind_read.c.
Referenced by BattleFx_AdvanceHueCycle(), Djinn_ResolvePendingEvent(), FieldFx_UpdateMindReadWave(), and RunSceneTransitionEffect().
Works out red, green and blue (0 to 31 each, 16.16) for a hue in degrees (16.16).
Definition at line 197 of file mind_read.c.
Referenced by BattleFx_AdvanceHueCycle(), Djinn_ResolvePendingEvent(), and FieldFx_ComputeHueChannels().
One colour channel's strength at a hue angle: rising from 0 to 60 degrees, high from 60 to 180, falling from 180 to 240, low elsewhere.
Definition at line 205 of file mind_read.c.
Referenced by BattleFx_HueChannelRamp(), Djinn_ResolvePendingEvent(), and FieldFx_ComputeHueChannels().
The 16.16 remainder of value divided by divisor (0 for a zero divisor).
Definition at line 217 of file mind_read.c.
Referenced by BattleFx_HueChannelRamp(), Djinn_ResolvePendingEvent(), and Fixed_Remainder().
| void BattleFx_SetCallbackWhenTargetUnset | ( | union FieldObject * | fieldObject | ) |
Per-frame update: once the object has arrived (no destination left), runs the script for untargeted objects.
Definition at line 231 of file mind_read.c.
Referenced by BattleFx_SetCallbackWhenTargetUnset(), Djinn_ResolvePendingEvent(), and FieldFx_UpdateMindReadWave().
| void Ui_FillBank15PaletteGrey | ( | void | ) |
Turns colours 1 and 3 to 12 of BG palette 15 grey and starts the BG0 scanline scroll (BattleFx_ArmBg0HBlankDma).
Definition at line 249 of file mind_read.c.
Referenced by Djinn_ResolvePendingEvent(), RunSceneTransitionEffect(), and Ui_FillBank15PaletteGrey().
| void Ui_SetBank15PaletteAndClearRenderMode | ( | void | ) |
Stops the BG0 scanline scroll and restores BG palette 15.
Definition at line 279 of file mind_read.c.
Referenced by BattleFx_FinishSceneAndReleaseHeapBlock(), Djinn_ResolvePendingEvent(), Event_ReadCorneredSuspectsMinds(), Ui_SetBank15PaletteAndClearRenderMode(), VaultInteriors_DefeatThieves(), and VaultInteriors_IvanJoinsRodSearch().
Returns the direction of the d-pad (0x10000 a full turn): right 0, down 0x4000, left 0x8000, up 0xc000; 0xffff when none or a diagonal is held.
Definition at line 9 of file move.c.
Referenced by BattleFx_SteerLiftedTarget(), BattleFx_SteerPushedTarget(), Djinn_ResolvePendingEvent(), and Input_GetDpadAngle().
| void BattleFx_UpdateItemBreakFragment | ( | union FieldObject * | fieldObject | ) |
Per-frame update of a broken item's main fragment: turns it toward the object it is linked to, at most 1/16 turn a frame, and sheds a particle (object 0x11d) round it.
Definition at line 17 of file move.c.
Referenced by BattleFx_StartItemBreak(), BattleFx_UpdateItemBreakFragment(), and Djinn_ResolvePendingEvent().
| void BattleFx_SteerPushedTarget | ( | s32 | targetId | ) |
Puts the pushing hand beside the target and pushes the target 16 pixels the way the d-pad points, for as long as the player pushes; A, B, L or R end it.
Abilities: Move (field kind 1), cast on a target.
Where the target cannot go, an error sound plays every 16 frames. When the push would run into the caster, the caster blocks it or, when the tile beyond is free, is pushed along too.
Definition at line 65 of file move.c.
Referenced by BattleFx_DispatchRequestKind(), BattleFx_SteerPushedTarget(), and Djinn_ResolvePendingEvent().
| void BattleFx_UpdateOrbitAndReturn | ( | struct EffectSlot * | slot | ) |
Effect slot callback of a particle that flies 30 pixels out from where it started, comes back and is freed.
Definition at line 246 of file move.c.
Referenced by BattleFx_UpdateOrbitAndReturn(), and Djinn_ResolvePendingEvent().
| void FieldFx_RunMove | ( | void | ) |
Shows the broken item beside the caster for 30 frames, then turns it into particles.
Abilities: Move (field kind 1), cast with no target.
Definition at line 296 of file move.c.
Referenced by BattleFx_Run(), Djinn_ResolvePendingEvent(), and FieldFx_RunMove().
| void * BattleFx_StartItemBreak | ( | void * | object | ) |
Spawns the broken item (object 215) 16 pixels above object and moves it 16 pixels the way object faces (to the nearest quarter turn), with 8 particles round it.
Returns the item, or 0.
Definition at line 323 of file move.c.
Referenced by BattleFx_StartItemBreak(), BattleFx_SteerPushedTarget(), Djinn_ResolvePendingEvent(), and FieldFx_RunMove().
| void BattleFx_SnapScaleToFull | ( | struct MotionObject * | obj | ) |
Per-frame update: grows an object's scale by 1/16 a frame up to full size and fixes its position.
Definition at line 377 of file move.c.
Referenced by BattleFx_SnapScaleToFull(), BattleFx_SteerPushedTarget(), Djinn_ResolvePendingEvent(), and FieldFx_RunMove().
| void UpdateRisingParticleBurst | ( | void * | object | ) |
Per-frame update: the object spins as it rises for 31 frames, shrinks, and bursts into 8 particles.
Definition at line 397 of file move.c.
Referenced by BattleFx_SteerPushedTarget(), Djinn_ResolvePendingEvent(), FieldFx_RunLiftOnTarget(), FieldFx_RunMove(), and UpdateRisingParticleBurst().
| void ObjectDispatch_ApplyValueToKind200Children | ( | s32 | value | ) |
Passes value (as animation timer steps) to every one of the 64 objects whose first sprite part shows sprite 200.
Definition at line 9 of file reveal.c.
Referenced by Djinn_ResolvePendingEvent(), FieldFx_RunReveal(), ObjectDispatch_ApplyValueToKind200Children(), and ResetSceneTransitionEffect().
| void FieldEffect_WatchLeaderDistance | ( | void | ) |
Scheduler callback of the timed effect (kind 8): asks for it to end once the leader is 60 pixels from its centre or its time has run out.
The centre and the time are in the event work from 0xcb8 on (FieldFx_RunReveal).
Definition at line 36 of file reveal.c.
Referenced by Djinn_ResolvePendingEvent(), FieldEffect_WatchLeaderDistance(), FieldFx_RunReveal(), and ResetSceneTransitionEffect().
| void FieldFx_RunReveal | ( | void | ) |
Starts a screen transition centred on the leader, runs the matching event if there is one, and puts markers round the leader.
Abilities: Reveal (field kind 8).
Definition at line 67 of file reveal.c.
Referenced by BattleFx_DispatchRequestKind(), BattleFx_Run(), Djinn_ResolvePendingEvent(), and FieldFx_RunReveal().
| void ResetSceneTransitionEffect | ( | void | ) |
Ends Reveal if it is running: stops its watch, brings the colours back from black over 30 frames and runs stage 4 of the Psynergy event.
Definition at line 116 of file reveal.c.
Referenced by BattleFx_DispatchRequestKind(), BattleFx_Run(), Djinn_ResolvePendingEvent(), FieldEvent_RunTypeHandler(), and ResetSceneTransitionEffect().
| void FieldFx_RunGrowthOnTarget | ( | s32 | unused | ) |
Particles round the target, which takes the sprite priority of the ground under it.
Abilities: Growth (field kind 12), cast on a target.
Definition at line 50 of file growth.c.
Referenced by BattleFx_DispatchRequestKind(), Djinn_ResolvePendingEvent(), and FieldFx_RunGrowthOnTarget().
| void FieldFx_RunGrowth | ( | void | ) |
The particles, then five falling objects 4 to 10 pixels round the effect's position.
Abilities: Growth (field kind 12), cast with no target.
Definition at line 71 of file growth.c.
Referenced by BattleFx_Run(), Djinn_ResolvePendingEvent(), and FieldFx_RunGrowth().
| void BattleEffect_SpawnBurstParticleField | ( | void | ) |
Sends 24 particles, one every 2 frames, from in front of the caster to points round the effect's position.
They start 10 pixels up facing south, 24 pixels up facing north, and 10 pixels up and 10 ahead otherwise.
Definition at line 107 of file growth.c.
Referenced by BattleEffect_SpawnBurstParticleField(), Djinn_ResolvePendingEvent(), FieldFx_RunGrowth(), and FieldFx_RunGrowthOnTarget().
| void FieldFx_RunLiftOnTarget | ( | s32 | unused | ) |
An object appears 32 pixels to either side, each moves 14 pixels in, and they lift the target 32 pixels with them.
Called by BattleFx_DispatchRequestKind; leaves the target raised, with its update set to ObjectGroup_ApplyRandomChildValues.
Abilities: Lift (field kind 7), cast on a target.
Definition at line 13 of file lift.c.
Referenced by BattleFx_DispatchRequestKind(), Djinn_ResolvePendingEvent(), and FieldFx_RunLiftOnTarget().
| struct MotionObject * BattleFx_SpawnItemBreakMode3 | ( | s32 | x, |
| s32 | y, | ||
| s32 | z, | ||
| s32 | angle ) |
Spawns object 215 and grows it, spinning, from a quarter to full size over 24 frames; angle is the way it faces once grown.
Makes Lift's two hands, for FieldFx_RunLiftOnTarget and FieldFx_RunLift; returns NULL when no object could be spawned.
Definition at line 87 of file lift.c.
Referenced by BattleFx_SpawnItemBreakMode3(), Djinn_ResolvePendingEvent(), FieldFx_RunLift(), and FieldFx_RunLiftOnTarget().
| void BattleFx_UpdateRadialBurst | ( | struct EffectSlot * | slot | ) |
Effect slot callback of a particle that scatters 25 pixels from its origin in a random direction, then gathers beside the main object and is freed.
Set on Force's 12 flashes by FieldFx_RunForceOnTarget in force.c.
Definition at line 118 of file lift.c.
Referenced by BattleFx_UpdateRadialBurst(), Djinn_ResolvePendingEvent(), and FieldFx_RunForce().
| s32 SpawnHeavyImpactEffect | ( | struct ScriptInterpreter * | interpreter | ) |
A heavy impact: places object 0x11b 32 pixels below the source and scatters 12 shards from it.
Reached through SC_CALL in gBattleFx_HeavyImpactScript (fxdata.c), where the interpreter is the object running the script. Returns 0.
Definition at line 177 of file lift.c.
Referenced by Djinn_ResolvePendingEvent(), and SpawnHeavyImpactEffect().
| void FieldFx_RunForceOnTarget | ( | s32 | unused | ) |
Runs Force cast on a target, through FieldFx_RunForce.
Abilities: Force (field kind 4), cast on a target.
Definition at line 10 of file force.c.
Referenced by BattleFx_DispatchRequestKind(), Djinn_ResolvePendingEvent(), and FieldFx_RunForceOnTarget().
| void FieldFx_RunForce | ( | void | ) |
A shot appears in front of the caster, grows and flies forward with three afterimages; what it hits (scene->child) is pushed 16 pixels.
Abilities: Force (field kind 4).
Definition at line 23 of file force.c.
Referenced by BattleFx_Run(), Djinn_ResolvePendingEvent(), FieldFx_RunForce(), and FieldFx_RunForceOnTarget().
| void BattleFx_UpdateOrbitingParticleMain | ( | union FieldObject * | fieldObject | ) |
Per-frame update: flashes (animation 2) for 2 frames in every 8.
Definition at line 8 of file frost.c.
Referenced by BattleFx_UpdateOrbitingParticleMain(), Djinn_ResolvePendingEvent(), and FieldFx_RunFrost().
| void BattleFx_UpdateOrbitingParticleFade | ( | union FieldObject * | fieldObject | ) |
Per-frame update: shrinks by 1/16 a frame and is released at 1/16.
Definition at line 19 of file frost.c.
Referenced by BattleFx_UpdateOrbitingParticleFade(), Djinn_ResolvePendingEvent(), and FieldFx_UpdateSpiralParticle().
| void BattleFx_UpdateOrbitingParticleLeft | ( | union FieldObject * | fieldObject | ) |
Spirals anticlockwise at twice the frames left in pixels, then fades.
Definition at line 65 of file frost.c.
Referenced by BattleFx_UpdateOrbitingParticleLeft(), Djinn_ResolvePendingEvent(), and FieldFx_RunFrost().
| void BattleFx_UpdateOrbitingParticleRight | ( | union FieldObject * | fieldObject | ) |
Per-frame update: as BattleFx_UpdateOrbitingParticleLeft, clockwise.
Definition at line 70 of file frost.c.
Referenced by BattleFx_UpdateOrbitingParticleRight(), Djinn_ResolvePendingEvent(), and FieldFx_RunFrost().
| void FieldFx_RunFrostOnTarget | ( | s32 | unused | ) |
Runs Frost cast on a target.
Abilities: Frost (field kind 6), cast on a target (scene->child).
With childMode the target is left as it is and only the particles appear.
Definition at line 79 of file frost.c.
Referenced by BattleFx_DispatchRequestKind(), Djinn_ResolvePendingEvent(), and FieldFx_RunFrostOnTarget().
| void FieldFx_RunFrost | ( | void | ) |
16 particles spiral in on the effect's position and make the target flash 16 times; without childOption the target takes mode 2.
Abilities: Frost (field kind 6).
Definition at line 96 of file frost.c.
Referenced by BattleFx_Run(), Djinn_ResolvePendingEvent(), FieldFx_RunFrost(), and FieldFx_RunFrostOnTarget().
| void BattleFx_SwayParticle | ( | union FieldObject * | fieldObject | ) |
Per-frame update: sways 4 pixels either side of anchorX, once every 128 frames.
The update of each spark BattleFx_RunSparkEmitter sheds; it writes the spark's x and advances its phase.
Definition at line 10 of file ply.c.
Referenced by BattleFx_RunSparkEmitter(), BattleFx_SwayParticle(), and Djinn_ResolvePendingEvent().
| void BattleFx_UpdateShrinkingOrbitObject | ( | union FieldObject * | fieldObject | ) |
Per-frame update: spirals in on a point 10 pixels above the effect's position, at a radius of as many pixels as frames are left; released when timer reaches 0.
The update of FieldFx_RunPly's eight spiralling particles; each one's work holds its starting angle.
Definition at line 24 of file ply.c.
Referenced by BattleFx_UpdateShrinkingOrbitObject(), Djinn_ResolvePendingEvent(), and FieldFx_RunPly().
| void BattleFx_RunSparkEmitter | ( | union FieldObject * | fieldObject | ) |
Per-frame update: sways 6 pixels either side (a 64-frame cycle) 16 pixels above the effect's position, and every 3 frames sheds a spark that sways as it slowly falls.
With phase -1 it stays where it is. The update FieldFx_RunPly gives the centre particle; spawns object 0x11d for each spark.
Definition at line 58 of file ply.c.
Referenced by BattleFx_RunSparkEmitter(), Djinn_ResolvePendingEvent(), and FieldFx_RunPly().
| void FieldFx_RunPlyOnTarget | ( | s32 | unused | ) |
Runs FieldFx_RunPly, then stops the caster's hook.
Called by BattleFx_DispatchRequestKind.
Abilities: Ply, Ply Well, Pure Ply (field kind 3), cast on a target.
Definition at line 98 of file ply.c.
Referenced by BattleFx_DispatchRequestKind(), Djinn_ResolvePendingEvent(), and FieldFx_RunPlyOnTarget().
| void FieldFx_RunPly | ( | void | ) |
Eight particles spiral into the centre, where one appears, sheds sparks and flies far away.
Called by BattleFx_Run and FieldFx_RunPlyOnTarget; frees the particles' shared sprite resource slot at the end and runs the effect scene's finishCallback.
Abilities: Ply, Ply Well, Pure Ply (field kind 3).
Definition at line 109 of file ply.c.
Referenced by BattleFx_Run(), Djinn_ResolvePendingEvent(), FieldFx_RunPly(), and FieldFx_RunPlyOnTarget().
| void FieldFx_CheckCloakTile | ( | void | ) |
Scheduler callback of Cloak: when the tile under the leader is not CLOAK_TILE, requests CLOAK_END.
On the world map (event mode 3) it reads the 32-pixel gMapBlocks, elsewhere the 16-pixel terrain map.
Definition at line 13 of file cloak.c.
Referenced by Djinn_ResolvePendingEvent(), FieldFx_CheckCloakTile(), FieldFx_EndCloak(), FieldFx_ResumeCloakCheck(), and FieldFx_StartCloak().
| void FieldFx_EndCloak | ( | void | ) |
Ends Cloak: stops the tile check and makes the leader blink back into sight, clearing cloaked.
Definition at line 77 of file cloak.c.
Referenced by Djinn_ResolvePendingEvent(), FieldEvent_RunTypeHandler(), FieldFx_EndCloak(), and FieldFx_StartCloak().
| void FieldFx_ResumeCloakCheck | ( | void | ) |
Starts the Cloak tile check if the leader is hidden.
Definition at line 117 of file cloak.c.
Referenced by Djinn_ResolvePendingEvent(), Field_RunScene(), and FieldFx_ResumeCloakCheck().
| void FieldFx_StartCloak | ( | void | ) |
The leader blinks 10 times and hides (cloaked set), and the tile check starts; where the leader cannot hide it shows again at once.
Abilities: Cloak (field kind 10).
Definition at line 127 of file cloak.c.
Referenced by BattleFx_DispatchRequestKind(), BattleFx_Run(), Djinn_ResolvePendingEvent(), and FieldFx_StartCloak().
| void FieldFx_SpawnRandomAngleTriplet | ( | union FieldObject * | fieldObject | ) |
Per-frame update of a falling particle: on reaching altitude, it scatters three small particles.
Definition at line 45 of file douse.c.
Referenced by Djinn_ResolvePendingEvent(), FieldFx_RunDouse(), and FieldFx_SpawnRandomAngleTriplet().
| void BattleFx_UpdateDriftingFallObject | ( | union FieldObject * | fieldObject | ) |
Per-frame update: drifts from side to side as it slowly falls, and is released on reaching the ground.
Definition at line 86 of file douse.c.
Referenced by BattleFx_UpdateDriftingFallObject(), Djinn_ResolvePendingEvent(), and FieldFx_RunDouse().
| void FieldFx_RunDouseOnTarget | ( | s32 | unused | ) |
Runs Douse cast on a target, through FieldFx_RunDouse.
Abilities: Douse (field kind 5), cast on a target.
Definition at line 102 of file douse.c.
Referenced by BattleFx_DispatchRequestKind(), Djinn_ResolvePendingEvent(), and FieldFx_RunDouseOnTarget().
| void FieldFx_RunDouse | ( | void | ) |
An orb of light rises from 16 pixels above the target to 32 pixels above the destination (80 with variant) over 10 frames, growing as it goes, rains particles, and returns.
Abilities: Douse (field kind 5).
With no destination yet, the destination is 16 pixels from the target toward angle.
Definition at line 112 of file douse.c.
Referenced by BattleFx_Run(), Djinn_ResolvePendingEvent(), FieldFx_RunDouse(), and FieldFx_RunDouseOnTarget().
| void BattleFx_SpawnFallingParticles | ( | void | ) |
Per-frame update: drops one particle round the lifted object, 8 to 24 pixels above it and 0 to 48 pixels away in a random direction.
Definition at line 11 of file carry.c.
Referenced by BattleFx_SpawnFallingParticles(), BattleFx_SteerLiftedTarget(), and Djinn_ResolvePendingEvent().
| void BattleFx_SteerLiftedTarget | ( | s32 | targetId | ) |
Two hands lift it to 24 pixels above the ground; the d-pad moves it 16 pixels at a time and A, B, L or R drops it where it is.
Abilities: Carry (field kind 11), cast on a target.
Where the way is blocked a buzzer sounds.
Definition at line 52 of file carry.c.
Referenced by BattleFx_DispatchRequestKind(), BattleFx_SteerLiftedTarget(), and Djinn_ResolvePendingEvent().
| struct MotionObject * BattleFx_SpawnItemBreakMode1 | ( | s32 | x, |
| s32 | y, | ||
| s32 | z, | ||
| s32 | angle ) |
Spawns object 215 with the item break sound, in animation 1, and grows it, spinning, from a quarter to full size over 24 frames; angle is the way it faces once grown.
Definition at line 290 of file carry.c.
Referenced by BattleFx_SpawnItemBreakMode1(), BattleFx_SteerLiftedTarget(), Djinn_ResolvePendingEvent(), and FieldFx_RunCarry().
| void FieldFx_UpdateParticleMotionAndScale | ( | union FieldObject * | object | ) |
Per-frame update of a particle: moves by its velocity, slowing its x and z velocity a little, and changes its scale and spin.
Assigned by BattleFx_SpawnRadialParticleRing for Carry's landing particles.
Definition at line 48 of file whirlwind.c.
Referenced by BattleFx_SpawnRadialParticleRing(), Djinn_ResolvePendingEvent(), and FieldFx_UpdateParticleMotionAndScale().
| void BattleFx_SpawnRadialParticleRing | ( | struct MotionObject * | origin | ) |
Spawns 17 particles that spread from origin in a flat ring, their x velocity 1.5 times their z velocity, so the ring is wider than deep as the field is drawn.
Carry's BattleFx_SteerLiftedTarget spawns it where it sets its load down.
Definition at line 65 of file whirlwind.c.
Referenced by BattleFx_SpawnRadialParticleRing(), BattleFx_SteerLiftedTarget(), and Djinn_ResolvePendingEvent().
| void BattleFx_WanderAroundAnchor | ( | union FieldObject * | fieldObject | ) |
Per-frame update: wanders away from the anchor, 2 to 3 pixels a frame, now and then turning sharply; after 101 frames it hands over to the common particle script.
BattleFx_CircleAnchor switches a particle to it. While it wanders, the engine's own motion lifts the particle (the velocity and gravity BattleFx_CircleAnchor gave it); this only moves it across the ground.
Definition at line 95 of file whirlwind.c.
Referenced by BattleFx_CircleAnchor(), BattleFx_WanderAroundAnchor(), and Djinn_ResolvePendingEvent().
| void BattleFx_CircleAnchor | ( | union FieldObject * | fieldObject | ) |
Per-frame update: circles the anchor at 8 pixels; after 121 frames it starts to wander (BattleFx_WanderAroundAnchor).
FieldFx_RunWhirlwind gives it to each of the 16 particles it spawns round the orb.
Definition at line 127 of file whirlwind.c.
Referenced by BattleFx_CircleAnchor(), Djinn_ResolvePendingEvent(), and FieldFx_RunWhirlwind().
| void BattleFx_ShrinkObjectScaleUntilHalf | ( | union FieldObject * | fieldObject | ) |
Shrinks a scene-selected Whirlwind target each frame; below half size, moves it to the origin, stops it and removes the update.
The scale falls by 1/512 each frame. From unit scale the strict lower bound takes 257 updates.
Definition at line 159 of file whirlwind.c.
Referenced by BattleFx_ShrinkObjectScaleUntilHalf(), Djinn_ResolvePendingEvent(), and FieldFx_RunWhirlwind().
| void FieldFx_RunWhirlwindOnTarget | ( | s32 | unused | ) |
Runs Whirlwind using the target already stored in the effect scene.
Abilities: Whirlwind, Gale (field kind 14), cast on a target. BattleFx_DispatchRequestKind passes an argument this adapter ignores; the shared runner reads scene->child instead.
Definition at line 176 of file whirlwind.c.
Referenced by BattleFx_DispatchRequestKind(), Djinn_ResolvePendingEvent(), and FieldFx_RunWhirlwindOnTarget().
| void FieldFx_RunWhirlwind | ( | void | ) |
An orb is carried from the caster to 4 pixels above the effect's position over 10 frames, growing from 0.25.
Abilities: Whirlwind, Gale (field kind 14).
Without scene->enabled the target shrinks, and 16 particles appear round the orb, one every 6 frames, and circle it.
Called by BattleFx_Run and FieldFx_RunWhirlwindOnTarget. Fades the palettes to an effect colour and back, and gives the target its shrinking update; the orb is released at the end, the particles finish on their own.
Definition at line 189 of file whirlwind.c.
Referenced by BattleFx_Run(), Djinn_ResolvePendingEvent(), FieldFx_RunWhirlwind(), and FieldFx_RunWhirlwindOnTarget().
| void BattleFx_UpdateRadialCamera | ( | struct EffectSlot * | effect | ) |
Effect slot callback: state 0 heads for a point 40 to 70 pixels from where the particle appeared; state 1 waits to arrive, then goes on to 2; state 2 heads for a point 4 pixels round 8 pixels above the effect's position on screen; state 3 frees the slot on arrival.
Set on the 16 particles of BattleEffect_RunFallbackObjectTransition.
Definition at line 12 of file halt.c.
Referenced by BattleEffect_RunFallbackObjectTransition(), BattleFx_UpdateRadialCamera(), and Djinn_ResolvePendingEvent().
| void BattleFx_MarkChildAndRunFallbackTransition | ( | s32 | unused | ) |
Pauses the target (scene->child) and runs BattleEffect_RunFallbackObjectTransition.
Called by BattleFx_Run and BattleFx_DispatchRequestKind for Halt on a target; sets the target's paused field.
Definition at line 65 of file halt.c.
Referenced by BattleFx_DispatchRequestKind(), BattleFx_MarkChildAndRunFallbackTransition(), BattleFx_Run(), and Djinn_ResolvePendingEvent().
| void BattleEffect_RunFallbackObjectTransition | ( | void | ) |
Throws an object from the caster to the effect's position over 10 frames and scatters it into 16 particles.
Halt's visible effect: called by BattleFx_Run when no target with a talk event is near, and through BattleFx_MarkChildAndRunFallbackTransition otherwise. Fills effect slots 0 to 15 and sets scene->y to the caster's height.
Definition at line 77 of file halt.c.
Referenced by BattleEffect_RunFallbackObjectTransition(), BattleFx_MarkChildAndRunFallbackTransition(), BattleFx_Run(), and Djinn_ResolvePendingEvent().
| void BattleEffect_SetRandomTableValueOnObject | ( | union FieldObject * | fieldObject | ) |
Per-frame update of a paused object: gives its sprite one of the table's eight params at random.
BattleEffect_PauseObject sets it, and BattleFx_ResumeObject looks for it to know the object was paused this way.
Definition at line 160 of file halt.c.
Referenced by BattleEffect_PauseObject(), BattleEffect_SetRandomTableValueOnObject(), BattleFx_ResumeObject(), and Djinn_ResolvePendingEvent().
| void BattleEffect_PauseObject | ( | s32 | actorId | ) |
Pauses object id, keeping its per-frame update and, if it is animated, its first animation's param in gGameState.
Called by BattleFx_Run and BattleFx_DispatchRequestKind for Halt, which then record the id in gGameState.pausedObject, and by the Colosso scenes to stop their operators. Sets gGameState.pausedUpdate and pausedPose, the object's update and paused fields, and stops its animation.
Definition at line 173 of file halt.c.
Referenced by BattleEffect_PauseObject(), BattleFx_DispatchRequestKind(), BattleFx_Run(), ColossoLog_Initialize(), ColossoWall_Initialize(), Djinn_ResolvePendingEvent(), Event_HaltLifts(), and Event_HaltWall().
| void BattleFx_ResumeObject | ( | s32 | actorId | ) |
Resumes object id with the update and param kept by BattleEffect_PauseObject.
Called for gGameState.pausedObject by BattleFx_Run and BattleFx_DispatchRequestKind before Halt stops another object, and by Scene_TalkToActor after talking to the paused actor. Clears gGameState.pausedUpdate and the object's paused field, and restarts its animation at speed 16.
Definition at line 199 of file halt.c.
Referenced by BattleFx_DispatchRequestKind(), BattleFx_ResumeObject(), BattleFx_Run(), Djinn_ResolvePendingEvent(), and Scene_TalkToActor().
Returns id, or -1 (no target) when the current effect's definition has flags 0xff.
Called by BattleFx_Run on the nearest Halt target.
Definition at line 216 of file halt.c.
Referenced by BattleFx_FilterObjectIdByFlags(), BattleFx_Run(), and Djinn_ResolvePendingEvent().
| void FieldFx_RunCatchOnTarget | ( | s32 | unused | ) |
Abilities: Catch (field kind 13), cast on a target.
Called by BattleFx_DispatchRequestKind; the target is ignored.
Definition at line 10 of file catch.c.
Referenced by BattleFx_DispatchRequestKind(), Djinn_ResolvePendingEvent(), and FieldFx_RunCatchOnTarget().
| void FieldFx_RunCatch | ( | void | ) |
Carries object 215 from 16 pixels above the caster to the goal in 10 steps, growing from a quarter to full size, presses down 20 pixels moving child to (-9, -9), rises 19.5 pixels and shrinks back.
Abilities: Catch (field kind 13).
The goal is 32 pixels in front of the caster with scene->enabled, otherwise the effect's position, 32 pixels up in both cases. Called by BattleFx_Run and FieldFx_RunCatchOnTarget. Moves the effect scene's child to (-9, -9) when there is one, and releases object 215 at the end.
Definition at line 22 of file catch.c.
Referenced by BattleFx_Run(), Djinn_ResolvePendingEvent(), FieldFx_RunCatch(), and FieldFx_RunCatchOnTarget().
| void FieldFx_UpdateSpinAngle | ( | union FieldObject * | fieldObject | ) |
Per-frame update: spins by 0x1000 + timer * 0x50 a frame, speeding up (timer counts up) until timer * 0x50 reaches 0x1000.
Definition at line 11 of file retreat.c.
Referenced by Djinn_ResolvePendingEvent(), FieldFx_RunRetreat(), and FieldFx_UpdateSpinAngle().
| void BattleFx_UpdateDescendingObject | ( | union FieldObject * | fieldObject | ) |
Per-frame update: spins 1/8 turn a frame as it shrinks, rising a pixel a frame; released once its scale falls below 0x3000.
Definition at line 23 of file retreat.c.
Referenced by BattleFx_UpdateDescendingObject(), Djinn_ResolvePendingEvent(), and FieldFx_RunRetreat().
| void BattleFx_UpdateRadialLaunch | ( | struct EffectSlot * | slot | ) |
Effect slot callback: a particle flies 120 pixels from the main object's screen position (8 pixels lower) in a direction within 1/8 turn of up the screen.
In state 1 it flies again on arrival; in state 2 it is freed.
Definition at line 39 of file retreat.c.
Referenced by BattleFx_UpdateRadialLaunch(), Djinn_ResolvePendingEvent(), and FieldFx_RunRetreat().
| void FieldFx_RunRetreat | ( | void | ) |
Spins the main object and shrinks it while 24 particles fly out, one a frame.
Abilities: Retreat (field kind 15).
Definition at line 88 of file retreat.c.
Referenced by BattleFx_DispatchRequestKind(), BattleFx_Run(), Djinn_ResolvePendingEvent(), and FieldFx_RunRetreat().
| void BattleFx_UpdateDescendingParticlePositiveArc | ( | union FieldObject * | fieldObject | ) |
Per-frame update of a falling arc: grows toward full size as it falls 2 pixels a frame on the object it follows, 9 pixels in front of it and up to 5 pixels further while small; released 10 pixels above the ground (4 on the clear screen).
Definition at line 159 of file retreat.c.
Referenced by BattleFx_SpawnDescendingArcParticles(), BattleFx_UpdateDescendingParticlePositiveArc(), and Djinn_ResolvePendingEvent().
| void BattleFx_UpdateDescendingParticleNegativeArc | ( | union FieldObject * | fieldObject | ) |
As BattleFx_UpdateDescendingParticlePositiveArc for the arc drawn upside down, 16 pixels in front of the object and up to 5 pixels nearer.
Definition at line 192 of file retreat.c.
Referenced by BattleFx_SpawnDescendingArcParticles(), BattleFx_UpdateDescendingParticleNegativeArc(), and Djinn_ResolvePendingEvent().
| void BattleFx_SpawnDescendingArcParticles | ( | struct FieldActor * | arc | ) |
Spawns a pair of falling arcs (one upside down) on arc.
Definition at line 254 of file retreat.c.
Referenced by BattleFx_SpawnDescendingArcParticles(), BattleFx_UpdatePairedArcSpawner(), and Djinn_ResolvePendingEvent().
| void FieldFx_BlinkAvoidCaster | ( | void | ) |
End of the effect: switches the caster's display flags between 3 and 1 on a 5-frame cycle.
FieldFx_RunAvoid schedules it (order 0xc80) for its last 70 frames and removes it again.
Definition at line 10 of file avoid.c.
Referenced by Djinn_ResolvePendingEvent(), FieldFx_BlinkAvoidCaster(), and FieldFx_RunAvoid().
| void BattleFx_UpdatePairedArcSpawner | ( | union FieldObject * | fieldObject | ) |
The caster during the effect: sheds a pair of falling arcs every 5 frames (7 on the world map), and spins in phase 1.
FieldFx_RunAvoid makes it the caster's callback; it counts the caster's step and turns its angle.
Definition at line 33 of file avoid.c.
Referenced by BattleFx_UpdatePairedArcSpawner(), Djinn_ResolvePendingEvent(), and FieldFx_RunAvoid().
| void FieldEvent_ShowStatusMessage | ( | void | ) |
Avoid (or the Sacred Feather) has worn off, and the game says so.
"Avoid's effects wore off." (or "Sacred Feather's ...").
Clears gGameState.avoidDistance. Reached through FieldEvent_RunTypeHandler when the Psynergy request the leader's steps raise as Avoid runs out (object/step.c) is handled.
Definition at line 58 of file avoid.c.
Referenced by Djinn_ResolvePendingEvent(), FieldEvent_RunTypeHandler(), and FieldEvent_ShowStatusMessage().
| void FieldFx_RunAvoid | ( | void | ) |
The caster spins and flashes, then blinks, and encounters are kept away until Avoid wears off.
Abilities: Avoid (field kind 16), and the Sacred Feather.
The caster spins shedding falling arcs and flashes 20 times, then blinks for 55 frames; encounters are kept away (avoidDistance 0x9600000) until it wears off, and the game says "Monsters won't attack so often now.". FLAG_ITEM_USE marks it as cast from the Sacred Feather.
Called by BattleFx_Run and BattleFx_DispatchRequestKind. Sets gGameState.avoidDistance and avoidByItem; the leader's steps count the distance down by their speed (object/step.c), 2,400 pixels in all.
Definition at line 82 of file avoid.c.
Referenced by BattleFx_DispatchRequestKind(), BattleFx_Run(), Djinn_ResolvePendingEvent(), and FieldFx_RunAvoid().
| void EffectSlot_Update | ( | struct EffectSlot * | effect | ) |
Updates one effect slot: counts its age, runs its callback (after any delay), moves it and draws it.
Definition at line 9 of file effect_slot.c.
Referenced by Djinn_ResolvePendingEvent(), EffectSlot_Update(), and FieldFx_UpdateSceneSlots().
| void BattleFx_DrawScaledObject | ( | struct EffectSlot * | object | ) |
Draws an effect slot's sprite at its screen position and scale, when it is near the screen.
With flag 4 the slot's z also lifts it (0x1fc pixels less z).
Definition at line 29 of file effect_slot.c.
Referenced by BattleFx_DrawScaledObject(), Djinn_ResolvePendingEvent(), and EffectSlot_Update().
| void EffectSlot_UpdateMotion | ( | struct EffectSlot * | effect | ) |
Moves an effect slot toward its target, turning at most maxTurnStep a frame when limitTurnStep is set and speeding up by acceleration to maxSpeed.
A slot that stops at its target lands on it once within 8 pixels.
Definition at line 53 of file effect_slot.c.
Referenced by Djinn_ResolvePendingEvent(), EffectSlot_Update(), and EffectSlot_UpdateMotion().
| u32 EffectSlot_HasPendingTarget | ( | struct EffectSlot * | effect | ) |
Returns nonzero while an effect slot that stops at its target still has one (it has not arrived), 0 once it has arrived or when it never stops.
Definition at line 108 of file effect_slot.c.
Referenced by AltmillerCave_UpdateWallFragment(), BattleEffect_UpdatePhasedRadialParticle(), BattleFx_UpdateOrbitAndReturn(), BattleFx_UpdateRadialBurst(), BattleFx_UpdateRadialCamera(), BattleFx_UpdateRadialLaunch(), BattleFx_UpdateRadialSpread(), BattleFx_UpdateRandomTargetParticle(), Djinn_ResolvePendingEvent(), and EffectSlot_HasPendingTarget().
| void EffectSlot_SetPosition | ( | struct EffectSlot * | effect, |
| s32 | x, | ||
| s32 | z ) |
Places an effect slot at (x, z), at rest with no target.
Definition at line 120 of file effect_slot.c.
Referenced by Djinn_ResolvePendingEvent(), EffectSlot_Initialize(), EffectSlot_SetPosition(), and EffectSlot_UpdateMotion().
| void EffectSlot_SetObjectMode | ( | struct EffectSlot * | effect, |
| s32 | mode ) |
Sets the animation of an effect slot's sprite.
Definition at line 129 of file effect_slot.c.
Referenced by AltmillerCave_ReleaseWallBurst(), BattleFx_RunMercuryDjinnCapture(), BattleFx_RunVenusDjinnCapture(), Djinn_ResolvePendingEvent(), Djinn_RunJupiterJoinEffect(), Djinn_RunMarsJoinEffect(), EffectSlot_Initialize(), EffectSlot_SetObjectMode(), FieldFx_RunForce(), and FieldFx_RunRetreat().
| void EffectSlot_SetCallback | ( | struct EffectSlot * | effect, |
| EffectCallback | callback ) |
Gives an effect slot its per-frame callback, starting at state 0.
Definition at line 134 of file effect_slot.c.
Referenced by AltmillerCave_ReleaseWallBurst(), BattleEffect_RunFallbackObjectTransition(), BattleFx_RunMercuryDjinnCapture(), BattleFx_RunVenusDjinnCapture(), Djinn_ResolvePendingEvent(), Djinn_RunJupiterJoinEffect(), Djinn_RunMarsJoinEffect(), EffectSlot_SetCallback(), FieldFx_RunForce(), and FieldFx_RunRetreat().
| void EffectSlot_Initialize | ( | struct EffectSlot * | effect, |
| s32 | kind, | ||
| s32 | x, | ||
| s32 | z ) |
Fills an effect slot with a new sprite of kind at (x, z): stopping at its target, top speed 2, acceleration and scale 1, drawn, animation 1.
Definition at line 144 of file effect_slot.c.
Referenced by AltmillerCave_ReleaseWallBurst(), BattleEffect_RunFallbackObjectTransition(), BattleFx_RunMercuryDjinnCapture(), BattleFx_RunVenusDjinnCapture(), Djinn_ResolvePendingEvent(), Djinn_RunJupiterJoinEffect(), Djinn_RunMarsJoinEffect(), EffectSlot_Initialize(), FieldFx_RunForce(), and FieldFx_RunRetreat().
| void BattleFx_ClearOwnedSlot | ( | struct EffectSlot * | slot | ) |
Frees an effect slot and its sprite.
Definition at line 180 of file effect_slot.c.
Referenced by AltmillerCave_UpdateWallFragment(), BattleEffect_CleanupSceneObjects(), BattleEffect_UpdatePhasedRadialParticle(), BattleFx_ClearActiveSlotsAndScheduleUpdates(), BattleFx_ClearOwnedSlot(), BattleFx_RunAngledApproachPhases(), BattleFx_UpdateOrbitAndReturn(), BattleFx_UpdateRadialBurst(), BattleFx_UpdateRadialCamera(), BattleFx_UpdateRadialLaunch(), BattleFx_UpdateRadialSpread(), BattleFx_UpdateRandomTargetParticle(), and Djinn_ResolvePendingEvent().
| void BattleFx_SetupResourcesAndWindow | ( | void | ) |
Sets up the world map screen: the marker tiles and their OAM entries, the cursor where the leader is on the map (or mid-screen when the place is not on it), and the place-name window.
Definition at line 75 of file world_map.c.
Referenced by BattleFx_SetupResourcesAndWindow(), Djinn_ResolvePendingEvent(), and Map_ShowWorldMap().
| void BattleFx_CleanupResourcesAndWindow | ( | void | ) |
Closes the world map screen: returns its VRAM blocks and removes the place-name window.
Definition at line 177 of file world_map.c.
Referenced by BattleFx_CleanupResourcesAndWindow(), Djinn_ResolvePendingEvent(), and Map_ShowWorldMap().
| void Map_UpdateWorldMapMarkers | ( | void | ) |
Scheduler callback of the world map screen: shows a marker at each place whose flag is set, moves the cursor with the d-pad (to the current place while L or R is held) and shows the name of the marker nearest the cursor.
Definition at line 188 of file world_map.c.
Referenced by Djinn_ResolvePendingEvent(), Map_ShowWorldMap(), and Map_UpdateWorldMapMarkers().
| void Map_ShowWorldMap | ( | s32 | picture | ) |
Borrows the map-cell buffer for the still map until A or B closes it.
Field_RunScene reaches this for event -888 in world-map mode. The marker task stops before map graphics are restored, so neither uses the other's scratch storage. The picture argument is unused; the resource is fixed.
Definition at line 427 of file world_map.c.
Referenced by Djinn_ResolvePendingEvent(), Field_RunScene(), and Map_ShowWorldMap().
| void Field_UpdateObjectVisibilityBounds | ( | void | ) |
On the world map, shows only the scene actors within 320 pixels sideways, 600 above and 400 below the camera.
Definition at line 496 of file world_map.c.
Referenced by BattleFx_RunVisibilityTransition(), Djinn_ResolvePendingEvent(), and Field_UpdateObjectVisibilityBounds().
| void BattleFx_RunVisibilityTransition | ( | void | ) |
On the world map, zooms the view out (0x9d89) while L is held, then back.
Definition at line 535 of file world_map.c.
Referenced by BattleFx_RunVisibilityTransition(), Djinn_ResolvePendingEvent(), and Field_RunScene().
|
extern |