Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/Common/Eggman.h
338 views
1
#ifndef OBJ_EGGMAN_H
2
#define OBJ_EGGMAN_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectEggman {
8
RSDK_OBJECT
9
uint16 aniFrames;
10
};
11
12
// Entity Class
13
struct EntityEggman {
14
RSDK_ENTITY
15
StateMachine(state);
16
StateMachine(nextState);
17
int32 timer;
18
uint16 animID;
19
Entity *parent;
20
Vector2 offset;
21
Hitbox hitbox;
22
Animator animator;
23
};
24
25
// Object Struct
26
extern ObjectEggman *Eggman;
27
28
// Standard Entity Events
29
void Eggman_Update(void);
30
void Eggman_LateUpdate(void);
31
void Eggman_StaticUpdate(void);
32
void Eggman_Draw(void);
33
void Eggman_Create(void *data);
34
void Eggman_StageLoad(void);
35
#if GAME_INCLUDE_EDITOR
36
void Eggman_EditorDraw(void);
37
void Eggman_EditorLoad(void);
38
#endif
39
void Eggman_Serialize(void);
40
41
// Extra Entity Functions
42
void Eggman_State_ProcessAnimation(void);
43
void Eggman_State_ProcessThenSet(void);
44
void Eggman_State_ProcessUntilEnd(void);
45
void Eggman_State_ProcessAirThenSet(void);
46
void Eggman_State_FallUntilTimerReset(void);
47
void Eggman_State_FallAndCollide(void);
48
void Eggman_State_WalkOffScreen(void);
49
50
#endif //! OBJ_EGGMAN_H
51
52