Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/FBZ/Cylinder.h
338 views
1
#ifndef OBJ_CYLINDER_H
2
#define OBJ_CYLINDER_H
3
4
#include "Game.h"
5
6
typedef enum {
7
CYLINDER_TUBE_H,
8
CYLINDER_TUBE_V,
9
CYLINDER_SPIRAL_LR,
10
CYLINDER_SPIRAL_RL,
11
CYLINDER_INKROLLER,
12
CYLINDER_FIXED_V_L,
13
CYLINDER_FIXED_V_R,
14
CYLINDER_PILLAR,
15
} CylinderTypes;
16
17
// Object Class
18
struct ObjectCylinder {
19
RSDK_OBJECT
20
// unused, all frames are calculated on the fly
21
TABLE(int32 frameTable[24], { 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13 });
22
Animator animator;
23
uint16 aniFrames;
24
};
25
26
// Entity Class
27
struct EntityCylinder {
28
RSDK_ENTITY
29
StateMachine(state);
30
uint8 type;
31
int32 length;
32
int32 radius;
33
int32 unused1;
34
int32 playerStatus[PLAYER_COUNT];
35
int32 playerAngles[PLAYER_COUNT];
36
Hitbox hitboxRange;
37
Hitbox hitboxSize;
38
Hitbox hitboxL;
39
Hitbox hitboxR;
40
};
41
42
// Object Struct
43
extern ObjectCylinder *Cylinder;
44
45
// Standard Entity Events
46
void Cylinder_Update(void);
47
void Cylinder_LateUpdate(void);
48
void Cylinder_StaticUpdate(void);
49
void Cylinder_Draw(void);
50
void Cylinder_Create(void *data);
51
void Cylinder_StageLoad(void);
52
#if GAME_INCLUDE_EDITOR
53
void Cylinder_EditorDraw(void);
54
void Cylinder_EditorLoad(void);
55
#endif
56
void Cylinder_Serialize(void);
57
58
// Extra Entity Functions
59
void Cylinder_State_TubeH(void);
60
void Cylinder_State_TubeV(void);
61
void Cylinder_State_Spiral(void);
62
void Cylinder_State_InkRoller(void);
63
void Cylinder_State_Pillar(void);
64
65
void Cylinder_PlayerState_InkRoller_Stand(void);
66
void Cylinder_PlayerState_InkRoller_Roll(void);
67
void Cylinder_PlayerState_Pillar(void);
68
void Cylinder_PlayerState_Spiral(void);
69
70
#endif //! OBJ_CYLINDER_H
71
72