Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/LRZ/LRZConvControl.h
338 views
1
#ifndef OBJ_LRZCONVCONTROL_H
2
#define OBJ_LRZCONVCONTROL_H
3
4
#include "Game.h"
5
6
typedef enum { LRZCONVCTRL_TRIGGER_PLAYER, LRZCONVCTRL_TRIGGER_BUTTON } LRZConvControlTriggerModes;
7
typedef enum {
8
LRZCONVCTRL_BEHAVIOR_ONOFF_SET,
9
LRZCONVCTRL_BEHAVIOR_ONOFF_SWAP,
10
LRZCONVCTRL_BEHAVIOR_CHANGEDIR_SET,
11
LRZCONVCTRL_BEHAVIOR_CHANGEDIR_SWAP
12
} LRZConvControlBehaviours;
13
// Object Class
14
struct ObjectLRZConvControl {
15
RSDK_OBJECT
16
uint16 aniFrames;
17
};
18
19
// Entity Class
20
struct EntityLRZConvControl {
21
RSDK_ENTITY
22
StateMachine(state);
23
uint8 triggerMode;
24
int32 buttonTag;
25
Vector2 hitboxSize;
26
uint8 behavior;
27
uint8 flipVal;
28
EntityButton *taggedButton;
29
uint8 activePlayers;
30
uint8 wasToggled;
31
Hitbox hitbox;
32
Animator animator;
33
};
34
35
// Object Struct
36
extern ObjectLRZConvControl *LRZConvControl;
37
38
// Standard Entity Events
39
void LRZConvControl_Update(void);
40
void LRZConvControl_LateUpdate(void);
41
void LRZConvControl_StaticUpdate(void);
42
void LRZConvControl_Draw(void);
43
void LRZConvControl_Create(void *data);
44
void LRZConvControl_StageLoad(void);
45
#if GAME_INCLUDE_EDITOR
46
void LRZConvControl_EditorDraw(void);
47
void LRZConvControl_EditorLoad(void);
48
#endif
49
void LRZConvControl_Serialize(void);
50
51
// Extra Entity Functions
52
void LRZConvControl_HandlePlayerTrigger(void);
53
void LRZConvControl_HandleButtonTrigger(void);
54
55
#endif //! OBJ_LRZCONVCONTROL_H
56
57