Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/LRZ/LRZConveyor.h
338 views
1
#ifndef OBJ_LRZCONVEYOR_H
2
#define OBJ_LRZCONVEYOR_H
3
4
#include "Game.h"
5
6
typedef enum {
7
LRZCONVEYOR_BEHAVIOR_CHANGEACTIVE,
8
LRZCONVEYOR_BEHAVIOR_CHANGEACTIVE_TOGGLE,
9
LRZCONVEYOR_BEHAVIOR_CHANGEDIR,
10
LRZCONVEYOR_BEHAVIOR_CHANGEDIR_TOGGLE,
11
} LRZConveyorButtonBehaviours;
12
13
// Object Class
14
struct ObjectLRZConveyor {
15
RSDK_OBJECT
16
uint16 aniFrames;
17
color lineColors[64];
18
};
19
20
// Entity Class
21
struct EntityLRZConveyor {
22
RSDK_ENTITY
23
int32 slope;
24
int32 length;
25
int32 speed;
26
bool32 globalControl;
27
int32 buttonTag;
28
uint8 buttonBehavior;
29
bool32 off;
30
uint8 isOff;
31
uint8 startDir;
32
Vector2 startPos;
33
int32 unused;
34
EntityButton *taggedButton;
35
Hitbox hitbox;
36
Animator wheelAnimator;
37
Animator smallWheelAnimator;
38
};
39
40
// Object Struct
41
extern ObjectLRZConveyor *LRZConveyor;
42
43
// Standard Entity Events
44
void LRZConveyor_Update(void);
45
void LRZConveyor_LateUpdate(void);
46
void LRZConveyor_StaticUpdate(void);
47
void LRZConveyor_Draw(void);
48
void LRZConveyor_Create(void *data);
49
void LRZConveyor_StageLoad(void);
50
#if GAME_INCLUDE_EDITOR
51
void LRZConveyor_EditorDraw(void);
52
void LRZConveyor_EditorLoad(void);
53
#endif
54
void LRZConveyor_Serialize(void);
55
56
// Extra Entity Functions
57
void LRZConveyor_HandleBehaviour(void);
58
void LRZConveyor_HandlePlayerInteractions(void);
59
int32 LRZConveyor_HandlePlayerCollisions(EntityLRZConveyor *conveyor, void *p, Hitbox *hitboxPtr);
60
void LRZConveyor_DrawWheels(void);
61
void LRZConveyor_DrawDeformedLine(int32 startY, int32 startX, int32 endX, int32 endY, int32 offsetX, int32 offsetY, int32 len, color *color);
62
void LRZConveyor_DrawConveyorLines(void);
63
64
#endif //! OBJ_LRZCONVEYOR_H
65
66