Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/CPZ/Bubbler.h
338 views
1
#ifndef OBJ_BUBBLER_H
2
#define OBJ_BUBBLER_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectBubbler {
8
RSDK_OBJECT
9
Hitbox hitboxBadnik;
10
Hitbox hitboxRange;
11
Hitbox hitboxProjectile;
12
uint16 aniFrames;
13
};
14
15
// Entity Class
16
struct EntityBubbler {
17
RSDK_ENTITY
18
StateMachine(state);
19
int16 timer;
20
uint16 spawnTimer;
21
Vector2 startPos;
22
uint8 startDir;
23
Animator bodyHitbox;
24
Animator flameAnimator;
25
};
26
27
// Object Entity
28
extern ObjectBubbler *Bubbler;
29
30
// Standard Entity Events
31
void Bubbler_Update(void);
32
void Bubbler_LateUpdate(void);
33
void Bubbler_StaticUpdate(void);
34
void Bubbler_Draw(void);
35
void Bubbler_Create(void *data);
36
void Bubbler_StageLoad(void);
37
#if GAME_INCLUDE_EDITOR
38
void Bubbler_EditorDraw(void);
39
void Bubbler_EditorLoad(void);
40
#endif
41
void Bubbler_Serialize(void);
42
43
// Extra Entity Functions
44
void Bubbler_DebugSpawn(void);
45
void Bubbler_DebugDraw(void);
46
47
void Bubbler_HandleInteractions(void);
48
void Bubbler_HandleProjectileInteractions(void);
49
void Bubbler_CheckOffScreen(void);
50
51
void Bubbler_State_Init(void);
52
void Bubbler_State_MotherPatrol(void);
53
void Bubbler_State_FoundPlayer(void);
54
void Bubbler_State_AttackPlayer(void);
55
56
void Bubbler_StateProjectile_Seed(void);
57
void Bubbler_StateProjectile_Bubbler(void);
58
59
#endif //! OBJ_BUBBLER_H
60
61