src/battle_effect/battle_effect_breaths.c
The monsters' breaths (Beam, Rolling Flame, Ghost Soldier, Pike Assault and Blast Breath), the crescent slash of Human Hunt and Echo Cut, and the four-way mirrored blit many effects draw their glows with. More…
Included by battle_effect.c.
Macros
| Name | Description | |
|---|---|---|
#define | FLAME_RING_TEXTURE (RamMapMetatileBuffer + 16384) | FlameBandTexture, wrapped round the rings of flame, unpacked into the map cell buffer's second 16 KB. |
#define | BEAM_RING_SIZE 32 | The Beam's 16 fading rings of 32x32, one after another in the sprite sheet, and the glow every breath draws at the mouth after them. |
#define | BEAM_RING_COUNT 16 | |
#define | BEAM_RING_BYTES (BEAM_RING_SIZE * BEAM_RING_SIZE) | |
#define | BREATH_GLOW 16384 | |
#define | BREATH_MOTES (state->particles + 32) | The motes that gather at the mouth, after the rolling ball. |
#define | BREATH_MOTE_COUNT 32 | |
#define | DUST_BALL_WIDTH 32 | DustCloudSheet's ball. |
#define | DUST_BALL_HEIGHT 48 | |
#define | BLAST_BREATH_GLOW_SIZE 40 | Blast Breath's glow, before it shrinks. |
#define | BREATH_FLASH_FULL 16 | The flash at the mouth grows at full brightness for BREATH_FLASH_FULL ticks, then fades 8 levels a tick; it is turned BREATH_FLASH_SLANT about its upright axis, and the rings of flame BREATH_RING_SLANT, so that both face across the field. |
#define | BREATH_FLASH_GROWTH toFIXED(0.15552) | |
#define | BREATH_FLASH_SLANT 13000 | |
#define | BREATH_RING_SLANT 14000 | |
#define | BREATH_RING_START_SCALE toFIXED(0.25586) | A ring of flame's scale as it starts; it grows by its growth times BREATH_RING_GROWTH a tick. |
#define | BREATH_RING_GROWTH toFIXED(0.0229) | |
#define | BLAST_BREATH_JET_ANGLE 12384 | Blast Breath's jet points BLAST_BREATH_JET_ANGLE from the user until tick 8, then sweeps a 512th of a turn a tick. |
#define | CRESCENT_SLASH_TICKS 32 | |
#define | GREY_CRESCENT_SIZE 128 | GreyCrescentSheet's two pictures are 128x128 each. |
#define | ECHO_CUT_Y 16 | The canvas line Echo Cut's crescent is drawn from; Human Hunt's is drawn from the top. |
Enumerations
| Name | Description | |
|---|---|---|
enum | CRESCENT_SLASH_MODE { CRESCENT_SLASH_HUMAN_HUNT, CRESCENT_SLASH_ECHO_CUT } | The crescent slash's modes (btEffectRunCrescentSlash). |
enum | CRESCENT_SLASH_STEP { CRESCENT_SLASH_STAR, CRESCENT_SLASH_FLASH, CRESCENT_SLASH_GR … } | The crescent slash's steps, three ticks each from tick 8. |
Functions
| Name | Description | |
|---|---|---|
void | btEffectRunBreaths (BATTLE_EFFECT_PARM *args, Sint32 mode) | The breaths (Beam, Rolling Flame, Ghost Soldier, Pike Assault and Blast Breath): motes gather at the user's mouth, then burst out of it as sparks while a flash grows there. |
void | btEffectRunHumanHunt (BATTLE_EFFECT_PARM *args) | Abilities: Human Hunt. |
void | btEffectRunEchoCut (BATTLE_EFFECT_PARM *args) | Abilities: Echo Cut. |
void | btEffectRunCrescentSlash (BATTLE_EFFECT_PARM *args, Sint32 mode) | The crescent slash of Human Hunt and Echo Cut. |
void | btCanvasBlitMirroredQuarters (void *src, Sint32 x, Sint32 y, Sint32 size) | Draws a quarter picture, size pixels tall and half as wide, four times into the canvas, mirrored about (x, y) and keeping the brighter pixel: a whole glow or disc centred there, round at the canvas's double width. |
Description
The monsters' breaths (Beam, Rolling Flame, Ghost Soldier, Pike Assault and
Blast Breath), the crescent slash of Human Hunt and Echo Cut, and the
four-way mirrored blit many effects draw their glows with. Part of
battle_effect.c.
Macros in detail
FLAME_RING_TEXTURE
#define FLAME_RING_TEXTURE (RamMapMetatileBuffer + 16384)
FlameBandTexture, wrapped round the rings of flame, unpacked into the map cell buffer's second 16 KB.
Referenced by btEffectRunBreaths().
Definition at line 15 of file battle_effect_breaths.c.
BEAM_RING_SIZE
#define BEAM_RING_SIZE 32
The Beam's 16 fading rings of 32x32, one after another in the sprite sheet, and the glow every breath draws at the mouth after them.
Referenced by btEffectRunBreaths().
Definition at line 18 of file battle_effect_breaths.c.
BEAM_RING_COUNT
#define BEAM_RING_COUNT 16
Referenced by btEffectRunBreaths().
Definition at line 19 of file battle_effect_breaths.c.
BEAM_RING_BYTES
#define BEAM_RING_BYTES (BEAM_RING_SIZE * BEAM_RING_SIZE)
Referenced by btEffectRunBreaths().
Definition at line 20 of file battle_effect_breaths.c.
BREATH_GLOW
#define BREATH_GLOW 16384
Referenced by btEffectRunBreaths().
Definition at line 21 of file battle_effect_breaths.c.
BREATH_MOTES
#define BREATH_MOTES (state->particles + 32)
The motes that gather at the mouth, after the rolling ball.
Referenced by btEffectRunBreaths().
Definition at line 23 of file battle_effect_breaths.c.
BREATH_MOTE_COUNT
#define BREATH_MOTE_COUNT 32
Referenced by btEffectRunBreaths().
Definition at line 24 of file battle_effect_breaths.c.
DUST_BALL_WIDTH
#define DUST_BALL_WIDTH 32
DustCloudSheet's ball.
Referenced by btEffectRunBreaths().
Definition at line 26 of file battle_effect_breaths.c.
DUST_BALL_HEIGHT
#define DUST_BALL_HEIGHT 48
Referenced by btEffectRunBreaths().
Definition at line 27 of file battle_effect_breaths.c.
BLAST_BREATH_GLOW_SIZE
#define BLAST_BREATH_GLOW_SIZE 40
Blast Breath's glow, before it shrinks.
Referenced by btEffectRunBreaths().
Definition at line 29 of file battle_effect_breaths.c.
BREATH_FLASH_FULL
#define BREATH_FLASH_FULL 16
The flash at the mouth grows at full brightness for BREATH_FLASH_FULL ticks,
then fades 8 levels a tick; it is turned BREATH_FLASH_SLANT about its upright
axis, and the rings of flame BREATH_RING_SLANT, so that both face across the
field.
Referenced by btEffectRunBreaths().
Definition at line 34 of file battle_effect_breaths.c.
BREATH_FLASH_GROWTH
#define BREATH_FLASH_GROWTH toFIXED(0.15552)
Referenced by btEffectRunBreaths().
Definition at line 35 of file battle_effect_breaths.c.
BREATH_FLASH_SLANT
#define BREATH_FLASH_SLANT 13000
Referenced by btEffectRunBreaths().
Definition at line 36 of file battle_effect_breaths.c.
BREATH_RING_SLANT
#define BREATH_RING_SLANT 14000
Referenced by btEffectRunBreaths().
Definition at line 37 of file battle_effect_breaths.c.
BREATH_RING_START_SCALE
#define BREATH_RING_START_SCALE toFIXED(0.25586)
A ring of flame's scale as it starts; it grows by its growth times
BREATH_RING_GROWTH a tick.
Referenced by btEffectRunBreaths().
Definition at line 40 of file battle_effect_breaths.c.
BREATH_RING_GROWTH
#define BREATH_RING_GROWTH toFIXED(0.0229)
Referenced by btEffectRunBreaths().
Definition at line 41 of file battle_effect_breaths.c.
BLAST_BREATH_JET_ANGLE
#define BLAST_BREATH_JET_ANGLE 12384
Blast Breath's jet points BLAST_BREATH_JET_ANGLE from the user until tick 8,
then sweeps a 512th of a turn a tick.
Referenced by btEffectRunBreaths().
Definition at line 44 of file battle_effect_breaths.c.
CRESCENT_SLASH_TICKS
#define CRESCENT_SLASH_TICKS 32
Referenced by btEffectRunCrescentSlash().
Definition at line 642 of file battle_effect_breaths.c.
GREY_CRESCENT_SIZE
#define GREY_CRESCENT_SIZE 128
GreyCrescentSheet's two pictures are 128x128 each.
Referenced by btEffectRunCrescentSlash().
Definition at line 655 of file battle_effect_breaths.c.
ECHO_CUT_Y
#define ECHO_CUT_Y 16
The canvas line Echo Cut's crescent is drawn from; Human Hunt's is drawn from the top.
Referenced by btEffectRunCrescentSlash().
Definition at line 658 of file battle_effect_breaths.c.
Enumerations in detail
CRESCENT_SLASH_MODE
enum CRESCENT_SLASH_MODE
The crescent slash's modes (btEffectRunCrescentSlash).
| Enumerator | Value | Description |
|---|---|---|
CRESCENT_SLASH_HUMAN_HUNT | ||
CRESCENT_SLASH_ECHO_CUT |
Definition at line 7 of file battle_effect_breaths.c.
CRESCENT_SLASH_STEP
enum CRESCENT_SLASH_STEP
The crescent slash's steps, three ticks each from tick 8.
| Enumerator | Value | Description |
|---|---|---|
CRESCENT_SLASH_STAR | the star crescent | |
CRESCENT_SLASH_FLASH | the canvas filled at its brightest | |
CRESCENT_SLASH_GREY_A | the grey crescent's thin arc | |
CRESCENT_SLASH_GREY_B | the full crescent | |
CRESCENT_SLASH_STAR_LAST | the star crescent's last cell |
Definition at line 645 of file battle_effect_breaths.c.
Functions in detail
btEffectRunBreaths
void btEffectRunBreaths(BATTLE_EFFECT_PARM *args, Sint32 mode)
The breaths (Beam, Rolling Flame, Ghost Soldier, Pike Assault and Blast Breath): motes gather at the user's mouth, then burst out of it as sparks while a flash grows there. The Beam glows and fires a beam of fading rings; Rolling Flame rolls a ball of dust to the target; Blast Breath glows, blasts and jets. The strongest variant also swells four rings of flame one after another in front of the user. Each breath hits every target at its tick (Blast Breath strikes them in turn, four ticks apart).
References BattleEffectBeamCorners, BattleEffectCylinderCorners, BattleEffectCylinderMesh, BattleEffectGroundSquareCorners, BattleEffectLargeSquareMesh, BattleEffectMotePictures, BattleEffectSmallSquareMesh, BreathBurstTicks, BreathFlashTicks, BreathMaxSizes, BreathRingGrowth, BreathRingStarts, BreathRingX, BreathTicks, btCameraShake(), btEffectDrawShadedDisc(), btEffectEndCanvasLayer(), btEffectPosProjectBattler(), btEffectSetApproachMotion(), btEffectStartActorMotion(), btEffectStartCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btMotionApplyKnockbackStub(), btParticleAdvanceWithGravity2D(), btRenderAllocateModelList(), btRenderDrawModelList(), btRenderTransformVertices(), btResourceLoadAndDecompress(), Sint32, syCloseEvent(), syCos(), syHeapAllocateEWRAM(), syHeapRelease(), syInitMatrix(), syRandom(), syRotX(), syRotY(), syRotZ(), syScale(), sySin(), sySoundPlayStub() and syTranslate().
Referenced by btEffectRunBeam(), btEffectRunBlastBreath(), btEffectRunGhostSoldier() and btEffectRunRollingFlame().
Definition at line 53 of file battle_effect_breaths.c.
btEffectRunHumanHunt
void btEffectRunHumanHunt(BATTLE_EFFECT_PARM *args)
Abilities: Human Hunt.
References btEffectRunCrescentSlash().
Referenced by BattleEffectHandlers.
Definition at line 631 of file battle_effect_breaths.c.
btEffectRunEchoCut
void btEffectRunEchoCut(BATTLE_EFFECT_PARM *args)
Abilities: Echo Cut.
References btEffectRunCrescentSlash().
Referenced by BattleEffectHandlers.
Definition at line 637 of file battle_effect_breaths.c.
btEffectRunCrescentSlash
void btEffectRunCrescentSlash(BATTLE_EFFECT_PARM *args, Sint32 mode)
The crescent slash of Human Hunt and Echo Cut. The caster closes in on the target; from tick 8 a crescent is cut in five steps of three ticks: the star crescent, the canvas flashing white, the grey crescent's thin arc, then the full crescent, and the star crescent's last picture; at tick 12 the blow throws the target into the air. Echo Cut cuts it upside down and lower, with a clatter. Human Hunt takes the Mars Djinn's colours, red, and blends its slash more faintly.
References btCameraShake(), btEffectPosProjectBattler(), btEffectStartActorMotion(), btEffectStartTiledCanvas(), btEffectTransferCanvas(), btMotionApproachTargetStub(), btResourceLoadAndDecompress(), Sint32, syResourceGetTableEntry(), sySetEvent(), sySoundPlayStub() and syWordsFill().
Referenced by btEffectRunEchoCut() and btEffectRunHumanHunt().
Definition at line 667 of file battle_effect_breaths.c.
btCanvasBlitMirroredQuarters
void btCanvasBlitMirroredQuarters(void *src, Sint32 x, Sint32 y, Sint32 size)
Draws a quarter picture, size pixels tall and half as wide, four times into
the canvas, mirrored about (x, y) and keeping the brighter pixel: a whole
glow or disc centred there, round at the canvas's double width.
References Sint32 and syHeapSlotRelease().
Referenced by btEffectRunBallLightning(), btEffectRunCastingImpact(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCruelRuin(), btEffectRunCrystal(), btEffectRunDaedalusStrike(), btEffectRunEclipse(), btEffectRunFlora(), btEffectRunFormChange(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunRadiantFire(), btEffectRunThor() and btEffectRunTrident().
Definition at line 848 of file battle_effect_breaths.c.