Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/LRZ/LRZ3Cutscene.c
338 views
1
// ---------------------------------------------------------------------
2
// RSDK Project: Sonic Mania
3
// Object Description: LRZ3Cutscene Object
4
// Object Author: Christian Whitehead/Simon Thomley/Hunter Bridges
5
// Decompiled by: Rubberduckycooly & RMGRich
6
// ---------------------------------------------------------------------
7
8
#include "Game.h"
9
10
ObjectLRZ3Cutscene *LRZ3Cutscene;
11
12
// INFO: This is the LRZ3 Intro
13
14
void LRZ3Cutscene_Update(void)
15
{
16
RSDK_THIS(LRZ3Cutscene);
17
18
CutsceneSeq_StartSequence(self, LRZ3Cutscene_Cutscene_FadeIn, LRZ3Cutscene_Cutscene_RunRight, StateMachine_None);
19
20
#if MANIA_USE_PLUS
21
CutsceneSeq_SetSkipType(SKIPTYPE_DISABLED);
22
#endif
23
24
self->active = ACTIVE_NEVER;
25
}
26
27
void LRZ3Cutscene_LateUpdate(void) {}
28
29
void LRZ3Cutscene_StaticUpdate(void) {}
30
31
void LRZ3Cutscene_Draw(void) {}
32
33
void LRZ3Cutscene_Create(void *data)
34
{
35
RSDK_THIS(LRZ3Cutscene);
36
37
self->active = ACTIVE_NORMAL;
38
}
39
40
bool32 LRZ3Cutscene_Cutscene_FadeIn(EntityCutsceneSeq *host)
41
{
42
if (!host->timer) {
43
foreach_active(Player, player)
44
{
45
player->groundVel = 0x40000;
46
player->velocity.x = 0x40000;
47
48
if (!player->sidekick) {
49
player->stateInput = StateMachine_None;
50
CutsceneSeq_LockAllPlayerControl();
51
player->left = false;
52
player->right = true;
53
player->up = false;
54
player->down = false;
55
player->jumpPress = false;
56
}
57
}
58
}
59
60
if (host->timer >= 8) {
61
if (globals->suppressTitlecard) {
62
foreach_all(TitleCard, titlecard)
63
{
64
destroyEntity(titlecard);
65
foreach_break;
66
}
67
68
globals->suppressTitlecard = false;
69
globals->suppressAutoMusic = false;
70
}
71
72
return true;
73
}
74
75
return false;
76
}
77
78
bool32 LRZ3Cutscene_Cutscene_RunRight(EntityCutsceneSeq *host)
79
{
80
if (host->timer >= 60) {
81
foreach_active(Player, player)
82
{
83
if (!player->sidekick)
84
player->stateInput = Player_Input_P1;
85
}
86
87
return true;
88
}
89
90
return false;
91
}
92
93
void LRZ3Cutscene_StageLoad(void) {}
94
95
#if GAME_INCLUDE_EDITOR
96
void LRZ3Cutscene_EditorDraw(void) {}
97
98
void LRZ3Cutscene_EditorLoad(void) {}
99
#endif
100
101
void LRZ3Cutscene_Serialize(void) {}
102
103