Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/SSZ/HotaruMKII.h
338 views
1
#ifndef OBJ_HOTARUMKII_H
2
#define OBJ_HOTARUMKII_H
3
4
#include "Game.h"
5
6
typedef enum {
7
HOTARUMKII_MAIN,
8
HOTARUMKII_FLASH,
9
HOTARUMKII_LASER,
10
} HotaruMKIITypes;
11
12
// Object Class
13
struct ObjectHotaruMKII {
14
RSDK_OBJECT
15
Hitbox hitboxBadnik;
16
Hitbox hitboxLaser;
17
uint16 aniFrames;
18
uint16 sfxAppear;
19
uint16 sfxLaser;
20
uint16 sfxFly;
21
uint16 sfxCharge;
22
};
23
24
// Entity Class
25
struct EntityHotaruMKII {
26
RSDK_ENTITY
27
StateMachine(state);
28
Vector2 startPos;
29
uint8 startDir;
30
int32 timer;
31
Vector2 moveAcceleration;
32
uint8 unused1;
33
uint8 unused2;
34
uint8 childCount;
35
Vector2 curOffset;
36
uint8 origin;
37
Vector2 offset1;
38
Vector2 offset2;
39
Vector2 offset3;
40
int32 offsetID;
41
EntityPlayer *playerPtr;
42
int32 type;
43
Vector2 triggerSize;
44
Hitbox hitboxTrigger;
45
Animator mainAnimator;
46
Animator flashAnimator;
47
Animator unusedAnimator;
48
};
49
50
// Object Struct
51
extern ObjectHotaruMKII *HotaruMKII;
52
53
// Standard Entity Events
54
void HotaruMKII_Update(void);
55
void HotaruMKII_LateUpdate(void);
56
void HotaruMKII_StaticUpdate(void);
57
void HotaruMKII_Draw(void);
58
void HotaruMKII_Create(void *data);
59
void HotaruMKII_StageLoad(void);
60
#if GAME_INCLUDE_EDITOR
61
void HotaruMKII_EditorDraw(void);
62
void HotaruMKII_EditorLoad(void);
63
#endif
64
void HotaruMKII_Serialize(void);
65
66
// Extra Entity Functions
67
void HotaruMKII_DebugSpawn(void);
68
void HotaruMKII_DebugDraw(void);
69
70
void HotaruMKII_CheckPlayerCollisions(void);
71
void HotaruMKII_CheckOffScreen(void);
72
void HotaruMKII_HandleDistances(EntityPlayer *player);
73
74
void HotaruMKII_State_Init(void);
75
void HotaruMKII_State_CheckPlayerInRange(void);
76
void HotaruMKII_State_FlyAway(void);
77
void HotaruMKII_State_FlyOnScreen(void);
78
void HotaruMKII_State_AttackDelay(void);
79
void HotaruMKII_State_Charging(void);
80
void HotaruMKII_State_LaserAttack(void);
81
82
void HotaruMKII_State_Flash(void);
83
84
void HotaruMKII_State_Laser(void);
85
void HotaruMKII_State_LaserStrike(void);
86
87
#endif //! OBJ_HOTARUMKII_H
88
89