Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R3/SpikeDebris.txt
1319 views
1
//----------------Sonic CD Spike Debris Script----------------//
2
//--------Scripted by Christian Whitehead 'The Taxman'--------//
3
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
4
5
// Aliases
6
#alias Object.Value0 : Object.XVelocity
7
#alias Object.Value1 : Object.YVelocity
8
9
sub ObjectMain
10
Object.XPos += Object.XVelocity
11
Object.YPos += Object.YVelocity
12
Object.YVelocity += 0x4000
13
14
if Object.OutOfBounds == true
15
Object.Type = TypeName[Blank Object]
16
end if
17
end sub
18
19
20
sub ObjectDraw
21
DrawSprite(Object.PropertyValue)
22
end sub
23
24
25
sub ObjectStartup
26
LoadSpriteSheet("Global/Items3.gif")
27
28
SpriteFrame(-8, -8, 16, 16, 50, 1) // #0 - Spike Facing Up Top Left Chunk
29
SpriteFrame(-8, -8, 16, 16, 66, 1) // #1 - Spike Facing Up Top Right Chunk
30
SpriteFrame(-8, -8, 16, 16, 50, 17) // #2 - Spike Facing Up Bottom Left Chunk
31
SpriteFrame(-8, -8, 16, 16, 66, 17) // #3 - Spike Facing Up Bottom Right Chunk
32
33
SpriteFrame(-8, -8, 16, 16, 50, 34) // #4 - Spike Facing Right Top Left Chunk
34
SpriteFrame(-8, -8, 16, 16, 66, 34) // #5 - Spike Facing Right Top Right Chunk
35
SpriteFrame(-8, -8, 16, 16, 50, 50) // #6 - Spike Facing Right Bottom Left Chunk
36
SpriteFrame(-8, -8, 16, 16, 66, 50) // #7 - Spike Facing Right Bottom Right Chunk
37
38
SpriteFrame(-8, -8, 16, 16, 50, 67) // #8 - Spike Facing Left Top Left Chunk
39
SpriteFrame(-8, -8, 16, 16, 66, 67) // #9 - Spike Facing Left Top Right Chunk
40
SpriteFrame(-8, -8, 16, 16, 50, 83) // #10 - Spike Facing Left Bottom Left Chunk
41
SpriteFrame(-8, -8, 16, 16, 66, 83) // #11 - Spike Facing Left Bottom Right Chunk
42
end sub
43
44
45
// ========================
46
// Editor Subs
47
// ========================
48
49
sub RSDKDraw
50
DrawSprite(0)
51
end sub
52
53
54
sub RSDKLoad
55
LoadSpriteSheet("Global/Display.gif")
56
SpriteFrame(-16, -16, 32, 32, 1, 143) // #0 - "Script" Icon
57
58
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
59
end sub
60
61