Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/GHZ/Chopper.h
338 views
1
#ifndef OBJ_CHOPPER_H
2
#define OBJ_CHOPPER_H
3
4
#include "Game.h"
5
6
typedef enum { CHOPPER_JUMP, CHOPPER_SWIM } ChopperTypes;
7
8
// Object Class
9
struct ObjectChopper {
10
RSDK_OBJECT
11
Hitbox hitboxJump;
12
Hitbox hitboxSwim;
13
Hitbox hitboxRange;
14
Hitbox hitboxWater;
15
uint16 aniFrames;
16
};
17
18
// Entity Class
19
struct EntityChopper {
20
RSDK_ENTITY
21
StateMachine(state);
22
uint8 type;
23
uint16 timer;
24
bool32 charge;
25
Vector2 startPos;
26
uint8 startDir;
27
Animator animator;
28
};
29
30
// Object Struct
31
extern ObjectChopper *Chopper;
32
33
// Standard Entity Events
34
void Chopper_Update(void);
35
void Chopper_LateUpdate(void);
36
void Chopper_StaticUpdate(void);
37
void Chopper_Draw(void);
38
void Chopper_Create(void *data);
39
void Chopper_StageLoad(void);
40
#if GAME_INCLUDE_EDITOR
41
void Chopper_EditorDraw(void);
42
void Chopper_EditorLoad(void);
43
#endif
44
void Chopper_Serialize(void);
45
46
// Extra Entity Functions
47
void Chopper_DebugDraw(void);
48
void Chopper_DebugSpawn(void);
49
50
void Chopper_CheckOffScreen(void);
51
void Chopper_CheckPlayerCollisions_Jump(void);
52
void Chopper_CheckPlayerCollisions_Swim(void);
53
54
// States
55
void Chopper_State_Init(void);
56
void Chopper_State_Jump(void);
57
void Chopper_State_Swim(void);
58
void Chopper_State_ChargeDelay(void);
59
void Chopper_State_Charge(void);
60
61
#endif //! OBJ_CHOPPER_H
62
63