Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/HCZ/ScrewMobile.h
338 views
1
#ifndef OBJ_SCREWMOBILE_H
2
#define OBJ_SCREWMOBILE_H
3
4
#include "Game.h"
5
6
typedef enum {
7
SCREWMOBILE_MOBILE,
8
SCREWMOBILE_BOMB,
9
} ScrewMobileTypes;
10
11
// Object Class
12
struct ObjectScrewMobile {
13
RSDK_OBJECT
14
Hitbox hitboxCockpit;
15
Hitbox hitboxDepthCharge;
16
bool32 playingFanSfx;
17
uint8 fanSfxTimer;
18
uint16 aniFrames;
19
uint16 sfxButton;
20
uint16 sfxEggMobile;
21
uint16 sfxBigFan;
22
uint16 sfxImpact;
23
};
24
25
// Entity Class
26
struct EntityScrewMobile {
27
RSDK_ENTITY
28
StateMachine(state);
29
StateMachine(stateDraw);
30
Vector2 startPos;
31
bool32 bombPress;
32
uint8 timer;
33
int32 whirlPoolTimer;
34
int32 whirlpoolHeight;
35
int32 invincibilityTimer;
36
uint8 health;
37
EntityWhirlpool *whirlpool;
38
Animator mobileAnimator;
39
Animator propellerAnimator;
40
Animator rackAnimator;
41
Animator whirlpoolAnimator;
42
Animator whirlpoolTopAnimator;
43
Animator whirlpoolBottomAnimator;
44
};
45
46
// Object Struct
47
extern ObjectScrewMobile *ScrewMobile;
48
49
// Standard Entity Events
50
void ScrewMobile_Update(void);
51
void ScrewMobile_LateUpdate(void);
52
void ScrewMobile_StaticUpdate(void);
53
void ScrewMobile_Draw(void);
54
void ScrewMobile_Create(void *data);
55
void ScrewMobile_StageLoad(void);
56
#if GAME_INCLUDE_EDITOR
57
void ScrewMobile_EditorDraw(void);
58
void ScrewMobile_EditorLoad(void);
59
#endif
60
void ScrewMobile_Serialize(void);
61
62
// Extra Entity Functions
63
void ScrewMobile_State_CheckPlayerEnter(void);
64
void ScrewMobile_State_PlayerRiding(void);
65
void ScrewMobile_State_BossFinished(void);
66
void ScrewMobile_State_Idle(void);
67
void ScrewMobile_Draw_ScrewMobile(void);
68
69
void ScrewMobile_StateDepthCharge_Active(void);
70
void ScrewMobile_StateDepthCharge_Debris(void);
71
void ScrewMobile_Draw_DepthCharge(void);
72
73
#endif //! OBJ_SCREWMOBILE_H
74
75