Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/PGZ/Press.h
338 views
1
#ifndef OBJ_PRESS_H
2
#define OBJ_PRESS_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectPress {
8
RSDK_OBJECT
9
uint16 aniFrames;
10
Hitbox hitbox;
11
uint16 sfxImpact;
12
uint16 sfxPress;
13
#if MANIA_USE_PLUS
14
bool32 canSuper;
15
#endif
16
};
17
18
// Entity Class
19
struct EntityPress {
20
RSDK_ENTITY
21
StateMachine(state);
22
uint16 size;
23
uint32 speed;
24
int32 offTop;
25
int32 offBottom;
26
int32 topOffset;
27
uint32 threads;
28
int32 height;
29
int32 timerStart;
30
int32 timer;
31
Vector2 drawPos;
32
uint16 threadSprY;
33
uint8 stoodPlayersRoof;
34
uint8 stoodPlayersFloor;
35
Animator crusherAnimator;
36
Animator threadAnimator;
37
Animator bumperAnimator;
38
};
39
40
// Object Struct
41
extern ObjectPress *Press;
42
43
// Standard Entity Events
44
void Press_Update(void);
45
void Press_LateUpdate(void);
46
void Press_StaticUpdate(void);
47
void Press_Draw(void);
48
void Press_Create(void *data);
49
void Press_StageLoad(void);
50
#if GAME_INCLUDE_EDITOR
51
void Press_EditorDraw(void);
52
void Press_EditorLoad(void);
53
#endif
54
void Press_Serialize(void);
55
56
// Extra Entity Functions
57
#if MANIA_USE_PLUS
58
bool32 Press_CheckCanSuper(bool32 isHUD);
59
#endif
60
void Press_Move(void);
61
void Press_State_Crush(void);
62
void Press_State_FinalCrush(void);
63
void Press_HandleMovement(void);
64
void Press_State_HandleCrates(void);
65
void Press_DrawHandle(void);
66
67
#endif //! OBJ_PRESS_H
68
69