Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R1/PaletteAni_C.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 %= 3
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 < 3
30
RotatePalette(181, 183, 1)
31
RotatePalette(172, 174, 0)
32
CopyPalette(0, TempValue0)
33
TempValue0++
34
loop
35
RotatePalette(181, 183, 1)
36
RotatePalette(172, 174, 0)
37
end sub
38
39
40
// ========================
41
// Editor Subs
42
// ========================
43
44
sub RSDKDraw
45
DrawSprite(0)
46
end sub
47
48
49
sub RSDKLoad
50
LoadSpriteSheet("Global/Display.gif")
51
SpriteFrame(-16, -16, 32, 32, 1, 143) // #0 - "Script" Icon
52
53
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
54
end sub
55
56