Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/FBZ/Blaster.h
338 views
1
#ifndef OBJ_BLASTER_H
2
#define OBJ_BLASTER_H
3
4
#include "Game.h"
5
6
typedef enum {
7
BLASTER_BADNIK,
8
BLASTER_SHOT,
9
BLASTER_SHELL,
10
} BlasterTypes;
11
12
// Object Class
13
struct ObjectBlaster {
14
RSDK_OBJECT
15
Hitbox hitboxBadnik;
16
Hitbox hitboxRange;
17
Hitbox hitboxProjectile;
18
uint16 aniFrames;
19
};
20
21
// Entity Class
22
struct EntityBlaster {
23
RSDK_ENTITY
24
StateMachine(state);
25
uint16 unused1;
26
uint16 timer;
27
uint16 attackTimer;
28
Vector2 startPos;
29
uint8 startDir;
30
Animator animator;
31
};
32
33
// Object Struct
34
extern ObjectBlaster *Blaster;
35
36
// Standard Entity Events
37
void Blaster_Update(void);
38
void Blaster_LateUpdate(void);
39
void Blaster_StaticUpdate(void);
40
void Blaster_Draw(void);
41
void Blaster_Create(void *data);
42
void Blaster_StageLoad(void);
43
#if GAME_INCLUDE_EDITOR
44
void Blaster_EditorDraw(void);
45
void Blaster_EditorLoad(void);
46
#endif
47
void Blaster_Serialize(void);
48
49
// Extra Entity Functions
50
void Blaster_DebugSpawn(void);
51
void Blaster_DebugDraw(void);
52
53
void Blaster_HandlePlayerInteractions(void);
54
void Blaster_CheckOffScreen(void);
55
56
void Blaster_State_Init(void);
57
void Blaster_State_Move(void);
58
void Blaster_State_HandleTurn(void);
59
void Blaster_State_AttackPlayer(void);
60
void Blaster_State_MagnetAttract(void);
61
void Blaster_State_MagnetReleased(void);
62
void Blaster_State_BeginShot(void);
63
void Blaster_State_Shot(void);
64
void Blaster_State_Fall(void);
65
void Blaster_State_Shell(void);
66
67
#endif //! OBJ_BLASTER_H
68
69