Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-1-Sonic-2-2013-Script-Decompilation
Path: blob/master/Sonic 2/Scripts/Credits/CreditsLogo.txt
1480 views
1
// ----------------------------------
2
// RSDK Project: Sonic 2
3
// Script Description: Credits Logo Object
4
// Script Author: Christian Whitehead/Simon Thomley
5
// Unpacked by Rubberduckycooly's script unpacker
6
// ----------------------------------
7
8
// ========================
9
// Aliases
10
// ========================
11
12
private alias object.value0 : object.timer
13
private alias object.value1 : object.logoFrame
14
private alias object.value2 : object.numberFrame
15
16
// States
17
private alias 0 : CREDITSLOGO_SETUP
18
private alias 1 : CREDITSLOGO_SHINEDELAY
19
private alias 2 : CREDITSLOGO_LOGOSHINE
20
private alias 3 : CREDITSLOGO_NUMBERSHINE
21
private alias 4 : CREDITSLOGO_SHOWLOGO
22
23
// ========================
24
// Tables
25
// ========================
26
27
private table CreditsLogo_logoFrameTable
28
0, 2, 3, 4, 3, 2, 0
29
end table
30
31
private table CreditsLogo_numberFrameTable
32
0, 5, 6, 7, 8, 7, 6, 5, 0
33
end table
34
35
36
// ========================
37
// Events
38
// ========================
39
40
event ObjectUpdate
41
switch object.state
42
case CREDITSLOGO_SETUP
43
GetTableValue(object.logoFrame, 0, CreditsLogo_logoFrameTable)
44
GetTableValue(object.numberFrame, 0, CreditsLogo_numberFrameTable)
45
object.state++
46
break
47
48
case CREDITSLOGO_SHINEDELAY
49
object.timer++
50
if object.timer == 90
51
object.timer = 0
52
object.frame = 0
53
object.state++
54
end if
55
break
56
57
case CREDITSLOGO_LOGOSHINE
58
object.timer++
59
if object.timer == 2
60
object.timer = 0
61
object.frame++
62
GetTableValue(object.logoFrame, object.frame, CreditsLogo_logoFrameTable)
63
if object.frame == 6
64
object.frame = 0
65
object.state++
66
end if
67
end if
68
break
69
70
case CREDITSLOGO_NUMBERSHINE
71
object.timer++
72
if object.timer == 2
73
object.timer = 0
74
object.frame++
75
GetTableValue(object.numberFrame, object.frame, CreditsLogo_numberFrameTable)
76
if object.frame == 9
77
object.frame = 0
78
object.state++
79
end if
80
end if
81
break
82
83
case CREDITSLOGO_SHOWLOGO
84
break
85
end switch
86
end event
87
88
89
event ObjectDraw
90
DrawSprite(1) // SONIC 2
91
DrawSprite(object.logoFrame) // SONIC Shine
92
DrawSprite(object.numberFrame) // 2 Shine
93
end event
94
95
96
event ObjectStartup
97
LoadSpriteSheet("Ending/Credits.gif")
98
SpriteFrame(0, 0, 0, 0, 141, 94) // Blank - #0
99
SpriteFrame(-60, -20, 120, 40, 135, 53) // SONIC 2 - #1
100
SpriteFrame(-63, -22, 81, 38, 141, 94) // SONIC Shine - Frame 1 - #2
101
SpriteFrame(-63, -22, 81, 38, 141, 133) // SONIC Shine - Frame 2 - #3
102
SpriteFrame(-63, -22, 81, 38, 141, 172) // SONIC Shine - Frame 3 - #4
103
SpriteFrame(28, -20, 32, 39, 223, 94) // "2" Shine - Frame 1 - #5
104
SpriteFrame(28, -20, 32, 39, 223, 134) // "2" Shine - Frame 2 - #6
105
SpriteFrame(28, -20, 32, 39, 223, 174) // "2" Shine - Frame 3 - #7
106
SpriteFrame(28, -20, 32, 39, 223, 214) // "2" Shine - Frame 4 - #8
107
end event
108
109
110
// ========================
111
// Editor Events
112
// ========================
113
114
event RSDKDraw
115
DrawSprite(1) // SONIC 2
116
end event
117
118
119
event RSDKLoad
120
LoadSpriteSheet("Ending/Credits.gif")
121
SpriteFrame(-60, -20, 120, 40, 135, 53) // "SONIC 2"
122
123
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
124
end event
125
126