Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/SPZ/CableWarp.h
338 views
1
#ifndef OBJ_CABLEWARP_H
2
#define OBJ_CABLEWARP_H
3
4
#include "Game.h"
5
6
typedef enum {
7
CABLEWARP_ENTRY,
8
CABLEWARP_EXIT,
9
CABLEWARP_NODE,
10
CABLEWARP_TRANSPORT,
11
} CableWarpTypes;
12
13
// Object Class
14
struct ObjectCableWarp {
15
RSDK_OBJECT
16
Hitbox hitboxPlug;
17
Hitbox hitboxTransport;
18
uint16 aniFrames;
19
uint16 sfxCharge;
20
uint16 sfxPulse;
21
uint16 sfxLedgeBreak;
22
};
23
24
// Entity Class
25
struct EntityCableWarp {
26
RSDK_ENTITY
27
StateMachine(state);
28
int32 type;
29
int32 timer;
30
EntityPlayer *player;
31
uint16 slotID;
32
uint16 nextSlot;
33
Animator animator;
34
};
35
36
// Object Struct
37
extern ObjectCableWarp *CableWarp;
38
39
// Standard Entity Events
40
void CableWarp_Update(void);
41
void CableWarp_LateUpdate(void);
42
void CableWarp_StaticUpdate(void);
43
void CableWarp_Draw(void);
44
void CableWarp_Create(void *data);
45
void CableWarp_StageLoad(void);
46
#if GAME_INCLUDE_EDITOR
47
void CableWarp_EditorDraw(void);
48
void CableWarp_EditorLoad(void);
49
#endif
50
void CableWarp_Serialize(void);
51
52
// Extra Entity Functions
53
void CableWarp_State_CablePlug(void);
54
void CableWarp_State_CheckPlayerEntry(void);
55
56
void CableWarp_StateTransport_BeginEnter(void);
57
void CableWarp_StateTransport_Enter(void);
58
void CableWarp_StateTransport_MoveToNextNode(void);
59
void CableWarp_StateTransport_EndNode(void);
60
void CableWarp_StateTransport_Exit(void);
61
62
#endif //! OBJ_CABLEWARP_H
63
64