Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/Common/Projectile.h
338 views
1
#ifndef OBJ_PROJECTILE_H
2
#define OBJ_PROJECTILE_H
3
4
#include "Game.h"
5
6
typedef enum {
7
PROJECTILE_NOTHING,
8
PROJECTILE_FIRE,
9
PROJECTILE_ELECTRIC,
10
PROJECTILE_UNUSED1,
11
PROJECTILE_BASIC,
12
PROJECTILE_UNUSED2,
13
PROJECTILE_UNUSED3,
14
PROJECTILE_BASIC2
15
} ProjectileTypes;
16
17
// Object Class
18
struct ObjectProjectile {
19
RSDK_OBJECT
20
};
21
22
// Entity Class
23
struct EntityProjectile {
24
RSDK_ENTITY
25
StateMachine(state);
26
int32 type;
27
bool32 isProjectile;
28
int32 timer;
29
int32 hurtDelay;
30
int32 gravityStrength;
31
int32 rotationSpeed;
32
Hitbox hitbox;
33
Animator animator;
34
};
35
36
// Object Struct
37
extern ObjectProjectile *Projectile;
38
39
// Standard Entity Events
40
void Projectile_Update(void);
41
void Projectile_LateUpdate(void);
42
void Projectile_StaticUpdate(void);
43
void Projectile_Draw(void);
44
void Projectile_Create(void *data);
45
void Projectile_StageLoad(void);
46
#if GAME_INCLUDE_EDITOR
47
void Projectile_EditorDraw(void);
48
void Projectile_EditorLoad(void);
49
#endif
50
void Projectile_Serialize(void);
51
52
// Extra Entity Functions
53
void Projectile_CheckPlayerCollisions(void);
54
void Projectile_State_Move(void);
55
void Projectile_State_MoveGravity(void);
56
57
#endif //! OBJ_PROJECTILE_H
58
59