Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/TMZ/BallHog.h
338 views
1
#ifndef OBJ_BALLHOG_H
2
#define OBJ_BALLHOG_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectBallHog {
8
RSDK_OBJECT
9
Hitbox hitboxBadnik;
10
Hitbox hitboxBomb;
11
uint16 aniFrames;
12
uint16 sfxExplosion;
13
uint16 sfxArrowHit;
14
uint16 sfxDrop;
15
uint16 sfxJump;
16
};
17
18
// Entity Class
19
struct EntityBallHog {
20
RSDK_ENTITY
21
StateMachine(state);
22
uint8 numJumps;
23
uint8 bombTime;
24
uint8 timer;
25
uint8 jumpCount;
26
Vector2 startPos;
27
uint8 startDir;
28
Animator animator;
29
};
30
31
// Object Struct
32
extern ObjectBallHog *BallHog;
33
34
// Standard Entity Events
35
void BallHog_Update(void);
36
void BallHog_LateUpdate(void);
37
void BallHog_StaticUpdate(void);
38
void BallHog_Draw(void);
39
void BallHog_Create(void *data);
40
void BallHog_StageLoad(void);
41
#if GAME_INCLUDE_EDITOR
42
void BallHog_EditorDraw(void);
43
void BallHog_EditorLoad(void);
44
#endif
45
void BallHog_Serialize(void);
46
47
// Extra Entity Functions
48
void BallHog_DebugSpawn(void);
49
void BallHog_DebugDraw(void);
50
51
void BallHog_CheckPlayerCollisions(void);
52
void BallHog_CheckOffScreen(void);
53
54
void BallHog_State_Init(void);
55
void BallHog_State_Idle(void);
56
void BallHog_State_Jump(void);
57
void BallHog_State_Land(void);
58
void BallHog_State_DropBomb(void);
59
60
void BallHog_State_Bomb(void);
61
62
#endif //! OBJ_BALLHOG_H
63
64