Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/PGZ/HeavyShinobi.h
338 views
1
#ifndef OBJ_HEAVYSHINOBI_H
2
#define OBJ_HEAVYSHINOBI_H
3
4
#include "Game.h"
5
6
typedef enum {
7
SHINOBI_MAIN,
8
SHINOBI_SLASH,
9
SHINOBI_ASTERON,
10
SHINOBI_ASTERONSPIKE,
11
SHINOBI_BOUNDS,
12
} HeavyShinobiTypes;
13
14
// Object Class
15
struct ObjectHeavyShinobi {
16
RSDK_OBJECT
17
int8 health;
18
uint8 invincibilityTimer;
19
Animator fxTrailAnimator[4];
20
uint8 storedIDs[4];
21
uint8 storedAnimIDs[4];
22
Vector2 storePos[16];
23
Animator unusedAnimator;
24
uint8 activeShurikens;
25
uint16 aniFrames;
26
Hitbox hitboxShinobi;
27
Hitbox hitboxSlashRange;
28
Hitbox hitboxUnused;
29
Hitbox hitboxSlash;
30
Hitbox hitboxAsteron;
31
Hitbox hitboxBounds;
32
Hitbox hitboxAsteronSpike;
33
uint16 sfxHit;
34
uint16 sfxExplosion;
35
uint16 sfxDefeat;
36
uint16 sfxDropIn;
37
uint16 sfxExplode;
38
uint16 sfxGlitch;
39
uint16 sfxJump;
40
uint16 sfxParry;
41
uint16 sfxSlash;
42
uint16 sfxStick;
43
uint16 sfxThrow;
44
};
45
46
// Entity Class
47
struct EntityHeavyShinobi {
48
RSDK_ENTITY
49
StateMachine(state);
50
StateMachine(stateDraw);
51
int32 type;
52
int32 timer;
53
int32 glitchTimer;
54
EntityPlayer *playerPtr;
55
Vector2 playerDistance;
56
Animator mainAnimator;
57
Animator fxAnimator;
58
};
59
60
// Object Struct
61
extern ObjectHeavyShinobi *HeavyShinobi;
62
63
// Standard Entity Events
64
void HeavyShinobi_Update(void);
65
void HeavyShinobi_LateUpdate(void);
66
void HeavyShinobi_StaticUpdate(void);
67
void HeavyShinobi_Draw(void);
68
void HeavyShinobi_Create(void *data);
69
void HeavyShinobi_StageLoad(void);
70
#if GAME_INCLUDE_EDITOR
71
void HeavyShinobi_EditorDraw(void);
72
void HeavyShinobi_EditorLoad(void);
73
#endif
74
void HeavyShinobi_Serialize(void);
75
76
// Extra Entity Functions
77
void HeavyShinobi_HandleAfterFX(void);
78
void HeavyShinobi_HandleSlash(EntityPlayer *player);
79
void HeavyShinobi_StartJump(void);
80
void HeavyShinobi_Explode(void);
81
82
// Shinobi States
83
void HeavyShinobi_State_Init(void);
84
void HeavyShinobi_State_SetupArena(void);
85
void HeavyShinobi_State_StartFight(void);
86
void HeavyShinobi_State_Idle(void);
87
void HeavyShinobi_State_Slash(void);
88
void HeavyShinobi_State_Jump(void);
89
void HeavyShinobi_State_Glitched(void);
90
void HeavyShinobi_State_Destroyed(void);
91
void HeavyShinobi_State_Finished(void);
92
void HeavyShinobi_Draw_Shinobi(void);
93
94
// Slash States
95
void HeavyShinobi_StateSlash_Active(void);
96
void HeavyShinobi_Draw_Slash(void);
97
98
// Asteron States
99
void HeavyShinobi_StateAsteron_Thrown(void);
100
void HeavyShinobi_StateAsteron_Debris(void);
101
void HeavyShinobi_StateAsteron_Explode(void);
102
void HeavyShinobi_Draw_Asteron(void);
103
104
// Asteron Spike States
105
void HeavyShinobi_State_AsteronSpike(void);
106
void HeavyShinobi_Draw_AsteronSpike(void);
107
108
// Boundary States
109
void HeavyShinobi_StateBounds_WaitForPlayer(void);
110
void HeavyShinobi_StateBounds_Active(void);
111
void HeavyShinobi_Draw_Bounds(void);
112
113
#endif //! OBJ_HEAVYSHINOBI_H
114
115