7#define FLARE_ARC_COUNT 9
41 canvas = (
void *)*cursor;
71 ((direction * (((
Trig_Sin(angle) * 32)) >> 16)) + originX) + 20;
72 arcFlame->
y = (((
Trig_Cos(angle) * 16)) >> 16) + 40;
109 flame->
x - (width >> 1),
122 flame->
x - (width >> 1),
136 flame->
x - (width >> 1),
155 if (
frame == (i * 8) + 16) {
163 }
while (
frame != 80);
182 for (windowIndex = 0; windowIndex != windowLength; windowIndex++) {
184 centerIndex = windowIndex;
188 for (windowIndex = 0; windowIndex != windowLength; windowIndex++) {
191 if (index >= 0 && index < window->entryLimit) {
192 output[outputCount++] = index;
198#undef FLARE_ARC_COUNT
@ SPRITE_COLOR_RED_TINT
red raised to full
@ POSE_DAMAGE
taking damage
BattleEffectDrawRectangle DrawRectangle
void BattleFx_ProcessPendingGraphicsTransfer(void)
Copies the canvas to VRAM once the effect has finished drawing a frame (transferPending): the 128x128...
void BattleFx_BeginCanvasLayer(s32 bgControl)
Opens the canvas layer: starts the background palette fade, makes BG2 the canvas, alpha-blended over ...
void BattleFx_EndCanvasLayer(void)
Closes the canvas layer: plays the closing sound, restores BG1's scroll and the projection centre,...
void Resource_LoadAndDecompress(s32 id, void *dst, s32 skipPalette, s32 copyPalette)
Decompresses a resource whose first 128 bytes may be a palette.
void ObjectGroup_UpdateMembers(s32 actorId, s32 palette, s32 animation, s32 timerSlot, s32 timerFrames)
Updates every animation group of one battler's object.
What every part of the battle effect object shares: its includes, macros and frame-loop helpers.
@ CANVAS_COPY_AND_FADE
copy, keeping 50% or 75% (transferValue) of each pixel in the canvas for the next frame
#define EFFECT_CALLBACK_ORDER
The scheduler order of every per-frame effect callback (Scheduler_AddOrUpdateCallback sorts the frame...
#define EFFECT_SLOT(slots, slot)
A work slot read through a pointer to the effect's own slot, gWorkSlot[HEAP_SLOT_BATTLE_EFFECT].
#define EFFECT_SHOW_DAMAGE(hitSound)
Lets the battle show the damage: resumes its paused playback, which plays hitSound (an SE_ id; 0 keep...
#define EFFECT_LOAD_BLITTER(slot, flags, mode)
Builds a blitter for the 128x128 canvas (1 << 7 pixels each way) in work slot slot: BattleFx_BuildBli...
#define EFFECT_END_FRAME(work)
The usual end of an effect frame: counts down the targets' flash timers (ObjectGroup_TickMemberTimers...
u16 gBattleFx_PuffArcCells[]
u8 gBattleFx_PuffArcCellHeights[]
u8 gBattleFx_PuffArcCellBiasY[]
u8 gBattleFx_PuffArcCellWidths[]
void AudioCommand_PlayFar(s32 id)
#define FLARE_ARC_COUNT
flames on the arc
void BattleFx_RunFlare(struct BattleEffectArgument *effect)
Flame arc: nine flames rise one after another, 4 frames apart, along a half circle,...
UNUSED s32 BattleFx_BuildCenteredIndexList(BattleEffectIndexWindow *window, s16 *output)
List the indices within indexRadius of where currentValue sits in values, keeping only those from 0 t...
@ HEAP_SLOT_BATTLE_EFFECT
#define BLDCNT_EFFECT_BLEND
weighted by REG_BLDALPHA
#define BLEND_ALPHA(top, bottom)
A REG_BLDALPHA value: top and bottom are the two targets' weights, out of 16.
void Runtime_ReleaseHeapBlock(s32 slot)
char ResourceId_EmberStreakSheet
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,...
The command shared by an effect's caller, dispatcher and handlers.
s16 actors[8]
the targets' unit ids, count of them
s32 variant
the ability's size, from 0 (Quake, then Earthquake)
s32 count
targets in actors, at least 1
What BattleFx_BuildCenteredIndexList (unused) reads: a value to find in a list, and how many indices ...
s16 values[1]
indexRadius * 2 + 1 values, searched in order
s32 indexRadius
indices kept either side of where it sits
s32 currentValue
the value looked for in values
The running battle effect's work: its canvas image, 64 particles, the display registers it stages and...
s32 frame
frame counter some effects keep, from 0
s32 transferMode
How the canvas transfer callbacks treat the canvas after each copy (enum CanvasTransferMode in effect...
s32 transferValue
The transfer mode's argument: the fill value, the share kept (50 or 75 percent) or the darken or brig...
struct BattleEffectArgument * effect
the command being run
struct EffectStep particles[64]
free while variant is -1
A moving point of an effect: its position, its velocity and a value each effect uses its own way (a s...
s32 variant
each effect's own: a size, a countdown, -1 for idle
s32 x
16.16 fixed-point pixels
s32 y
16.16 fixed-point pixels
#define EFFECT_CLIP_BOUNDS
Clips overflow on all four sides.