11 s32 remainingActors = 63;
15 u8 kind =
object->animationKind;
21 if (entry->
animId == 200) {
29 }
while (remainingActors >= 0);
54 if (distanceX * distanceX + distanceZ * distanceZ >= 3600 ||
86#if !(TBS_PATCH_1 && !TBS_PATCH_2)
106 transition->
value = frame;
108 }
while (frame <= 18);
112#define REVEAL_END_EVENT 0x40000005
164#undef REVEAL_END_EVENT
void * ObjectTable_Get(u32 actorIndex)
Returns the actor in slot index (0 to 65), or NULL.
void BattleFx_ApplyColorToTargetBuffer(s32 mode, s32 half)
Sets the colours the buffer moves toward (see BattleFx_BuildBuffer); does nothing without a colour bu...
void BattleFx_StartBufferInterpolation(s32 frames)
Starts moving the shown colours to the target colours over frames frames: sets work->duration,...
void BattleFx_ApplyColorToSourceBuffer(s32 mode, s32 half)
Sets the colours the buffer shows now (see BattleFx_BuildBuffer).
void AudioCommand_PlayFar(s32 id)
void FieldEffect_SpawnNearbyMarkers(void)
Reveal: marks with sparkles the hidden things within 8 cells left or right and 5 up or down of the le...
void WaitFrames(s32 frames)
The game's frame loop: runs frames frames and returns.
struct GameState gGameState
struct DisplayTransitionState * gDisplayTransition
Slot 31.
void * gEffectWork
Slot 56: points to a scene-specific structure.
#define WORK_SLOT(n)
Reads slots through their own addresses; adjacent slots are reached by offsets.
void * BattleFx_FindMatchingEvent(s32 eventFlags, s32 group, void *target)
Returns the scene's Psynergy event (kind 5) for Psynergy of the given group that applies to what the ...
#define Iwram_MulQ16(left, right)
void DisplayTransition_InitializeBattleEffectState(s32 mode)
Starts window transition mode at value 0, with no duration: the caller moves it.
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 ...
@ PALETTE_TRANSFORM_PLAIN
each colour unchanged
What every part of psynergy_effects.c shares: its includes and the macros and types more than one par...
void FieldEffect_WatchLeaderDistance(void)
Scheduler callback of the timed effect (kind 8): asks for it to end once the leader is 60 pixels from...
void FieldFx_RunReveal(void)
Starts a screen transition centred on the leader, runs the matching event if there is one,...
void ResetSceneTransitionEffect(void)
Ends Reveal if it is running: stops its watch, brings the colours back from black over 30 frames and ...
#define REVEAL_END_EVENT
Psynergy event, stage 4.
void ObjectDispatch_ApplyValueToKind200Children(s32 value)
Passes value (as animation timer steps) to every one of the 64 objects whose first sprite part shows ...
s32 Scheduler_AddOrUpdateCallback(SchedulerCallback callback, s32 order)
Schedules callback with order, or gives a task already running it the new order, and re-sorts the tab...
s32 Scheduler_RemoveCallback(SchedulerCallback callback)
Unschedules the task running callback: clears its routine and gives it order 0x7fff,...
#define SE_SCENE_TRANSITION
struct EventWork * gEventWork
One animation layer of a sprite: its animation id, frames, running script and timer.
u8 param
SpriteColorMode its pixels are drawn with; 0 when taken.
u8 kind
The facing table its frames follow (from the metadata, or ANIM_CMD_SET_KIND); zero marks a free layer...
s16 animId
the sprite id whose metadata and frames it uses
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
struct AnimationEntry * entries[4]
its layers; empty ones null
u8 dirty
nonzero redraws its pixels into VRAM when next drawn
The work of a Psynergy effect scene: its caster and target, where it takes place, the map state it re...
s8 childOption
Set by some scenes before an effect; Carry, Frost, Force and Reveal treat the target differently with...
The display transition state (heap block 31): two pages of window edges for every line,...
u16 value
The progress, moved from start to end over duration frames: bit 5 says whether the transition opens o...
s8 nextMode
The mode taken when the value reaches its end; 0 ends the transition.
s32 centreX
16.16 fixed-point pixels: the centre of the ellipse around a point (mode 8), set by the Reveal effect...
s8 duration
frames; 0 when the value is not moving
s32 centreY
as centreX: the target's z less its y
A field actor: a person or thing on the field with a position, motion toward a target,...
union FieldCoordinate x
16.16 fixed-point pixels
union FieldCoordinate y
16.16 fixed-point pixels
union FieldCoordinate z
16.16 fixed-point pixels
Full event work allocated by Field_RunScene (heap slot 27).
s16 event
A raised event for Scene_RunRaisedEvent, or -1 when characters fell to poison or hazard damage,...
s16 command
a field Psynergy to use, as owner << 10 | Psynergy
s16 revealActive
nonzero while Reveal is active
s16 effectTimerRunning
Nonzero lets the Reveal countdown advance; menus and other effects pause it.
s16 revealCenterX
where Reveal was cast, in pixels
s16 revealFrames
the frames Reveal has left
s32 selectedActor
the leader: its unit and its actor
One of the 64 field objects in the object pool (heap slot 5): its script, position,...
s32 z
16.16 fixed-point pixels
s32 * script
the object script it runs; null when the object is free
s32 x
16.16 fixed-point pixels
s32 y
16.16 fixed-point pixels
s32 fixed
16.16 fixed-point pixels
struct ScriptMotionObject * gObjectSlots