Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/MSZ/MSZSetup.h
338 views
1
#ifndef OBJ_MSZSETUP_H
2
#define OBJ_MSZSETUP_H
3
4
#include "Game.h"
5
6
typedef enum { MSZ_GENERICTRIGGER_ACHIEVEMENT } GenericTriggerTypesMSZ;
7
8
typedef enum {
9
MSZ_DECORATION_MAIN,
10
MSZ_DECORATION_TANKERRAIL,
11
MSZ_DECORATION_TANKERWHEEL,
12
MSZ_DECORATION_CARRIAGEWHEEL,
13
MSZ_DECORATION_CONNECTOR1,
14
MSZ_DECORATION_CONNECTOR2,
15
} DecorationTypesMSZ;
16
17
typedef enum {
18
MSZ_PARALLAXSPRITE_CACTUS1,
19
MSZ_PARALLAXSPRITE_CACTUS2,
20
MSZ_PARALLAXSPRITE_CACTUS3,
21
MSZ_PARALLAXSPRITE_CACTUS4,
22
MSZ_PARALLAXSPRITE_CACTUS5,
23
MSZ_PARALLAXSPRITE_CACTUS6,
24
MSZ_PARALLAXSPRITE_CACTUS7,
25
MSZ_PARALLAXSPRITE_OOZPEEK,
26
} ParallaxSpriteAniIDsMSZ;
27
28
// Object Class
29
struct ObjectMSZSetup {
30
RSDK_OBJECT
31
int32 fadeTimer;
32
uint16 aniTiles;
33
TileLayer *background1;
34
TABLE(int32 deformData[32], { -1, 0, 0, -1, -1, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 });
35
STATIC(int32 bladeCactusFlowerAniTimer, 16);
36
STATIC(int32 bobbingCactusFlowerAniTimer, 30);
37
int32 bladeCactusFlowerAniFrame;
38
int32 bobbingCactusFlowerAniFrame;
39
int32 spinningCactusFlowerAniFrame;
40
bool32 usingRegularPalette;
41
TABLE(int32 bladeCactusFlowerAniSprPos[14], { 0, 1, 2, 3, 4, 5, 2, 3, 4, 5, 2, 1, 6, 7 });
42
TABLE(int32 bladeCactusFlowerAniDuration[14], { 16, 2, 3, 3, 2, 2, 2, 2, 2, 3, 3, 3, 2, 3 });
43
TABLE(int32 bobbingCactusFlowerAniDuration[8], { 16, 2, 4, 5, 16, 2, 4, 5 });
44
int32 storedParallax[512];
45
int32 parallaxMult;
46
int32 parallaxPos;
47
bool32 hasAchievement;
48
EntityMSZ2Cutscene *msz2Cutscene;
49
int32 starPostID;
50
#if MANIA_USE_PLUS
51
int32 chuggaVolume;
52
int32 chuggaChannel;
53
uint16 sfxLocoChugga;
54
#endif
55
};
56
57
// Entity Class
58
struct EntityMSZSetup {
59
RSDK_ENTITY
60
StateMachine(state);
61
int32 timer;
62
};
63
64
// Object Struct
65
extern ObjectMSZSetup *MSZSetup;
66
67
// Standard Entity Events
68
void MSZSetup_Update(void);
69
void MSZSetup_LateUpdate(void);
70
void MSZSetup_StaticUpdate(void);
71
void MSZSetup_Draw(void);
72
void MSZSetup_Create(void *data);
73
void MSZSetup_StageLoad(void);
74
#if GAME_INCLUDE_EDITOR
75
void MSZSetup_EditorDraw(void);
76
void MSZSetup_EditorLoad(void);
77
#endif
78
void MSZSetup_Serialize(void);
79
80
// Extra Entity Functions
81
void MSZSetup_SetBGScrollOrigin(int32 x, int32 y);
82
void MSZSetup_StoreBGParallax(void);
83
void MSZSetup_ReloadBGParallax(void);
84
void MSZSetup_ReloadBGParallax_Multiply(int32 parallaxMult);
85
86
void MSZSetup_State_ManageFade_ST(void);
87
void MSZSetup_State_ManageFade_K(void);
88
#if MANIA_USE_PLUS
89
void MSZSetup_State_ManageFade_E(void);
90
#endif
91
92
void MSZSetup_StageFinish_EndAct1ST(void);
93
void MSZSetup_StageFinish_EndAct1K(void);
94
#if MANIA_USE_PLUS
95
void MSZSetup_StageFinish_EndAct1E(void);
96
#endif
97
98
void MSZSetup_StageFinish_EndAct2(void);
99
void MSZSetup_Trigger_AwardAchievement(void);
100
void MSZSetup_HandleRestart(void);
101
void MSZSetup_State_SwitchPalettes(void);
102
103
#if MANIA_USE_PLUS
104
void MSZSetup_State_CheckFadeTrigger_E(void);
105
void MSZSetup_State_CheckTrainStart(void);
106
void MSZSetup_State_TrainStarting(void);
107
void MSZSetup_State_TrainSequence_MSZ1E(void);
108
void MSZSetup_State_Boss_MSZ1E(void);
109
void MSZSetup_State_AwaitActClearStart(void);
110
void MSZSetup_State_AwaitActClearFinish(void);
111
void MSZSetup_State_MoveToMSZ2Start(void);
112
void MSZSetup_State_AwaitPlayerStopped(void);
113
void MSZSetup_State_StoreMSZ1ScrollPos_E(void);
114
#endif
115
void MSZSetup_State_StoreMSZ1ScrollPos_ST(void);
116
117
void MSZSetup_PlayerState_Pilot(void);
118
void MSZSetup_PlayerState_PostCrashJumpIn(void);
119
120
#endif //! OBJ_MSZSETUP_H
121
122