Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R7/Debris.txt
1319 views
1
//-------------------Sonic CD Debris Script-------------------//
2
//--------Scripted by Christian Whitehead 'The Taxman'--------//
3
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
4
5
// Aliases
6
#alias Object.Value1 : Object.XVelocity
7
#alias Object.Value2 : Object.YVelocity
8
9
10
sub ObjectMain
11
// Update movement
12
Object.XPos += Object.XVelocity
13
Object.YPos += Object.YVelocity
14
15
// Gravity
16
Object.YVelocity += 0x2000
17
18
if Object.OutOfBounds == true
19
// Unload when no longer needed
20
Object.Type = TypeName[Blank Object]
21
end if
22
23
end sub
24
25
26
sub ObjectDraw
27
DrawSpriteFX(Object.PropertyValue, FX_FLIP, Object.XPos, Object.YPos)
28
end sub
29
30
31
sub ObjectStartup
32
LoadSpriteSheet("R7/Objects3.gif")
33
34
// Debris Frames
35
36
// Average looking Debris
37
SpriteFrame(-4, -4, 8, 8, 162, 124)
38
SpriteFrame(-4, -4, 8, 8, 171, 124)
39
SpriteFrame(-4, -4, 8, 8, 180, 124)
40
SpriteFrame(-4, -4, 8, 8, 189, 124)
41
42
// Metal Sonic-shaped Debris
43
SpriteFrame(-4, -4, 8, 8, 109, 124)
44
SpriteFrame(-4, -4, 8, 8, 118, 124)
45
SpriteFrame(-4, -4, 8, 8, 127, 124)
46
SpriteFrame(-4, -4, 8, 8, 136, 124)
47
SpriteFrame(-8, -8, 16, 16, 145, 124)
48
49
end sub
50
51
52
// ========================
53
// Editor Subs
54
// ========================
55
56
sub RSDKDraw
57
DrawSprite(0)
58
end sub
59
60
61
sub RSDKLoad
62
LoadSpriteSheet("R7/Objects3.gif")
63
SpriteFrame(-4, -4, 8, 8, 162, 124)
64
65
// Although used by the object, it shouldn't be set from the editor, let alone placed in the scene at all
66
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
67
end sub
68
69