Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/HCZ/Current.h
338 views
1
#ifndef OBJ_CURRENT_H
2
#define OBJ_CURRENT_H
3
4
#include "Game.h"
5
6
typedef enum {
7
CURRENT_C_LEFT,
8
CURRENT_C_RIGHT,
9
CURRENT_C_UP,
10
CURRENT_C_DOWN,
11
CURRENT_W_LEFT,
12
CURRENT_W_RIGHT,
13
CURRENT_W_UP,
14
CURRENT_W_DOWN,
15
} CurrentTypes;
16
17
typedef enum {
18
CURRENT_CHILD_NONE,
19
CURRENT_CHILD_WIND,
20
CURRENT_CHILD_BUBBLE,
21
} CurrentChildTypes;
22
23
// Object Class
24
struct ObjectCurrent {
25
RSDK_OBJECT
26
uint8 activePlayers;
27
Animator animator;
28
uint16 aniFrames;
29
uint16 sfxRush;
30
};
31
32
// Entity Class
33
struct EntityCurrent {
34
RSDK_ENTITY
35
StateMachine(state);
36
CurrentTypes type;
37
Vector2 size;
38
uint8 strength;
39
Hitbox hitbox;
40
uint8 activePlayers;
41
Vector2 playerPositions[PLAYER_COUNT];
42
int32 buttonTag;
43
EntityButton *taggedButton;
44
bool32 activated;
45
PlaneFilterTypes planeFilter;
46
bool32 waterOnly;
47
bool32 fbzAchievement;
48
Animator animator;
49
};
50
51
// Object Struct
52
extern ObjectCurrent *Current;
53
54
// Standard Entity Events
55
void Current_Update(void);
56
void Current_LateUpdate(void);
57
void Current_StaticUpdate(void);
58
void Current_Draw(void);
59
void Current_Create(void *data);
60
void Current_StageLoad(void);
61
#if GAME_INCLUDE_EDITOR
62
void Current_EditorDraw(void);
63
void Current_EditorLoad(void);
64
#endif
65
void Current_Serialize(void);
66
67
// Extra Entity Functions
68
void Current_SetupTagLink(void);
69
Vector2 Current_GetBubbleSpawnPosHorizontal(uint8 right);
70
Vector2 Current_GetBubbleSpawnPosVertical(uint8 down);
71
72
void Current_State_WaterLeft(void);
73
void Current_State_WaterRight(void);
74
void Current_State_WaterUp(void);
75
void Current_State_WaterDown(void);
76
void Current_State_PushLeft(void);
77
void Current_State_PushRight(void);
78
void Current_State_PushUp(void);
79
void Current_State_PushDown(void);
80
void Current_State_Child(void);
81
82
void Current_PlayerState_Left(void);
83
void Current_PlayerState_Right(void);
84
void Current_PlayerState_Up(void);
85
void Current_PlayerState_Down(void);
86
87
#endif //! OBJ_CURRENT_H
88
89