Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/SPZ/LottoBall.h
338 views
1
#ifndef OBJ_LOTTOBALL_H
2
#define OBJ_LOTTOBALL_H
3
4
#include "Game.h"
5
6
typedef enum {
7
LOTTOBALL_BLUE,
8
LOTTOBALL_YELLOW,
9
LOTTOBALL_MULTI,
10
LOTTOBALL_EGGMAN,
11
LOTTOBALL_BIG,
12
LOTTOBALL_TOTAL,
13
} LottoBallTypes;
14
15
// Object Class
16
struct ObjectLottoBall {
17
RSDK_OBJECT
18
uint16 aniFrames;
19
uint16 sfxLottoBounce;
20
uint16 sfxSpew;
21
};
22
23
// Entity Class
24
struct EntityLottoBall {
25
RSDK_ENTITY
26
StateMachine(state);
27
uint8 type;
28
uint8 lottoNum;
29
int32 ringCount;
30
int32 timer;
31
Vector2 startPos;
32
Vector2 bounds;
33
int32 gravityStrength;
34
int32 angleVel;
35
EntityLottoMachine *parent;
36
int32 isVisible[PLAYER_COUNT];
37
bool32 isUIBall;
38
Animator ballAnimator;
39
Animator leftNumAnimator;
40
Animator rightNumAnimator;
41
};
42
43
// Object Struct
44
extern ObjectLottoBall *LottoBall;
45
46
// Standard Entity Events
47
void LottoBall_Update(void);
48
void LottoBall_LateUpdate(void);
49
void LottoBall_StaticUpdate(void);
50
void LottoBall_Draw(void);
51
void LottoBall_Create(void *data);
52
void LottoBall_StageLoad(void);
53
#if GAME_INCLUDE_EDITOR
54
void LottoBall_EditorDraw(void);
55
void LottoBall_EditorLoad(void);
56
#endif
57
void LottoBall_Serialize(void);
58
59
// Extra Entity Functions
60
void LottoBall_CheckOffScreen(void);
61
62
void LottoBall_State_FallIntoMachine(void);
63
void LottoBall_State_InMachine(void);
64
void LottoBall_State_Collected(void);
65
void LottoBall_State_CollectFall(void);
66
67
void LottoBall_State_SetupUIBall(void);
68
void LottoBall_State_EnterUIBall(void);
69
void LottoBall_State_ShowUIBall(void);
70
71
#endif //! OBJ_LOTTOBALL_H
72
73