Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/TMZ/FlasherMKII.h
338 views
1
#ifndef OBJ_FLASHERMKII_H
2
#define OBJ_FLASHERMKII_H
3
4
#include "Game.h"
5
6
typedef enum {
7
FLASHERMKII_ORIENTATION_UP,
8
FLASHERMKII_ORIENTATION_DOWN,
9
FLASHERMKII_ORIENTATION_RIGHT,
10
FLASHERMKII_ORIENTATION_LEFT,
11
} FlasherMKIIOrientations;
12
13
// Object Class
14
struct ObjectFlasherMKII {
15
RSDK_OBJECT
16
uint16 aniFrames;
17
uint16 sfxFlop;
18
uint16 sfxZap;
19
};
20
21
// Entity Class
22
struct EntityFlasherMKII {
23
RSDK_ENTITY
24
StateMachine(state);
25
uint8 orientation;
26
int32 type;
27
int32 timer;
28
Vector2 startPos;
29
Animator animator;
30
};
31
32
// Object Struct
33
extern ObjectFlasherMKII *FlasherMKII;
34
35
// Standard Entity Events
36
void FlasherMKII_Update(void);
37
void FlasherMKII_LateUpdate(void);
38
void FlasherMKII_StaticUpdate(void);
39
void FlasherMKII_Draw(void);
40
void FlasherMKII_Create(void *data);
41
void FlasherMKII_StageLoad(void);
42
#if GAME_INCLUDE_EDITOR
43
void FlasherMKII_EditorDraw(void);
44
void FlasherMKII_EditorLoad(void);
45
#endif
46
void FlasherMKII_Serialize(void);
47
48
// Extra Entity Functions
49
void FlasherMKII_DebugSpawn(void);
50
void FlasherMKII_DebugDraw(void);
51
52
void FlasherMKII_CheckOffScreen(void);
53
54
void FlasherMKII_HandlePlayerCollisions(void);
55
void FlasherMKII_HandleHarmPlayerCollisions(void);
56
57
void FlasherMKII_State_Idle(void);
58
void FlasherMKII_State_Moving(void);
59
void FlasherMKII_State_WeakFlash(void);
60
void FlasherMKII_State_StrongFlash(void);
61
void FlasherMKII_State_FinishedFlashing(void);
62
63
#endif //! OBJ_FLASHERMKII_H
64
65