24 for (i = 0; i != 64; i++, color++) {
25 s32 red = *color & 0x1f;
26 s32 green = (*color >> 5) & 0x1f;
27 s32 blue = (*color >> 10) & 0x1f;
28 s32 targetRed = target[i] & 0x1f;
29 s32 targetGreen = (target[i] >> 5) & 0x1f;
30 s32 targetBlue = (target[i] >> 10) & 0x1f;
34 else if (red > targetRed)
36 if (green < targetGreen)
38 else if (green > targetGreen)
40 if (blue < targetBlue)
42 else if (blue > targetBlue)
44 target[i] =
RGB(red, green, blue);
72 (*draw)(canvas, pixels, x, y, width, height);
81 (*draw)(canvas, pixels, x, y, width, width * 2);
86 const void *pixels,
s32 x,
92 (*draw)(canvas, pixels, x, y, width, height - scroll);
97 const void *pixels,
s32 x,
102 (*draw)(canvas, pixels, x, y, width, 91);
174#define CASTING_IMPACT_ORB_CELLS 0x5100
176#define CASTING_IMPACT_DJINNI_CELLS 0x3c56
177#define CASTING_IMPACT_GATHER_FRAMES 32
178#define CASTING_IMPACT_SPARKS 64
180#define CASTING_IMPACT_IMPACT_PARTICLES \
181 ((struct EffectStep *)(Ram_MapCellBuffer + 0x4000))
182#define CASTING_IMPACT_IMPACT_PARTICLE_COUNT 64
185#define CASTING_IMPACT_IMAGE_X(side, image) \
186 gCastingImpact_ImageX[(side)][(image)]
229 s32 savedAcceleration;
230 s32 savedVerticalStrength;
392 targetScreen = &targetPos);
394 casterScreen = &casterPos);
415 position = &djinnPos;
427 casterScreen->
x = casterScreen->
x / 2;
440 if (frame >= i / 4) {
448 sparkScreen.
x = sparkScreen.
x / 2 + casterScreen->
x;
452 sparkScreen.
y = sparkScreen.
y + casterScreen->
y - 8;
454 sparkScreen.
y = sparkScreen.
y + casterScreen->
y + 44;
456 sparkScreen.
y = sparkScreen.
y + casterScreen->
y + 12;
459 sparkScreen.
depth += 60;
461 sparkScreen.
y, size);
474 djinnX = sparkScreen.
x;
476 djinnX - 10, sparkScreen.
y - 4, 20, 40);
485 position = &djinnPos;
493 REG_BG2X = (frame - targetScreen->
x) << 8;
502 scrollPos = -0x800000;
503 scrollSpeed = 0xc0000;
506 scrollSpeed = -0xc0000;
548 SET_VELOCITY(casterActor, savedVelocityX, savedVelocityY, savedVelocityZ);
565 (targetActor->
y - position->
y + 0x1e0000) / 6,
566 (targetActor->
z - position->
z) / 6);
575 for (i = 0; i != 32; i++) {
587 particle->
variant = i / 2 + 32;
639 kindFromTwo = mode - 2;
640 if ((kindFromTwo >= 0 && kindFromTwo <= 1) ||
650 kindFromFour = mode - 4;
651 if ((kindFromFour >= 0 && kindFromFour <= 2) ||
658 }
else if ((mode >= 0 && mode <= 3) ||
685 while (frame != duration) {
690 scanline = work->bg2xLines;
694 for (; i != 160; i++) {
696 s32 offset = (base - ((
Trig_Sin(phase) * 4))) >> 10;
697 *scanline++ = offset;
706 casterScreen->
x = casterScreen->
x / 2;
707 casterScreen->
y += 16;
717 blitters[0](canvas, work->sheet + frame / 2 * (48 * 72),
718 casterScreen->
x - 32, casterScreen->
y - 40, 48, 72);
720 blitters[0](canvas, work->sheet + frame / 2 * (48 * 72),
721 casterScreen->
x, casterScreen->
y - 40, 48, 72);
780 if (frame >= 4 && frame <= 15) {
782 work->sheet + (frame - 4) / 2 * (20 * 48) +
784 targetScreen->
x / 2 - 8, casterScreen->
y - 24, 20, 48);
790 for (i = 0; i != 128; i++) {
841 for (i = 0; i != 32; i++, step++) {
843 s32 size = (i & 1) + 6;
847 projected.
x - (
u32)size / 2, projected.
y - size, size,
850 if (frame > i + 22) {
851 s32 dx = (caster->
x - step->
x) >> 8;
853 s32 dz = (caster->
z - step->
z) >> 8;
857 if ((dx >= -0xfff && dx <= 0xfff) &&
858 (dz >= -0xfff && dz <= 0xfff))
872 if (frame >= 6 && frame <= 19) {
879 targetScreen->
x / 2 - 8, 0, 24, 104);
884 if (frame >= 8 && frame <= 23) {
885 for (i = 0; i != 3; i++) {
894 imageX += targetScreen->
x / 2;
923 if (frame >= 0 && frame <= 23) {
932 originX = targetScreen->
x / 2;
933 fall = frame * 32 - 232;
934 scroll = frame * 16 - 48;
943 columnX = originX - 8;
944 columnY = fall + scroll;
951 columnY, width, tileHeight, scroll,
954 fall + 47, width * 2, 65);
963 if ((step = &work->
particles[i])->variant == 0) {
982 if (frame >= 4 && frame <= 23) {
983 pairX = targetScreen->
x / 2;
1008 stripX = targetScreen->
x / 2 - 20;
1009 image = frame / 2 % 3;
1010 cellOffset = image * 2560;
1014 stripX, 48, 40, 32);
1022 for (i = 0; i != 16; i++, step++) {
1024 if (frame >= i / 2 + 4) {
1027 s32 image = age / 2;
1031 projected.
x - 16, projected.
y - 32, 32, 64);
1051 imageY = (targetScreen->
y >> 16) + sway + 16;
1053 blitters[0](canvas, work->sheet,
1058 blitters[0](canvas, work->sheet,
1062 blitters[0](canvas, work->sheet + (57 * 98),
1065 if (frame == 4 || frame == 5) {
1068 if (frame == 6 || frame == 7) {
1069 blitters[0](canvas, work->sheet + (57 * 98 + 99 * 69),
1073 if (frame == 8 || frame == 9) {
1079 if (frame == 10 || frame == 11) {
1084 if (frame == 12 || frame == 13) {
1089 if (frame == 14 || frame == 15) {
1102 scrollPos += scrollSpeed;
1104 scrollSpeed = (scrollSpeed * 48) / 64;
1110 if (fade >= 0 && fade <= 15) {
1114 if (frame == 4 || frame == 5) {
1119 blitters[0](canvas, work->imageStorage, 0, 24, 80, 104);
1121 blitters[0](canvas, work->imageStorage, 48, 24, 80, 104);
1126 blitters[0](canvas, work->imageStorage, 0, 24, 80, 104);
1128 blitters[0](canvas, work->imageStorage, 48, 24, 80, 104);
1132 blitters[0](canvas, work->imageStorage + 0x1e00, 16, 16, 80, 104);
1134 blitters[0](canvas, work->imageStorage + 0x1e00, 32, 16, 80, 104);
1136 if (frame == 6 || frame == 7) {
1137 blitters[0](canvas, work->imageStorage + 0x3e80, 0, 16, 128, 91);
1139 if (frame == 8 || frame == 9) {
1143 if (frame == 10 || frame == 11) {
1146 if (frame == 12 || frame == 13) {
1150 if (frame == 14 || frame == 15) {
1161 for (i = 0; i != 12; i++) {
1162 if (frame >= i + 6 && frame < i + 18) {
1163 s32 image = (frame - i - 6) / 2;
1168 imageX += (1 + i) / 2 * 3;
1170 imageX -= (i + 1) / 2 * 3;
1174 if (((i - 1) & 3) > 1)
1177 blitters[mirrored](canvas,
1205 if (step->
x >= 0 && frame >= i / 2) {
1213 projected.
x = projected.
x / 2 + origin->
x / 2;
1214 projected.
y += origin->
y + 32;
1217 projected.
x - 4, projected.
y - 4, 8, 8);
1219 if (step->
x < 0 && ((i & 7) == 0 || i == 63)) {
1231 if (frame >= 5 && frame <= 49) {
1233 height = 196 - (frame << 2);
1235 height = (frame << 4) - 64;
1241 height, &blitters[0]);
1254 imageX = targetScreen->
x;
1255 imageX += (
u32)imageX >> 31;
1257 offset = (6 - frame) * 3;
1258 imageX += offset * 2;
1259 imageY = targetScreen->
y - offset * 4 + 24;
1261 imageX = targetScreen->
x;
1262 imageX += (
u32)imageX >> 31;
1264 offset = (6 - frame) * 3;
1265 imageX -= offset * 2;
1266 imageY = targetScreen->
y - offset * 4 + 24;
1269 imageY - 32, 32, &blitters[1]);
1279 for (i = 0; i != 16; i++, step++) {
1284 projected.
x - 12, projected.
y - 12, 24, 24);
1289 }
else if (mode != 100) {
1292 for (i = 0; i != 16; i++, step++) {
1294 if (frame >= i + 4) {
1297 s32 image = age / 4;
1301 projected.
x - 12, projected.
y - 24, 24, 48);
1316 djinnX = projected.
x;
1318 djinnX - 10, projected.
y - 4, 20, 40);
1319 position->
x += motion->
x;
1320 position->
y += motion->
y;
1321 position->
z += motion->
z;
1392#undef CASTING_IMPACT_ORB_CELLS
1393#undef CASTING_IMPACT_DJINNI_CELLS
1394#undef CASTING_IMPACT_GATHER_FRAMES
1395#undef CASTING_IMPACT_SPARKS
1396#undef CASTING_IMPACT_IMPACT_PARTICLES
1397#undef CASTING_IMPACT_IMPACT_PARTICLE_COUNT
1398#undef CASTING_IMPACT_IMAGE_X
@ SPRITE_COLOR_WHITE
solid colour 15, white
@ POSE_DAMAGE
taking damage
BattleEffectDrawRectangle DrawRectangle
void BattleFx_ArmBg2AffineHBlankDma(void)
Arms DMA 0 to copy one word of gBattleFxWork's bg2xLines table into BG2X at each horizontal blank,...
void Palette_StepFadeTransfer(void)
Darkens the battle backdrop while the canvas is open: for fadeFrames frames, writes the backdrop's co...
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_BeginTiledCanvas(s32 bgControl)
Opens the canvas layer with BG2 a wrapping 256x256 map: each row of the map is the canvas's 16 tiles ...
#define CASTING_IMPACT_GATHER_FRAMES
frames the sparks gather
#define CASTING_IMPACT_IMPACT_PARTICLES
The impact pictures' particles, in Ram_MapCellBuffer after the Djinni.
static void CastingImpact_EndPrelude(struct BattleEffectWork *work, void *canvas)
Clears the prelude image, stops its callbacks and releases its blitters before the next effect takes ...
void BattleFx_StepPaletteToResource(s32 resourceId)
Moves each RGB555 channel of background colours 0 to 63 one level towards the resource palette.
void BattleFx_RunCastingImpact(struct BattleEffectArgument *effect, s32 mode)
Gathers sparks around the caster, launches the Djinni and draws the impact on the first target.
#define CASTING_IMPACT_IMPACT_PARTICLE_COUNT
static void CastingImpact_DrawImage(void *canvas, const void *pixels, s32 x, s32 y, s32 width, s32 height, DrawRectangle *draw)
Draws one casting impact image with the given blitter.
static void CastingImpact_DrawScrolledImage(void *canvas, const void *pixels, s32 x, s32 y, s32 width, s32 height, s32 scroll, DrawRectangle *draw)
Draws only the unscrolled height of a casting-impact image.
#define CASTING_IMPACT_DJINNI_CELLS
The Djinni pictures, 20x40, in Ram_MapCellBuffer after the impact's own.
static void CastingImpact_PackRows(void *src, void *dest, s32 width, s32 height)
Packs a casting impact's picture rows (Graphics_PackTileRows).
static void CastingImpact_DrawTallImage(void *canvas, const void *pixels, s32 x, s32 y, s32 width, DrawRectangle *draw)
Draws a casting-impact image whose height is twice its width.
static void CastingImpact_DrawCroppedImage(void *canvas, const void *pixels, s32 x, s32 y, s32 width, DrawRectangle *draw)
Draws a casting-impact image cropped to 91 pixels high.
#define CASTING_IMPACT_SPARKS
sparks in work->particles
#define CASTING_IMPACT_ORB_CELLS
The impact orb, 20x48 pictures packed at half width.
#define CASTING_IMPACT_IMAGE_X(side, image)
gCastingImpact_ImageX has seven pictures for each side.
CastingImpact
The casting impacts, by kind - 100: each is named for the first ability whose gBattle_ActionFlags ent...
@ CASTING_IMPACT_IMPACT_CYCLONE_SLASH
a tornado stands over the target
@ CASTING_IMPACT_IMPACT_MURK
smoke
@ CASTING_IMPACT_IMPACT_SCORCH
flash bursts rise from the target
@ CASTING_IMPACT_IMPACT_FLINT
nothing
@ CASTING_IMPACT_IMPACT_SAP
motes fly back to the caster
@ CASTING_IMPACT_IMPACT_POISON_CLOUD
smoke
@ CASTING_IMPACT_IMPACT_LIFE_LEECH
motes fly back to the caster
@ CASTING_IMPACT_IMPACT_BARRAGE
flash bursts rise from the target
@ CASTING_IMPACT_IMPACT_ASURA
a beast scrolls across and breaks
@ CASTING_IMPACT_IMPACT_PSY_LEECH
motes fly back to the caster
@ CASTING_IMPACT_IMPACT_TRUNCHEON_FIST
a flame falls diagonally
@ CASTING_IMPACT_IMPACT_MELTDOWN
nothing; hands to the stat reduction
@ CASTING_IMPACT_IMPACT_BROIL
ember streaks spread sideways
@ CASTING_IMPACT_IMPACT_TERRA_STRIKE
a rock spire grows and sinks
@ CASTING_IMPACT_IMPACT_15
hands off
@ CASTING_IMPACT_IMPACT_DEADLY_POISON
smoke
@ CASTING_IMPACT_IMPACT_SEVERE_BLOW
hands off
@ CASTING_IMPACT_IMPACT_26
hands off
@ CASTING_IMPACT_IMPACT_HEAT_MIRAGE
also Heat Flash; smoke
@ CASTING_IMPACT_IMPACT_STUN_VOLTAGE
two bolts strike among glints
@ CASTING_IMPACT_IMPACT_MIST
smoke
@ CASTING_IMPACT_IMPACT_SMOG
smoke
@ CASTING_IMPACT_IMPACT_LIFE_NOURISH
motes fly back to the caster
@ CASTING_IMPACT_IMPACT_FORCIBLE_ARM
a flame falls diagonally
@ CASTING_IMPACT_IMPACT_24
hands off
@ CASTING_IMPACT_IMPACT_ACID_BATH
smoke
@ CASTING_IMPACT_IMPACT_MORTAL_DANGER
also Death Size; a large picture rises and breaks
@ CASTING_IMPACT_IMPACT_FROST_BITE
ice chips converge on the target
@ CASTING_IMPACT_IMPACT_BAD_OMEN
skulls rise from the target
@ CASTING_IMPACT_IMPACT_AQUA_SOCK
a blue flame column falls onto the target
@ CASTING_IMPACT_IMPACT_BANE
smoke
@ CASTING_IMPACT_IMPACT_BLINDING_SMOG
smoke
@ CASTING_IMPACT_IMPACT_SQUALL
two bolts strike among glints
@ CASTING_IMPACT_IMPACT_17
hands off
@ CASTING_IMPACT_IMPACT_FEVER
smoke
@ CASTING_IMPACT_IMPACT_PSYPHON_SEAL
a rune opens over the target
static void CastingImpact_LoadResource(const void *id, void *dest, s32 skip, s32 copy)
Loads one of the impact's pictures (Resource_LoadAndDecompress).
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.
#define EFFECT_RELEASE_BLITTERS()
Frees the two blitters, the alternate first.
#define EFFECT_DRAW_MOTE(draw, canvas, sheet, x, y, size)
Particle sheets hold ten mote cells, 1x2 to 10x20 pixels.
#define EFFECT_PRESENT_FRAME(work)
Ends a frame of a canvas effect: marks the canvas ready for the transfer callback,...
@ CANVAS_COPY_AND_CLEAR
copy, then fill the canvas with transferValue
@ CANVAS_COPY_AND_FADE
copy, keeping 50% or 75% (transferValue) of each pixel in the canvas for the next frame
#define CANVAS_BYTES
The canvas: 128x128 pixels, one byte each, in its heap slot and in VRAM at BG_CHAR_BLOCK(1).
#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_FINISH_CANVAS()
The usual end of a canvas effect: stops the transfer callback before freeing what it reads,...
#define EFFECT_SHOW_DAMAGE(hitSound)
Lets the battle show the damage: resumes its paused playback, which plays hitSound (an SE_ id; 0 keep...
#define LIGHTNING_BOLT_CELL_BYTES
Closing bolts and lightning columns use the same 24x120 picture cells.
#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...
#define EFFECT_VIEW_FROM_CAMERA(camera)
Starts a frame's 3D projection from the battle camera: resets the transform, then looks from camera->...
u16 gBattleFx_PuffArcCells[]
u8 gBattleFx_PuffArcCellHeights[]
u8 gBattleFx_GlintCellHeights[]
u16 gCastingImpact_IceChipCells[]
The four ice chip cells, 8x8.
u8 gBattleFx_PuffArcCellBiasY[]
u16 gBattleFx_MoteCells[]
Mote cells: particle sheets hold ten, cell n (from 0) n + 1 pixels wide and twice that tall.
u8 gBattleFx_PuffArcCellWidths[]
u16 gBattleFx_GlintCells[]
u8 gBattleFx_GlintCellWidths[]
u8 gCastingImpact_ImageY[]
u8 gCastingImpact_GlintDrawFlags[]
The flips a glint may take, picked at random.
struct BattleObj * GetBattleObjectSlotFar(s32 objectId)
Far call to BattleObjGet.
s32 BattleUnit_GetEffectHeightFar(s32 id)
void BattleMotion_ApplyVariantMotionFar(s32 id, s32 variant)
void ObjectDispatch_SelectAnimationFar(void *raw, s32 no)
void ObjectDispatch_SetAnimationSpeedFar(struct DispatchObject *obj, s32 val)
void AudioCommand_PlayFar(s32 id)
void Camera_ApplyShake(s32 rangeX, u32 rangeY)
Shakes the battle view while gBattleFxWork's shakeFrames lasts, moving BG1 and the projection centre ...
@ HEAP_SLOT_BATTLE_EFFECT
@ HEAP_SLOT_BLITTER_ALTERNATE
#define WORK_SLOT(n)
Reads slots through their own addresses; adjacent slots are reached by offsets.
#define Q_8_8(n)
The BG2/BG3 affine matrix entries are signed 8.8 fixed point: texels stepped per screen pixel.
#define RGB(r, g, b)
A 15-bit colour from its red, green and blue levels (0 to 31 each), as the palette stores it: blue in...
#define BLEND_ALPHA(top, bottom)
A REG_BLDALPHA value: top and bottom are the two targets' weights, out of 16.
static s32 Iwram_CopyWords(volatile void *destination, const volatile void *source, s32 size)
static s32 Iwram_FillWords(void *destination, s32 size, u32 value)
static s32 Iwram_ClearWords(void *destination, s32 size)
#define SET_VELOCITY(p, vx, vy, vz)
#define SET_POSITION(p, px, py, pz)
Sets the position or the velocity of a particle, a piece of debris or an object in one statement.
#define CLAMP(v, low, high)
Keeps v within low to high, the low bound tested first.
u32 Random16(void)
Advances the game's random number generator (the C library's classic linear congruential one),...
void Runtime_ReleaseHeapBlock(s32 slot)
void BattleFx_FetchRectangleBlitters(s32 flip, BlitterPair out)
Builds the two usual routines that draw onto the 128x128 canvas, both clipped on both axes.
void BattleFx_RunSparkGroups(struct BattleEffectArgument *effect, s32 mode)
One to three bursts, 8 frames apart: each flashes, rings itself with twelve smaller flashes that fade...
void EffectPosition_ProjectScaledBattler(s32 id, struct EffectPosition *position)
The screen position of a battler, scaled for the battle view, 16 pixels higher.
void EffectStep_AdvanceWithGravity3D(struct EffectStep *step, s32 damping, s32 gravity)
Moves a particle one frame in three dimensions: adds its velocity, then gravity to its vertical speed...
s32 EffectPosition_ProjectPoint(const void *point, struct EffectPosition *position)
Projects a point in the current transform onto the screen, 16 pixels higher, and returns the projecti...
void BattleFx_RunProjectileVolley(struct BattleEffectArgument *effect, s32 mode)
Projectile volley: shots fly from the user to each target and burst into a flash and sparks when they...
#define Ram_MapCellBuffer
char ResourceId_CounterRevealSheet
char ResourceId_VenusDjinnSmallSheet
char ResourceId_PinkBurstSheet
char ResourceId_MarsDjinnSmallSheet
char ResourceId_CyanPalette
char ResourceId_MercuryDjinnSmallSheet
char ResourceId_TornadoSheet
char ResourceId_YellowOrbSheet
char ResourceId_LimePalette
char ResourceId_FireStreakSheet
char ResourceId_MarsDjinnSheet
char ResourceId_IceChipSheet
char ResourceId_BlastSheet
char ResourceId_SkullSheet
char ResourceId_BlueFlameSheet
char ResourceId_LightningBoltSheet
char ResourceId_RedCrescentSheetA
char ResourceId_SmokeSheet
char ResourceId_BlueBeastSheet
char ResourceId_RockSpireSheet
char ResourceId_FlameSheetA
char ResourceId_ParticleSpritesA
char ResourceId_IceBlockSheet
char ResourceId_JupiterDjinnSmallSheet
char ResourceId_FlashBurstSheet
char ResourceId_RuneSheet
char ResourceId_EmberStreakSheet
char ResourceId_RedCrescentSheetB
char ResourceId_TanPalette
void Graphics_PackTileRows(u8 *src, u8 *dst, s32 stride, s32 rowCount)
Packs 288 rows of 40 bytes to half width, keeping every second byte (the bytes of the odd columns win...
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,...
void BattleFx_RunImpair(struct BattleEffectArgument *effect)
A shield appears over each target and breaks into shards that fade through darker copies,...
The battle camera: its eye, the focus it turns about, and its pitch, yaw and distance.
The command shared by an effect's caller, dispatcher and handlers.
s32 actor
the user's unit id
s32 side
1 when the targets are the party, 0 for enemies
s16 actors[8]
the targets' unit ids, count of them
s32 variant
the ability's size, from 0 (Quake, then Earthquake)
s32 prelude
1 plays a prelude: in some effects a Djinni appears
The running battle effect's work: its canvas image, 64 particles, the display registers it stages and...
s32 fadeFrames
backdrop fade frames left (Palette_StepFadeTransfer)
s32 frame
frame counter some effects keep, from 0
s32 fadeStep
CANVAS_FADE_STEPs the backdrop has darkened so far.
s32 shakeFrames
shake frames left; Camera_ApplyShake counts down
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
struct MotionObject * object
NULL once released.
A field object as the object dispatcher's far calls take it.
A point projected onto the screen, with its depth.
s32 depth
projected depth, larger further away
A moving point of an effect: its position, its velocity and a value each effect uses its own way (a s...
s32 velocityX
16.16 fixed-point pixels per frame
s32 z
16.16 fixed-point pixels
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
s32 velocityY
16.16 fixed-point pixels per frame
s32 velocityZ
16.16 fixed-point pixels per frame
A position in three coordinates, each in 16.16 fixed point.
An effect object that moves and draws one sprite: its position, scale, velocity and target,...
s32 velocityZ
16.16 fixed-point pixels per frame
s32 velocityX
16.16 fixed-point pixels per frame
s32 z
16.16 fixed-point pixels
s32 y
16.16 fixed-point pixels
u16 height
half the sprite's box height; FieldActor's radius
s32 velocityY
16.16 fixed-point pixels per frame
s32 acceleration
Horizontal speed gained each frame towards the target, or lost braking without one,...
s32 x
16.16 fixed-point pixels
s32 verticalMotionStrength
Gravity: taken from velocityY each frame above the ground with motionFlags bit 1, in 16....
void * Resource_GetTableEntry(s32 index)
Returns the ROM address of resource index from the resource directory.
void BattleFx_RunMysticFlame(struct BattleEffectArgument *effect)
Glowing orbs.
#define EFFECT_CLIP_BOUNDS
Clips overflow on all four sides.
DrawRectangle BlitterPair[2]
A blitter pair: [0] built in HEAP_SLOT_BLITTER and [1] in HEAP_SLOT_BLITTER_ALTERNATE (BattleFx_Fetch...