Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/DAGarden/ShootingStar.txt
1319 views
1
//-------------Sonic CD Shooting Star 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
#alias Object.PropertyValue : Object.SpawnedStar // Correspond to Star Sprite Frames
9
10
// States
11
#alias 0 : SHOOTINGSTAR_SETUP
12
#alias 1 : SHOOTINGSTAR_MOVEMENT
13
14
// Property Values
15
#alias 0 : WHITE_STAR
16
#alias 6 : GREEN_STAR
17
18
19
sub ObjectMain
20
switch Object.State
21
case SHOOTINGSTAR_SETUP
22
Object.XVelocity = -0x14000
23
Object.YVelocity = 0x20000
24
Object.State++
25
break
26
27
case SHOOTINGSTAR_MOVEMENT
28
Object.XPos += Object.XVelocity
29
Object.YPos += Object.YVelocity
30
break
31
32
end switch
33
34
if Object.OutOfBounds == true
35
Object.Type = TypeName[Blank Object]
36
end if
37
end sub
38
39
40
sub ObjectDraw
41
TempValue0 = Object.AnimationSpeed
42
TempValue0 >>= 2
43
TempValue0 += Object.SpawnedStar
44
DrawSpriteFX(TempValue0, FX_FLIP, Object.XPos, Object.YPos)
45
46
Object.AnimationSpeed++
47
Object.AnimationSpeed %= 24
48
end sub
49
50
51
sub ObjectStartup
52
LoadSpriteSheet("DAGarden/Objects.gif")
53
54
SpriteFrame(-4, -12, 9, 24, 387, 854) // #0 - White Star frame 0
55
SpriteFrame(-9, -12, 19, 24, 397, 854) // #1 - White Star frame 1
56
SpriteFrame(-12, -12, 24, 24, 417, 854) // #2 - White Star frame 2
57
SpriteFrame(-12, -12, 24, 24, 442, 854) // #3 - White Star frame 3
58
SpriteFrame(-12, -12, 24, 24, 467, 854) // #4 - White Star frame 4
59
SpriteFrame(-10, -12, 19, 24, 492, 854) // #5 - White Star frame 5
60
61
SpriteFrame(-4, -12, 9, 24, 387, 879) // #6 - Green Star Frame 0
62
SpriteFrame(-9, -12, 19, 24, 397, 879) // #7 - Green Star Frame 1
63
SpriteFrame(-12, -12, 24, 24, 417, 879) // #8 - Green Star Frame 2
64
SpriteFrame(-12, -12, 24, 24, 442, 879) // #9 - Green Star Frame 3
65
SpriteFrame(-12, -12, 24, 24, 467, 879) // #10 - Green Star Frame 4
66
SpriteFrame(-10, -12, 19, 24, 492, 879) // #11 - Green Star Frame 5
67
end sub
68
69
70
// ========================
71
// Editor Subs
72
// ========================
73
74
sub RSDKDraw
75
DrawSprite(0)
76
end sub
77
78
79
sub RSDKLoad
80
LoadSpriteSheet("DAGarden/Objects.gif")
81
SpriteFrame(-4, -12, 9, 24, 387, 854) // #0 - White Star frame 0
82
83
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
84
end sub
85
86