Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/CPZ/Springboard.h
338 views
1
#ifndef OBJ_SPRINGBOARD_H
2
#define OBJ_SPRINGBOARD_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectSpringboard {
8
RSDK_OBJECT
9
// Unused here, was used in S2' 13 for getting the 'force' from propertyValue, mania just uses an editable var
10
TABLE(int32 forces[3], { -0x40000, -0xA0000, -0x80000 });
11
TABLE(int32 springPower[40], { 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, -0x10000, -0x10000,
12
-0x10000, -0x10000, -0x10000, -0x10000, -0x10000, -0x10000, -0x10000, -0x10000, -0x10000, -0x10000,
13
-0x10000, -0x10000, -0x10000, -0x10000, -0x20000, -0x20000, -0x20000, -0x20000, -0x20000, -0x20000,
14
-0x20000, -0x20000, -0x30000, -0x30000, -0x30000, -0x30000, -0x30000, -0x30000, -0x40000, -0x40000 });
15
TABLE(int32 heightsReady[28], { 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 17, 18, 19, 20, 20, 21, 21, 22, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24 });
16
TABLE(int32 heightsFlat[28], { 8, 9, 10, 11, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 15, 15, 16, 16, 16, 16, 15, 15, 14, 14, 13, 13 });
17
uint16 aniFrames;
18
uint16 sfxSpring;
19
};
20
21
// Entity Class
22
struct EntitySpringboard {
23
RSDK_ENTITY
24
int32 force;
25
int32 bounceDelay; // bounceDelay goes unused here, though it was used in S2 '13
26
uint8 activePlayers;
27
Animator animator;
28
};
29
30
// Object Struct
31
extern ObjectSpringboard *Springboard;
32
33
// Standard Entity Events
34
void Springboard_Update(void);
35
void Springboard_LateUpdate(void);
36
void Springboard_StaticUpdate(void);
37
void Springboard_Draw(void);
38
void Springboard_Create(void *data);
39
void Springboard_StageLoad(void);
40
#if GAME_INCLUDE_EDITOR
41
void Springboard_EditorDraw(void);
42
void Springboard_EditorLoad(void);
43
#endif
44
void Springboard_Serialize(void);
45
46
// Extra Entity Functions
47
void Springboard_DebugSpawn(void);
48
void Springboard_DebugDraw(void);
49
50
#endif //! OBJ_SPRINGBOARD_H
51
52