Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/MMZ/EggPistonsMKII.h
338 views
1
#ifndef OBJ_EGGPISTONSMKII_H
2
#define OBJ_EGGPISTONSMKII_H
3
4
#include "Game.h"
5
6
typedef enum {
7
EGGPISTON_PISTON,
8
EGGPISTON_CONTROL,
9
EGGPISTON_EMITTER,
10
EGGPISTON_BARRIER,
11
EGGPISTON_PLASMABALL,
12
EGGPISTON_ALARM,
13
} EggPistonMKIITypes;
14
15
// Object Class
16
struct ObjectEggPistonsMKII {
17
RSDK_OBJECT
18
int32 invincibilityTimer;
19
int32 health;
20
int32 alarmAngle;
21
int32 alarmTimer;
22
EntityEggPistonsMKII *controller;
23
EntityEggPistonsMKII *pistons[5];
24
uint8 pistonCount;
25
uint8 isPhase2;
26
uint8 pistonID;
27
uint16 aniFrames;
28
uint16 eggmanFrames;
29
uint16 sfxHit;
30
uint16 sfxWall;
31
uint16 sfxElectrify;
32
uint16 sfxExplosion;
33
uint16 sfxAlarm;
34
};
35
36
// Entity Class
37
struct EntityEggPistonsMKII {
38
RSDK_ENTITY
39
StateMachine(state);
40
StateMachine(stateDraw);
41
uint8 type;
42
int32 timer;
43
int32 pistonID;
44
EntityEggPistonsMKII *parent;
45
Animator mainAnimator;
46
Animator altAnimator;
47
Hitbox hitbox;
48
};
49
50
// Object Struct
51
extern ObjectEggPistonsMKII *EggPistonsMKII;
52
53
// Standard Entity Events
54
void EggPistonsMKII_Update(void);
55
void EggPistonsMKII_LateUpdate(void);
56
void EggPistonsMKII_StaticUpdate(void);
57
void EggPistonsMKII_Draw(void);
58
void EggPistonsMKII_Create(void *data);
59
void EggPistonsMKII_StageLoad(void);
60
#if GAME_INCLUDE_EDITOR
61
void EggPistonsMKII_EditorDraw(void);
62
void EggPistonsMKII_EditorLoad(void);
63
#endif
64
void EggPistonsMKII_Serialize(void);
65
66
// Extra Entity Functions
67
void EggPistonsMKII_CheckPlayerCollisions_Piston(void);
68
void EggPistonsMKII_CheckPlayerCollisions_EggPiston(void);
69
void EggPistonsMKII_CheckPlayerCollisions_Ball(void);
70
void EggPistonsMKII_CheckPlayerCollisions_Solid(void);
71
72
void EggPistonsMKII_Hit(void);
73
void EggPistonsMKII_Explode(void);
74
75
EntityEggPistonsMKII *EggPistonsMKII_GetNextPiston(void);
76
void EggPistonsMKII_SpawnElecBall(void);
77
bool32 EggPistonsMKII_CheckPlayerAttacking(EntityPlayer *player);
78
79
void EggPistonsMKII_State_SetupArena(void);
80
void EggPistonsMKII_State_EnterBoss(void);
81
void EggPistonsMKII_State_PistonReveal(void);
82
void EggPistonsMKII_State_ClassicMode(void);
83
void EggPistonsMKII_State_StartPinchMode(void);
84
void EggPistonsMKII_State_PinchMode(void);
85
void EggPistonsMKII_State_Destroyed(void);
86
void EggPistonsMKII_State_Finish(void);
87
88
void EggPistonsMKII_StatePiston_Idle(void);
89
void EggPistonsMKII_StatePiston_Shaking(void);
90
void EggPistonsMKII_StatePiston_BeginCrushing(void);
91
void EggPistonsMKII_StatePiston_CrushExtend(void);
92
void EggPistonsMKII_StatePiston_Retract(void);
93
void EggPistonsMKII_StatePiston_Explode(void);
94
95
void EggPistonsMKII_StateOrbGenerator_Idle(void);
96
void EggPistonsMKII_StateOrbGenerator_Warning(void);
97
98
void EggPistonsMKII_StateOrb_MoveToTargetPos(void);
99
void EggPistonsMKII_StateOrb_Charging(void);
100
void EggPistonsMKII_StateOrb_Attacking(void);
101
102
void EggPistonsMKII_StateAlarm_Active(void);
103
void EggPistonsMKII_StateAlarm_Destroyed(void);
104
105
void EggPistonsMKII_StateBarrier_Solid(void);
106
void EggPistonsMKII_StateBarrier_Explode(void);
107
108
#endif //! OBJ_EGGPISTONSMKII_H
109
110