Alchemy

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.

Line 57

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.

Line 81

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.

Line 119

Structures

BurstParticleVector

struct BurstParticleVector

A point Growth works out round the effect's position.

FieldDeclared as
valuess32 values[3]x, y, z

Used by FieldFx_RunGrowth.

Line 13

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.

FieldDeclared as
reserved00u8 reserved00[5]
flagsALowu8 flagsALow : 5affine, objectMode and mosaic
flipu8 flip : 1fullColor, despite the name
flagsAHighu8 flagsAHigh : 2shape
reserved06u8 reserved06
flagsBLowu8 flagsBLow : 6x's top bit and affineIndex
flagsBHighu8 flagsBHigh : 2size
shape, unused, bits, lo, highLow, palette, bytes, attributesunion { 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.

Line 20

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).

FieldDeclared as
primarystruct BurstParticleVisual primary
childstruct BurstParticleVisual child

Used by BattleEffect_SpawnBurstParticleField.

Line 44

Macros, without a comment: GROWTH_PARTICLE_MAX, GROWTH_PARTICLE_OBJECT, GROWTH_FALL_OBJECT, GROWTH_FALL_LAST.

On this page