Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/ERZ/ERZMystic.h
338 views
1
#ifndef OBJ_ERZMYSTIC_H
2
#define OBJ_ERZMYSTIC_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectERZMystic {
8
RSDK_OBJECT
9
uint16 aniFrames;
10
};
11
12
// Entity Class
13
struct EntityERZMystic {
14
RSDK_ENTITY
15
StateMachine(state);
16
StateMachine(stateDraw);
17
Vector2 originPos;
18
Vector2 mysticPos;
19
int32 mysticVelY;
20
int32 middleCupY;
21
int32 timer;
22
int32 invincibilityTimer;
23
int32 correctCup;
24
int32 cupPos[3];
25
int32 unused1[3];
26
int32 unused2[3];
27
int32 cupAlpha[3];
28
int32 swapCup1;
29
int32 swapCup2;
30
int32 swapCup1Pos;
31
int32 swapCup2Pos;
32
int32 swapCup1Alpha;
33
int32 swapCup2Alpha;
34
int32 cupSwapCount;
35
Animator mysticAnimator;
36
Animator cupAnimator;
37
Animator cupSilhouetteAnimator;
38
Animator cupSpikeAnimator; // Not actually ever drawn...
39
Animator cupBlastAnimator;
40
Hitbox hitbox;
41
};
42
43
// Object Struct
44
extern ObjectERZMystic *ERZMystic;
45
46
// Standard Entity Events
47
void ERZMystic_Update(void);
48
void ERZMystic_LateUpdate(void);
49
void ERZMystic_StaticUpdate(void);
50
void ERZMystic_Draw(void);
51
void ERZMystic_Create(void *data);
52
void ERZMystic_StageLoad(void);
53
#if GAME_INCLUDE_EDITOR
54
void ERZMystic_EditorDraw(void);
55
void ERZMystic_EditorLoad(void);
56
#endif
57
void ERZMystic_Serialize(void);
58
59
// Extra Entity Functions
60
void ERZMystic_CheckPlayerCollisions(void);
61
void ERZMystic_Hit(void);
62
void ERZMystic_SetupNewCupSwap(void);
63
64
void ERZMystic_Draw_CupSetup(void);
65
void ERZMystic_Draw_CupSwap(void);
66
67
void ERZMystic_State_Init(void);
68
void ERZMystic_State_SetupInitialCupPos(void);
69
void ERZMystic_State_MoveCupsDownwards(void);
70
void ERZMystic_State_RotateMiddleCup(void);
71
void ERZMystic_State_MoveMiddleCupToFloor(void);
72
void ERZMystic_State_PrepareCupSwap(void);
73
void ERZMystic_State_CupSwapping(void);
74
void ERZMystic_State_RevealMystic(void);
75
void ERZMystic_State_CupBlast(void);
76
void ERZMystic_State_MoveCupsToMystic(void);
77
78
#endif //! OBJ_ERZMYSTIC_H
79
80