Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R1/LoveHeart.txt
1319 views
1
//---------------Sonic CD Love Heart Script-------------------//
2
//--------Scripted by Christian Whitehead 'The Taxman'--------//
3
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
4
5
// Aliases
6
#alias Object.Value0 : Object.Timer
7
#alias Object.Value1 : Object.Oscillation
8
9
10
sub ObjectDraw
11
if Object.Timer > 144
12
TempValue0 = Object.Timer
13
TempValue0 -= 144
14
TempValue0 <<= 3
15
if TempValue0 > 255
16
TempValue0 = 255
17
end if
18
19
Object.Alpha = 255
20
Object.Alpha -= TempValue0
21
22
if Object.Alpha == 0
23
Object.Type = TypeName[Blank Object]
24
end if
25
end if
26
27
Sin(TempValue0, Object.Oscillation)
28
TempValue0 <<= 9
29
TempValue0 += Object.XPos
30
31
if Object.Timer > 19
32
DrawSpriteFX(1, FX_INK, TempValue0, Object.YPos)
33
else
34
DrawSpriteXY(0, TempValue0, Object.YPos)
35
end if
36
37
Object.YPos -= 0x6000
38
39
Object.Oscillation += 8
40
Object.Oscillation &= 511
41
42
Object.Timer++
43
end sub
44
45
46
sub ObjectStartup
47
LoadSpriteSheet("R1/Objects.gif")
48
49
SpriteFrame(-8, -8, 16, 16, 193, 134) // #0 - Small Heart
50
SpriteFrame(-8, -8, 16, 16, 193, 150) // #1 - Big Heart
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("R1/Objects.gif")
65
SpriteFrame(-8, -8, 16, 16, 193, 150) // #1 - Big Heart
66
67
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
68
end sub
69
70