Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/HPZ/Redz.h
338 views
1
#ifndef OBJ_REDZ_H
2
#define OBJ_REDZ_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectRedz {
8
RSDK_OBJECT
9
Hitbox hitboxBadnik;
10
Hitbox attackbox;
11
Hitbox hitboxFlame;
12
Hitbox hitboxRange;
13
uint16 aniFrames;
14
uint16 sfxFlame;
15
};
16
17
// Entity Class
18
struct EntityRedz {
19
RSDK_ENTITY
20
StateMachine(state);
21
Vector2 startPos;
22
uint8 startDir;
23
uint16 timer;
24
uint16 attackDelay;
25
Animator animator;
26
};
27
28
// Object Entity
29
extern ObjectRedz *Redz;
30
31
// Standard Entity Events
32
void Redz_Update(void);
33
void Redz_LateUpdate(void);
34
void Redz_StaticUpdate(void);
35
void Redz_Draw(void);
36
void Redz_Create(void *data);
37
void Redz_StageLoad(void);
38
#if GAME_INCLUDE_EDITOR
39
void Redz_EditorDraw(void);
40
void Redz_EditorLoad(void);
41
#endif
42
void Redz_Serialize(void);
43
44
// Extra Entity Functions
45
void Redz_DebugSpawn(void);
46
void Redz_DebugDraw(void);
47
48
void Redz_CheckPlayerCollisions(void);
49
50
void Redz_State_Init(void);
51
void Redz_State_Walk(void);
52
void Redz_State_Turn(void);
53
void Redz_State_PrepareAttack(void);
54
void Redz_State_Attack(void);
55
void Redz_Flame_Setup(void);
56
void Redz_Flame_State(void);
57
58
#endif //! OBJ_REDZ_H
59
60