Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/SSZ/BouncePlant.h
338 views
1
#ifndef OBJ_BOUNCEPLANT_H
2
#define OBJ_BOUNCEPLANT_H
3
4
#include "Game.h"
5
6
#define BOUNCEPLANT_NODE_COUNT (8)
7
8
// Object Class
9
struct ObjectBouncePlant {
10
RSDK_OBJECT
11
Hitbox hitbox;
12
uint16 aniFrames;
13
uint16 sfxBouncePlant;
14
};
15
16
// Entity Class
17
struct EntityBouncePlant {
18
RSDK_ENTITY
19
StateMachine(state);
20
int32 recoilDuration;
21
Vector2 drawPos[BOUNCEPLANT_NODE_COUNT];
22
Vector2 nodeStartPos[BOUNCEPLANT_NODE_COUNT];
23
int32 recoilVelocity[BOUNCEPLANT_NODE_COUNT];
24
Vector2 stoodPos;
25
bool32 stood;
26
bool32 instantRecoil;
27
int32 depression;
28
int32 centerX;
29
Animator nodeAnimator;
30
Animator decorAnimators[BOUNCEPLANT_NODE_COUNT];
31
};
32
33
// Object Struct
34
extern ObjectBouncePlant *BouncePlant;
35
36
// Standard Entity Events
37
void BouncePlant_Update(void);
38
void BouncePlant_LateUpdate(void);
39
void BouncePlant_StaticUpdate(void);
40
void BouncePlant_Draw(void);
41
void BouncePlant_Create(void *data);
42
void BouncePlant_StageLoad(void);
43
#if GAME_INCLUDE_EDITOR
44
void BouncePlant_EditorDraw(void);
45
void BouncePlant_EditorLoad(void);
46
#endif
47
void BouncePlant_Serialize(void);
48
49
// Extra Entity Functions
50
void BoucePlant_SetupNodePositions(void);
51
int32 BoucePlant_GetNodeStandY(int32 x);
52
int32 BoucePlant_GetNodeY(int32 x);
53
54
#endif //! OBJ_BOUNCEPLANT_H
55
56