Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/Global/DustPuff.txt
1319 views
1
//-----------------Sonic CD Dust Puff Script------------------//
2
//--------Scripted by Christian Whitehead 'The Taxman'--------//
3
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
4
5
6
sub ObjectDraw
7
if Object.Frame > 3
8
Stage.ActivePlayer = Object.PropertyValue
9
10
Object.Direction = Player.Direction
11
Object.XPos = Player.XPos
12
Object.iYPos = Player.CollisionBottom
13
Object.YPos += Player.YPos
14
15
Stage.ActivePlayer = 0
16
17
if Player.Animation != ANI_SPINDASH
18
Object.Type = TypeName[Blank Object]
19
else
20
DrawSpriteFX(Object.Frame, FX_FLIP, Object.XPos, Object.YPos)
21
end if
22
else
23
DrawSpriteFX(Object.Frame, FX_FLIP, Object.XPos, Object.YPos)
24
end if
25
26
switch Object.Frame
27
case 0
28
case 1
29
case 2
30
Object.AnimationTimer++
31
if Object.AnimationTimer > 3
32
Object.Frame++
33
Object.AnimationTimer = 0
34
end if
35
break
36
37
case 3
38
Object.AnimationTimer++
39
if Object.AnimationTimer > 3
40
Object.Type = TypeName[Blank Object]
41
end if
42
break
43
44
case 4
45
case 5
46
case 6
47
case 7
48
case 8
49
case 9
50
Object.AnimationTimer++
51
if Object.AnimationTimer > 1
52
Object.Frame++
53
Object.AnimationTimer = 0
54
end if
55
break
56
57
case 10
58
Object.AnimationTimer++
59
if Object.AnimationTimer > 1
60
Object.Frame = 4
61
Object.AnimationTimer = 0
62
end if
63
break
64
65
end switch
66
end sub
67
68
69
sub ObjectStartup
70
LoadSpriteSheet("Global/Items3.gif")
71
72
SpriteFrame(-7, -11, 13, 14, 148, 129) // #0 - Dust Puff Frame 0
73
SpriteFrame(-7, -11, 13, 14, 161, 137) // #1 - Dust Puff Frame 1
74
SpriteFrame(-6, -11, 13, 14, 240, 233) // #2 - Dust Puff Frame 2
75
76
SpriteFrame(-7, -11, 13, 14, 243, 177) // #3 - Dust Puff Frame 3
77
78
SpriteFrame(-32, -10, 32, 10, 181, 183) // #4 - Dust Puff Frame 4
79
SpriteFrame(-32, -12, 32, 12, 148, 198) // #5 - Dust Puff Frame 5
80
SpriteFrame(-32, -16, 32, 16, 181, 194) // #6 - Dust Puff Frame 6
81
SpriteFrame(-32, -18, 32, 18, 115, 192) // #7 - Dust Puff Frame 7
82
SpriteFrame(-32, -20, 32, 20, 148, 177) // #8 - Dust Puff Frame 8
83
SpriteFrame(-32, -21, 32, 21, 214, 177) // #9 - Dust Puff Frame 9
84
85
SpriteFrame(-32, -23, 32, 23, 50, 232) // #10 - Dust Puff Frame 10
86
end sub
87
88
89
// ========================
90
// Editor Subs
91
// ========================
92
93
sub RSDKDraw
94
DrawSprite(0)
95
end sub
96
97
98
sub RSDKLoad
99
LoadSpriteSheet("Global/Items3.gif")
100
SpriteFrame(-32, -20, 32, 20, 148, 177) // #0 - Dust Puff Frame 8
101
102
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
103
end sub
104
105