Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/Puyo/PuyoGame.h
338 views
1
#ifndef OBJ_PUYOGAME_H
2
#define OBJ_PUYOGAME_H
3
4
#include "Game.h"
5
6
typedef enum {
7
PUYOGAME_PLAYER1,
8
PUYOGAME_PLAYER2,
9
} PuyoGamePlayerIDs;
10
11
// Object Class
12
struct ObjectPuyoGame {
13
RSDK_OBJECT
14
uint16 aniFrames;
15
EntityPuyoMatch *managers[2];
16
EntityPuyoIndicator *indicators[2];
17
EntityCollapsingPlatform *platforms[2];
18
EntityPuyoScore *score1[2];
19
EntityPuyoScore *score2[2];
20
EntityPuyoLevelSelect *levelSel[2];
21
EntityFXFade *fxFade;
22
};
23
24
// Entity Class
25
struct EntityPuyoGame {
26
RSDK_ENTITY
27
StateMachine(state);
28
int32 unused1;
29
Vector2 startPos;
30
int32 timer;
31
int32 selectedLevels[2];
32
int32 unused2;
33
int32 unused3;
34
Animator animator;
35
bool32 started;
36
int32 finishedMatch;
37
bool32 determinedLoser;
38
uint8 roundWinner;
39
uint8 matchWinner;
40
};
41
42
// Object Struct
43
extern ObjectPuyoGame *PuyoGame;
44
45
// Standard Entity Events
46
void PuyoGame_Update(void);
47
void PuyoGame_LateUpdate(void);
48
void PuyoGame_StaticUpdate(void);
49
void PuyoGame_Draw(void);
50
void PuyoGame_Create(void *data);
51
void PuyoGame_StageLoad(void);
52
#if GAME_INCLUDE_EDITOR
53
void PuyoGame_EditorDraw(void);
54
void PuyoGame_EditorLoad(void);
55
#endif
56
void PuyoGame_Serialize(void);
57
58
// Extra Entity Functions
59
void PuyoGame_SetupStartingEntities(void);
60
void PuyoGame_SetLoser(uint8 loser);
61
void PuyoGame_DestroyPuyoBeans(void);
62
void PuyoGame_SetupGameState(void);
63
void PuyoGame_CheckMatchFinish(void);
64
void PuyoGame_State_Init(void);
65
void PuyoGame_State_Wait(void);
66
void PuyoGame_State_SelectingLevel(void);
67
void PuyoGame_State_SetupRound(void);
68
void PuyoGame_State_SetupEntities(void);
69
void PuyoGame_State_HandleRound(void);
70
void PuyoGame_State_ShowRoundResults(void);
71
void PuyoGame_State_ShowMatchResults(void);
72
void PuyoGame_State_FadeToMenu(void);
73
74
#endif //! OBJ_PUYOGAME_H
75
76