Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/HPZ/Batbot.h
338 views
1
#ifndef OBJ_BATBOT_H
2
#define OBJ_BATBOT_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectBatbot {
8
RSDK_OBJECT
9
Hitbox hitboxBadnik;
10
Hitbox hitboxSpinCheck;
11
Hitbox hitboxAttack;
12
Hitbox hitboxPlayer;
13
uint16 aniFrames;
14
uint8 directionTable[5];
15
};
16
17
// Entity Class
18
struct EntityBatbot {
19
RSDK_ENTITY
20
StateMachine(state);
21
Vector2 startPos;
22
uint8 startDir;
23
uint16 timer;
24
int32 arcAngle;
25
int32 originY;
26
Vector2 landPos;
27
int32 unused1;
28
int32 unused2;
29
int32 swoopAngle;
30
EntityPlayer *playerPtr;
31
uint8 swoopDir;
32
bool32 showJet;
33
uint16 unused3; // set to 0, not used, value isn't in S2
34
Animator bodyAnimator;
35
Animator jetAnimator;
36
};
37
38
// Object Entity
39
extern ObjectBatbot *Batbot;
40
41
// Standard Entity Events
42
void Batbot_Update(void);
43
void Batbot_LateUpdate(void);
44
void Batbot_StaticUpdate(void);
45
void Batbot_Draw(void);
46
void Batbot_Create(void *data);
47
void Batbot_StageLoad(void);
48
#if GAME_INCLUDE_EDITOR
49
void Batbot_EditorDraw(void);
50
void Batbot_EditorLoad(void);
51
#endif
52
void Batbot_Serialize(void);
53
54
// Extra Entity Functions
55
void Batbot_DebugSpawn(void);
56
void Batbot_DebugDraw(void);
57
58
void Batbot_CheckPlayerCollisions(void);
59
60
void Batbot_State_Init(void);
61
void Batbot_State_Idle(void);
62
void Batbot_State_Attack(void);
63
void Batbot_State_SwoopLeft(void);
64
void Batbot_State_SwoopRight(void);
65
66
#endif //! OBJ_BATBOT_H
67
68