SSBM Decomp
Toggle main menu visibility
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1
#ifndef MELEE_EF_TYPES_H
2
#define MELEE_EF_TYPES_H
3
4
#include <
melee/ef/forward.h
>
// IWYU pragma: export
5
#include <
sysdolphin/baselib/forward.h
>
6
7
#include <
dolphin/mtx.h
>
8
#include <
dolphin/types.h
>
9
#include <
melee/sc/types.h
>
10
11
// How efAsync_Spawn resolves position and forwards args to efSync_Spawn.
12
// ATTACH = passes jobj directly (effect tracks the joint).
13
// POS = converts jobj to world coords via lb_8000B1CC (effect at fixed
14
// pos). OFFSET = Vec3 offset applied during world-pos calculation. PARAM =
15
// extra float(s) forwarded to efSync_Spawn after the position arg.
16
typedef
enum
EF_SpawnKind
{
17
EF_SPAWN_ATTACH
=
18
0,
// (jobj) -> efSync(gfx_id, gobj, jobj)
19
EF_SPAWN_POS
= 1,
// (jobj) -> worldpos(jobj) ->
20
// efSync(gfx_id, gobj, &pos)
21
EF_SPAWN_POS_OFFSET
= 2,
// (jobj, &ofs) -> worldpos(jobj, &ofs)
22
// -> efSync(gfx_id, gobj, &pos)
23
EF_SPAWN_ATTACH_PARAM
=
24
3,
// (jobj, &f) -> efSync(gfx_id, gobj, jobj, &f)
25
EF_SPAWN_POS_PARAM
= 4,
// (jobj, &f) -> worldpos(jobj) ->
26
// efSync(gfx_id, gobj, &pos, &f)
27
EF_SPAWN_POS_OFFSET_PARAM
=
28
5,
// (jobj, &ofs, &f) -> worldpos(jobj, &ofs) ->
29
// efSync(..., &pos, &f)
30
EF_SPAWN_POS_OFFSET_PARAM2
=
31
6,
// (jobj, &ofs, &f1, &f2) -> worldpos(jobj, &ofs) ->
32
// efSync(..., &f1, &f2)
33
EF_SPAWN_ATTACH_OFFSET
=
34
7,
// (jobj, &vec) -> efSync(gfx_id, gobj, jobj, &vec)
35
EF_SPAWN_CAMERA_SHAKE
=
36
8,
// (jobj, &ofs) -> worldpos(jobj, &ofs) ->
37
// Camera_RequestQuake(gfx_id, &pos)
38
}
EF_SpawnKind
;
39
40
// 0 = async load (default)
41
// 1 = sync load
42
#define EF_LOADKIND_ASYNC 0
43
#define EF_LOADKIND_SYNC 1
44
45
// EF_Effect: scale_flags
46
#define EF_SCALE_NO_INHERIT 0x00
47
#define EF_SCALE_INHERIT 0x01
48
49
// EF_Effect: expire_flags
50
#define EF_DOES_NOT_EXPIRE 0x00
51
#define EF_DOES_EXPIRE 0x01
52
53
// EF_Effect: state_flags
54
#define EF_STATE_ACTIVE 0x00
55
#define EF_STATE_ENTERING_PAUSE 0x01
56
#define EF_STATE_PAUSED 0x02
57
#define EF_STATE_ASYNC 0x80
58
59
struct
EF_Effect
{
60
/* +0 */
EF_Effect
*
next
;
61
/* +4 */
HSD_GObj
*
gobj
;
62
/* +8 */
HSD_GObj
*
parent_gobj
;
63
/* +C */
HSD_JObj
*
attach_jobj
;
64
/* +10 */
EF_UpdateFn
update
;
65
/* +14 */
void
*
user_data
;
66
/* +18 */
Vec3
params
;
// callback parameters, usage depends per-callback
67
/* +24 */
u16
lifetime
;
68
/* +26 */
s8
expire_flags
;
69
/* +27 */
u8
scale_flags
;
70
/* +28 */
u8
state_flags
;
71
/* +29 */
u8
is_async
;
72
/* +2A */
s8
x2A
;
73
/* +2B */
s8
x2B
;
74
};
/* size = 0x2C */
75
76
struct
EF_EffectDesc
{
77
/* +0 */
float
lifetime
;
78
/* +4 */
StaticModelDesc
model_desc
;
79
};
/* size = 0x14 */
80
81
struct
EF_QueuedEffect
{
82
/* +0 */
EF_QueuedEffect
*
next
;
83
/* +4 */
u8
spawn_kind
;
// EF_SpawnKind
84
/* +8 */
s32
gfx_id
;
85
/* +C */
HSD_JObj
*
jobj
;
86
/* +10 */
Vec3
params
;
// parameters depending on spawn_kind
87
/* +1C */
f32
extra1
;
// forwarded to efSync_Spawn depending on spawn_kind
88
/* +20 */
f32
extra2
;
// second extra float used depending on spawn_kind
89
};
/* size = 0x24 */
90
91
typedef
struct
EF_DAT_Entry
{
92
/* 0x0 */
char
*
ef_DAT_file
;
// ex. "EfCoData.dat"
93
/* 0x4 */
char
*
effDataTable_name
;
// ex. "effCommonDataTable"
94
/* 0x8 */
void
*
data
;
// loaded data pointer
95
}
EF_DAT_Entry
;
/* size = 0xC */
96
ASSERT_SIZE
(
EF_DAT_Entry
, 0xC);
97
98
struct
EF_QueuedEffect_ObjAlloc
{
99
char
pad_0
[0x24];
100
};
101
ASSERT_SIZE
(
struct
EF_QueuedEffect_ObjAlloc
, 0x24);
102
103
#endif
mtx.h
Vec3
struct Vec Vec3
types.h
s8
signed char s8
Definition
types.h:4
f32
float f32
Definition
types.h:13
u16
unsigned short int u16
Definition
types.h:7
s32
signed long s32
Definition
types.h:8
u8
unsigned char u8
Definition
types.h:5
forward.h
EF_UpdateFn
void(* EF_UpdateFn)(EF_Effect *)
Definition
forward.h:12
ASSERT_SIZE
#define ASSERT_SIZE(expr, size)
Definition
platform.h:161
EF_SpawnKind
EF_SpawnKind
Definition
types.h:16
EF_SPAWN_POS
@ EF_SPAWN_POS
Definition
types.h:19
EF_SPAWN_POS_OFFSET_PARAM2
@ EF_SPAWN_POS_OFFSET_PARAM2
Definition
types.h:30
EF_SPAWN_ATTACH_PARAM
@ EF_SPAWN_ATTACH_PARAM
Definition
types.h:23
EF_SPAWN_ATTACH
@ EF_SPAWN_ATTACH
Definition
types.h:17
EF_SPAWN_ATTACH_OFFSET
@ EF_SPAWN_ATTACH_OFFSET
Definition
types.h:33
EF_SPAWN_POS_PARAM
@ EF_SPAWN_POS_PARAM
Definition
types.h:25
EF_SPAWN_CAMERA_SHAKE
@ EF_SPAWN_CAMERA_SHAKE
Definition
types.h:35
EF_SPAWN_POS_OFFSET
@ EF_SPAWN_POS_OFFSET
Definition
types.h:21
EF_SPAWN_POS_OFFSET_PARAM
@ EF_SPAWN_POS_OFFSET_PARAM
Definition
types.h:27
types.h
EF_DAT_Entry
Definition
types.h:91
EF_DAT_Entry::effDataTable_name
char * effDataTable_name
Definition
types.h:93
EF_DAT_Entry::ef_DAT_file
char * ef_DAT_file
Definition
types.h:92
EF_DAT_Entry::data
void * data
Definition
types.h:94
EF_EffectDesc
Definition
types.h:76
EF_EffectDesc::lifetime
float lifetime
Definition
types.h:77
EF_EffectDesc::model_desc
StaticModelDesc model_desc
Definition
types.h:78
EF_Effect
Definition
types.h:59
EF_Effect::lifetime
u16 lifetime
Definition
types.h:67
EF_Effect::attach_jobj
HSD_JObj * attach_jobj
Definition
types.h:63
EF_Effect::is_async
u8 is_async
Definition
types.h:71
EF_Effect::x2A
s8 x2A
Definition
types.h:72
EF_Effect::update
EF_UpdateFn update
Definition
types.h:64
EF_Effect::next
EF_Effect * next
Definition
types.h:60
EF_Effect::state_flags
u8 state_flags
Definition
types.h:70
EF_Effect::parent_gobj
HSD_GObj * parent_gobj
Definition
types.h:62
EF_Effect::params
Vec3 params
Definition
types.h:66
EF_Effect::expire_flags
s8 expire_flags
Definition
types.h:68
EF_Effect::user_data
void * user_data
Definition
types.h:65
EF_Effect::x2B
s8 x2B
Definition
types.h:73
EF_Effect::gobj
HSD_GObj * gobj
Definition
types.h:61
EF_Effect::scale_flags
u8 scale_flags
Definition
types.h:69
EF_QueuedEffect_ObjAlloc
Definition
types.h:98
EF_QueuedEffect_ObjAlloc::pad_0
char pad_0[0x24]
Definition
types.h:99
EF_QueuedEffect
Definition
types.h:81
EF_QueuedEffect::next
EF_QueuedEffect * next
Definition
types.h:82
EF_QueuedEffect::extra2
f32 extra2
Definition
types.h:88
EF_QueuedEffect::spawn_kind
u8 spawn_kind
Definition
types.h:83
EF_QueuedEffect::extra1
f32 extra1
Definition
types.h:87
EF_QueuedEffect::jobj
HSD_JObj * jobj
Definition
types.h:85
EF_QueuedEffect::gfx_id
s32 gfx_id
Definition
types.h:84
EF_QueuedEffect::params
Vec3 params
Definition
types.h:86
HSD_GObj
Definition
gobj.h:13
HSD_JObj
Definition
jobj.h:104
StaticModelDesc
Model with a single animation or no animation.
Definition
types.h:8
forward.h
src
melee
ef
types.h
Generated by
1.17.0