growth.c
Growth.
games/tbs/src/object/psynergy_effects/growth.c on GitHub
Growth. Part of psynergy_effects.c, compiled only through it.
Functions
FieldFx_RunGrowthOnTarget
void FieldFx_RunGrowthOnTarget(s32 unused)
Particles round the target, which takes the sprite priority of the ground under it.
Abilities: Growth (field kind 12), cast on a target.
The target plays animation 2, stops being solid (collision flags 0), loses its shadow and is depth-sorted as if 320 pixels higher (ACTOR_PRIORITY_UNDERFOOT); the effect leaves it so.
Used by BattleFx_DispatchRequestKind.
FieldFx_RunGrowth
void FieldFx_RunGrowth(void)
The particles, then five falling objects 4 to 10 pixels round the effect's position.
Abilities: Growth (field kind 12), cast with no target.
The objects (217) appear 2 or 3 frames apart and each lasts 60 frames (gBattleFx_BurstParticleObjectScript).
Used by BattleFx_Run.
BattleEffect_SpawnBurstParticleField
void BattleEffect_SpawnBurstParticleField(void)
Sends 24 particles, one every 2 frames, from in front of the caster to points round the effect's position. They start 10 pixels up facing south, 24 pixels up facing north, and 10 pixels up and 10 ahead otherwise. Each flies at 1.5 pixels a frame and is freed on arrival; facing north, the points are 14 pixels further north.
Used by FieldFx_RunGrowth, FieldFx_RunGrowthOnTarget.
Structures
BurstParticleVector
struct BurstParticleVector
A point Growth works out round the effect's position.
| Field | Declared as | |
|---|---|---|
values | s32 values[3] | x, y, z |
Used by FieldFx_RunGrowth.
BurstParticleVisual
struct BurstParticleVisual
A sprite part's OAM attributes (struct AnimationSpritePart) as Growth copies them; the notes give the AnimationSpritePart fields, some under other names here.
| Field | Declared as | |
|---|---|---|
reserved00 | u8 reserved00[5] | |
flagsALow | u8 flagsALow : 5 | affine, objectMode and mosaic |
flip | u8 flip : 1 | fullColor, despite the name |
flagsAHigh | u8 flagsAHigh : 2 | shape |
reserved06 | u8 reserved06 | |
flagsBLow | u8 flagsBLow : 6 | x's top bit and affineIndex |
flagsBHigh | u8 flagsBHigh : 2 | size |
shape, unused, bits, lo, highLow, palette, bytes, attributes | union { struct { u16 shape : 10; ///< tile, despite the name u16 unused : 6; } bits; struct { u8 lo; u8 highLow : 4; u8 palette : 4; } bytes; } attributes |
Used by BattleEffect_SpawnBurstParticleField.
BurstParticleVisualGroup
struct BurstParticleVisualGroup
A particle's sprite, seen as its two parts' attributes, which Growth copies from the first to the second: the image and the shadow (AnimationObject.image and shadow).
| Field | Declared as | |
|---|---|---|
primary | struct BurstParticleVisual primary | |
child | struct BurstParticleVisual child |
Used by BattleEffect_SpawnBurstParticleField.
Macros, without a comment: GROWTH_PARTICLE_MAX, GROWTH_PARTICLE_OBJECT, GROWTH_FALL_OBJECT, GROWTH_FALL_LAST.