Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/SPZ/LottoMachine.h
338 views
1
#ifndef OBJ_LOTTOMACHINE_H
2
#define OBJ_LOTTOMACHINE_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectLottoMachine {
8
RSDK_OBJECT
9
Hitbox hitboxBottom;
10
Hitbox hitboxMotor;
11
uint8 activePlayers;
12
uint16 sfxPimPom;
13
uint16 sfxFail;
14
Animator shineAnimator;
15
uint16 aniFrames;
16
};
17
18
// Entity Class
19
struct EntityLottoMachine {
20
RSDK_ENTITY
21
StateMachine(state);
22
int32 playerCount;
23
EntityPlayer *playerPtrs[PLAYER_COUNT];
24
int32 timer;
25
int32 spinSpeed;
26
int32 playerDir;
27
int32 playerTimers[PLAYER_COUNT];
28
int32 collectedBallCount;
29
int32 collectedBallTypes[4];
30
int32 chutePos;
31
int32 chuteTargetPos;
32
int32 chuteVel;
33
uint8 drawGroupHigh;
34
int32 playerAngles[PLAYER_COUNT];
35
Animator machineAnimator;
36
Animator supportAnimator;
37
Animator chuteAnimator;
38
Animator motorAnimator;
39
Animator glassAnimator;
40
};
41
42
// Object Struct
43
extern ObjectLottoMachine *LottoMachine;
44
45
// Standard Entity Events
46
void LottoMachine_Update(void);
47
void LottoMachine_LateUpdate(void);
48
void LottoMachine_StaticUpdate(void);
49
void LottoMachine_Draw(void);
50
void LottoMachine_Create(void *data);
51
void LottoMachine_StageLoad(void);
52
#if GAME_INCLUDE_EDITOR
53
void LottoMachine_EditorDraw(void);
54
void LottoMachine_EditorLoad(void);
55
#endif
56
void LottoMachine_Serialize(void);
57
58
// Extra Entity Functions
59
void LottoMachine_VSSwap_CheckBusy(void);
60
void LottoMachine_CheckPlayerCollisions(void);
61
void LottoMachine_CheckPlayerCollisions_Bottom(void);
62
void LottoMachine_HandleMotor(void);
63
void LottoMachine_SetupBalls(void);
64
void LottoMachine_SetupUIBalls(void);
65
void LottoMachine_GiveRings(void);
66
67
void LottoMachine_State_Startup(void);
68
void LottoMachine_State_HandleBallCollect(void);
69
void LottoMachine_State_CollectBall(void);
70
void LottoMachine_State_HandleBallCollected(void);
71
void LottoMachine_State_DropPlayers(void);
72
void LottoMachine_State_ReleasePlayers(void);
73
void LottoMachine_State_StopSpinning(void);
74
75
#endif //! OBJ_LOTTOMACHINE_H
76
77