Skip to Content
The Alchemy Project

src/field/field_psynergy_blaze.c

Blaze, and the check whether an actor stands where the map or another actor blocks it. More…

Included by field_psynergy.c.

Macros

NameDescription
#defineACTOR_FIRST_LAYER (actor) (((SPR *)(actor)->sprite)->entries[0])The first layer of an actor's sprite.
#defineBLAZE_SPRAY_TICKS 80The jet's longest spray, in ticks; B ends it sooner.
#defineBLAZE_FLAME_DEPTH 10How far in front of the caster the jet's flames are drawn.

Enumerations

NameDescription
enumBLAZE_LOOK { BLAZE_RED, BLAZE_VIOLET, BLAZE_YELLOW, BLAZE_BLUE }The flame's colour, after the torch it is cast at: an index of BlazeTintColors.

Functions

NameDescription
voidfdPsynergyBlaze (void)Blaze: a jet of flame sprays from the caster, with smoke, until B is pressed or for BLAZE_SPRAY_TICKS at most: red, or violet, yellow or blue to match the torch (SPRITE_MARS_TORCH_LIT) it is cast at.
Sint32fdMapGridCheckCollisionAtStub (Sint32 x, Sint32 z, Sint32 layer, Sint32 height)Nonzero when the map blocks an actor at (x, z) on a layer at a height.
Sint32fdActorCheckBlocked (ACTOR *actor)Says whether an actor stands where it may not: 1 when, outside the World Map, fdMapGridCheckCollisionAtStub reports its metatile, ORed with 2 when it overlaps any other solid actor (each radius less 2 pixels).

Variables

NameDescription
extern const Sint32BlazeTintColors []The tints fdPsynergyBlaze passes to fdStartColorTransition, one for each look of the flame.

Description

Blaze, and the check whether an actor stands where the map or another actor blocks it. Part of field_psynergy.c.

Macros in detail

ACTOR_FIRST_LAYER

#define ACTOR_FIRST_LAYER(actor) (((SPR *)(actor)->sprite)->entries[0])

The first layer of an actor's sprite.

Referenced by fdPsynergyBlaze().

Definition at line 7 of file field_psynergy_blaze.c.

BLAZE_SPRAY_TICKS

#define BLAZE_SPRAY_TICKS 80

The jet's longest spray, in ticks; B ends it sooner.

Referenced by fdPsynergyBlaze().

Definition at line 10 of file field_psynergy_blaze.c.

BLAZE_FLAME_DEPTH

#define BLAZE_FLAME_DEPTH 10

How far in front of the caster the jet's flames are drawn.

Referenced by fdPsynergyBlaze().

Definition at line 12 of file field_psynergy_blaze.c.

Enumerations in detail

BLAZE_LOOK

enum BLAZE_LOOK

The flame's colour, after the torch it is cast at: an index of BlazeTintColors.

EnumeratorValueDescription
BLAZE_RED
BLAZE_VIOLET
BLAZE_YELLOW
BLAZE_BLUE

Definition at line 16 of file field_psynergy_blaze.c.

Functions in detail

fdPsynergyBlaze

void fdPsynergyBlaze(void)

Blaze: a jet of flame sprays from the caster, with smoke, until B is pressed or for BLAZE_SPRAY_TICKS at most: red, or violet, yellow or blue to match the torch (SPRITE_MARS_TORCH_LIT) it is cast at. Each actor it reaches runs its Blaze script, and one that is lit by it ends the jet, its actor id kept in the field state. Cast at nothing, the nearest fire in reach is the target: a brazier, a lit candlestick, a lit Mars Lighthouse torch, or an actor wearing SPRITE_EXCLAMATION_BUBBLE (the Gondowan Cliffs hideout's unseen marker at its fire).

References BlazeTintColors, fdActorGetSpriteDepth(), fdActorGetSpriteIdStub(), fdActorGetSpritePriority(), fdActorReleaseStub(), fdActorSelectAnimationStub(), fdActorSpawn(), fdBattleEffectSetObjectUpdateMode(), fdBlazeUpdateSpray(), fdEffectSpriteInit(), fdFindPsynergyCue(), fdMeasurePsynergyReach(), fdPsynergyFadeFromCastColor(), fdResourceGetMetadataRecordStubStub(), fdRunPsynergyScript(), fdStartColorTransition(), PerWork, Sint32, syCloseEvent(), syDecompressTaggedLZ(), syHeapSlotAllocate(), syHeapSlotRelease(), syResourceGetTableEntry(), sySetEvent(), sySoundPlayStub(), sySynch(), syVRAMCacheFindFreeEntry(), syVRAMCacheFreeEntry() and syVRAMCacheLoad().

Referenced by fdPsynergyBlazeOnTarget() and fdPsynergyRun().

Definition at line 32 of file field_psynergy_blaze.c.

fdMapGridCheckCollisionAtStub

Sint32 fdMapGridCheckCollisionAtStub(Sint32 x, Sint32 z, Sint32 layer, Sint32 height)

Nonzero when the map blocks an actor at (x, z) on a layer at a height.

Referenced by fdActorCheckBlocked().

Definition at line 268 of file field_psynergy_blaze.c.

fdActorCheckBlocked

Sint32 fdActorCheckBlocked(ACTOR *actor)

Says whether an actor stands where it may not: 1 when, outside the World Map, fdMapGridCheckCollisionAtStub reports its metatile, ORed with 2 when it overlaps any other solid actor (each radius less 2 pixels).

References fdCheckSpheresOverlapStub(), fdMapGridCheckCollisionAtStub(), result and Sint32.

Referenced by fdPsynergyWatchSandGround().

Definition at line 274 of file field_psynergy_blaze.c.