Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/GHZ/Fireball.h
338 views
1
#ifndef OBJ_FIREBALL_H
2
#define OBJ_FIREBALL_H
3
4
#include "Game.h"
5
6
typedef enum {
7
FIREBALL_SPAWNER,
8
FIREBALL_LAUNCHER_STATIC,
9
FIREBALL_LAUNCHER_GRAVITY,
10
} FireballTypes;
11
12
// Object Class
13
struct ObjectFireball {
14
RSDK_OBJECT
15
uint16 aniFrames;
16
Hitbox hitboxFireball;
17
uint16 sfxFireball;
18
};
19
20
// Entity Class
21
struct EntityFireball {
22
RSDK_ENTITY
23
StateMachine(state);
24
StateMachine(stateDraw);
25
Animator animator;
26
uint8 type;
27
uint8 interval;
28
uint8 intervalOffset;
29
int32 unused1;
30
int32 unused2;
31
};
32
33
// Object Entity
34
extern ObjectFireball *Fireball;
35
36
// Standard Entity Events
37
void Fireball_Update(void);
38
void Fireball_LateUpdate(void);
39
void Fireball_StaticUpdate(void);
40
void Fireball_Draw(void);
41
void Fireball_Create(void *data);
42
void Fireball_StageLoad(void);
43
#if GAME_INCLUDE_EDITOR
44
void Fireball_EditorDraw(void);
45
void Fireball_EditorLoad(void);
46
#endif
47
void Fireball_Serialize(void);
48
49
// Extra Entity Functions
50
void Fireball_HandlePlayerInteractions(void);
51
52
// Spawner States
53
void Fireball_State_Spawner(void);
54
void Fireball_State_LauncherStatic(void);
55
void Fireball_State_LauncherGravity(void);
56
57
// Fireball States
58
void Fireball_StateFireball_Spawner(void);
59
void Fireball_StateFireball_LauncherStatic(void);
60
void Fireball_StateFireball_LauncherGravity(void);
61
void Fireball_StateFireball_Dissipate(void);
62
63
void Fireball_Draw_Simple(void);
64
65
#endif //! OBJ_FIREBALL_H
66
67