Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/UFO/SpecialClear.h
338 views
1
#ifndef OBJ_SPECIALCLEAR_H
2
#define OBJ_SPECIALCLEAR_H
3
4
#include "Game.h"
5
6
typedef enum {
7
SC_MSG_SPECIALCLEAR,
8
SC_MSG_GOTEMERALD,
9
SC_MSG_ALLEMERALDS,
10
SC_MSG_SUPER,
11
} SpecialClearTypes;
12
13
typedef enum {
14
SC_ANI_SONIC,
15
SC_ANI_TAILS,
16
SC_ANI_KNUX,
17
#if MANIA_USE_PLUS
18
SC_ANI_MIGHTY,
19
SC_ANI_RAY,
20
#endif
21
SC_ANI_BONUS,
22
SC_ANI_NUMBERS,
23
SC_ANI_EMERALDS,
24
#if MANIA_USE_PLUS
25
SC_ANI_CONTINUE,
26
#endif
27
} SpecialClearAniIDs;
28
29
// Object Class
30
struct ObjectSpecialClear {
31
RSDK_OBJECT
32
uint16 aniFrames;
33
#if !MANIA_USE_PLUS
34
uint16 continueFrames;
35
#endif
36
uint16 sfxScoreAdd;
37
uint16 sfxScoreTotal;
38
uint16 sfxEvent;
39
uint16 sfxSpecialWarp;
40
uint16 sfxContinue;
41
uint16 sfxEmerald;
42
};
43
44
// Entity Class
45
struct EntitySpecialClear {
46
RSDK_ENTITY
47
StateMachine(state);
48
bool32 isBSS;
49
int32 messageType;
50
int32 timer;
51
bool32 showFade;
52
bool32 continueIconVisible;
53
bool32 hasContinues;
54
int32 fillColor;
55
int32 score;
56
int32 score1UP;
57
int32 lives;
58
int32 ringBonus;
59
int32 perfectBonus;
60
int32 machBonus;
61
Vector2 messagePos1;
62
Vector2 messagePos2;
63
Vector2 scoreBonusPos;
64
Vector2 ringBonusPos;
65
Vector2 perfectBonusPos;
66
Vector2 machBonusPos;
67
Vector2 continuePos;
68
int32 emeraldPositions[7];
69
int32 emeraldSpeeds[7];
70
int32 unused1;
71
int32 unused2;
72
int32 unused3;
73
int32 unused4;
74
int32 unused5;
75
int32 unused6;
76
int32 unused7;
77
int32 unused8;
78
bool32 saveInProgress;
79
Animator playerNameAnimator;
80
Animator bonusAnimator;
81
Animator numbersAnimator;
82
Animator emeraldsAnimator;
83
Animator continueAnimator;
84
};
85
86
// Object Struct
87
extern ObjectSpecialClear *SpecialClear;
88
89
// Standard Entity Events
90
void SpecialClear_Update(void);
91
void SpecialClear_LateUpdate(void);
92
void SpecialClear_StaticUpdate(void);
93
void SpecialClear_Draw(void);
94
void SpecialClear_Create(void *data);
95
void SpecialClear_StageLoad(void);
96
#if GAME_INCLUDE_EDITOR
97
void SpecialClear_EditorDraw(void);
98
void SpecialClear_EditorLoad(void);
99
#endif
100
void SpecialClear_Serialize(void);
101
102
// Extra Entity Functions
103
void SpecialClear_DrawNumbers(Vector2 *pos, int32 value);
104
void SpecialClear_GiveScoreBonus(int32 score);
105
106
#if MANIA_USE_PLUS
107
void SpecialClear_SaveCB(bool32 success);
108
#else
109
void SpecialClear_SaveCB(void);
110
#endif
111
112
void SpecialClear_State_SetupDelay(void);
113
void SpecialClear_State_EnterText(void);
114
void SpecialClear_State_AdjustText(void);
115
void SpecialClear_HandleEmeraldAppear(void);
116
void SpecialClear_State_EnterBonuses(void);
117
void SpecialClear_State_ScoreShownDelay(void);
118
void SpecialClear_State_TallyScore(void);
119
void SpecialClear_State_ShowTotalScore_Continues(void);
120
void SpecialClear_State_ShowTotalScore_NoContinues(void);
121
void SpecialClear_State_ExitFinishMessage(void);
122
void SpecialClear_State_EnterSuperMessage(void);
123
void SpecialClear_State_ShowSuperMessage(void);
124
void SpecialClear_State_ExitFadeOut(void);
125
void SpecialClear_State_ExitResults(void);
126
127
#endif //! OBJ_SPECIALCLEAR_H
128
129