Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/FBZ/BigSqueeze.h
338 views
1
#ifndef OBJ_BIGSQUEEZE_H
2
#define OBJ_BIGSQUEEZE_H
3
4
#include "Game.h"
5
6
typedef enum {
7
BIGSQUEEZE_MANAGER,
8
BIGSQUEEZE_BOSS,
9
BIGSQUEEZE_CRUSHER_L,
10
BIGSQUEEZE_CRUSHER_R,
11
} BigSqueezeTypes;
12
13
// Object Class
14
struct ObjectBigSqueeze {
15
RSDK_OBJECT
16
TABLE(int32 prongDebrisInfo[10], { 3, 12, -0x20000, -0x10000, 13, 0, -0x10000, 14, 0x20000, -0x10000 });
17
TABLE(int32 domeDebrisInfo[13], { 4, 8, -0x20000, -0x10000, 9, -0x10000, -0x10000, 10, 0x10000, -0x10000, 11, 0x20000, -0x10000 });
18
TABLE(int32 baseDebrisInfo[25], { 8, 0, -0x20000, -0x10000, 1, -0x10000, -0x10000, 2, 0x10000, -0x10000, 3, 0x20000, -0x10000, 4, -0x20000,
19
-0x8000, 5, -0x10000, -0x8000, 6, 0x10000, -0x8000, 7, 0x20000, -0x8000 });
20
int32 crusherX[4];
21
bool32 isCrushing;
22
int32 crushTimer;
23
int32 boundsB;
24
uint16 sfxBossHit;
25
uint16 sfxExplosion2;
26
uint16 sfxMagnet;
27
uint16 sfxOrbinaut;
28
uint16 aniFrames;
29
};
30
31
// Entity Class
32
struct EntityBigSqueeze {
33
RSDK_ENTITY
34
StateMachine(state);
35
StateMachine(stateDraw);
36
BigSqueezeTypes type;
37
int32 setupTimer;
38
int32 invincibilityTimer;
39
int32 timer;
40
EntityEggman *eggman;
41
bool32 invincible;
42
Animator animator;
43
Animator domeAnimator;
44
Animator prongsAnimator;
45
Animator wheelAnimator;
46
Animator electricAnimator;
47
Hitbox hitbox;
48
};
49
50
// Object Struct
51
extern ObjectBigSqueeze *BigSqueeze;
52
53
// Standard Entity Events
54
void BigSqueeze_Update(void);
55
void BigSqueeze_LateUpdate(void);
56
void BigSqueeze_StaticUpdate(void);
57
void BigSqueeze_Draw(void);
58
void BigSqueeze_Create(void *data);
59
void BigSqueeze_StageLoad(void);
60
#if GAME_INCLUDE_EDITOR
61
void BigSqueeze_EditorDraw(void);
62
void BigSqueeze_EditorLoad(void);
63
#endif
64
void BigSqueeze_Serialize(void);
65
66
// Extra Entity Functions
67
bool32 BigSqueeze_SfxCheck_Rumble(void);
68
69
void BigSqueeze_HandleWallCollisions(void);
70
void BigSqueeze_CheckPlayerCollisions_Vulnerable(void);
71
void BigSqueeze_CheckPlayerCollisions_Electrified(void);
72
void BigSqueeze_Hit(void);
73
void BigSqueeze_Explode(void);
74
75
void BigSqueeze_HandleBossMovement(void);
76
void BigSqueeze_SpawnDebris(int32 *debrisInfo);
77
78
void BigSqueeze_Draw_Boss(void);
79
void BigSqueeze_Draw_Crusher(void);
80
81
void BigSqueeze_StateManager_SetupIntro(void);
82
void BigSqueeze_StateManager_SetupEggman(void);
83
void BigSqueeze_StateManager_SetupArena(void);
84
void BigSqueeze_StateManager_SetupBoss(void);
85
86
void BigSqueeze_StateBoss_Idle(void);
87
void BigSqueeze_StateBoss_Electrified(void);
88
void BigSqueeze_StateBoss_Destroyed(void);
89
void BigSqueeze_StateBoss_DropSignPost(void);
90
void BigSqueeze_StateManager_HandleOutro(void);
91
92
void BigSqueeze_StateManager_HandleBoss(void);
93
94
void BigSqueeze_StateCrusher_BeginCrushing(void);
95
void BigSqueeze_StateCrusher_Crushing(void);
96
97
#endif //! OBJ_BIGSQUEEZE_H
98
99