Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/OOZ/PushSpring.h
338 views
1
#ifndef OBJ_PUSHSPRING_H
2
#define OBJ_PUSHSPRING_H
3
4
#include "Game.h"
5
6
typedef enum { PUSHSPRING_V, PUSHSPRING_H } PushSpringTypes;
7
8
// Object Class
9
struct ObjectPushSpring {
10
RSDK_OBJECT
11
uint16 aniFrames;
12
uint16 sfxPush;
13
uint16 sfxSpring;
14
};
15
16
// Entity Class
17
struct EntityPushSpring {
18
RSDK_ENTITY
19
StateMachine(state);
20
StateMachine(stateDraw);
21
StateMachine(stateCollide);
22
uint8 type;
23
int32 pushOffset;
24
int32 timer;
25
Hitbox hitbox;
26
bool32 beingPushed;
27
Animator animator;
28
};
29
30
// Object Struct
31
extern ObjectPushSpring *PushSpring;
32
33
// Standard Entity Events
34
void PushSpring_Update(void);
35
void PushSpring_LateUpdate(void);
36
void PushSpring_StaticUpdate(void);
37
void PushSpring_Draw(void);
38
void PushSpring_Create(void *data);
39
void PushSpring_StageLoad(void);
40
#if GAME_INCLUDE_EDITOR
41
void PushSpring_EditorDraw(void);
42
void PushSpring_EditorLoad(void);
43
#endif
44
void PushSpring_Serialize(void);
45
46
// Extra Entity Functions
47
void PushSpring_Collide_Top(void);
48
void PushSpring_Collide_Bottom(void);
49
void PushSpring_Collide_Left(void);
50
void PushSpring_Collide_Right(void);
51
52
void PushSpring_Draw_Top(void);
53
void PushSpring_Draw_Bottom(void);
54
void PushSpring_Draw_Left(void);
55
void PushSpring_Draw_Right(void);
56
57
void PushSpring_State_WaitForPushed(void);
58
void PushSpring_State_BeingPushed(void);
59
void PushSpring_State_PushRecoil(void);
60
61
#endif //! OBJ_PUSHSPRING_H
62
63