Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/CPZ/StickyPlatform.h
338 views
1
#ifndef OBJ_STICKYPLATFORM_H
2
#define OBJ_STICKYPLATFORM_H
3
4
#include "Game.h"
5
6
typedef enum {
7
STICKYPLATFORM_UP,
8
STICKYPLATFORM_DOWN,
9
STICKYPLATFORM_RIGHT,
10
STICKYPLATFORM_LEFT,
11
} StickyPlatformTypes;
12
13
// Object Class
14
struct ObjectStickyPlatform {
15
RSDK_OBJECT
16
uint16 sfxLand;
17
uint16 aniFrames;
18
};
19
20
// Entity Class
21
struct EntityStickyPlatform {
22
RSDK_ENTITY
23
StateMachine(state);
24
StickyPlatformTypes type;
25
Vector2 amplitude;
26
int32 speed;
27
bool32 oscillate;
28
int32 unused;
29
int32 activePlayers;
30
int32 playerTimer[PLAYER_COUNT];
31
Vector2 centerPos;
32
Hitbox hitbox;
33
Animator animator;
34
};
35
36
// Object Struct
37
extern ObjectStickyPlatform *StickyPlatform;
38
39
// Standard Entity Events
40
void StickyPlatform_Update(void);
41
void StickyPlatform_LateUpdate(void);
42
void StickyPlatform_StaticUpdate(void);
43
void StickyPlatform_Draw(void);
44
void StickyPlatform_Create(void *data);
45
void StickyPlatform_StageLoad(void);
46
#if GAME_INCLUDE_EDITOR
47
void StickyPlatform_EditorDraw(void);
48
void StickyPlatform_EditorLoad(void);
49
#endif
50
void StickyPlatform_Serialize(void);
51
52
// Extra Entity Functions
53
void StickyPlatform_Interact(void);
54
55
void StickyPlatform_State_HandleMovement(void);
56
void StickyPlatform_State_MoveBack(void);
57
void StickyPlatform_State_MoveBackForth(void);
58
void StickyPlatform_State_Oscillating(void);
59
60
#endif //! OBJ_STICKYPLATFORM_H
61
62