Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/PGZ/Dragonfly.h
338 views
1
#ifndef OBJ_DRAGONFLY_H
2
#define OBJ_DRAGONFLY_H
3
4
#include "Game.h"
5
6
#define DRAGONFLY_SPINE_COUNT (6)
7
8
// Object Class
9
struct ObjectDragonfly {
10
RSDK_OBJECT
11
Hitbox hitboxBadnik;
12
Hitbox hitboxSpine;
13
uint16 aniFrames;
14
};
15
16
// Entity Class
17
struct EntityDragonfly {
18
RSDK_ENTITY
19
StateMachine(state);
20
uint8 dir;
21
uint8 dist;
22
uint8 speed;
23
Vector2 positions[DRAGONFLY_SPINE_COUNT];
24
uint8 directions[DRAGONFLY_SPINE_COUNT];
25
Vector2 startPos;
26
Animator animator;
27
Animator wingAnimator;
28
Animator bodyAnimator;
29
};
30
31
// Object Struct
32
extern ObjectDragonfly *Dragonfly;
33
34
// Standard Entity Events
35
void Dragonfly_Update(void);
36
void Dragonfly_LateUpdate(void);
37
void Dragonfly_StaticUpdate(void);
38
void Dragonfly_Draw(void);
39
void Dragonfly_Create(void *data);
40
void Dragonfly_StageLoad(void);
41
#if GAME_INCLUDE_EDITOR
42
void Dragonfly_EditorDraw(void);
43
void Dragonfly_EditorLoad(void);
44
#endif
45
void Dragonfly_Serialize(void);
46
47
// Extra Entity Functions
48
void Dragonfly_DebugDraw(void);
49
void Dragonfly_DebugSpawn(void);
50
51
void Dragonfly_CheckPlayerCollisions(void);
52
53
void Dragonfly_State_Init(void);
54
void Dragonfly_State_Move(void);
55
void Dragonfly_State_Debris(void);
56
57
#endif //! OBJ_DRAGONFLY_H
58
59