src/battle_effect/battle_effect_fire_puppet.c
Fire Puppet and Whiplash. More…
Included by battle_effect.c.
Macros
| Name | Description | |
|---|---|---|
#define | FIRE_PUPPET_TICKS 103 | |
#define | PUPPET_SEGMENTS 33 | The ghost's trail is PUPPET_SEGMENTS pairs of corners, laid in the map cell buffer: the corners, those btRenderTransformVertices makes of them at PUPPET_STRIP_VERTICES, and the trail's mesh at PUPPET_STRIP_MESH, whose quads each take 4 texels of StreakTexture across and its 32 down. |
#define | PUPPET_CORNERS (PUPPET_SEGMENTS * 2) | |
#define | PUPPET_QUADS (PUPPET_SEGMENTS - 1) | |
#define | PUPPET_STRIP_VERTICES (RamMapMetatileBuffer + 4096) | |
#define | PUPPET_STRIP_MESH (RamMapMetatileBuffer + 8192) | |
#define | PUPPET_TARGET_COPY (state->particles[ARRAY_COUNT(state->particles) - 1]) | The last particle keeps a copy of the target's place and scale. |
#define | PUPPET_RISE_TICK 16 | The ghost rises at PUPPET_RISE_TICK, its trail curling a further PUPPET_CURL_SPEED a segment each tick up to PUPPET_CURL_MAX; it strikes at PUPPET_STRIKE_TICK, and from PUPPET_RETURN_TICK it uncurls and shrinks back into the caster over PUPPET_RETURN_TICKS. |
#define | PUPPET_CURL_SPEED 44 | |
#define | PUPPET_CURL_MAX 1424 | |
#define | PUPPET_STRIKE_TICK 54 | |
#define | PUPPET_RETURN_TICK 74 | |
#define | PUPPET_RETURN_TICKS 32 | |
#define | PUPPET_CASTER_RISE_TICK 100 | The caster kneels, grey, until this tick. |
#define | PUPPET_SKULL_GROWTH 23 | The skull grows from half size by this much a step of the curl, to about full size at PUPPET_CURL_MAX. |
#define | PUPPET_WIDTH 50 | The trail is PUPPET_WIDTH wide, pinched by up to PUPPET_PINCH along a sine that runs PUPPET_PINCH_STEP a segment, starting five segments before the caster: 33 pixels at the caster, 6 at its narrowest, near the middle, and 47 at the skull. |
#define | PUPPET_PINCH 44 | |
#define | PUPPET_PINCH_STEP 862 | |
#define | PUPPET_PINCH_START (5 * PUPPET_PINCH_STEP) | |
#define | PUPPET_SWAY 16 | The trail sways up to PUPPET_SWAY pixels at the skull, less towards the caster, a wave that runs along it a segment a tick. |
#define | PUPPET_SKULL_TURN 22384 | The skull's turn at the trail's end, against the trail's own turn there. |
#define | FIRE_PUPPET_GHOST_SKULL 16384 | Where GhostSkullTexture is decoded in the effect's pictures. |
#define | WHIPLASH_TICKS 52 | |
#define | WHIPLASH_HIT_TICK 18 | The tick the lash strikes the target. |
#define | WHIPLASH_LASH_A 0 | SlashFlameSheet: the violet lash in five pictures, shown one after another for WHIPLASH_LASH_PICTURE_TICKS apiece. |
#define | WHIPLASH_LASH_A_WIDTH 48 | |
#define | WHIPLASH_LASH_A_HEIGHT 96 | |
#define | WHIPLASH_LASH_B (WHIPLASH_LASH_A + PICTURE_BYTES(WHIPLASH_LASH_A)) | |
#define | WHIPLASH_LASH_B_WIDTH 38 | |
#define | WHIPLASH_LASH_B_HEIGHT 92 | |
#define | WHIPLASH_LASH_C (WHIPLASH_LASH_B + PICTURE_BYTES(WHIPLASH_LASH_B)) | |
#define | WHIPLASH_LASH_C_WIDTH 30 | |
#define | WHIPLASH_LASH_C_HEIGHT 76 | |
#define | WHIPLASH_LASH_D (WHIPLASH_LASH_C + PICTURE_BYTES(WHIPLASH_LASH_C)) | |
#define | WHIPLASH_LASH_D_WIDTH 56 | |
#define | WHIPLASH_LASH_D_HEIGHT 96 | |
#define | WHIPLASH_LASH_E (WHIPLASH_LASH_D + PICTURE_BYTES(WHIPLASH_LASH_D)) | |
#define | WHIPLASH_LASH_E_WIDTH 56 | |
#define | WHIPLASH_LASH_E_HEIGHT 88 | |
#define | WHIPLASH_LASH_PICTURE_TICKS 6 | |
#define | WHIPLASH_MOTES 256 | The motes the lash's crack sprays, kept as particles in the map cell buffer. |
Functions
| Name | Description | |
|---|---|---|
void | btEffectRunFirePuppet (BATTLE_EFFECT_PARM *args) | The caster kneels, grey, and its ghost rises from it: a trail of blue streaks that curls up and over the battle with a skull at its head. |
void | btEffectRunWhiplash (BATTLE_EFFECT_PARM *args) | A lash of violet light swings out from the caster and cracks down on the target, which is thrown up and flashes, and motes spray from where the lash struck, half of them rising and half falling as they burn down. |
Description
Fire Puppet and Whiplash. Part of battle_effect.c.
Macros in detail
FIRE_PUPPET_TICKS
#define FIRE_PUPPET_TICKS 103
Referenced by btEffectRunFirePuppet().
Definition at line 3 of file battle_effect_fire_puppet.c.
PUPPET_SEGMENTS
#define PUPPET_SEGMENTS 33
The ghost's trail is PUPPET_SEGMENTS pairs of corners, laid in the map cell
buffer: the corners, those btRenderTransformVertices makes of them at
PUPPET_STRIP_VERTICES, and the trail's mesh at PUPPET_STRIP_MESH, whose quads
each take 4 texels of StreakTexture across and its 32 down.
Referenced by btEffectRunFirePuppet().
Definition at line 8 of file battle_effect_fire_puppet.c.
PUPPET_CORNERS
#define PUPPET_CORNERS (PUPPET_SEGMENTS * 2)
Referenced by btEffectRunFirePuppet().
Definition at line 9 of file battle_effect_fire_puppet.c.
PUPPET_QUADS
#define PUPPET_QUADS (PUPPET_SEGMENTS - 1)
Referenced by btEffectRunFirePuppet().
Definition at line 10 of file battle_effect_fire_puppet.c.
PUPPET_STRIP_VERTICES
#define PUPPET_STRIP_VERTICES (RamMapMetatileBuffer + 4096)
Referenced by btEffectRunFirePuppet().
Definition at line 11 of file battle_effect_fire_puppet.c.
PUPPET_STRIP_MESH
#define PUPPET_STRIP_MESH (RamMapMetatileBuffer + 8192)
Referenced by btEffectRunFirePuppet().
Definition at line 12 of file battle_effect_fire_puppet.c.
PUPPET_TARGET_COPY
#define PUPPET_TARGET_COPY (state->particles[ARRAY_COUNT(state->particles) - 1])
The last particle keeps a copy of the target's place and scale.
Referenced by btEffectRunFirePuppet().
Definition at line 14 of file battle_effect_fire_puppet.c.
PUPPET_RISE_TICK
#define PUPPET_RISE_TICK 16
The ghost rises at PUPPET_RISE_TICK, its trail curling a further
PUPPET_CURL_SPEED a segment each tick up to PUPPET_CURL_MAX; it strikes at
PUPPET_STRIKE_TICK, and from PUPPET_RETURN_TICK it uncurls and shrinks back
into the caster over PUPPET_RETURN_TICKS.
Referenced by btEffectRunFirePuppet().
Definition at line 20 of file battle_effect_fire_puppet.c.
PUPPET_CURL_SPEED
#define PUPPET_CURL_SPEED 44
Referenced by btEffectRunFirePuppet().
Definition at line 21 of file battle_effect_fire_puppet.c.
PUPPET_CURL_MAX
#define PUPPET_CURL_MAX 1424
Referenced by btEffectRunFirePuppet().
Definition at line 22 of file battle_effect_fire_puppet.c.
PUPPET_STRIKE_TICK
#define PUPPET_STRIKE_TICK 54
Referenced by btEffectRunFirePuppet().
Definition at line 23 of file battle_effect_fire_puppet.c.
PUPPET_RETURN_TICK
#define PUPPET_RETURN_TICK 74
Referenced by btEffectRunFirePuppet().
Definition at line 24 of file battle_effect_fire_puppet.c.
PUPPET_RETURN_TICKS
#define PUPPET_RETURN_TICKS 32
Referenced by btEffectRunFirePuppet().
Definition at line 25 of file battle_effect_fire_puppet.c.
PUPPET_CASTER_RISE_TICK
#define PUPPET_CASTER_RISE_TICK 100
The caster kneels, grey, until this tick.
Referenced by btEffectRunFirePuppet().
Definition at line 27 of file battle_effect_fire_puppet.c.
PUPPET_SKULL_GROWTH
#define PUPPET_SKULL_GROWTH 23
The skull grows from half size by this much a step of the curl, to about full
size at PUPPET_CURL_MAX.
Referenced by btEffectRunFirePuppet().
Definition at line 30 of file battle_effect_fire_puppet.c.
PUPPET_WIDTH
#define PUPPET_WIDTH 50
The trail is PUPPET_WIDTH wide, pinched by up to PUPPET_PINCH along a sine
that runs PUPPET_PINCH_STEP a segment, starting five segments before the
caster: 33 pixels at the caster, 6 at its narrowest, near the middle, and 47
at the skull.
Referenced by btEffectRunFirePuppet().
Definition at line 36 of file battle_effect_fire_puppet.c.
PUPPET_PINCH
#define PUPPET_PINCH 44
Referenced by btEffectRunFirePuppet().
Definition at line 37 of file battle_effect_fire_puppet.c.
PUPPET_PINCH_STEP
#define PUPPET_PINCH_STEP 862
Referenced by btEffectRunFirePuppet().
Definition at line 38 of file battle_effect_fire_puppet.c.
PUPPET_PINCH_START
#define PUPPET_PINCH_START (5 * PUPPET_PINCH_STEP)
Referenced by btEffectRunFirePuppet().
Definition at line 39 of file battle_effect_fire_puppet.c.
PUPPET_SWAY
#define PUPPET_SWAY 16
The trail sways up to PUPPET_SWAY pixels at the skull, less towards the
caster, a wave that runs along it a segment a tick.
Referenced by btEffectRunFirePuppet().
Definition at line 42 of file battle_effect_fire_puppet.c.
PUPPET_SKULL_TURN
#define PUPPET_SKULL_TURN 22384
The skull's turn at the trail's end, against the trail's own turn there.
Referenced by btEffectRunFirePuppet().
Definition at line 44 of file battle_effect_fire_puppet.c.
FIRE_PUPPET_GHOST_SKULL
#define FIRE_PUPPET_GHOST_SKULL 16384
Where GhostSkullTexture is decoded in the effect's pictures.
Referenced by btEffectRunFirePuppet().
Definition at line 47 of file battle_effect_fire_puppet.c.
WHIPLASH_TICKS
#define WHIPLASH_TICKS 52
Referenced by btEffectRunWhiplash().
Definition at line 268 of file battle_effect_fire_puppet.c.
WHIPLASH_HIT_TICK
#define WHIPLASH_HIT_TICK 18
The tick the lash strikes the target.
Referenced by btEffectRunWhiplash().
Definition at line 270 of file battle_effect_fire_puppet.c.
WHIPLASH_LASH_A
#define WHIPLASH_LASH_A 0
SlashFlameSheet: the violet lash in five pictures, shown one after another
for WHIPLASH_LASH_PICTURE_TICKS apiece.
Referenced by btEffectRunWhiplash().
Definition at line 273 of file battle_effect_fire_puppet.c.
WHIPLASH_LASH_A_WIDTH
#define WHIPLASH_LASH_A_WIDTH 48
Definition at line 274 of file battle_effect_fire_puppet.c.
WHIPLASH_LASH_A_HEIGHT
#define WHIPLASH_LASH_A_HEIGHT 96
Definition at line 275 of file battle_effect_fire_puppet.c.
WHIPLASH_LASH_B
#define WHIPLASH_LASH_B (WHIPLASH_LASH_A + PICTURE_BYTES(WHIPLASH_LASH_A))
Referenced by btEffectRunWhiplash().
Definition at line 276 of file battle_effect_fire_puppet.c.
WHIPLASH_LASH_B_WIDTH
#define WHIPLASH_LASH_B_WIDTH 38
Definition at line 277 of file battle_effect_fire_puppet.c.
WHIPLASH_LASH_B_HEIGHT
#define WHIPLASH_LASH_B_HEIGHT 92
Definition at line 278 of file battle_effect_fire_puppet.c.
WHIPLASH_LASH_C
#define WHIPLASH_LASH_C (WHIPLASH_LASH_B + PICTURE_BYTES(WHIPLASH_LASH_B))
Referenced by btEffectRunWhiplash().
Definition at line 279 of file battle_effect_fire_puppet.c.
WHIPLASH_LASH_C_WIDTH
#define WHIPLASH_LASH_C_WIDTH 30
Definition at line 280 of file battle_effect_fire_puppet.c.
WHIPLASH_LASH_C_HEIGHT
#define WHIPLASH_LASH_C_HEIGHT 76
Definition at line 281 of file battle_effect_fire_puppet.c.
WHIPLASH_LASH_D
#define WHIPLASH_LASH_D (WHIPLASH_LASH_C + PICTURE_BYTES(WHIPLASH_LASH_C))
Referenced by btEffectRunWhiplash().
Definition at line 282 of file battle_effect_fire_puppet.c.
WHIPLASH_LASH_D_WIDTH
#define WHIPLASH_LASH_D_WIDTH 56
Definition at line 283 of file battle_effect_fire_puppet.c.
WHIPLASH_LASH_D_HEIGHT
#define WHIPLASH_LASH_D_HEIGHT 96
Definition at line 284 of file battle_effect_fire_puppet.c.
WHIPLASH_LASH_E
#define WHIPLASH_LASH_E (WHIPLASH_LASH_D + PICTURE_BYTES(WHIPLASH_LASH_D))
Referenced by btEffectRunWhiplash().
Definition at line 285 of file battle_effect_fire_puppet.c.
WHIPLASH_LASH_E_WIDTH
#define WHIPLASH_LASH_E_WIDTH 56
Definition at line 286 of file battle_effect_fire_puppet.c.
WHIPLASH_LASH_E_HEIGHT
#define WHIPLASH_LASH_E_HEIGHT 88
Definition at line 287 of file battle_effect_fire_puppet.c.
WHIPLASH_LASH_PICTURE_TICKS
#define WHIPLASH_LASH_PICTURE_TICKS 6
Referenced by btEffectRunWhiplash().
Definition at line 288 of file battle_effect_fire_puppet.c.
WHIPLASH_MOTES
#define WHIPLASH_MOTES 256
The motes the lash's crack sprays, kept as particles in the map cell buffer.
Referenced by btEffectRunWhiplash().
Definition at line 290 of file battle_effect_fire_puppet.c.
Functions in detail
btEffectRunFirePuppet
void btEffectRunFirePuppet(BATTLE_EFFECT_PARM *args)
The caster kneels, grey, and its ghost rises from it: a trail of blue streaks that curls up and over the battle with a skull at its head. The skull dives on the targets, the screen flashes white and every target is thrown back; then the ghost shrinks back into the caster, who stands again.
Abilities: Fire Puppet.
References BattleEffectSquareCorners, BattleEffectSquareMesh, btCameraShake(), btEffectCountDownBattlerTints(), btEffectEndCanvasLayer(), btEffectPosProjectScaledBattler(), btEffectStartActorMotion(), btEffectStartCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btObjectGetStub(), btRenderAllocateModelList(), btRenderBuildQuadStrip(), btRenderDrawModelList(), btRenderTransformVertices(), btResourceLoadAndDecompress(), Sint32, syCloseEvent(), syCos(), syHeapRelease(), syHeapSlotRelease(), syInitMatrix(), syMatrixScaleUniform(), syResourceGetTableEntry(), syRotY(), syRotZ(), syScale(), sySin(), sySoundPlayStub() and syTranslate().
Referenced by BattleEffectHandlers.
Definition at line 55 of file battle_effect_fire_puppet.c.
btEffectRunWhiplash
void btEffectRunWhiplash(BATTLE_EFFECT_PARM *args)
A lash of violet light swings out from the caster and cracks down on the target, which is thrown up and flashes, and motes spray from where the lash struck, half of them rising and half falling as they burn down.
Abilities: Whiplash.
References btCameraShake(), btEffectPosProjectBattler(), btEffectStartCanvasLayer(), btEffectTintBattler(), btMotionApplyKnockbackStub(), btParticleAdvanceWithGravity2D(), btResourceLoadAndDecompress(), Sint32, syCos(), syRandom(), syResourceGetTableEntry() and sySin().
Referenced by BattleEffectHandlers.
Definition at line 297 of file battle_effect_fire_puppet.c.