Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/SPZ/HeavyGunner.h
338 views
1
#ifndef OBJ_HEAVYGUNNER_H
2
#define OBJ_HEAVYGUNNER_H
3
4
#include "Game.h"
5
6
typedef enum {
7
HEAVYGUNNER_HBH,
8
HEAVYGUNNER_1,
9
HEAVYGUNNER_HELI,
10
HEAVYGUNNER_EGGROBO,
11
HEAVYGUNNER_GUN,
12
HEAVYGUNNER_MISSILE_F,
13
HEAVYGUNNER_MISSILE,
14
HEAVYGUNNER_ESCAPE_HBH,
15
} HeavyGunnerTypes;
16
17
// Object Class
18
struct ObjectHeavyGunner {
19
RSDK_OBJECT
20
int32 boundsL;
21
int32 boundsR;
22
int32 boundsT;
23
int32 boundsB;
24
bool32 stageWrapActive;
25
Hitbox hitboxMissileF;
26
Hitbox hitboxMissile;
27
uint16 aniFrames;
28
uint16 sfxFire;
29
uint16 sfxJet;
30
uint16 sfxHit;
31
uint16 sfxDestroy;
32
uint16 sfxExplosion2;
33
uint16 sfxExplosion3;
34
uint16 sfxCharge;
35
uint16 sfxThrow;
36
uint16 sfxFlyIn;
37
uint16 sfxWooshIn;
38
uint16 sfxWooshOut;
39
uint16 sfxFlip;
40
uint16 sfxRumble;
41
int32 unused1;
42
int32 unused2;
43
int32 unused3;
44
int32 unused4;
45
};
46
47
// Entity Class
48
struct EntityHeavyGunner {
49
RSDK_ENTITY
50
StateMachine(state);
51
StateMachine(stateDraw);
52
EntityHeavyGunner *parent;
53
int32 timer;
54
int32 flyInTimer;
55
int32 parentOffset;
56
int32 targetScale;
57
int32 nextRoboID;
58
int32 type;
59
int32 missileID;
60
bool32 defeated; // prolly unused, this is set only after the entity is destroyed so...
61
Animator mainAnimator;
62
Animator pilotAnimator;
63
Animator frontAnimator;
64
Animator tBladeAnimator;
65
Animator rBladeAnimator;
66
Animator beaconAnimator;
67
Animator feetAnimator;
68
Animator feet2Animator;
69
Animator gunnerAnimator;
70
Animator armAnimator;
71
Animator exhaustAnimator;
72
};
73
74
// Object Struct
75
extern ObjectHeavyGunner *HeavyGunner;
76
77
// Standard Entity Events
78
void HeavyGunner_Update(void);
79
void HeavyGunner_LateUpdate(void);
80
void HeavyGunner_StaticUpdate(void);
81
void HeavyGunner_Draw(void);
82
void HeavyGunner_Create(void *data);
83
void HeavyGunner_StageLoad(void);
84
#if GAME_INCLUDE_EDITOR
85
void HeavyGunner_EditorDraw(void);
86
void HeavyGunner_EditorLoad(void);
87
#endif
88
void HeavyGunner_Serialize(void);
89
90
// Extra Entity Functions
91
bool32 HeavyGunner_SfxCheck_HeliProp(void);
92
bool32 HeavyGunner_SfxCheck_HBHSurprise(void);
93
bool32 HeavyGunner_SfxCheck_RocketBurn(void);
94
95
void HeavyGunner_HandleBGWrap(int32 multiplier);
96
void HeavyGunner_DestroyAllMissiles(void);
97
98
void HeavyGunner_Draw_Heli(void);
99
void HeavyGunner_Draw_EggRobo(void);
100
void HeavyGunner_Draw_Missile(void);
101
void HeavyGunner_Draw_Simple(void);
102
void HeavyGunner_Draw_FadeOut(void);
103
104
void HeavyGunner_StateManager_SetupArena(void);
105
void HeavyGunner_StateManager_HandleStageWrap(void);
106
void HeavyGunner_StateManager_HandlePathChange(void);
107
108
void HeavyGunner_Input_LockedP1(void);
109
void HeavyGunner_Input_LockedP2(void);
110
void HeavyGunner_Input_LockedP2_AI(void);
111
112
void HeavyGunner_StateEggRobo_Patrolling(void);
113
void HeavyGunner_StateEggRobo_FlyIn(void);
114
void HeavyGunner_StateEggRobo_ThrowGun(void);
115
void HeavyGunner_StateEggRobo_ThrownGun(void);
116
117
void HeavyGunner_StateGun_Thrown(void);
118
void HeavyGunner_StateGun_Grabbed(void);
119
120
void HeavyGunner_StateMissile_Launched(void);
121
void HeavyGunner_StateMissile_BlastOff(void);
122
void HeavyGunner_StateMissile_FindFloor(void);
123
void HeavyGunner_StateMissile_AttackPlayer(void);
124
void HeavyGunner_StateMissile_Malfunction(void);
125
void HeavyGunner_StateMissile_ReturnToSender(void);
126
void HeavyGunner_StateMissile_AttackRobo(void);
127
void HeavyGunner_StateMissile_AttackGunner(void);
128
129
void HeavyGunner_StateHeli_AwaitPlayer(void);
130
void HeavyGunner_StateHeli_WooshIn(void);
131
void HeavyGunner_StateHeli_FindFloor(void);
132
void HeavyGunner_StateHeli_HandleAttacks(void);
133
void HeavyGunner_StateHeli_ShotsFired(void);
134
void HeavyGunner_StateHeli_EscapeMissile(void);
135
void HeavyGunner_StateHeli_IncomingMissile(void);
136
void HeavyGunner_StateHeli_Exploding(void);
137
void HeavyGunner_StateHeli_ExplodeAndFall(void);
138
139
void HeavyGunner_StateEscapeHBH_Hover(void);
140
void HeavyGunner_StateEscapeHBH_FlyAway(void);
141
142
void HeavyGunner_StateHeli_FadeOutDestroy(void);
143
144
#endif //! OBJ_HEAVYGUNNER_H
145
146