Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/SPZ/DirectorChair.h
338 views
1
#ifndef OBJ_DIRECTORCHAIR_H
2
#define OBJ_DIRECTORCHAIR_H
3
4
#include "Game.h"
5
6
typedef enum {
7
DIRECTORCHAIR_CLOSED,
8
DIRECTORCHAIR_STRETCHED,
9
} DirectorChairTypes;
10
11
// Object Class
12
struct ObjectDirectorChair {
13
RSDK_OBJECT
14
uint8 extendCount;
15
uint8 retractCount;
16
uint16 aniFrames;
17
Hitbox hitboxChair;
18
Hitbox hitboxL;
19
Hitbox hitboxR;
20
uint16 sfxUnravel;
21
uint16 sfxExtend;
22
uint16 sfxRetract;
23
};
24
25
// Entity Class
26
struct EntityDirectorChair {
27
// Platform "Inherit"
28
RSDK_ENTITY
29
StateMachine(state);
30
StateMachine(stateCollide);
31
int32 type;
32
Vector2 amplitude;
33
int32 speed;
34
bool32 hasTension;
35
int8 frameID;
36
uint8 collision;
37
Vector2 tileOrigin;
38
Vector2 centerPos;
39
Vector2 drawPos;
40
Vector2 collisionOffset;
41
int32 stood;
42
int32 timer;
43
int32 size;
44
uint8 stoodPlayers;
45
uint8 pushPlayersL;
46
uint8 pushPlayersR;
47
Hitbox hitbox;
48
Animator animator;
49
int32 childCount;
50
51
Animator scissorAnimator;
52
int32 extendVel;
53
int32 minRetract;
54
int32 initExtendVel;
55
};
56
57
// Object Struct
58
extern ObjectDirectorChair *DirectorChair;
59
60
// Standard Entity Events
61
void DirectorChair_Update(void);
62
void DirectorChair_LateUpdate(void);
63
void DirectorChair_StaticUpdate(void);
64
void DirectorChair_Draw(void);
65
void DirectorChair_Create(void *data);
66
void DirectorChair_StageLoad(void);
67
#if GAME_INCLUDE_EDITOR
68
void DirectorChair_EditorDraw(void);
69
void DirectorChair_EditorLoad(void);
70
#endif
71
void DirectorChair_Serialize(void);
72
73
// Extra Entity Functions
74
void DirectorChair_Collide_Chair(void);
75
76
void DirectorChair_State_Idle(void);
77
void DirectorChair_State_StartExtend(void);
78
void DirectorChair_State_Extend(void);
79
void DirectorChair_State_StartRetract(void);
80
void DirectorChair_State_Retract(void);
81
82
#endif //! OBJ_DIRECTORCHAIR_H
83
84