Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/Menu/TrophieList.txt
1319 views
1
//----------------Sonic CD Trophie List Script----------------//
2
//--------Scripted by Christian Whitehead 'The Taxman'--------//
3
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
4
//---This Object is normally only used by WP7 Data files------//
5
6
// Aliases
7
#alias Object.Value1 : Object.AchievementUnlocked //[[Actually i have no clue about this one]]
8
#alias Object.Value2 : Object.TrophieSheet
9
#alias Object.Value3 : Object.HelpTextSheet
10
11
#alias Object[0].Value2 : TrophiesMenu.SelectionPos
12
13
// Priority
14
#alias 1 : PRIORITY_ACTIVE
15
16
// Online Menus
17
#alias 0 : ONLINEMENU_ACHIEVEMENTS
18
19
20
sub ObjectDraw
21
Object.YPos = Object.PropertyValue
22
Object.YPos *= 0x300000
23
Object.YPos -= TrophiesMenu.SelectionPos
24
Object.YPos += 0x480000
25
Object.Scale = 128
26
27
Object.SpriteSheet = Object.TrophieSheet
28
if Object.AchievementUnlocked == true
29
DrawSpriteFX(Object.Frame, FX_SCALE, Object.XPos, Object.YPos)
30
else
31
DrawSpriteFX(12, FX_SCALE, Object.XPos, Object.YPos)
32
end if
33
34
TempValue0 = Object.XPos
35
TempValue0 >>= 16
36
TempValue0 -= Screen.XOffset
37
TempValue0 += 20
38
39
TempValue1 = Object.YPos
40
TempValue1 >>= 16
41
TempValue1 -= Screen.YOffset
42
TempValue1 -= 13
43
44
TempValue2 = Object.PropertyValue
45
TempValue2 <<= 1
46
47
Object.SpriteSheet = Object.HelpTextSheet
48
49
DrawText(MENU_2, TempValue0, TempValue1, 128, 41, TempValue2, 1)
50
TempValue1 += 15
51
TempValue2++
52
DrawText(MENU_2, TempValue0, TempValue1, 92, 41, TempValue2, 1)
53
end sub
54
55
56
sub ObjectStartup
57
LoadSpriteSheet("Menu/Trophies.gif")
58
TempValue0 = Object.SpriteSheet
59
LoadSpriteSheet("Menu/HelpText.gif")
60
TempValue1 = Object.SpriteSheet
61
62
SpriteFrame(-64, -64, 128, 128, 0, 0) // #0 - 88 Miles Per Hour Icon
63
SpriteFrame(-64, -64, 128, 128, 128, 0) // #1 - One Hug is Enough Icon
64
SpriteFrame(-64, -64, 128, 128, 256, 0) // #2 - Paradise Found Icon
65
SpriteFrame(-64, -64, 128, 128, 384, 0) // #3 - Take the High Road Icon
66
SpriteFrame(-64, -64, 128, 128, 0, 128) // #4 - King of the Rings Icon
67
SpriteFrame(-64, -64, 128, 128, 128, 128) // #5 - Statue Saviour Icon
68
SpriteFrame(-64, -64, 128, 128, 256, 128) // #6 - Heavy Metal Icon
69
SpriteFrame(-64, -64, 128, 128, 384, 128) // #7 - All Stages Clear! Icon
70
SpriteFrame(-64, -64, 128, 128, 0, 256) // #8 - Treasure Hunter Icon
71
SpriteFrame(-64, -64, 128, 128, 128, 256) // #9 - Dr. Eggman Got Served Icon
72
SpriteFrame(-64, -64, 128, 128, 256, 256) // #10 - Just In Time! Icon
73
SpriteFrame(-64, -64, 128, 128, 384, 256) // #11 - Saviour of the Planet Icon
74
SpriteFrame(-64, -64, 128, 128, 0, 384) // #12 - Lock Icon
75
76
SetupMenu(MENU_2, 0, 3, 1)
77
78
AddMenuEntry(MENU_2, "88 Miles Per Hour", 0)
79
AddMenuEntry(MENU_2, "Travel through time.", 0)
80
81
AddMenuEntry(MENU_2, "Just One Hug is Enough", 0)
82
AddMenuEntry(MENU_2, "Get a hug from Amy.", 0)
83
84
AddMenuEntry(MENU_2, "Paradise Found", 0)
85
AddMenuEntry(MENU_2, "Complete a Zone in the Good Future.", 0)
86
87
AddMenuEntry(MENU_2, "Take the High Road", 0)
88
AddMenuEntry(MENU_2, "Pass the upper signpost in Collision Chaos Zone 2.", 0)
89
90
AddMenuEntry(MENU_2, "King of the Rings", 0)
91
AddMenuEntry(MENU_2, "Collect 200 Rings.", 0)
92
93
AddMenuEntry(MENU_2, "Statue Saviour", 0)
94
AddMenuEntry(MENU_2, "Find the angel statue in Wacky Workbench.", 0)
95
96
AddMenuEntry(MENU_2, "Heavy Metal", 0)
97
AddMenuEntry(MENU_2, "Defeat Metal Sonic without getting hurt.", 0)
98
99
AddMenuEntry(MENU_2, "All Stages Clear!", 0)
100
AddMenuEntry(MENU_2, "Finish the game.", 0)
101
102
AddMenuEntry(MENU_2, "Treasure Hunter", 0)
103
AddMenuEntry(MENU_2, "Collect all the Time Stones.", 0)
104
105
AddMenuEntry(MENU_2, "Dr. Eggman Got Served", 0)
106
AddMenuEntry(MENU_2, "Destroy Dr. Eggman's final machine.", 0)
107
108
AddMenuEntry(MENU_2, "Just In Time!", 0)
109
AddMenuEntry(MENU_2, "Complete the Time Attack mode in under 25 minutes.", 0)
110
111
AddMenuEntry(MENU_2, "Saviour of the Planet", 0)
112
AddMenuEntry(MENU_2, "Destroy all the robot transporters and Metal Sonic holograms in the past.", 0)
113
114
LoadOnlineMenu(ONLINEMENU_ACHIEVEMENTS)
115
116
// Used to be below LoadSpriteSheet, moved here for consistency
117
ArrayPos0 = 32
118
while ArrayPos0 < 1056
119
if Object[ArrayPos0].Type == TypeName[Trophie List]
120
Object[ArrayPos0].TrophieSheet = TempValue0
121
Object[ArrayPos0].HelpTextSheet = TempValue1
122
Object[ArrayPos0].DrawOrder = 2
123
Object[ArrayPos0].Priority = PRIORITY_ACTIVE
124
if Screen.XSize >= 384
125
Object[ArrayPos0].XPos -= 0x100000
126
end if
127
end if
128
ArrayPos0++
129
loop
130
end sub
131
132
133
// ========================
134
// Editor Subs
135
// ========================
136
137
sub RSDKDraw
138
Object.Scale = 128
139
TempValue0 = Object.EntityNo
140
TempValue0--
141
DrawSpriteFX(TempValue0, FX_SCALE, Object.XPos, Object.YPos)
142
end sub
143
144
145
sub RSDKLoad
146
LoadSpriteSheet("Menu/Trophies.gif")
147
148
SpriteFrame(-64, -64, 128, 128, 0, 0) // #0 - 88 Miles Per Hour Icon
149
SpriteFrame(-64, -64, 128, 128, 128, 0) // #1 - One Hug is Enough Icon
150
SpriteFrame(-64, -64, 128, 128, 256, 0) // #2 - Paradise Found Icon
151
SpriteFrame(-64, -64, 128, 128, 384, 0) // #3 - Take the High Road Icon
152
SpriteFrame(-64, -64, 128, 128, 0, 128) // #4 - King of the Rings Icon
153
SpriteFrame(-64, -64, 128, 128, 128, 128) // #5 - Statue Saviour Icon
154
SpriteFrame(-64, -64, 128, 128, 256, 128) // #6 - Heavy Metal Icon
155
SpriteFrame(-64, -64, 128, 128, 384, 128) // #7 - All Stages Clear! Icon
156
SpriteFrame(-64, -64, 128, 128, 0, 256) // #8 - Treasure Hunter Icon
157
SpriteFrame(-64, -64, 128, 128, 128, 256) // #9 - Dr. Eggman Got Served Icon
158
SpriteFrame(-64, -64, 128, 128, 256, 256) // #10 - Just In Time! Icon
159
SpriteFrame(-64, -64, 128, 128, 384, 256) // #11 - Saviour of the Planet Icon
160
SpriteFrame(-64, -64, 128, 128, 0, 384) // #12 - Lock Icon
161
162
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
163
end sub
164
165