Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/CPZ/CPZBoss.h
338 views
1
#ifndef OBJ_CPZBOSS_H
2
#define OBJ_CPZBOSS_H
3
4
#include "Game.h"
5
6
typedef enum {
7
CPZBOSS_PLAYER,
8
CPZBOSS_EGGMAN,
9
} CPZBossTypes;
10
11
// Object Class
12
struct ObjectCPZBoss {
13
RSDK_OBJECT
14
Hitbox hitboxPlayerTrigger;
15
EntityPuyoMatch *managers[2];
16
uint16 hudSlotID;
17
uint16 aniFrames;
18
uint16 playerFrames;
19
uint16 sfxExplosion;
20
};
21
22
// Entity Class
23
struct EntityCPZBoss {
24
RSDK_ENTITY
25
StateMachine(state);
26
uint8 type;
27
int32 timer;
28
Vector2 startPos;
29
Vector2 explosionPos;
30
Animator panelAnimator;
31
Animator enterAnimator;
32
Animator characterAnimator;
33
};
34
35
// Object Struct
36
extern ObjectCPZBoss *CPZBoss;
37
38
// Standard Entity Events
39
void CPZBoss_Update(void);
40
void CPZBoss_LateUpdate(void);
41
void CPZBoss_StaticUpdate(void);
42
void CPZBoss_Draw(void);
43
void CPZBoss_Create(void *data);
44
void CPZBoss_StageLoad(void);
45
#if GAME_INCLUDE_EDITOR
46
void CPZBoss_EditorDraw(void);
47
void CPZBoss_EditorLoad(void);
48
#endif
49
void CPZBoss_Serialize(void);
50
51
// Extra Entity Functions
52
void CPZBoss_DrawHook_SetupPuyoHUD(void);
53
void CPZBoss_DrawHook_RemovePuyoHUD(void);
54
55
void CPZBoss_Explode_Eggman(void);
56
void CPZBoss_Explode_Player(void);
57
58
bool32 CPZBoss_CheckMatchReset(void);
59
60
void CPZBoss_State_SetupArena(void);
61
void CPZBoss_State_EnterPlayer(void);
62
void CPZBoss_State_CheckPlayerReady(void);
63
void CPZBoss_State_PlayPlayerEnterAnim(void);
64
void CPZBoss_State_SetupMatch(void);
65
void CPZBoss_State_HandleMatch_Player(void);
66
void CPZBoss_State_HandleMatch_Eggman(void);
67
void CPZBoss_State_HandleMatchFinish_EggmanLose(void);
68
void CPZBoss_State_PlayerWin(void);
69
void CPZBoss_State_HandleMatchFinish_PlayerLose(void);
70
void CPZBoss_State_EggmanFall(void);
71
void CPZBoss_State_PlayerExit(void);
72
void CPZBoss_State_Destroyed(void);
73
74
#endif //! OBJ_CPZBOSS_H
75
76