Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/Global/GameOver.h
338 views
1
#ifndef OBJ_GAMEOVER_H
2
#define OBJ_GAMEOVER_H
3
4
#include "Game.h"
5
6
#define GAMEOVER_LETTER_COUNT (8)
7
8
// Object Class
9
struct ObjectGameOver {
10
RSDK_OBJECT
11
int32 activeScreens;
12
uint16 aniFrames;
13
};
14
15
// Entity Class
16
struct EntityGameOver {
17
RSDK_ENTITY
18
StateMachine(state);
19
int32 timer;
20
int32 playerID;
21
Vector2 barPos;
22
Vector2 verts[4];
23
Vector2 letterPositions[GAMEOVER_LETTER_COUNT];
24
Vector2 finalOffsets[GAMEOVER_LETTER_COUNT];
25
Vector2 letterPosMove[GAMEOVER_LETTER_COUNT];
26
int32 letterBounceCount[GAMEOVER_LETTER_COUNT];
27
int32 letterRotations[GAMEOVER_LETTER_COUNT];
28
int32 letterRotateSpeed[GAMEOVER_LETTER_COUNT];
29
Animator animator;
30
};
31
32
// Object Struct
33
extern ObjectGameOver *GameOver;
34
35
// Standard Entity Events
36
void GameOver_Update(void);
37
void GameOver_LateUpdate(void);
38
void GameOver_StaticUpdate(void);
39
void GameOver_Draw(void);
40
void GameOver_Create(void *data);
41
void GameOver_StageLoad(void);
42
#if GAME_INCLUDE_EDITOR
43
void GameOver_EditorDraw(void);
44
void GameOver_EditorLoad(void);
45
#endif
46
void GameOver_Serialize(void);
47
48
// Extra Entity Functions
49
#if MANIA_USE_PLUS
50
void GameOver_SaveGameCallback(bool32 success);
51
#else
52
void GameOver_SaveGameCallback(void);
53
#endif
54
55
void GameOver_State_EnterLetters(void);
56
#if MANIA_USE_PLUS
57
void GameOver_State_WaitComp(void);
58
#endif
59
void GameOver_State_Wait(void);
60
void GameOver_State_ExitLetters(void);
61
62
#endif //! OBJ_GAMEOVER_H
63
64