Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/PGZ/Crate.h
338 views
1
#ifndef OBJ_CRATE_H
2
#define OBJ_CRATE_H
3
4
#include "Game.h"
5
6
typedef enum {
7
CRATE_FRAME_BLUE,
8
CRATE_FRAME_ORANGE_BROKEN,
9
CRATE_FRAME_ORANGE,
10
CRATE_FRAME_BLUE_BG,
11
} CrateFrameIDs;
12
13
// Object Class
14
struct ObjectCrate {
15
RSDK_OBJECT
16
uint16 aniFrames;
17
uint16 sfxExplosion2;
18
};
19
20
// Entity Class
21
struct EntityCrate {
22
MANIA_PLATFORM_BASE
23
24
bool32 ignoreItemBox;
25
};
26
27
// Object Struct
28
extern ObjectCrate *Crate;
29
30
// Standard Entity Events
31
void Crate_Update(void);
32
void Crate_LateUpdate(void);
33
void Crate_StaticUpdate(void);
34
void Crate_Draw(void);
35
void Crate_Create(void *data);
36
void Crate_StageLoad(void);
37
#if GAME_INCLUDE_EDITOR
38
void Crate_EditorDraw(void);
39
void Crate_EditorLoad(void);
40
#endif
41
void Crate_Serialize(void);
42
43
// Extra Entity Functions
44
void Crate_Break(EntityCrate *entity);
45
void Crate_MoveY(EntityCrate *self, int32 offset);
46
bool32 Crate_Collide(void);
47
48
void Crate_State_None(void);
49
void Crate_State_ApplyGravity(void);
50
void Crate_State_WaitToFall(void);
51
void Crate_State_Fall(void);
52
53
#endif //! OBJ_CRATE_H
54
55