102 x = 64 - screenPosition.
x;
106 x = (-screenPosition.
x * 4) / 5 + 64;
126 }
else if (mode == 1) {
133 for (frame = 0; frame != 48; frame++) {
146 if (frame == 8 && mode == 0)
155 cell = (cell & 1) + 1;
@ SPRITE_COLOR_WHITE
solid colour 15, white
@ SPRITE_COLOR_RED_TINT
red raised to full
BattleEffectDrawRectangle DrawRectangle
void BattleFx_BeginCanvasLayer(s32 bgControl)
Opens the canvas layer: starts the background palette fade, makes BG2 the canvas, alpha-blended over ...
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_GET_WORK_AND_CANVAS(cursor, work, canvas)
The work block and canvas occupy adjacent slots, starting at 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 EFFECT_START_TRANSFER(work, mode, value)
Sets the transfer, then starts copying the canvas to VRAM once a frame.
#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 gMirroredWall_Cells[]
u8 gMirroredWall_CellWidths[]
u8 gMirroredWall_CellHeights[]
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_BLITTER_ALTERNATE
#define Q_8_8(n)
The BG2/BG3 affine matrix entries are signed 8.8 fixed point: texels stepped per screen pixel.
static s32 Iwram_CopyWords(volatile void *destination, const volatile void *source, s32 size)
void BattleFx_RunRecovery(struct BattleEffectArgument *effect)
A wide wall of fire, without a shake.
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_RunBerserk(struct BattleEffectArgument *effect)
The wall rises wide and shakes the screen hard.
void BattleFx_RunMirroredWall(struct BattleEffectArgument *effect, s32 mode)
Raises a symmetrical wall (the EarthWall images) at the first target's feet for 48 frames; the target...
void BattleFx_RunSpasm(struct BattleEffectArgument *effect)
The wall rises with a long gentle shake and the recovery sound.
void EffectPosition_ProjectBattler(s32 id, struct EffectPosition *position)
The screen position of a battler, 16 pixels higher.
char ResourceId_EarthWallSheet
char ResourceId_MarsDjinnSheet
char ResourceId_FireballSheet
s32 Resource_DecodeType01(const void *source, void *destination)
Decodes a type-01 resource and returns its unpacked byte count.
The command shared by an effect's caller, dispatcher and handlers.
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...
s32 shakeFrames
shake frames left; Camera_ApplyShake counts down
struct BattleEffectArgument * effect
the command being run
A point projected onto the screen, with its depth.
void * Resource_GetTableEntry(s32 index)
Returns the ROM address of resource index from the resource directory.
#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...