Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/SBZ/Bomb.h
338 views
1
#ifndef OBJ_BOMB_H
2
#define OBJ_BOMB_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectBomb {
8
RSDK_OBJECT
9
Hitbox hitboxHurt;
10
Hitbox hitboxRange;
11
Hitbox hitboxShrapnel;
12
uint16 aniFrames;
13
uint16 sfxExplosion;
14
};
15
16
// Entity Class
17
struct EntityBomb {
18
RSDK_ENTITY
19
StateMachine(state);
20
int32 planeFilter;
21
Vector2 startPos;
22
uint8 startDir;
23
int32 timer;
24
int32 fuseOffset;
25
Animator mainAnimator;
26
Animator fuseAnimator;
27
};
28
29
// Object Entity
30
extern ObjectBomb *Bomb;
31
32
// Standard Entity Events
33
void Bomb_Update(void);
34
void Bomb_LateUpdate(void);
35
void Bomb_StaticUpdate(void);
36
void Bomb_Draw(void);
37
void Bomb_Create(void *data);
38
void Bomb_StageLoad(void);
39
#if GAME_INCLUDE_EDITOR
40
void Bomb_EditorDraw(void);
41
void Bomb_EditorLoad(void);
42
#endif
43
void Bomb_Serialize(void);
44
45
// Extra Entity Functions
46
void Bomb_DebugSpawn(void);
47
void Bomb_DebugDraw(void);
48
49
void Bomb_CheckOffScreen(void);
50
void Bomb_CheckPlayerCollisions(void);
51
52
void Bomb_State_Init(void);
53
void Bomb_State_Walk(void);
54
void Bomb_State_Idle(void);
55
void Bomb_State_Explode(void);
56
void Bomb_State_Shrapnel(void);
57
58
#endif //! OBJ_BOMB_H
59
60