Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/GHZ/Splats.h
338 views
1
#ifndef OBJ_SPLATS_H
2
#define OBJ_SPLATS_H
3
4
#include "Game.h"
5
6
typedef enum {
7
// GHZ
8
SPLATS_BOUNCEAROUND = 0,
9
10
// PGZ
11
SPLATS_SPAWNER = 0,
12
SPLATS_INKSPLATS,
13
SPLATS_SPLAT,
14
} SplatsTypes;
15
16
// Object Class
17
struct ObjectSplats {
18
RSDK_OBJECT
19
StateMachine(initialState);
20
Hitbox hitboxBadnikGHZ;
21
Hitbox hitboxJar;
22
Hitbox hitboxBadnikPGZ;
23
uint16 aniFrames;
24
uint16 sfxSplatsSpawn;
25
uint16 sfxSplatsLand;
26
};
27
28
// Entity Class
29
struct EntitySplats {
30
RSDK_ENTITY
31
StateMachine(state);
32
uint8 bounceCount;
33
uint8 activeCount;
34
uint8 numActive;
35
uint16 minDelay;
36
int32 delay;
37
bool32 isOnScreen;
38
EntitySplats *parent;
39
Vector2 startPos;
40
int32 startDir;
41
Animator mainAnimator;
42
Animator splashAnimator;
43
};
44
45
// Object Struct
46
extern ObjectSplats *Splats;
47
48
// Standard Entity Events
49
void Splats_Update(void);
50
void Splats_LateUpdate(void);
51
void Splats_StaticUpdate(void);
52
void Splats_Draw(void);
53
void Splats_Create(void *data);
54
void Splats_StageLoad(void);
55
#if GAME_INCLUDE_EDITOR
56
void Splats_EditorDraw(void);
57
void Splats_EditorLoad(void);
58
#endif
59
void Splats_Serialize(void);
60
61
// Extra Entity Functions
62
void Splats_DebugDraw(void);
63
void Splats_DebugSpawn(void);
64
65
void Splats_CheckPlayerCollisions(void);
66
void Splats_CheckOffScreen(void);
67
68
void Splats_State_Init(void);
69
void Splats_State_BounceAround(void);
70
void Splats_State_SetupInkJar(void);
71
void Splats_State_InkJarSpawner(void);
72
void Splats_State_JumpOutOfJar(void);
73
void Splats_State_HandleBouncing(void);
74
void Splats_State_HandleLanding(void);
75
void Splats_State_NoMoreJumps(void);
76
void Splats_State_InkSplat(void);
77
78
#endif //! OBJ_SPLATS_H
79
80