Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/MSZ/RollerMKII.h
338 views
1
#ifndef OBJ_ROLLERMKII_H
2
#define OBJ_ROLLERMKII_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectRollerMKII {
8
RSDK_OBJECT
9
Hitbox hitboxBadnik;
10
Hitbox hitboxObject;
11
Hitbox hitboxInner_Rolling;
12
Hitbox hitboxOuter_Rolling;
13
Hitbox hitboxInner_Idle;
14
Hitbox hitboxOuter_Idle;
15
uint16 aniFrames;
16
uint16 sfxBumper;
17
uint16 sfxJump;
18
uint16 sfxDropDash;
19
uint16 sfxRelease;
20
uint16 sfxSkidding;
21
};
22
23
// Entity Class
24
struct EntityRollerMKII {
25
RSDK_ENTITY
26
StateMachine(state);
27
Vector2 startPos;
28
uint8 startDir;
29
uint8 timer;
30
bool32 touchedGround;
31
EntityPlayer *playerPtr;
32
Animator animator;
33
};
34
35
// Object Struct
36
extern ObjectRollerMKII *RollerMKII;
37
38
// Standard Entity Events
39
void RollerMKII_Update(void);
40
void RollerMKII_LateUpdate(void);
41
void RollerMKII_StaticUpdate(void);
42
void RollerMKII_Draw(void);
43
void RollerMKII_Create(void *data);
44
void RollerMKII_StageLoad(void);
45
#if GAME_INCLUDE_EDITOR
46
void RollerMKII_EditorDraw(void);
47
void RollerMKII_EditorLoad(void);
48
#endif
49
void RollerMKII_Serialize(void);
50
51
// Extra Entity Functions
52
void RollerMKII_DebugSpawn(void);
53
void RollerMKII_DebugDraw(void);
54
55
void RollerMKII_CheckOffScreen(void);
56
57
void RollerMKII_CheckPlayerCollisions(void);
58
void RollerMKII_CheckPlayerCollisions_Rolling(void);
59
int32 RollerMKII_HandleObjectCollisions(Entity *otherEntity, Hitbox *hitbox);
60
bool32 RollerMKII_HandlePlatformCollisions(EntityPlatform *platform);
61
void RollerMKII_HandleCollisions(void);
62
63
void RollerMKII_State_Init(void);
64
void RollerMKII_State_Idle(void);
65
void RollerMKII_State_SpinUp(void);
66
void RollerMKII_State_RollDelay(void);
67
void RollerMKII_State_Rolling_Air(void);
68
void RollerMKII_State_Rolling_Ground(void);
69
void RollerMKII_State_Bumped(void);
70
71
#endif //! OBJ_ROLLERMKII_H
72
73