Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/LRZ/LRZ3Setup.c
338 views
1
// ---------------------------------------------------------------------
2
// RSDK Project: Sonic Mania
3
// Object Description: LRZ3Setup Object
4
// Object Author: Christian Whitehead/Simon Thomley/Hunter Bridges
5
// Decompiled by: Rubberduckycooly & RMGRich
6
// ---------------------------------------------------------------------
7
8
#include "Game.h"
9
10
ObjectLRZ3Setup *LRZ3Setup;
11
12
void LRZ3Setup_Update(void) {}
13
14
void LRZ3Setup_LateUpdate(void) {}
15
16
void LRZ3Setup_StaticUpdate(void) {}
17
18
void LRZ3Setup_Draw(void) {}
19
20
void LRZ3Setup_Create(void *data) {}
21
22
void LRZ3Setup_StageLoad(void)
23
{
24
#if MANIA_USE_PLUS
25
if (SceneInfo->filter & FILTER_ENCORE) {
26
RSDK.LoadPalette(0, "EncoreLRZ3.act", 0b0000000011111111);
27
RSDK.CopyPalette(0, 240, 1, 240, 16);
28
}
29
#endif
30
31
Animals->animalTypes[0] = ANIMAL_FLICKY;
32
Animals->animalTypes[1] = ANIMAL_CUCKY;
33
34
if (globals->suppressTitlecard) {
35
SaveGame_LoadPlayerState();
36
Zone_StartFadeIn(10, 0x000000);
37
}
38
39
if ((isMainGameMode() && globals->enableIntro && !CutsceneRules_CheckStageReload()) || !CutsceneRules_CheckStageReload()) {
40
CREATE_ENTITY(LRZ3Cutscene, NULL, 0, 0);
41
}
42
43
#if MANIA_USE_PLUS
44
if (globals->gameMode == MODE_ENCORE && globals->tempFlags) {
45
if (!CutsceneRules_CheckStageReload()) {
46
foreach_all(Player, player) { player->position.y += 0x8000000; }
47
}
48
}
49
#endif
50
51
if (isMainGameMode() && CutsceneRules_IsAct2()) {
52
#if MANIA_USE_PLUS
53
if (globals->gameMode == MODE_ENCORE) {
54
if (!globals->tempFlags) {
55
Zone->stageFinishCallback = LRZ3Outro_StageFinish_EndAct2ST;
56
}
57
}
58
else {
59
if (!CHECK_CHARACTER_ID(ID_KNUCKLES, 1)) {
60
Zone->stageFinishCallback = LRZ3Outro_StageFinish_EndAct2ST;
61
}
62
else {
63
LRZ3Setup->cutsceneOutroK = CutsceneSeq_GetEntity(LRZ3OutroK->classID);
64
if (LRZ3Setup->cutsceneOutroK)
65
Zone->stageFinishCallback = LRZ3Setup_StageFinish_EndAct2K;
66
}
67
}
68
#else
69
if (CHECK_CHARACTER_ID(ID_KNUCKLES, 1))
70
LRZ3Setup->cutsceneOutroK = CutsceneSeq_GetEntity(LRZ3OutroK->classID);
71
72
if (LRZ3Setup->cutsceneOutroK)
73
Zone->stageFinishCallback = LRZ3Setup_StageFinish_EndAct2K;
74
#endif
75
}
76
}
77
78
void LRZ3Setup_StageFinish_EndAct2K(void) { LRZ3Setup->cutsceneOutroK->active = ACTIVE_NORMAL; }
79
80
#if GAME_INCLUDE_EDITOR
81
void LRZ3Setup_EditorDraw(void) {}
82
83
void LRZ3Setup_EditorLoad(void) {}
84
#endif
85
86
void LRZ3Setup_Serialize(void) {}
87
88