Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R5/SBullet.txt
1319 views
1
//---------------Sonic CD Sasuri Bullet 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
8
9
sub ObjectMain
10
11
Object.XPos += Object.XVelocity
12
13
if Object.OutOfBounds == true
14
// If Out Of Bounds, then Unload
15
Object.Type = TypeName[Blank Object]
16
else
17
// Another condition for Unloading - be far enough from the screen on the Y Axis too
18
TempValue0 = Screen.YOffset
19
TempValue0 -= 8
20
TempValue0 <<= 16
21
22
if Object.YPos < TempValue0
23
Object.Type = TypeName[Blank Object]
24
end if
25
end if
26
27
end sub
28
29
30
sub ObjectPlayerInteraction
31
32
PlayerObjectCollision(C_TOUCH, -6, -6, 6, 6)
33
if CheckResult == true
34
CallFunction(Player_Hit)
35
end if
36
37
end sub
38
39
40
sub ObjectDraw
41
42
TempValue0 = Object.Frame
43
TempValue0 >>= 1
44
DrawSprite(TempValue0)
45
46
Object.Frame++
47
Object.Frame &= 3
48
49
end sub
50
51
52
sub ObjectStartup
53
LoadSpriteSheet("R5/Objects.gif")
54
55
// Bullet Frames
56
SpriteFrame(-8, -8, 16, 16, 67, 27)
57
SpriteFrame(-8, -8, 16, 16, 133, 127)
58
59
end sub
60
61
62
// ========================
63
// Editor Subs
64
// ========================
65
66
sub RSDKDraw
67
DrawSprite(0)
68
end sub
69
70
71
sub RSDKLoad
72
LoadSpriteSheet("R5/Objects.gif")
73
SpriteFrame(-8, -8, 16, 16, 67, 27)
74
75
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
76
end sub
77
78