Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R3/MothSparkle.txt
1319 views
1
//----------------Sonic CD Moth Sparkle 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
8
9
sub ObjectMain
10
Object.Timer++
11
Object.YPos += 0x10000
12
if Object.Timer == 6
13
Object.Timer = 0
14
Object.Frame++
15
Object.Frame &= 3
16
end if
17
18
if Object.OutOfBounds == true
19
Object.Type = TypeName[Blank Object]
20
end if
21
end sub
22
23
24
sub ObjectDraw
25
DrawSprite(Object.Frame)
26
end sub
27
28
29
sub ObjectStartup
30
LoadSpriteSheet("Global/Items.gif")
31
32
SpriteFrame(-8, -8, 16, 16, 1, 202) // #0 - Moth Sparkle Frame 0
33
SpriteFrame(-8, -8, 16, 16, 18, 202) // #1 - Moth Sparkle Frame 1
34
SpriteFrame(-8, -8, 16, 16, 1, 219) // #2 - Moth Sparkle Frame 2
35
SpriteFrame(-8, -8, 16, 16, 18, 219) // #3 - Moth Sparkle Frame 3
36
end sub
37
38
39
// ========================
40
// Editor Subs
41
// ========================
42
43
sub RSDKDraw
44
DrawSprite(0)
45
end sub
46
47
48
sub RSDKLoad
49
LoadSpriteSheet("Global/Items.gif")
50
51
SpriteFrame(-8, -8, 16, 16, 1, 202) // #0 - Moth Sparkle
52
53
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
54
end sub
55
56