Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/MSZ/DBTower.h
338 views
1
#ifndef OBJ_DBTOWER_H
2
#define OBJ_DBTOWER_H
3
4
#include "Game.h"
5
6
#define DBTOWER_SEGMENT_COUNT (4)
7
8
// Object Class
9
struct ObjectDBTower {
10
RSDK_OBJECT
11
Hitbox hitboxSegment;
12
bool32 defeated;
13
uint16 sfxRocketJet;
14
uint16 sfxHit;
15
uint16 sfxExplosion2;
16
uint16 sfxExplosion3;
17
uint16 sfxBumper3;
18
uint16 sfxAssemble;
19
uint16 sfxRocketJet2;
20
uint16 sfxRockemSockem;
21
uint16 aniFrames;
22
};
23
24
// Entity Class
25
struct EntityDBTower {
26
RSDK_ENTITY
27
StateMachine(state);
28
int32 timer;
29
int32 invincibilityTimer;
30
int32 health;
31
Vector2 originPos;
32
Vector2 bodyPositions[DBTOWER_SEGMENT_COUNT];
33
int32 segmentUnused1[DBTOWER_SEGMENT_COUNT];
34
int32 segmentUnused2[DBTOWER_SEGMENT_COUNT];
35
int32 segmentUnused3[DBTOWER_SEGMENT_COUNT];
36
int32 bodyAngles[DBTOWER_SEGMENT_COUNT];
37
int32 wobbleAngle;
38
int32 wobbleAngleVel;
39
int32 segmentOffsetY;
40
int32 xOffsetAngle;
41
uint8 connectedSegmentCount;
42
Animator *segmentAnimators[DBTOWER_SEGMENT_COUNT];
43
uint8 playerTimers[PLAYER_COUNT];
44
Animator headAnimator;
45
Animator bodyAnimator;
46
};
47
48
// Object Struct
49
extern ObjectDBTower *DBTower;
50
51
// Standard Entity Events
52
void DBTower_Update(void);
53
void DBTower_LateUpdate(void);
54
void DBTower_StaticUpdate(void);
55
void DBTower_Draw(void);
56
void DBTower_Create(void *data);
57
void DBTower_StageLoad(void);
58
#if GAME_INCLUDE_EDITOR
59
void DBTower_EditorDraw(void);
60
void DBTower_EditorLoad(void);
61
#endif
62
void DBTower_Serialize(void);
63
64
// Extra Entity Functions
65
void DBTower_CheckPlayerCollisions_Head(void);
66
void DBTower_Explode(void);
67
68
void DBTower_State_SetupArena(void);
69
#if MANIA_USE_PLUS
70
void DBTower_State_Setup_Encore(void);
71
#endif
72
void DBTower_State_HandleBoss(void);
73
void DBTower_State_Destroyed(void);
74
void DBTower_State_Finish(void);
75
#if MANIA_USE_PLUS
76
void DBTower_State_SpawnSignPost(void);
77
#endif
78
79
void DBTower_CheckPlayerCollisions_Body(void);
80
void DBTower_State_BodyBouncing(void);
81
void DBTower_State_BodyRolling(void);
82
83
#endif //! OBJ_DBTOWER_H
84
85