Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R8/BBFireball.txt
1319 views
1
//-------------Sonic CD Big Bomb Fireball 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
// Collision Plane
10
#alias 0 : COLLISION_PLANE_A
11
12
13
sub ObjectMain
14
Object.XPos += Object.XVelocity
15
Object.YPos += Object.YVelocity
16
Object.YVelocity += 0x2000
17
18
if Object.OutOfBounds == true
19
Object.Type = TypeName[Blank Object]
20
end if
21
end sub
22
23
24
sub ObjectPlayerInteraction
25
if Player.CollisionPlane == COLLISION_PLANE_A
26
if Player.State != Player_State_Static
27
PlayerObjectCollision(C_TOUCH, -8, -8, 8, 8)
28
if CheckResult == true
29
CallFunction(Player_Hit)
30
end if
31
end if
32
end if
33
end sub
34
35
36
sub ObjectDraw
37
TempValue0 = Object.AnimationTimer
38
TempValue0 >>= 1
39
DrawSprite(TempValue0)
40
41
Object.AnimationTimer++
42
Object.AnimationTimer &= 3
43
end sub
44
45
46
sub ObjectStartup
47
LoadSpriteSheet("R8/Objects2.gif")
48
49
SpriteFrame(-8, -8, 16, 16, 109, 110) // #0 - Big Bomb Fireball yellow frame
50
SpriteFrame(-8, -8, 16, 16, 126, 110) // #1 - Big Bomb Fireball red frame
51
end sub
52
53
54
// ========================
55
// Editor Subs
56
// ========================
57
58
sub RSDKDraw
59
DrawSprite(0)
60
end sub
61
62
63
sub RSDKLoad
64
LoadSpriteSheet("R8/Objects2.gif")
65
SpriteFrame(-8, -8, 16, 16, 109, 110) // #0 - Big Bomb Fireball yellow
66
67
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
68
end sub
69
70