Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R3/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 == 3
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
CopyPalette(0, 1)
29
CopyPalette(0, 2)
30
CopyPalette(0, 3)
31
CopyPalette(0, 4)
32
CopyPalette(0, 5)
33
34
TempValue0 = 0
35
TempValue1 = 0
36
TempValue2 = 32
37
while TempValue0 < 6
38
LoadPalette("R3D_PalCycle.act", TempValue0, 160, TempValue1, TempValue2)
39
TempValue0++
40
TempValue1 += 32
41
TempValue2 += 32
42
loop
43
end sub
44
45
46
// ========================
47
// Editor Subs
48
// ========================
49
50
sub RSDKDraw
51
DrawSprite(0)
52
end sub
53
54
55
sub RSDKLoad
56
LoadSpriteSheet("Global/Display.gif")
57
SpriteFrame(-16, -16, 32, 32, 1, 143) // #0 - "Script" Icon
58
59
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
60
end sub
61
62