src/battle_effect/battle_effect_beams.c
The plain attack's slash, the critical hit's gathering light and crescent, and pushing a unit back in its damage pose. More…
Included by battle_effect.c.
Macros
| Name | Description | |
|---|---|---|
#define | BEAM_TICKS 32 | The slash's and the critical hit's length. |
#define | BEAM_SPARKS 64 | Sparks in state->particles, drawn in pairs. |
#define | BEAM_SPARK_LIFE 16 | The ticks the first spark lives, shrinking as it goes; each later one lives a tick longer. |
#define | BEAM_CANVAS_SCROLL_Y (96 - BATTLE_VIEW_TOP) | BG1's scroll that shows the canvas, 96 pixels down BG1's map (btEffectSetupCanvasTileMap), from the battle view's top line. |
#define | CRITICAL_HIT_ZOOM 130 | The critical hit's camera zoom, in percent, held while it gathers. |
#define | CRITICAL_HIT_MOTES 64 | The motes that close in on the attacker, and how far either side of the centre their depth is clamped. |
#define | CRITICAL_HIT_MOTE_DEPTH 60 |
Functions
| Name | Description | |
|---|---|---|
void | btEffectRunAttackSlash (BATTLE_EFFECT_PARM *args) | A plain attack: a slash or streak sweeps from the user over its first target, a yellow orb flashes over the target and sparks fly off. |
void | btEffectRunCriticalHit (BATTLE_EFFECT_PARM *args) | A critical hit: motes of light close in on the attacker as it hangs in its leap, then a crescent slash sweeps across the first target and sparks fly from it. |
void | btEffectStartActorMotion (Sint32 id, Sint32 force, Sint32 acceleration, Sint32 speedLimit, Sint32 velocityY, Sint32 percent) | Knocks a unit back in its damage pose with the caller's acceleration, top speed, hop and reach in percent, as btMotionApplyKnockback does from its tables; a unit already moving up or down always takes the hop, a still one only when force is set. |
Description
The plain attack's slash, the critical hit's gathering light and crescent,
and pushing a unit back in its damage pose. Part of battle_effect.c.
Macros in detail
BEAM_TICKS
#define BEAM_TICKS 32
The slash's and the critical hit's length.
Referenced by btEffectRunAttackSlash() and btEffectRunCriticalHit().
Definition at line 5 of file battle_effect_beams.c.
BEAM_SPARKS
#define BEAM_SPARKS 64
Sparks in state->particles, drawn in pairs.
Referenced by btEffectRunAttackSlash() and btEffectRunCriticalHit().
Definition at line 7 of file battle_effect_beams.c.
BEAM_SPARK_LIFE
#define BEAM_SPARK_LIFE 16
The ticks the first spark lives, shrinking as it goes; each later one lives a tick longer.
Referenced by btEffectRunAttackSlash() and btEffectRunCriticalHit().
Definition at line 10 of file battle_effect_beams.c.
BEAM_CANVAS_SCROLL_Y
#define BEAM_CANVAS_SCROLL_Y (96 - BATTLE_VIEW_TOP)
BG1's scroll that shows the canvas, 96 pixels down BG1's map
(btEffectSetupCanvasTileMap), from the battle view's top line.
Referenced by btEffectRunAttackSlash() and btEffectRunCriticalHit().
Definition at line 13 of file battle_effect_beams.c.
CRITICAL_HIT_ZOOM
#define CRITICAL_HIT_ZOOM 130
The critical hit's camera zoom, in percent, held while it gathers.
Referenced by btEffectRunCriticalHit().
Definition at line 15 of file battle_effect_beams.c.
CRITICAL_HIT_MOTES
#define CRITICAL_HIT_MOTES 64
The motes that close in on the attacker, and how far either side of the centre their depth is clamped.
Referenced by btEffectRunCriticalHit().
Definition at line 18 of file battle_effect_beams.c.
CRITICAL_HIT_MOTE_DEPTH
#define CRITICAL_HIT_MOTE_DEPTH 60
Referenced by btEffectRunCriticalHit().
Definition at line 19 of file battle_effect_beams.c.
Functions in detail
btEffectRunAttackSlash
void btEffectRunAttackSlash(BATTLE_EFFECT_PARM *args)
A plain attack: a slash or streak sweeps from the user over its first target, a yellow orb flashes over the target and sparks fly off.
References BeamPictureHeights, BeamPictureReaches, BeamPictures, BeamPictureWidths, BgScrollWork, btEffectConfigureEffectDisplay(), btEffectHideBg1AndRestoreBackdrop(), btEffectPosProjectScaledBattler(), btEffectPosProjectSprite(), btEffectSetupCanvasTileMap(), btEffectStartActorMotion(), btEffectTransferCanvas(), btMotionApplyKnockbackStub(), btObjectGetStub(), btParticleAdvanceWithGravity3D(), btResourceLoadAndDecompress(), btSpriteHasHeavyImpactStub(), btUnitGetEffectHeightStub(), gmUnitGet(), Sint32, syCloseEvent(), syConvert3Dto2D(), syDMAXCopy(), syRandom(), syResourceGetTableEntry() and sySynch().
Referenced by btEffectRunByIdRange().
Definition at line 23 of file battle_effect_beams.c.
btEffectRunCriticalHit
void btEffectRunCriticalHit(BATTLE_EFFECT_PARM *args)
A critical hit: motes of light close in on the attacker as it hangs in its leap, then a crescent slash sweeps across the first target and sparks fly from it.
References BgScrollWork, btBackgroundSetPaletteLevelStub(), btCameraSetViewAtPairMidpointStub(), btEffectDarkenBackgroundStep(), btEffectHideBg1AndRestoreBackdrop(), btEffectPosProjectPoint(), btEffectPosProjectScaledBattler(), btEffectSetupCanvasTileMap(), btEffectTransferCanvas(), btMotionApplyKnockbackStub(), btObjectGetStub(), btParticleAdvanceWithGravity3D(), btResourceLoadAndDecompress(), btUnitGetEffectHeightStub(), fdActorSetAnimationSpeedStub(), Sint32, syCloseEvent(), syDMAXCopy(), syInitMatrix(), syRandom(), syResourceGetTableEntry(), syRotX(), syRotY(), syRotZ(), sySetEvent(), sySoundPlayStub() and sySynch().
Referenced by btEffectRunByIdRange().
Definition at line 316 of file battle_effect_beams.c.
btEffectStartActorMotion
void btEffectStartActorMotion(Sint32 id, Sint32 force, Sint32 acceleration, Sint32 speedLimit, Sint32 velocityY, Sint32 percent)
Knocks a unit back in its damage pose with the caller's acceleration, top
speed, hop and reach in percent, as btMotionApplyKnockback does from its
tables; a unit already moving up or down always takes the hop, a still one
only when force is set. The Fusion Dragon and the Doom Dragon's three forms
only take the pose.
References btObjectGetStub(), fdActorSelectAnimationStub(), gmUnitGet() and Sint32.
Referenced by btEffectRunAttackSlash(), btEffectRunAzul(), btEffectRunBackstab(), btEffectRunBreaths(), btEffectRunBurstShower(), btEffectRunCards(), btEffectRunCastingImpact(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCrescentSlash(), btEffectRunDaedalus(), btEffectRunDaedalusStrike(), btEffectRunElementCards(), btEffectRunFirePuppet(), btEffectRunFume(), btEffectRunGatheringLights(), btEffectRunHaures(), btEffectRunLeapingStrike(), btEffectRunLegend(), btEffectRunLiquifier(), btEffectRunMoloch(), btEffectRunOceanFist(), btEffectRunRisingDragon(), btEffectRunSabreDance(), btEffectRunStarMine(), btEffectRunStoneJustice(), btEffectRunTrident(), btEffectRunTripleChomp(), btEffectRunTwistingColumn(), btEffectRunUlysses(), btEffectRunVengeance() and btEffectRunWaterSheet().
Definition at line 589 of file battle_effect_beams.c.