src/battle_effect/battle_effect_positions.c
Where an effect's pieces are: particles moved a tick at a time, and the screen points of units, which effects anchor on; and the runner for a casting impact, a plain attack or a critical hit. More…
Included by battle_effect.c.
Functions
| Name | Description | |
|---|---|---|
void | btParticleAdvanceWithGravity3D (PARTICLE *particle, Sint32 damping, Sint32 gravity) | Moves a particle one tick in three dimensions. |
void | btParticleAdvanceWithGravity2D (PARTICLE *particle, Sint32 damping, Sint32 gravity) | Moves a particle one tick on the screen. |
Sint32 | btProjectionPoint (const void *point, SCREEN_POINT *pos) | Projects a point in the current transform onto the screen, 16 pixels higher, and returns the projection's scale. |
void | btProjectionSprite (Sint32 id, SCREEN_POINT *pos) | The screen position of a unit's sprite, at its scaled height, 16 pixels higher. |
void | btProjectionScaledUnit (Sint32 id, SCREEN_POINT *pos) | The screen position of a unit, scaled for the battle view, 16 pixels higher. |
void | btProjectionUnit (Sint32 id, SCREEN_POINT *pos) | The screen position of a unit, 16 pixels higher. |
Sint32 | btUnitProjectToScreen (Sint32 unit, Sint32 *screen) | Projects a unit onto the screen, raised by half its height, from the battle camera. |
void | btEffectReadKeysForEnemyTarget (void) | Unused: reads the held keys when the first target is an enemy and does nothing with them. |
void | btEffectRunByIdRange (BATTLE_EFFECT_PARM *args) | Runs an effect the battle names by kind rather than from the handler table: from EFFECT_RANGE_CASTING_IMPACT a casting impact, from EFFECT_RANGE_BEAM a plain attack's slash, and from EFFECT_RANGE_RING_AND_SPARK a critical hit. |
Description
Where an effect's pieces are: particles moved a tick at a time, and the
screen points of units, which effects anchor on; and the runner for a casting
impact, a plain attack or a critical hit. Part of battle_effect.c.
A particle moves a tick by its velocity, gravity added to its vertical speed,
then slows by a damping out of DAMPING_SCALE. The projections return a point
16 pixels above where a unit stands.
Functions in detail
btParticleAdvanceWithGravity3D
void btParticleAdvanceWithGravity3D(PARTICLE *particle, Sint32 damping, Sint32 gravity)
Moves a particle one tick in three dimensions.
References Sint32.
Referenced by btEffectRunAnnihilation(), btEffectRunAttackSlash(), btEffectRunCastingImpact(), btEffectRunCriticalHit(), btEffectRunDjinnHeal(), btEffectRunDjinniEntrance(), btEffectRunDrain(), btEffectRunEruption(), btEffectRunFlurry(), btEffectRunGatheringLights(), btEffectRunHail(), btEffectRunJudgment(), btEffectRunLobbedShells(), btEffectRunMoteFountain(), btEffectRunRushingStrike(), btEffectRunStarfieldFall(), btEffectRunStatReduction(), btEffectRunStreakVolley(), btEffectRunSwirlingStars(), btEffectRunTargetBursts() and btEffectRunTargetStrike().
Definition at line 10 of file battle_effect_positions.c.
btParticleAdvanceWithGravity2D
void btParticleAdvanceWithGravity2D(PARTICLE *particle, Sint32 damping, Sint32 gravity)
Moves a particle one tick on the screen.
References Sint32.
Referenced by btEffectRunBolt(), btEffectRunBoreas(), btEffectRunBreak(), btEffectRunCybele(), btEffectRunDjinniEntrance(), btEffectRunDouse(), btEffectRunHelmSplitter(), btEffectRunImpactBurst(), btEffectRunJupiter(), btEffectRunMars(), btEffectRunMercury(), btEffectRunNeptune(), btEffectRunPlasma(), btEffectRunPrism(), btEffectRunProjectileVolley(), btEffectRunRagnarok(), btEffectRunRamses(), btEffectRunRay(), btEffectRunShatteringOpening(), btEffectRunSparkGroups(), btEffectRunSpire(), btEffectRunTargetStrike(), btEffectRunThor(), btEffectRunTitanBlade(), btEffectRunUndeadSword() and btEffectRunVenus().
Definition at line 25 of file battle_effect_positions.c.
btProjectionPoint
Sint32 btProjectionPoint(const void *point, SCREEN_POINT *pos)
Projects a point in the current transform onto the screen, 16 pixels higher, and returns the projection's scale.
References fdScreenPointCoordinates(), Sint32 and syConvert3Dto2D().
Referenced by btEffectDrawStreaks(), btEffectRunAnnihilation(), btEffectRunAstralBlast(), btEffectRunAtalanta(), btEffectRunBind(), btEffectRunBreak(), btEffectRunCastingImpact(), btEffectRunCriticalHit(), btEffectRunCybele(), btEffectRunDeathPlunge(), btEffectRunDjinnBeams(), btEffectRunDjinnHeal(), btEffectRunDjinniEntrance(), btEffectRunDragonCloud(), btEffectRunDrain(), btEffectRunElementPillar(), btEffectRunEruption(), btEffectRunFire(), btEffectRunFlurry(), btEffectRunFrost(), btEffectRunFroth(), btEffectRunGatheringLights(), btEffectRunGround(), btEffectRunHaunt(), btEffectRunHealingMotes(), btEffectRunJudgment(), btEffectRunLobbedShells(), btEffectRunMoteFountain(), btEffectRunOrbitingSkulls(), btEffectRunProcne(), btEffectRunProjectileVolley(), btEffectRunQuake(), btEffectRunRushingStrike(), btEffectRunShiningStar(), btEffectRunStarfieldFall(), btEffectRunStatBoost(), btEffectRunStatReduction(), btEffectRunStreakVolley(), btEffectRunSwirlingStars(), btEffectRunTargetBursts(), btEffectRunTargetMotes(), btEffectRunTargetStrike(), btEffectRunThor(), btEffectRunUnusedOrbitingSpirals(), btEffectRunUnusedTriangleStrike() and btEffectRunVolcano().
Definition at line 38 of file battle_effect_positions.c.
btProjectionSprite
void btProjectionSprite(Sint32 id, SCREEN_POINT *pos)
The screen position of a unit's sprite, at its scaled height, 16 pixels higher.
References btUnitProjectToScreen(), fdScreenPointCoordinates() and Sint32.
Referenced by btEffectRunAttackSlash() and btEffectRunBurstShower().
Definition at line 47 of file battle_effect_positions.c.
btProjectionScaledUnit
void btProjectionScaledUnit(Sint32 id, SCREEN_POINT *pos)
The screen position of a unit, scaled for the battle view, 16 pixels higher.
References btMotionProjectScaledPosStub(), fdScreenPointCoordinates() and Sint32.
Referenced by btEffectRunAnnihilation(), btEffectRunAtalanta(), btEffectRunAttackSlash(), btEffectRunBind(), btEffectRunBladeRain(), btEffectRunBurstShower(), btEffectRunCastingImpact(), btEffectRunCondemn(), btEffectRunCriticalHit(), btEffectRunCurse(), btEffectRunDjinnBeams(), btEffectRunDragonFire(), btEffectRunElementBurst(), btEffectRunFlurry(), btEffectRunHealingMotes(), btEffectRunNeptune(), btEffectRunOrbitingSkulls(), btEffectRunSparkGroups(), btEffectRunSpiderWeb(), btEffectRunSpire(), btEffectRunStatBoost(), btEffectRunSwirlSwipe(), btEffectRunTargetMotes(), btEffectRunTargetStrike(), btEffectRunUnusedTriangleStrike() and btEffectRunVine().
Definition at line 54 of file battle_effect_positions.c.
btProjectionUnit
void btProjectionUnit(Sint32 id, SCREEN_POINT *pos)
The screen position of a unit, 16 pixels higher.
References btMotionProjectPosStub(), fdScreenPointCoordinates() and Sint32.
Referenced by btEffectRunBolt(), btEffectRunElementPillar(), btEffectRunHail(), btEffectRunHelmSplitter(), btEffectRunKirin(), btEffectRunMirroredWall(), btEffectRunPlanetDiver(), btEffectRunRushingStrike(), btEffectRunTargetStrike(), btEffectRunTitanBlade() and btEffectRunUndeadSword().
Definition at line 61 of file battle_effect_positions.c.
btUnitProjectToScreen
Sint32 btUnitProjectToScreen(Sint32 unit, Sint32 *screen)
Projects a unit onto the screen, raised by half its height, from the battle camera.
References btActorGetSpriteStub(), btObjectGetStub(), btUnitGetEffectHeightStub(), Sint32, syConvert3Dto2D() and syMulFX().
Referenced by btProjectionSprite().
Definition at line 69 of file battle_effect_positions.c.
btEffectReadKeysForEnemyTarget
void btEffectReadKeysForEnemyTarget(void)
Unused: reads the held keys when the first target is an enemy and does nothing with them.
Definition at line 90 of file battle_effect_positions.c.
btEffectRunByIdRange
void btEffectRunByIdRange(BATTLE_EFFECT_PARM *args)
Runs an effect the battle names by kind rather than from the handler table:
from EFFECT_RANGE_CASTING_IMPACT a casting impact, from EFFECT_RANGE_BEAM a
plain attack's slash, and from EFFECT_RANGE_RING_AND_SPARK a critical hit.
References btEffectRunAttackSlash(), btEffectRunCastingImpact(), btEffectRunCriticalHit(), Sint32, syHeapSlotAllocate(), syHeapSlotAllocateEWRAM() and syHeapSlotRelease().
Definition at line 104 of file battle_effect_positions.c.