Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/Global/ActClear.h
338 views
1
#ifndef OBJ_ACTCLEAR_H
2
#define OBJ_ACTCLEAR_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectActClear {
8
RSDK_OBJECT
9
uint16 aniFrames;
10
uint16 sfxScoreAdd;
11
uint16 sfxScoreTotal;
12
#if MANIA_USE_PLUS
13
uint16 sfxEvent;
14
#endif
15
bool32 bufferMoveEnabled;
16
bool32 isSavingGame;
17
#if MANIA_USE_PLUS
18
bool32 disableResultsInput;
19
#endif
20
int32 displayedActID;
21
bool32 finished;
22
#if MANIA_USE_PLUS
23
bool32 forceNoSave;
24
StateMachine(bufferMove_CB);
25
StateMachine(saveReplay_CB);
26
bool32 hasSavedReplay;
27
bool32 disableTimeBonus;
28
bool32 actClearActive;
29
#endif
30
};
31
32
// Entity Class
33
struct EntityActClear {
34
RSDK_ENTITY
35
StateMachine(state);
36
int32 timer;
37
int32 stageFinishTimer;
38
int32 timeBonus;
39
int32 ringBonus;
40
int32 coolBonus;
41
int32 totalScore;
42
int32 time;
43
int32 newRecordTimer;
44
bool32 achievedRank;
45
bool32 isNewRecord;
46
bool32 showCoolBonus;
47
Vector2 playerNamePos;
48
Vector2 gotThroughPos;
49
Vector2 timeBonusPos;
50
Vector2 ringBonusPos;
51
Vector2 coolBonusPos;
52
Vector2 totalScorePos;
53
EntityPlayer *targetPlayer;
54
Animator hudElementsAnimator;
55
Animator numbersAnimator;
56
Animator playerNameAnimator;
57
Animator gotThroughAnimator;
58
Animator actNumAnimator;
59
#if MANIA_USE_PLUS
60
Animator timeElementsAnimator;
61
#endif
62
};
63
64
// Object Struct
65
extern ObjectActClear *ActClear;
66
67
// Standard Entity Events
68
void ActClear_Update(void);
69
void ActClear_LateUpdate(void);
70
void ActClear_StaticUpdate(void);
71
void ActClear_Draw(void);
72
void ActClear_Create(void *data);
73
void ActClear_StageLoad(void);
74
#if GAME_INCLUDE_EDITOR
75
void ActClear_EditorDraw(void);
76
void ActClear_EditorLoad(void);
77
#endif
78
void ActClear_Serialize(void);
79
80
// Extra Entity Functions
81
#if MANIA_USE_PLUS
82
void ActClear_DrawTime(Vector2 *drawPosPtr, int32 mins, int32 secs, int32 millisecs);
83
#endif
84
void ActClear_DrawNumbers(Vector2 *drawPos, int32 value, int32 digitCount);
85
void ActClear_CheckPlayerVictory(void);
86
87
#if MANIA_USE_PLUS
88
void ActClear_SaveGameCallback(bool32 success);
89
#else
90
void ActClear_SaveGameCallback(void);
91
#endif
92
void ActClear_SetupRecoverPlayers(void);
93
94
void ActClear_State_EnterText(void);
95
void ActClear_State_AdjustText(void);
96
void ActClear_State_EnterResults(void);
97
void ActClear_State_ScoreShownDelay(void);
98
void ActClear_State_TallyScore(void);
99
void ActClear_State_SaveGameProgress(void);
100
#if MANIA_USE_PLUS
101
void ActClear_State_ShowResultsTA(void);
102
#endif
103
void ActClear_State_WaitForSave(void);
104
void ActClear_State_ExitActClear(void);
105
106
void ActClear_State_RecoverPlayers(void);
107
108
#endif //! OBJ_ACTCLEAR_H
109
110