Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/UFO/UFO_Player.h
338 views
1
#ifndef OBJ_UFO_PLAYER_H
2
#define OBJ_UFO_PLAYER_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectUFO_Player {
8
RSDK_OBJECT
9
int32 maxSpeed;
10
uint16 aniFrames; // unused
11
uint16 sfxJump;
12
uint16 sfxCharge;
13
uint16 sfxRelease;
14
uint16 sfxLoseRings;
15
uint16 sfxDrop;
16
uint16 sfxBumper;
17
uint16 sfxSpring;
18
uint16 sfxSkid;
19
uint16 sfxGrittyGround;
20
uint16 jogModel;
21
uint16 dashModel;
22
uint16 jumpModel;
23
uint16 ballModel;
24
uint16 tumbleModel;
25
uint16 sceneIndex;
26
};
27
28
// Entity Class
29
struct EntityUFO_Player {
30
RSDK_ENTITY
31
StateMachine(state);
32
int32 machQuota1;
33
int32 machQuota2;
34
int32 machQuota3;
35
int32 startingRings;
36
int32 timer;
37
int32 courseOutTimer;
38
int32 angleX;
39
int32 height;
40
int32 gravityStrength;
41
int32 angleZ;
42
int32 velDivisor;
43
int32 bumperTimer;
44
int32 angleVel;
45
int32 skidTimer;
46
EntityUFO_Camera *camera;
47
EntityUFO_Circuit *circuitPtr;
48
Matrix matRotate;
49
Matrix matTransform;
50
Matrix matWorld;
51
Matrix matNormal;
52
StateMachine(stateInput);
53
int32 controllerID;
54
bool32 up;
55
bool32 down;
56
bool32 left;
57
bool32 right;
58
bool32 jumpPress;
59
bool32 jumpHold;
60
Animator animator;
61
};
62
63
// Object Struct
64
extern ObjectUFO_Player *UFO_Player;
65
66
// Standard Entity Events
67
void UFO_Player_Update(void);
68
void UFO_Player_LateUpdate(void);
69
void UFO_Player_StaticUpdate(void);
70
void UFO_Player_Draw(void);
71
void UFO_Player_Create(void *data);
72
void UFO_Player_StageLoad(void);
73
#if GAME_INCLUDE_EDITOR
74
void UFO_Player_EditorDraw(void);
75
void UFO_Player_EditorLoad(void);
76
#endif
77
void UFO_Player_Serialize(void);
78
79
// Extra Entity Functions
80
void UFO_Player_Input_P1(void);
81
void UFO_Player_ChangeMachState(void);
82
void UFO_Player_HandleBumperTiles(void);
83
void UFO_Player_HandleSpeedUp(void);
84
void UFO_Player_State_Run(void);
85
void UFO_Player_State_Jump(void);
86
void UFO_Player_State_Springboard(void);
87
void UFO_Player_State_Trip(void);
88
void UFO_Player_State_CourseOut(void);
89
void UFO_Player_State_UFOCaught_Charge(void);
90
void UFO_Player_State_UFOCaught_Released(void);
91
92
#endif //! OBJ_UFO_PLAYER_H
93
94