Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/MMZ/ConveyorPlatform.h
338 views
1
#ifndef OBJ_CONVEYORPLATFORM_H
2
#define OBJ_CONVEYORPLATFORM_H
3
4
#include "Game.h"
5
6
typedef enum {
7
CONVEYORPLATFORM_FIXED,
8
CONVEYORPLATFORM_MOVING,
9
} ConveyorPlatformTypes;
10
11
// Object Class
12
struct ObjectConveyorPlatform {
13
RSDK_OBJECT
14
TABLE(int32 frameIDs[24], { 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1 });
15
TABLE(int32 directionIDs[24], { 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1 });
16
};
17
18
// Entity Class
19
struct EntityConveyorPlatform {
20
RSDK_ENTITY
21
StateMachine(state);
22
StateMachine(stateCollide);
23
int32 type;
24
Vector2 amplitude;
25
int32 node;
26
bool32 hasTension;
27
int8 frameID;
28
uint8 collision;
29
Vector2 tileOrigin;
30
Vector2 centerPos;
31
Vector2 drawPos;
32
Vector2 collisionOffset;
33
int32 stood;
34
int32 timer;
35
int32 stoodAngle;
36
uint8 stoodPlayers;
37
uint8 pushPlayersL;
38
uint8 pushPlayersR;
39
Hitbox hitbox;
40
Animator animator;
41
int32 childCount;
42
43
uint16 interval;
44
uint16 intervalOffset;
45
uint16 flipCount;
46
uint8 flipTimer;
47
};
48
49
// Object Struct
50
extern ObjectConveyorPlatform *ConveyorPlatform;
51
52
// Standard Entity Events
53
void ConveyorPlatform_Update(void);
54
void ConveyorPlatform_LateUpdate(void);
55
void ConveyorPlatform_StaticUpdate(void);
56
void ConveyorPlatform_Draw(void);
57
void ConveyorPlatform_Create(void *data);
58
void ConveyorPlatform_StageLoad(void);
59
#if GAME_INCLUDE_EDITOR
60
void ConveyorPlatform_EditorDraw(void);
61
void ConveyorPlatform_EditorLoad(void);
62
#endif
63
void ConveyorPlatform_Serialize(void);
64
65
// Extra Entity Functions
66
67
#endif //! OBJ_CONVEYORPLATFORM_H
68
69