Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/Cutscene/ChaosEmerald.h
338 views
1
#ifndef OBJ_CHAOSEMERALD_H
2
#define OBJ_CHAOSEMERALD_H
3
4
#include "Game.h"
5
6
typedef enum {
7
CHAOSEMERALD_GREEN,
8
CHAOSEMERALD_YELLOW,
9
CHAOSEMERALD_BLUE,
10
CHAOSEMERALD_PURPLE,
11
CHAOSEMERALD_GRAY,
12
CHAOSEMERALD_CYAN,
13
CHAOSEMERALD_RED,
14
} EmeraldColors;
15
16
// Object Class
17
struct ObjectChaosEmerald {
18
RSDK_OBJECT
19
uint16 aniFrames;
20
TABLE(int32 emeraldColors[36],
21
{ 0xA00000, 0xB01820, 0xC03040, 0xD04860, 0xE06080, 0x4040C8, 0x5858C8, 0xE060E0, 0x7070C8, 0x8888C8, 0xA0A0C8, 0xC048C8,
22
0xA030B0, 0x801898, 0x600080, 0x88B8E0, 0x80E0, 0x2890E0, 0x58A8E0, 0xB8D0E0, 0x208000, 0x409800, 0x60B000, 0x80C800,
23
0xA0E000, 0xE0E0A0, 0xD0C878, 0xC0B050, 0xB09828, 0xA08000, 0x808080, 0x909090, 0xA0A0A0, 0xC0C0C0, 0xB0B0B0, 0xE8E8E8 });
24
int32 colorStorage[36];
25
};
26
27
// Entity Class
28
struct EntityChaosEmerald {
29
RSDK_ENTITY
30
StateMachine(state);
31
uint8 type;
32
int32 radius;
33
Vector2 originPos;
34
Animator animator;
35
};
36
37
// Object Struct
38
extern ObjectChaosEmerald *ChaosEmerald;
39
40
// Standard Entity Events
41
void ChaosEmerald_Update(void);
42
void ChaosEmerald_LateUpdate(void);
43
void ChaosEmerald_StaticUpdate(void);
44
void ChaosEmerald_Draw(void);
45
void ChaosEmerald_Create(void *data);
46
void ChaosEmerald_StageLoad(void);
47
#if GAME_INCLUDE_EDITOR
48
void ChaosEmerald_EditorDraw(void);
49
void ChaosEmerald_EditorLoad(void);
50
#endif
51
void ChaosEmerald_Serialize(void);
52
53
// Extra Entity Functions
54
void ChaosEmerald_State_None(void);
55
void ChaosEmerald_State_Rotate(void);
56
57
#endif //! OBJ_CHAOSEMERALD_H
58
59