Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/Common/CollapsingPlatform.h
338 views
1
#ifndef OBJ_COLLAPSINGPLATFORM_H
2
#define OBJ_COLLAPSINGPLATFORM_H
3
4
#include "Game.h"
5
6
typedef enum {
7
COLLAPSEPLAT_LEFT,
8
COLLAPSEPLAT_RIGHT,
9
COLLAPSEPLAT_CENTER,
10
COLLAPSEPLAT_LR,
11
COLLAPSEPLAT_LRC,
12
} CollapsingPlatformTypes;
13
14
typedef enum {
15
COLLAPSEPLAT_TARGET_LOW,
16
COLLAPSEPLAT_TARGET_HIGH,
17
} CollapsingPlatformTargetLayers;
18
19
// Object Class
20
struct ObjectCollapsingPlatform {
21
RSDK_OBJECT
22
uint8 shift;
23
Animator animator;
24
uint16 aniFrames;
25
uint16 sfxCrumble;
26
};
27
28
// Entity Class
29
struct EntityCollapsingPlatform {
30
RSDK_ENTITY
31
StateMachine(state);
32
Vector2 size;
33
bool32 respawn;
34
uint16 targetLayer;
35
uint8 type;
36
int32 delay;
37
bool32 eventOnly;
38
bool32 mightyOnly;
39
int32 unused1;
40
int32 collapseDelay;
41
uint16 storedTiles[256];
42
Hitbox hitboxTrigger;
43
Vector2 stoodPos;
44
};
45
46
// Object Struct
47
extern ObjectCollapsingPlatform *CollapsingPlatform;
48
49
// Standard Entity Events
50
void CollapsingPlatform_Update(void);
51
void CollapsingPlatform_LateUpdate(void);
52
void CollapsingPlatform_StaticUpdate(void);
53
void CollapsingPlatform_Draw(void);
54
void CollapsingPlatform_Create(void *data);
55
void CollapsingPlatform_StageLoad(void);
56
#if GAME_INCLUDE_EDITOR
57
void CollapsingPlatform_EditorDraw(void);
58
void CollapsingPlatform_EditorLoad(void);
59
#endif
60
void CollapsingPlatform_Serialize(void);
61
62
// Extra Entity Functions
63
void CollapsingPlatform_State_Left(void);
64
void CollapsingPlatform_State_Right(void);
65
void CollapsingPlatform_State_Center(void);
66
void CollapsingPlatform_State_LeftRight(void);
67
void CollapsingPlatform_State_LeftRightCenter(void);
68
69
#endif //! OBJ_COLLAPSINGPLATFORM_H
70
71