Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/SPZ/PimPom.h
338 views
1
#ifndef OBJ_PIMPOM_H
2
#define OBJ_PIMPOM_H
3
4
#include "Game.h"
5
6
typedef enum {
7
PIMPOM_SINGLE,
8
PIMPOM_HORIZONTAL,
9
PIMPOM_DIAGONAL,
10
PIMPOM_VERTICAL,
11
} PimPomTypes;
12
13
typedef enum {
14
PIMPOM_MOVE_FIXED,
15
PIMPOM_MOVE_NORMAL,
16
PIMPOM_MOVE_CIRCLE,
17
PIMPOM_MOVE_TRACK,
18
PIMPOM_MOVE_PATH,
19
} PimPomMoveTypes;
20
21
typedef enum { PIMPOM_CLR_CYAN, PIMPOM_CLR_PURPLE, PIMPOM_CLR_GREEN } PimPomColors;
22
23
// Object Class
24
struct ObjectPimPom {
25
RSDK_OBJECT
26
uint16 aniFrames;
27
uint16 sfxPimPom;
28
uint16 sfxBumper2;
29
};
30
31
// Entity Class
32
struct EntityPimPom {
33
RSDK_ENTITY
34
StateMachine(state);
35
StateMachine(stateMove);
36
int32 type;
37
uint8 color;
38
int32 newAngle;
39
uint8 spinSpeed;
40
int32 negAngle;
41
int32 sfxTimer;
42
Hitbox hitbox;
43
int32 moveType;
44
Vector2 amplitude;
45
int32 speed;
46
int32 angleM;
47
uint8 length;
48
uint8 gap;
49
uint8 numChildren;
50
Vector2 drawPos;
51
Vector2 offset;
52
Vector2 moveAmount;
53
Animator animator;
54
};
55
56
// Object Struct
57
extern ObjectPimPom *PimPom;
58
59
// Standard Entity Events
60
void PimPom_Update(void);
61
void PimPom_LateUpdate(void);
62
void PimPom_StaticUpdate(void);
63
void PimPom_Draw(void);
64
void PimPom_Create(void *data);
65
void PimPom_StageLoad(void);
66
#if GAME_INCLUDE_EDITOR
67
void PimPom_EditorDraw(void);
68
void PimPom_EditorLoad(void);
69
#endif
70
void PimPom_Serialize(void);
71
72
// Extra Entity Functions
73
void PimPom_State_Single(void);
74
void PimPom_State_Horizontal(void);
75
void PimPom_State_Vertical(void);
76
77
void PimPom_Move_Fixed(void);
78
void PimPom_Move_Normal(void);
79
void PimPom_Move_Circle(void);
80
void PimPom_Move_Path(void);
81
void PimPom_Move_Track(void);
82
83
#endif //! OBJ_PIMPOM_H
84
85