Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R7/FireTrail.txt
1319 views
1
//-----------------Sonic CD Fire Trail 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 ObjectDraw
10
// Draw the sprite (notably done before the rest of the code is done)
11
DrawSpriteFX(Object.Frame, FX_FLIP, Object.XPos, Object.YPos)
12
13
// Animate the object
14
Object.Timer++
15
if Object.Timer > 3
16
Object.Timer = 0
17
18
Object.Frame++
19
if Object.Frame > 3
20
// Unload upon reaching frame 4, since it's no longer needed now
21
Object.Type = TypeName[Blank Object]
22
Object.Frame = 0
23
end if
24
end if
25
26
end sub
27
28
29
sub ObjectStartup
30
31
LoadSpriteSheet("R7/Objects.gif")
32
33
// Fire Trail Frames
34
SpriteFrame(-24, -32, 32, 32, 207, 59) // 0 - Larger Frame
35
SpriteFrame(-16, -16, 24, 16, 199, 1) // 1 - Smaller Frame
36
SpriteFrame(-24, -32, 32, 32, 207, 59) // 2 - Larger Frame, Repeated
37
SpriteFrame(-16, -16, 24, 16, 199, 1) // 3 - Smaller Frame, Repeated
38
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("R7/Objects.gif")
53
SpriteFrame(-24, -32, 32, 32, 207, 59) // Larger Frame of the pair
54
55
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
56
end sub
57
58