23 }
else if (phase == 2) {
39 elapsedFrames = caster->
step++;
42 if (elapsedFrames % 7 == 0)
44 }
else if (elapsedFrames % 5 == 0) {
49 caster->
angle += 0xc00;
93 group =
object->records;
95 angle =
object->angle;
107 object->phase = zero;
115 for (count = 0; count < 20; count++) {
124 object->callback =
NULL;
125 object->angle = angle;
void * ObjectTable_Get(u32 actorIndex)
Returns the actor in slot index (0 to 65), or NULL.
@ SPRITE_COLOR_WHITE
solid colour 15, white
void FieldFx_RunAvoid(void)
The caster spins and flashes, then blinks, and encounters are kept away until Avoid wears off.
void FieldEvent_ShowStatusMessage(void)
Avoid (or the Sacred Feather) has worn off, and the game says so.
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),...
const u8 gBattleFx_ArcSparkTiles[]
void ObjectDispatch_SetSingleChildFlagsFar(struct DispatchObject *obj, u32 flags)
void Animation_ApplyChildValuesFar(struct DispatchObject *obj, u32 val)
s32 GameFlag_TestFar(s32 flag)
void AudioCommand_PlayFar(s32 id)
void UiText_ShowPositionedMessageAndWaitFar(s32 no, s32 flags)
void UiWork_PushValueSlotFar(u32 value, u32 kind)
#define FLAG_ITEM_USE
the Psynergy comes from an item
void WaitFrames(s32 frames)
The game's frame loop: runs frames frames and returns.
volatile u32 gFrameCount
Frames WaitFrames has finished.
struct GameState gGameState
void * gEffectWork
Slot 56: points to a scene-specific structure.
What every part of psynergy_effects.c shares: its includes and the macros and types more than one par...
void BattleFx_SpawnDescendingArcParticles(struct FieldActor *arc)
Spawns a pair of falling arcs (one upside down) on arc.
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,...
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.
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
u8 flags
bits: 1 outlined in ObjectSystemWork's edge and fill colours | 0 shadow drawn (set when created)
struct AnimationEntry * entries[4]
its layers; empty ones null
u8 dirty
nonzero redraws its pixels into VRAM when next drawn
A field object as Avoid's caster: its facing, its animation records and the phase and frame count of ...
s16 phase
1 spins the caster 0xc00 a frame
struct AnimationObject * records
the caster's sprite
s16 step
frames since the arcs started
The work of a Psynergy effect scene: its caster and target, where it takes place, the map state it re...
s16 arcTileSlot
resource entry of Avoid's and Retreat's arcs
void * mainObject
the caster's object
A field object as the object dispatcher's far calls take it.
A field actor: a person or thing on the field with a position, motion toward a target,...
s16 cloaked
1 under Cloak, which prevents battles
s16 map
the scene's map; SceneId_Clear for the world map
s32 avoidDistance
distance left of Avoid, 16.16 pixels; 0 when off
s8 avoidByItem
Avoid came from an item (the Sacred Feather).
s32 selectedActor
the leader: its unit and its actor
An object on the field, read as an actor or as an effect.
s32 Resource_ResetEntry(u32 no)
Frees cache entry no: its blocks go back and the entry is marked free (offset 0xffff).
s32 Resource_FindFreeEntry(void)
Returns the number of the first free cache entry, or VRAM_CACHE_ENTRY_COUNT when all are taken.
s32 VramCache_Load(u32 no, u32 size, const void *src)
Gives cache entry no size bytes of sprite VRAM and copies src there.