Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/Global/Announcer.h
338 views
1
#ifndef OBJ_ANNOUNCER_H
2
#define OBJ_ANNOUNCER_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectAnnouncer {
8
RSDK_OBJECT
9
uint16 aniFrames;
10
uint16 sfxThree;
11
uint16 sfxTwo;
12
uint16 sfxOne;
13
uint16 sfxGo;
14
uint16 sfxGoal;
15
uint16 sfxSonicWins;
16
uint16 sfxTailsWins;
17
uint16 sfxKnuxWins;
18
#if MANIA_USE_PLUS
19
uint16 sfxMightyWins;
20
uint16 sfxRayWins;
21
#endif
22
uint16 sfxNewRecordTop;
23
uint16 sfxNewRecordMid;
24
uint16 sfxSonic;
25
uint16 sfxTails;
26
uint16 sfxKnuckles;
27
#if MANIA_USE_PLUS
28
uint16 sfxMighty;
29
uint16 sfxRay;
30
#endif
31
uint16 sfxTheWinnerIs;
32
uint16 sfxPlayer1;
33
uint16 sfxPlayer2;
34
#if MANIA_USE_PLUS
35
uint16 sfxPlayer3;
36
uint16 sfxPlayer4;
37
#endif
38
uint16 sfxDrawRound;
39
uint16 sfxDrawSet;
40
bool32 finishedCountdown;
41
};
42
43
// Entity Class
44
struct EntityAnnouncer {
45
RSDK_ENTITY
46
StateMachine(state);
47
StateMachine(stateDraw);
48
int32 timer;
49
int32 playerID;
50
int32 screen;
51
Vector2 drawOffset;
52
Animator animator;
53
Animator playerIconAnimator;
54
};
55
56
// Object Struct
57
extern ObjectAnnouncer *Announcer;
58
59
// Standard Entity Events
60
void Announcer_Update(void);
61
void Announcer_LateUpdate(void);
62
void Announcer_StaticUpdate(void);
63
void Announcer_Draw(void);
64
void Announcer_Create(void *data);
65
void Announcer_StageLoad(void);
66
#if GAME_INCLUDE_EDITOR
67
void Announcer_EditorDraw(void);
68
void Announcer_EditorLoad(void);
69
#endif
70
void Announcer_Serialize(void);
71
72
// Extra Entity Functions
73
void Announcer_StartCountdown(void);
74
void Announcer_AnnounceGoal(int32 screen);
75
76
void Announcer_Draw_Countdown(void);
77
void Announcer_Draw_Finished(void);
78
79
void Announcer_State_Countdown(void);
80
void Announcer_State_Finished(void);
81
void Announcer_State_AnnounceWinner(void);
82
void Announcer_State_AnnounceDraw(void);
83
void Announcer_State_AnnounceWinPlayer(void);
84
85
#endif //! OBJ_ANNOUNCER_H
86
87