Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/TMZ/CrashTest.h
338 views
1
#ifndef OBJ_CRASHTEST_H
2
#define OBJ_CRASHTEST_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectCrashTest {
8
RSDK_OBJECT
9
uint16 aniFrames;
10
uint16 sfxExplosion;
11
uint16 sfxCrash;
12
uint16 sfxTrafficLight;
13
uint16 sfxCarRev;
14
uint16 sfxSpeedBooster;
15
};
16
17
// Entity Class
18
struct EntityCrashTest {
19
RSDK_ENTITY
20
StateMachine(state);
21
int32 length;
22
bool32 debugParticles;
23
uint8 activePlayers;
24
int32 playerTimers[PLAYER_COUNT];
25
Vector2 startPos;
26
int32 timer;
27
int32 travelDistance;
28
bool32 boosterActive;
29
Vector2 debrisOffsets[8];
30
bool32 turningGreen;
31
bool32 prevTurningGreen;
32
Hitbox hitboxSeat;
33
Hitbox hitboxFront;
34
Hitbox hitboxBack;
35
Hitbox hitboxFloor;
36
Hitbox hitboxStopper;
37
Hitbox hitboxBooster;
38
Animator carAnimator;
39
Animator driverAnimator;
40
Animator lightAnimator;
41
Animator stopperAnimator;
42
};
43
44
// Object Struct
45
extern ObjectCrashTest *CrashTest;
46
47
// Standard Entity Events
48
void CrashTest_Update(void);
49
void CrashTest_LateUpdate(void);
50
void CrashTest_StaticUpdate(void);
51
void CrashTest_Draw(void);
52
void CrashTest_Create(void *data);
53
void CrashTest_StageLoad(void);
54
#if GAME_INCLUDE_EDITOR
55
void CrashTest_EditorDraw(void);
56
void CrashTest_EditorLoad(void);
57
#endif
58
void CrashTest_Serialize(void);
59
60
// Extra Entity Functions
61
void CrashTest_SetupHitboxes(void);
62
void CrashTest_CheckOffScreen(void);
63
void CrashTest_HandlePlayerCrash(void);
64
void CrashTest_CheckPlayerCollisionsSolid(void);
65
void CrashTest_CheckPlayerRide(void);
66
void CrashTest_CheckPlayerJump(void);
67
void CrashTest_HandleLightAnims(void);
68
69
void CrashTest_State_Init(void);
70
void CrashTest_State_AwaitPlayer(void);
71
void CrashTest_State_Rev(void);
72
void CrashTest_State_Move(void);
73
void CrashTest_State_Crashed(void);
74
75
#endif //! OBJ_CRASHTEST_H
76
77