Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R5/FadeMusic.txt
1319 views
1
//-----------------Sonic CD Fade Music Script-----------------//
2
//--------Scripted by Christian Whitehead 'The Taxman'--------//
3
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
4
5
6
// Note: Nope, there aren't any conflicts going on here!
7
// Even if there's also a Fade Music Object in the Globals folder, that object isn't actually global...
8
9
// Aliases
10
#alias Object.Value0 : Object.Timer
11
12
#alias 0 : FADEMUSIC_FADE_TO_BOSS
13
#alias 1 : FADEMUSIC_FADE_TO_LEVEL
14
15
16
sub ObjectMain
17
18
if Object.PropertyValue == FADEMUSIC_FADE_TO_BOSS
19
if Object.Timer < 100
20
Object.Timer++
21
Music.Volume--
22
else
23
PlayMusic(4)
24
25
Object.Type = TypeName[Blank Object]
26
end if
27
else // FADEMUSIC_FADE_TO_LEVEL
28
if Object.Timer < 100
29
Object.Timer++
30
Music.Volume--
31
else
32
PlayMusic(0)
33
34
Object.Type = TypeName[Blank Object]
35
end if
36
end if
37
38
end sub
39
40
41
// ========================
42
// Editor Subs
43
// ========================
44
45
sub RSDKDraw
46
DrawSprite(0)
47
end sub
48
49
50
sub RSDKLoad
51
LoadSpriteSheet("Global/Display.gif")
52
SpriteFrame(-16, -16, 32, 32, 1, 143) // "Script" Icon
53
54
// Although used by the object, it shouldn't be set from the editor
55
// This object shouldn't even be placed in a scene at all, for that matter...
56
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
57
end sub
58
59