Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R1/PaletteAni_D.txt
1319 views
1
//-------------Sonic CD Palette Animation Script--------------//
2
//--------Scripted by Christian Whitehead 'The Taxman'--------//
3
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
4
5
// Aliases
6
#alias Object.Value0 : Object.Timer
7
#alias Object.Value1 : Object.CurrentPalette
8
9
// Priority
10
#alias 1 : PRIORITY_ACTIVE
11
12
13
sub ObjectMain
14
Object.Timer++
15
if Object.Timer == 8
16
Object.Timer = 0
17
Object.CurrentPalette++
18
Object.CurrentPalette %= 6
19
SetActivePalette(Object.CurrentPalette, 0, 240)
20
end if
21
end sub
22
23
24
sub ObjectStartup
25
Object[19].Type = TypeName[PaletteAnimation]
26
Object[19].Priority = PRIORITY_ACTIVE
27
28
TempValue0 = 1
29
while TempValue0 < 6
30
RotatePalette(181, 183, 1)
31
RotatePalette(172, 174, 0)
32
RotatePalette(192, 197, 0)
33
CopyPalette(0, TempValue0)
34
TempValue0++
35
loop
36
RotatePalette(181, 183, 1)
37
RotatePalette(172, 174, 0)
38
RotatePalette(192, 197, 0)
39
end sub
40
41
42
// ========================
43
// Editor Subs
44
// ========================
45
46
sub RSDKDraw
47
DrawSprite(0)
48
end sub
49
50
51
sub RSDKLoad
52
LoadSpriteSheet("Global/Display.gif")
53
SpriteFrame(-16, -16, 32, 32, 1, 143) // #0 - "Script" Icon
54
55
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
56
end sub
57
58