Alchemy
Loading...
Searching...
No Matches

configured_effect_spawn.h

Go to the documentation of this file.
1#ifndef GUARD_CONFIGURED_EFFECT_SPAWN_H
2#define GUARD_CONFIGURED_EFFECT_SPAWN_H
3
4/// @file
5/// The sprite and effect views and the options a scene's configured effect
6/// spawner uses.
7
8#include "types.h"
9
10/// A scene actor's sprite, as far as the angle a scene turns it by.
11struct Sprite {
13 /// AnimationObject's attribute 2 high byte; not named by TBS code.
14 /// bits: 7..4 palette | 3..2 priority | 1..0 tile bits 9..8
16 u8 pad0a[20];
17 u16 angle; ///< AnimationObject's rotation, in 1/65536 turns
19 u8 state26; ///< AnimationObject's flags; not named by TBS code
20};
21
22/// A field effect's layout, as FieldEffect gives it; no TBS code names this
23/// struct.
24struct Effect {
26 s32 position[3]; ///< FieldEffect's x, y and z
28 s32 accum18; ///< FieldEffect's scaleX
29 s32 accum1c; ///< FieldEffect's scaleY
31 u8 flags23; ///< FieldEffect's priorityFlags
32 u8 pad24[12];
33 s32 rate30; ///< FieldEffect's scaleRateX
34 s32 rate34; ///< FieldEffect's scaleRateY
35 u8 pad38[12];
36 s32 velocityX; ///< FieldEffect's velocity.x
37 s32 velocityY; ///< FieldEffect's velocity.y
38 s32 velocityZ; ///< FieldEffect's velocity.z
39 struct Sprite *sprite;
41 u8 mode55; ///< FieldEffect's motionFlags
42 u8 pad56[14];
43 u16 step64; ///< FieldEffect's spin
45 u32 callback; ///< FieldEffect's update
46};
47
48/// The options a scene passes to Effect_Spawn for a configured effect: its
49/// kind, mode, rates and callback.
51 s32 modeBits; ///< EffectOptions' priority; not named by TBS code
52 s32 mode; ///< EffectOptions' palette; not named by TBS code
53 /// EffectOptions' startScaleX, in 16.16 fixed point (0x10000 full size);
54 /// the waterway stump's ring starts at 0x8000.
56 s32 accum1c; ///< EffectOptions' startScaleY, 16.16 fixed point
57 s32 target30; ///< EffectOptions' targetScaleX, 16.16 fixed point
58 s32 target34; ///< EffectOptions' targetScaleY, 16.16 fixed point
59 s16 kind; ///< EffectOptions' type, the object type to create
61 s32 callbackArg; ///< EffectOptions' script; not named by TBS code
62 u16 angle; ///< EffectOptions' rotation; not named by TBS code
63 u16 step; ///< EffectOptions' spin; not named by TBS code
64 u32 callback; ///< EffectOptions' update; not named by TBS code
65};
66
67#endif
The options a scene passes to Effect_Spawn for a configured effect: its kind, mode,...
s32 callbackArg
EffectOptions' script; not named by TBS code.
s32 mode
EffectOptions' palette; not named by TBS code.
u32 callback
EffectOptions' update; not named by TBS code.
s32 accum1c
EffectOptions' startScaleY, 16.16 fixed point.
s32 target34
EffectOptions' targetScaleY, 16.16 fixed point.
u16 step
EffectOptions' spin; not named by TBS code.
s16 kind
EffectOptions' type, the object type to create.
u16 angle
EffectOptions' rotation; not named by TBS code.
s32 modeBits
EffectOptions' priority; not named by TBS code.
s32 target30
EffectOptions' targetScaleX, 16.16 fixed point.
s32 accum18
EffectOptions' startScaleX, in 16.16 fixed point (0x10000 full size); the waterway stump's ring start...
A field effect's layout, as FieldEffect gives it; no TBS code names this struct.
s32 rate30
FieldEffect's scaleRateX.
s32 velocityY
FieldEffect's velocity.y.
u8 flags23
FieldEffect's priorityFlags.
s32 velocityZ
FieldEffect's velocity.z.
s32 accum1c
FieldEffect's scaleY.
s32 velocityX
FieldEffect's velocity.x.
s32 accum18
FieldEffect's scaleX.
u32 callback
FieldEffect's update.
s32 position[3]
FieldEffect's x, y and z.
s32 rate34
FieldEffect's scaleRateY.
struct Sprite * sprite
u8 mode55
FieldEffect's motionFlags.
u16 step64
FieldEffect's spin.
One lettering piece as queued for drawing: a header word, then its OAM attributes.
u8 flags9
AnimationObject's attribute 2 high byte; not named by TBS code.
u8 state26
AnimationObject's flags; not named by TBS code.
u16 angle
AnimationObject's rotation, in 1/65536 turns.
The integer types, TRUE, UNUSED and the fixed-address macros.
signed int s32
Definition types.h:14
unsigned int u32
Definition types.h:15
signed short s16
Definition types.h:12
unsigned short u16
Definition types.h:13
unsigned char u8
Definition types.h:11