Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/CPZ/DNARiser.h
338 views
1
#ifndef OBJ_DNARISER_H
2
#define OBJ_DNARISER_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectDNARiser {
8
RSDK_OBJECT
9
uint16 aniFrames;
10
uint16 sfxGrab;
11
uint16 sfxScan;
12
uint16 sfxBurst;
13
uint16 sfxTiny[6];
14
Hitbox hitbox;
15
};
16
17
// Entity Class
18
struct EntityDNARiser {
19
RSDK_ENTITY
20
StateMachine(state);
21
StateMachine(stateDraw);
22
bool32 noBubbleScaling;
23
bool32 popped;
24
Vector2 popPos;
25
int32 bubbleScale;
26
Animator bubbleAnimator;
27
Animator popAnimator;
28
uint16 startHelixPos;
29
int16 timer;
30
uint8 scaleTimer;
31
bool32 canDestroySelf;
32
int32 scanSfxDir;
33
uint16 sfxTimer;
34
uint8 lastSfxID;
35
int32 height;
36
Vector2 speed;
37
uint8 activePlayers;
38
int32 risePos;
39
int32 amplitude;
40
Vector2 startPos;
41
Vector2 maxSpeed;
42
uint16 helixPos;
43
EntityDNARiser *firstChild;
44
EntityDNARiser *child;
45
EntityDNARiser *sibling;
46
EntityDNARiser *lastChild;
47
EntityDNARiser *parent;
48
};
49
50
// Object Struct
51
extern ObjectDNARiser *DNARiser;
52
53
// Standard Entity Events
54
void DNARiser_Update(void);
55
void DNARiser_LateUpdate(void);
56
void DNARiser_StaticUpdate(void);
57
void DNARiser_Draw(void);
58
void DNARiser_Create(void *data);
59
void DNARiser_StageLoad(void);
60
#if GAME_INCLUDE_EDITOR
61
void DNARiser_EditorDraw(void);
62
void DNARiser_EditorLoad(void);
63
#endif
64
void DNARiser_Serialize(void);
65
66
// Extra Entity Functions
67
void DNARiser_State_BubbleBurst(void);
68
void DNARiser_SetupBurst(void);
69
Vector2 DNARiser_CalculateScale(Vector2 *scalePtr);
70
71
void DNARiser_State_Init(void);
72
void DNARiser_State_HandleInteractions(void);
73
void DNARiser_State_HelixRise(void);
74
void DNARiser_State_HelixBurst(void);
75
void DNARiser_State_ResetRiser(void);
76
void DNARiser_State_OrbSetup(void);
77
void DNARiser_State_OrbIdle(void);
78
void DNARiser_State_OrbFall(void);
79
80
void DNARiser_Draw_Main(void);
81
void DNARiser_Draw_Helix(void);
82
83
#endif //! OBJ_DNARISER_H
84
85