Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/HCZ/Spear.h
338 views
1
#ifndef OBJ_SPEAR_H
2
#define OBJ_SPEAR_H
3
4
#include "Game.h"
5
6
typedef enum {
7
SPEAR_UP,
8
SPEAR_RIGHT,
9
SPEAR_DOWN,
10
SPEAR_LEFT,
11
} SpearOrientations;
12
13
// Object Class
14
struct ObjectSpear {
15
RSDK_OBJECT
16
uint16 aniFrames;
17
uint16 sfxSpear;
18
};
19
20
// Entity Class
21
struct EntitySpear {
22
RSDK_ENTITY
23
StateMachine(state); // unused
24
uint8 orientation;
25
int32 interval;
26
int32 intervalOffset;
27
int32 duration;
28
int32 unused1;
29
Vector2 startPos;
30
int32 unused2;
31
int32 retractPos;
32
Hitbox hitbox;
33
Animator baseAnimator;
34
Animator spearAnimator;
35
};
36
37
// Object Struct
38
extern ObjectSpear *Spear;
39
40
// Standard Entity Events
41
void Spear_Update(void);
42
void Spear_LateUpdate(void);
43
void Spear_StaticUpdate(void);
44
void Spear_Draw(void);
45
void Spear_Create(void *data);
46
void Spear_StageLoad(void);
47
#if GAME_INCLUDE_EDITOR
48
void Spear_EditorDraw(void);
49
void Spear_EditorLoad(void);
50
#endif
51
void Spear_Serialize(void);
52
53
// Extra Entity Functions
54
void Spear_SetupHitboxes(void);
55
56
#endif //! OBJ_SPEAR_H
57
58