Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/Global/EggPrison.h
338 views
1
#ifndef OBJ_EGGPRISON_H
2
#define OBJ_EGGPRISON_H
3
4
#include "Game.h"
5
6
typedef enum {
7
EGGPRISON_NORMAL,
8
EGGPRISON_FLYING,
9
EGGPRISON_DUD,
10
EGGPRISON_RINGS,
11
EGGPRISON_TRAP,
12
EGGPRISON_SPRING,
13
} EggPrisonTypes;
14
15
// Object Class
16
struct ObjectEggPrison {
17
RSDK_OBJECT
18
uint16 aniFrames;
19
uint16 sfxDestroy;
20
uint16 sfxSpring;
21
};
22
23
// Entity Class
24
struct EntityEggPrison {
25
RSDK_ENTITY
26
StateMachine(state);
27
EggPrisonTypes type;
28
int32 timer;
29
int32 originY;
30
int32 buttonPos;
31
int32 notSolid;
32
int32 checkTileCollisions;
33
Hitbox hitboxSolid;
34
Hitbox hitboxButton;
35
Hitbox hitboxButtonTrigger;
36
Animator capsuleAnimator;
37
Animator propellerAnimator;
38
Animator panelAnimator;
39
Animator buttonAnimator;
40
};
41
42
// Object Struct
43
extern ObjectEggPrison *EggPrison;
44
45
// Standard Entity Events
46
void EggPrison_Update(void);
47
void EggPrison_LateUpdate(void);
48
void EggPrison_StaticUpdate(void);
49
void EggPrison_Draw(void);
50
void EggPrison_Create(void *data);
51
void EggPrison_StageLoad(void);
52
#if GAME_INCLUDE_EDITOR
53
void EggPrison_EditorDraw(void);
54
void EggPrison_EditorLoad(void);
55
#endif
56
void EggPrison_Serialize(void);
57
58
// Extra Entity Functions
59
void EggPrison_HandleMovement(void);
60
61
void EggPrison_State_Init(void);
62
void EggPrison_State_Idle(void);
63
void EggPrison_State_Opened(void);
64
void EggPrison_State_Explode(void);
65
void EggPrison_State_SetupActClear(void);
66
void EggPrison_State_FlyOffScreen(void);
67
68
#endif //! OBJ_EGGPRISON_H
69
70