142 if (effect->
actors[0] > 0x7f)
171 value = effect->
kind;
175 if ((
u32)value <= 35) {
177 }
else if (
kind > 199) {
struct BattleCamera * gCameraWork
void BattleFx_RunRingAndSparkScene(struct BattleEffectArgument *effect)
Plays the selected ring-and-spark strike, restoring the user motion after it.
void BattleFx_RunBeamSequence(struct BattleEffectArgument *effect)
Draws the selected beam and its projected sparks over the first target: a beam, arc or wave shoots fr...
void BattleFx_RunCastingImpact(struct BattleEffectArgument *effect, s32 mode)
Gathers sparks around the caster, launches the Djinni and draws the impact on the first target.
What every part of the battle effect object shares: its includes, macros and frame-loop helpers.
#define CANVAS_BYTES
The canvas: 128x128 pixels, one byte each, in its heap slot and in VRAM at BG_CHAR_BLOCK(1).
#define EFFECT_VIEW_FROM_CAMERA(camera)
Starts a frame's 3D projection from the battle camera: resets the transform, then looks from camera->...
static s32 * EffectPosition_Coordinates(struct EffectPosition *position)
Returns the position's three coordinates as an array.
struct BattleObj * GetBattleObjectSlotFar(s32 objectId)
Far call to BattleObjGet.
s32 BattleUnit_GetEffectHeightFar(s32 id)
s32 BattleMotion_ProjectScaledPositionFar(s32 id, s32 *projected)
void * GetMotionRecordFar(struct MotionObject *object, s32 record_index)
s32 BattleMotion_ProjectPositionFar(s32 id, s32 *projected)
void * Runtime_AllocateBlock(s32 kind, s32 size)
As Runtime_AllocateHeapBlock, but tries EWRAM first, for blocks that need room more than speed: the b...
void * Runtime_AllocateHeapBlock(s32 kind, s32 size)
Returns heap slot kind's block, first allocating size bytes for it (rounded up to words),...
@ HEAP_SLOT_BATTLE_EFFECT
@ HEAP_SLOT_BATTLE_CANVAS
#define WORK_SLOT(n)
Reads slots through their own addresses; adjacent slots are reached by offsets.
#define Iwram_MulQ16(left, right)
volatile u32 gKeysHeld
Keys down now.
#define SET_VELOCITY(p, vx, vy, vz)
void Runtime_ReleaseHeapBlock(s32 slot)
void EffectPosition_ProjectBattler(s32 id, struct EffectPosition *position)
The screen position of a battler, 16 pixels higher.
void EffectPosition_ProjectScaledBattler(s32 id, struct EffectPosition *position)
The screen position of a battler, scaled for the battle view, 16 pixels higher.
void BattleFx_DispatchByIdRange(struct BattleEffectArgument *effect)
Runs a battle effect from the second range of kinds: 100 to 135 are the casting impacts (kind - 100),...
void EffectStep_AdvanceWithGravity2D(struct EffectStep *step, s32 damping, s32 gravity)
Moves a particle one frame on the screen: adds its velocity, then gravity to its vertical speed,...
void EffectPosition_ProjectSprite(s32 id, struct EffectPosition *position)
The screen position of a battler's sprite, at its scaled height, 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...
void BattleFx_ProbeKeysForExtendedActor(void)
Reads the held keys when the first target is an enemy (id 128 or more) and does nothing with them.
s32 BattleUnit_ProjectToScreen(s32 unit, s32 *screen)
Projects a battler onto the screen, raised by half its table height (the table holds the full height ...
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...
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
s32 scale
16.16 fixed point, 0x10000 full size
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 kind
handler table index; 200 more for a critical hit
s16 actors[8]
the targets' unit ids, count of them
The running battle effect's work: its canvas image, 64 particles, the display registers it stages and...
struct BattleEffectArgument * effect
the command being run
struct MotionObject * object
NULL once released.
A point projected onto the screen, with its depth.
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 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
An effect object that moves and draws one sprite: its position, scale, velocity and target,...
s32 x
16.16 fixed-point pixels