Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/ERZ/PhantomMystic.h
338 views
1
#ifndef OBJ_PHANTOMMYSTIC_H
2
#define OBJ_PHANTOMMYSTIC_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectPhantomMystic {
8
RSDK_OBJECT
9
uint16 aniFrames;
10
uint16 sfxCupSwap;
11
uint16 sfxBigLaser;
12
uint16 sfxImpact;
13
};
14
15
// Entity Class
16
struct EntityPhantomMystic {
17
RSDK_ENTITY
18
StateMachine(state);
19
StateMachine(stateDraw);
20
Vector2 originPos;
21
Vector2 mysticPos;
22
int32 mysticVelY;
23
int32 middleCupY;
24
int32 timer;
25
int32 invincibilityTimer;
26
int32 correctCup;
27
int32 cupPos[3];
28
int32 unused1[3];
29
int32 unused2[3];
30
int32 cupAlpha[3];
31
int32 swapCup1;
32
int32 swapCup2;
33
int32 swapCup1Pos;
34
int32 swapCup2Pos;
35
int32 swapCup1Alpha;
36
int32 swapCup2Alpha;
37
int32 cupSwapCount;
38
Animator mysticAnimator;
39
Animator cupAnimator;
40
Animator cupSilhouetteAnimator;
41
Animator cupSpikeAnimator; // Not actually ever drawn...
42
Animator cupBlastAnimator;
43
Hitbox hitbox;
44
};
45
46
// Object Struct
47
extern ObjectPhantomMystic *PhantomMystic;
48
49
// Standard Entity Events
50
void PhantomMystic_Update(void);
51
void PhantomMystic_LateUpdate(void);
52
void PhantomMystic_StaticUpdate(void);
53
void PhantomMystic_Draw(void);
54
void PhantomMystic_Create(void *data);
55
void PhantomMystic_StageLoad(void);
56
#if GAME_INCLUDE_EDITOR
57
void PhantomMystic_EditorDraw(void);
58
void PhantomMystic_EditorLoad(void);
59
#endif
60
void PhantomMystic_Serialize(void);
61
62
// Extra Entity Functions
63
void PhantomMystic_CheckPlayerCollisions(void);
64
void PhantomMystic_Hit(void);
65
void PhantomMystic_SetupNewCupSwap(void);
66
67
void PhantomMystic_Draw_CupSetup(void);
68
void PhantomMystic_Draw_CupSwap(void);
69
70
void PhantomMystic_State_Init(void);
71
void PhantomMystic_State_SetupInitialCupPos(void);
72
void PhantomMystic_State_MoveCupsDownwards(void);
73
void PhantomMystic_State_RotateMiddleCup(void);
74
void PhantomMystic_State_MoveMiddleCupToFloor(void);
75
void PhantomMystic_State_PrepareCupSwap(void);
76
void PhantomMystic_State_CupSwapping(void);
77
void PhantomMystic_State_RevealMystic(void);
78
void PhantomMystic_State_CupBlast(void);
79
void PhantomMystic_State_MoveCupsToMystic(void);
80
81
#endif //! OBJ_PHANTOMMYSTIC_H
82
83