37 y = work->
y + 0x100000;
47 for (handIndex = 0; handIndex < 2; handIndex++) {
51 0xe0000, hand->
angle);
61 if (pair[0] !=
NULL && pair[1] !=
NULL && startY <= startY + 0x200000) {
67 }
while (target->
y.
fixed <= startY + 0x200000);
94 if (fragment !=
NULL) {
100 if (
scale < 0x10000) {
105 fragment->
angle += 0x2000;
108 }
while (
scale <= 0xffff);
110 fragment->
angle = angle;
156 pos.
y = caster->
y + (16 << 16);
189 if (impact !=
NULL) {
197 for (fragmentIndex = 0; fragmentIndex < 12; fragmentIndex++) {
199 if (fragment !=
NULL) {
202 fragment->speedLimit =
Random16() + (1 << 16);
203 fragment->acceleration = 1 << 16;
u32 EffectSlot_HasPendingTarget(struct EffectSlot *effect)
Returns nonzero while an effect slot that stops at its target still has one (it has not arrived),...
void BattleFx_ClearOwnedSlot(struct EffectSlot *slot)
Frees an effect slot and its sprite.
void ObjectDispatch_SelectAnimationFar(void *raw, s32 no)
void ObjectDispatch_InitializeFar(struct DispatchObject *obj, const s32 *script)
void FieldObject_WaitForMoveFar(void *fieldObject)
void AudioCommand_PlayFar(s32 id)
void WaitFrames(s32 frames)
The game's frame loop: runs frames frames and returns.
const s32 gBattleFx_FragmentScript[]
const s32 gBattleFx_CommonParticleScript[]
[0] only frees the actor, +1 waits for it to arrive and frees it; +3 is gBattleFx_SourceHoldScript,...
void * gEffectWork
Slot 56: points to a scene-specific structure.
void FieldFx_RunLift(void)
Lift cast with no target: objects appear above the caster and to either side, move apart and scatter ...
s32 SpawnHeavyImpactEffect(struct ScriptInterpreter *interpreter)
A heavy impact: places object 0x11b 32 pixels below the source and scatters 12 shards from it.
void FieldFx_RunLiftOnTarget(s32 unused)
An object appears 32 pixels to either side, each moves 14 pixels in, and they lift the target 32 pixe...
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 wa...
void BattleFx_UpdateRadialBurst(struct EffectSlot *slot)
Effect slot callback of a particle that scatters 25 pixels from its origin in a random direction,...
void Vector_AddPolarOffset(s32 radius, s32 angle, void *position)
Moves the point position by radius in direction angle on the ground plane: x by the cosine,...
u32 Random16(void)
Advances the game's random number generator (the C library's classic linear congruential one),...
void UpdateRisingParticleBurst(void *object)
Per-frame update: the object spins as it rises for 31 frames, shrinks, and bursts into 8 particles.
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 m...
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 ...
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 BattleEffect_InitializeSharedScene(void)
Saves the palettes for the effect (once, unless an effect is already shown) and fades them toward one...
void BattleFx_PrepareBufferInterpolation(void)
Fades the palettes back from an effect's colours to the saved ones (or to palette 0x10001 while an ef...
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 be...
What every part of psynergy_effects.c shares: its includes and the macros and types more than one par...
#define DEFINE_ITEM_BREAK_EFFECT(name, spawn)
Defines an effect cast with no target: spawn makes an object 16 pixels above the effect's position an...
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
struct AnimationSpritePart image
u8 slot
VRAM cache entry holding its tiles.
s32 scale
16.16 fixed point, 0x10000 full size
u16 priority
2 when created
The work of a Psynergy effect scene: its caster and target, where it takes place, the map state it re...
s32 y
16.16 fixed-point pixels
void * mainObject
the caster's object
void * child
the target's object, or NULL
s32 x
16.16 fixed-point pixels
s32 z
16.16 fixed-point pixels
A field object as the object dispatcher's far calls take it.
s32 argument
the linked object a script approaches or follows
A particle a Psynergy effect moves and draws: its sprite, its position and target,...
s8 state
the callback's own step; 0 when it is given
s32 originX
16.16 fixed-point pixels; where the slot started
s16 maxTurnStep
1/65536 turns a frame
s8 limitTurnStep
Clamp steering to maxTurnStep; zero faces the target directly.
s32 originZ
16.16 fixed-point pixels; where the slot started
s32 targetZ
16.16 fixed-point pixels; EFFECT_NO_TARGET at rest
s32 targetX
16.16 fixed-point pixels; EFFECT_NO_TARGET at rest
s32 maxSpeed
16.16 fixed-point pixels per frame
s32 acceleration
16.16 fixed-point pixels per frame, each frame
A world position, as Camera_WorldToScreen converts it to the screen.
s32 y
16.16 fixed-point pixels
s32 z
16.16 fixed-point pixels
s32 x
16.16 fixed-point pixels
A field actor: a person or thing on the field with a position, motion toward a target,...
u8 motionFlags
ActorMotionFlag bits; zero is free flight in 3D, and 3 is set on creation.
union FieldCoordinate y
16.16 fixed-point pixels
void(*) update(union FieldObject *object)
Called each frame before the object's script, while the object is live.
An effect object that moves and draws one sprite: its position, scale, velocity and target,...
s32 scaleX
16.16 fixed point, 0x10000 full size
s32 speedLimit
16.16 fixed-point pixels per frame
s32 z
16.16 fixed-point pixels
s32 y
16.16 fixed-point pixels
void * records
one sprite, or a table of up to four (recordStorageKind)
s32 acceleration
Horizontal speed gained each frame towards the target, or lost braking without one,...
s32 scaleY
16.16 fixed point, 0x10000 full size
s32 x
16.16 fixed-point pixels
One of the 64 field objects in the object pool (heap slot 5): its script, position,...
u8 flags
FieldActor.motionFlags: 3 when created, 4 for a placed actor above the ground; zero is free flight in...
u16 wait
the object script's wait, in frames
The prefix that command handlers read from a field object's 0x70-byte slot.
s32 fixed
16.16 fixed-point pixels