Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/GHZ/Motobug.h
338 views
1
#ifndef OBJ_MOTOBUG_H
2
#define OBJ_MOTOBUG_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectMotobug {
8
RSDK_OBJECT
9
Hitbox hitboxBadnik;
10
uint16 aniFrames;
11
};
12
13
// Entity Class
14
struct EntityMotobug {
15
RSDK_ENTITY
16
StateMachine(state);
17
int32 turnTimer;
18
int32 timer;
19
Vector2 startPos;
20
uint8 startDir;
21
bool32 wasTurning;
22
Animator animator;
23
};
24
25
// Object Struct
26
extern ObjectMotobug *Motobug;
27
28
// Standard Entity Events
29
void Motobug_Update(void);
30
void Motobug_LateUpdate(void);
31
void Motobug_StaticUpdate(void);
32
void Motobug_Draw(void);
33
void Motobug_Create(void *data);
34
void Motobug_StageLoad(void);
35
#if GAME_INCLUDE_EDITOR
36
void Motobug_EditorDraw(void);
37
void Motobug_EditorLoad(void);
38
#endif
39
void Motobug_Serialize(void);
40
41
// Extra Entity Functions
42
void Motobug_DebugDraw(void);
43
void Motobug_DebugSpawn(void);
44
45
void Motobug_CheckOffScreen(void);
46
void Motobug_CheckPlayerCollisions(void);
47
48
// States
49
void Motobug_State_Init(void);
50
void Motobug_State_Move(void);
51
void Motobug_State_Idle(void);
52
void Motobug_State_Fall(void);
53
void Motobug_State_Turn(void);
54
void Motobug_State_Smoke(void);
55
56
#endif //! OBJ_MOTOBUG_H
57
58