Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/TMZ/GymBar.h
338 views
1
#ifndef OBJ_GYMBAR_H
2
#define OBJ_GYMBAR_H
3
4
#include "Game.h"
5
6
typedef enum { GYMBAR_HORIZONTAL, GYMBAR_VERTICAL } GymBarTypes;
7
8
// Object Class
9
struct ObjectGymBar {
10
RSDK_OBJECT
11
uint16 aniFrames;
12
uint16 sfxBumper;
13
};
14
15
// Entity Class
16
struct EntityGymBar {
17
RSDK_ENTITY
18
int32 type;
19
int32 size;
20
bool32 noSwing;
21
uint8 playerTimers[PLAYER_COUNT];
22
int32 maxX;
23
int32 minX;
24
Animator animator;
25
Hitbox hitbox;
26
};
27
28
// Object Struct
29
extern ObjectGymBar *GymBar;
30
31
// Standard Entity Events
32
void GymBar_Update(void);
33
void GymBar_LateUpdate(void);
34
void GymBar_StaticUpdate(void);
35
void GymBar_Draw(void);
36
void GymBar_Create(void *data);
37
void GymBar_StageLoad(void);
38
#if GAME_INCLUDE_EDITOR
39
void GymBar_EditorDraw(void);
40
void GymBar_EditorLoad(void);
41
#endif
42
void GymBar_Serialize(void);
43
44
// Extra Entity Functions
45
void GymBar_DebugSpawn(void);
46
void GymBar_DebugDraw(void);
47
48
void GymBar_HandlePlayerInteractions(void);
49
50
void GymBar_HandleSwingJump(void);
51
void GymBar_PlayerState_SwingV(void);
52
void GymBar_PlayerState_Hang(void);
53
void GymBar_PlayerState_SwingH(void);
54
55
#endif //! OBJ_GYMBAR_H
56
57