Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/PGZ/IceSpring.h
338 views
1
#ifndef OBJ_ICESPRING_H
2
#define OBJ_ICESPRING_H
3
4
#include "Game.h"
5
6
typedef enum {
7
ICESPRING_VERTICAL,
8
ICESPRING_HORIZONTAL,
9
ICESPRING_DIAGONAL,
10
} IceSpringTypes;
11
12
// Object Class
13
struct ObjectIceSpring {
14
RSDK_OBJECT
15
uint16 aniFrames;
16
uint16 sfxBounce;
17
uint16 sfxShatter;
18
Animator animators[PLAYER_COUNT];
19
};
20
21
// Entity Class
22
struct EntityIceSpring {
23
// Spring "Inherit"
24
RSDK_ENTITY
25
StateMachine(state);
26
IceSpringTypes type;
27
FlipFlags flipFlag;
28
uint8 planeFilter;
29
int32 sfxTimer;
30
Animator animator;
31
Hitbox hitbox;
32
// END SPRING INHERITANCE
33
34
int32 shatterTimer;
35
uint8 activePlayers;
36
};
37
38
// Object Struct
39
extern ObjectIceSpring *IceSpring;
40
41
// Standard Entity Events
42
void IceSpring_Update(void);
43
void IceSpring_LateUpdate(void);
44
void IceSpring_StaticUpdate(void);
45
void IceSpring_Draw(void);
46
void IceSpring_Create(void *data);
47
void IceSpring_StageLoad(void);
48
#if GAME_INCLUDE_EDITOR
49
void IceSpring_EditorDraw(void);
50
void IceSpring_EditorLoad(void);
51
#endif
52
void IceSpring_Serialize(void);
53
54
// Extra Entity Functions
55
void IceSpring_Shatter(int32 velX, int32 velY);
56
57
#endif //! OBJ_ICESPRING_H
58
59