Alchemy
Loading...
Searching...
No Matches

psynergy_effects_internal.h File Reference

What every part of psynergy_effects.c shares: its includes and the macros and types more than one part uses. More...

Go to the source code of this file.

Data Structures

struct  Object
 A field actor (struct FieldActor), seen with its position as one vector. More...
struct  DescendingOrbitObject
 A FieldActor seen with the halfword at 0x64 unsigned and the one at 0x66 signed, as the bytes read them (FieldActor's own types change the code). More...
struct  CaptureObject
 A FieldActor seen with the halfword at 0x5e (lifetime), which FieldActor does not name. More...
struct  WaveFxSprite
 A particle's sprite, seen as the two fields Douse and Mind Read set on it. More...
struct  ItemBreakFragmentObject
 A FieldActor seen with the halfword at 0x5e (its lifetime), which FieldActor does not name. More...
struct  SparkObject
 A FieldActor seen with the halfword at 0x5e (its lifetime), which FieldActor does not name. More...

Macros

#define PSYNERGY_EFFECT_SLOT_COUNT   24
 The effect slots of a Psynergy effect's scene (gEffectWork->slots).
#define DJINNI_0   300
 gGameState.pendingDjinnEvent of Djinni 0 (requests.c, djinni.c).
#define DEFINE_SHRINK_AND_DESTROY(name, step)
 Defines a per-frame update that spins an object 1/8 turn a frame while its scale changes by step, releasing the object once the scale falls below 0x3000.
#define HEAP_SLOT_FX   56
 the Psynergy effect's work (gWorkSlot[56], gEffectWork)
#define ITEM_BREAK_SHARD_MAX   24
 The shards DEFINE_ITEM_BREAK_EFFECT's effects scatter.
#define DEFINE_ITEM_BREAK_EFFECT(name, spawn)
 Defines an effect cast with no target: spawn makes an object 16 pixels above the effect's position and 32 pixels to either side; each moves 24 pixels its way, then 24 shards scatter 8 to 32 pixels.
#define ABOVE   (16 << 16)
 16 pixels up

Functions

static void BattleFx_MoveAfterimageHalfway (union FieldObject *fieldObject)
 Per-frame update of an afterimage: closes half the distance to the object it is linked to, on all three axes.
static __inline__ void FieldFx_UpdateSceneSlots (void)
 Runs the update of each of the 24 effect slots.
static void BattleFx_InitializeFallingFragment (struct ItemBreakFragmentObject *fragment)
 Both item fragments and Lift shed the same short-lived falling particle.

Detailed Description

What every part of psynergy_effects.c shares: its includes and the macros and types more than one part uses.

psynergy_effects.c includes it before the parts, and each part includes it too, so that a part read on its own resolves. It places no bytes.

Definition in file psynergy_effects_internal.h.

Macro Definition Documentation

◆ PSYNERGY_EFFECT_SLOT_COUNT

#define PSYNERGY_EFFECT_SLOT_COUNT   24

The effect slots of a Psynergy effect's scene (gEffectWork->slots).

Definition at line 100 of file psynergy_effects_internal.h.

Referenced by BattleFx_ClearActiveSlotsAndScheduleUpdates(), FieldFx_RunRetreat(), and FieldFx_UpdateSceneSlots().

◆ DJINNI_0

#define DJINNI_0   300

gGameState.pendingDjinnEvent of Djinni 0 (requests.c, djinni.c).

Definition at line 103 of file psynergy_effects_internal.h.

Referenced by Djinn_ResolvePendingEvent(), Field_RequestDjinnBattle(), and FieldObject_PlaceSceneActors().

◆ DEFINE_SHRINK_AND_DESTROY

#define DEFINE_SHRINK_AND_DESTROY ( name,
step )
Value:
void name(union FieldObject *fieldObject) { \
void *obj = fieldObject; \
s32 scale; \
\
scale = ((struct MotionObject *)obj)->scaleX + step; \
((struct MotionObject *)obj)->scaleY = \
((struct MotionObject *)obj)->scaleY + step; \
((struct MotionObject *)obj)->angle = \
((struct MotionObject *)obj)->angle + 0x2000; \
((struct MotionObject *)obj)->scaleX = scale; \
if (scale < 0x3000) { \
ObjectDispatch_ReleaseFar(obj); \
} \
}
An effect object that moves and draws one sprite: its position, scale, velocity and target,...
Definition motobj.h:20
signed int s32
Definition types.h:14
An object on the field, read as an actor or as an effect.

Defines a per-frame update that spins an object 1/8 turn a frame while its scale changes by step, releasing the object once the scale falls below 0x3000.

Definition at line 185 of file psynergy_effects_internal.h.

Referenced by BattleFx_ShrinkObjectAndDestroyFast(), and BattleFx_ShrinkObjectAndDestroySlow().

◆ HEAP_SLOT_FX

#define HEAP_SLOT_FX   56

◆ ITEM_BREAK_SHARD_MAX

#define ITEM_BREAK_SHARD_MAX   24

The shards DEFINE_ITEM_BREAK_EFFECT's effects scatter.

Definition at line 242 of file psynergy_effects_internal.h.

◆ DEFINE_ITEM_BREAK_EFFECT

#define DEFINE_ITEM_BREAK_EFFECT ( name,
spawn )

Defines an effect cast with no target: spawn makes an object 16 pixels above the effect's position and 32 pixels to either side; each moves 24 pixels its way, then 24 shards scatter 8 to 32 pixels.

Definition at line 247 of file psynergy_effects_internal.h.

Referenced by FieldFx_RunCarry(), and FieldFx_RunLift().

◆ ABOVE

#define ABOVE   (16 << 16)

Function Documentation

◆ BattleFx_MoveAfterimageHalfway()

void BattleFx_MoveAfterimageHalfway ( union FieldObject * fieldObject)
inlinestatic

Per-frame update of an afterimage: closes half the distance to the object it is linked to, on all three axes.

Definition at line 120 of file psynergy_effects_internal.h.

◆ FieldFx_UpdateSceneSlots()

__inline__ void FieldFx_UpdateSceneSlots ( void )
static

Runs the update of each of the 24 effect slots.

Definition at line 130 of file psynergy_effects_internal.h.

◆ BattleFx_InitializeFallingFragment()

void BattleFx_InitializeFallingFragment ( struct ItemBreakFragmentObject * fragment)
inlinestatic

Both item fragments and Lift shed the same short-lived falling particle.

Definition at line 228 of file psynergy_effects_internal.h.