Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/LRZ/BuckwildBall.h
338 views
1
#ifndef OBJ_BUCKWILDBALL_H
2
#define OBJ_BUCKWILDBALL_H
3
4
#include "Game.h"
5
6
typedef enum { BUCKWILDBALL_PATROLLING, BUCKWILDBALL_ROLLING } BuckwildBallModes;
7
8
// Object Class
9
struct ObjectBuckwildBall {
10
RSDK_OBJECT
11
Hitbox hitbox;
12
uint16 aniFrames;
13
uint16 particleFrames;
14
uint16 sfxImpact;
15
uint16 sfxSharp;
16
};
17
18
// Entity Class
19
struct EntityBuckwildBall {
20
RSDK_ENTITY
21
StateMachine(state);
22
int32 amplitude;
23
uint8 mode;
24
int32 speed;
25
Vector2 detectOffset;
26
Vector2 detectSize;
27
bool32 respawn;
28
int32 unused;
29
Vector2 startPos;
30
Vector2 ballPos;
31
int32 particleDelay;
32
int32 timerSfx;
33
Hitbox detectHitbox;
34
Animator animator;
35
int32 bossBallSlot;
36
};
37
38
// Object Struct
39
extern ObjectBuckwildBall *BuckwildBall;
40
41
// Standard Entity Events
42
void BuckwildBall_Update(void);
43
void BuckwildBall_LateUpdate(void);
44
void BuckwildBall_StaticUpdate(void);
45
void BuckwildBall_Draw(void);
46
void BuckwildBall_Create(void *data);
47
void BuckwildBall_StageLoad(void);
48
#if GAME_INCLUDE_EDITOR
49
void BuckwildBall_EditorDraw(void);
50
void BuckwildBall_EditorLoad(void);
51
#endif
52
void BuckwildBall_Serialize(void);
53
54
// Extra Entity Functions
55
void BuckwildBall_HandleTimerSfx(void);
56
void BuckwildBall_CheckOffScreen(void);
57
void BuckwildBall_SpawnDebris(void);
58
void BuckwildBall_CheckPlayerCollisions(void);
59
void BuckwildBall_HandleRollCrush(void);
60
61
void BuckwildBall_State_Init(void);
62
void BuckwildBall_State_Patrolling(void);
63
void BuckwildBall_State_AwaitDetection(void);
64
void BuckwildBall_State_Falling(void);
65
void BuckwildBall_State_Rolling(void);
66
void BuckwildBall_State_Debris(void);
67
68
#endif //! OBJ_BUCKWILDBALL_H
69
70