Skip to Content
The Alchemy Project

src/field/field_psynergy_grind.c

Grind: the screen shakes up and down while spray rises round the target, a sea rock is ground away, and the plain sway Grind makes at nothing. More…

Included by field_psynergy.c.

Structures

NameDescription
structGRIND_STATEGrind's state (heap slot HEAP_SLOT_BATTLE_EFFECT): the splash picture and the splash particles.

Macros

NameDescription
#defineGRIND_SPLASH_COUNT 64The splashes of spray Grind keeps.
#defineGRIND_PICTURE_SIZE 2048The largest picture Grind grinds down, in bytes, a byte a pixel.
#defineGRIND_SPLASH_FRAME_TILES SPRITE_TILES_8BPP(16, 16)The tiles of each frame of the splash picture (RESOURCE_WATER_SPLASH), 16 by 16 pixels in 256 colours.
#defineGRIND_SPRAY_DEPTH 15How far in front of or behind the target the spray is drawn.

Enumerations

NameDescription
enumGRIND_MODE { GRIND_ON_TARGET, GRIND_SEA_ROCK, GRIND_ON_NOTHING }What Grind does.

Functions

NameDescription
voidfdPsynergyGrindOnTarget (void)Grind ("Pulverize large objects."): the screen shakes harder and harder while spray rises round the target, or round the spot 32 pixels before the caster.
voidfdPsynergyGrind (void)Sways the view up and down the screen: the swing grows from SWAY_START to SWAY_PEAK, holds for SWAY_HOLD_TICKS, shrinks back and stops; then the map's view bounds come back.

Description

Grind: the screen shakes up and down while spray rises round the target, a sea rock is ground away, and the plain sway Grind makes at nothing. Part of field_psynergy.c.

Macros in detail

GRIND_SPLASH_COUNT

#define GRIND_SPLASH_COUNT 64

The splashes of spray Grind keeps.

Referenced by fdPsynergyGrindOnTarget().

Definition at line 6 of file field_psynergy_grind.c.

GRIND_PICTURE_SIZE

#define GRIND_PICTURE_SIZE 2048

The largest picture Grind grinds down, in bytes, a byte a pixel.

Referenced by fdPsynergyGrindOnTarget().

Definition at line 8 of file field_psynergy_grind.c.

GRIND_SPLASH_FRAME_TILES

#define GRIND_SPLASH_FRAME_TILES SPRITE_TILES_8BPP(16, 16)

The tiles of each frame of the splash picture (RESOURCE_WATER_SPLASH), 16 by 16 pixels in 256 colours.

Referenced by fdPsynergyGrindOnTarget().

Definition at line 11 of file field_psynergy_grind.c.

GRIND_SPRAY_DEPTH

#define GRIND_SPRAY_DEPTH 15

How far in front of or behind the target the spray is drawn.

Referenced by fdPsynergyGrindOnTarget().

Definition at line 13 of file field_psynergy_grind.c.

Enumerations in detail

GRIND_MODE

enum GRIND_MODE

What Grind does.

EnumeratorValueDescription
GRIND_ON_TARGET0the target's Grind script runs as the shaking peaks
GRIND_SEA_ROCK1a sea rock is ground down row by row
GRIND_ON_NOTHING2spray rises before the caster

Definition at line 26 of file field_psynergy_grind.c.

Functions in detail

fdPsynergyGrindOnTarget

void fdPsynergyGrindOnTarget(void)

Grind ("Pulverize large objects."): the screen shakes harder and harder while spray rises round the target, or round the spot 32 pixels before the caster. A sea rock (SPRITE_SEA_ROCK) is ground down row by row; otherwise the place's Grind script runs while the shaking is at its height.

References fdActorGetSpriteDepth(), fdActorGetSpriteIdStub(), fdActorGetSpritePriority(), fdBattleEffectShiftRowsDown(), fdEffectSpriteDrawAtWorldPos(), fdEffectSpriteInit(), fdFindPsynergyCue(), fdPsynergyDecodePicture(), fdPsynergyFadeFromCastColor(), fdPsynergyFadeToCastColor(), fdSelectPsynergyTarget(), fdSpriteSetAnimationSpeedStub(), fdViewMoveEnd(), fdViewMoveStart(), fdViewMoveSwing(), Sint32, syDecompressTaggedLZ(), syHeapSlotAllocate(), syHeapSlotRelease(), syRandom(), syResourceGetTableEntry(), sySoundPlayStub(), sySynch(), syVectorAddPolarOffset(), syVRAMCacheFindFreeEntry(), syVRAMCacheFreeEntry() and syVRAMCacheLoad().

Referenced by fdPsynergyDispatch().

Definition at line 37 of file field_psynergy_grind.c.

fdPsynergyGrind

void fdPsynergyGrind(void)

Sways the view up and down the screen: the swing grows from SWAY_START to SWAY_PEAK, holds for SWAY_HOLD_TICKS, shrinks back and stops; then the map's view bounds come back.

References fdBattleEffectSetObjectUpdateMode(), fdPsynergyFadeFromCastColor(), fdPsynergyFadeToCastColor(), fdViewMoveEnd(), fdViewMoveStart(), fdViewMoveSwing(), Sint32, syHeapSlotAllocate(), syHeapSlotRelease() and sySynch().

Referenced by fdPsynergyRun().

Definition at line 283 of file field_psynergy_grind.c.