Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R7/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.Angle
8
9
10
sub ObjectDraw
11
if Object.Timer > 144
12
// Fade out the Heart
13
14
TempValue0 = Object.Timer
15
TempValue0 -= 144
16
TempValue0 <<= 3
17
if TempValue0 > 255
18
TempValue0 = 255
19
end if
20
21
Object.Alpha = 255
22
Object.Alpha -= TempValue0
23
24
if Object.Alpha == 0
25
Object.Type = TypeName[Blank Object]
26
end if
27
end if
28
29
Sin(TempValue0, Object.Angle)
30
TempValue0 <<= 9
31
TempValue0 += Object.XPos
32
33
if Object.Timer > 19
34
// Fading heart
35
36
DrawSpriteFX(1, FX_INK, TempValue0, Object.YPos)
37
else
38
// Normal heart
39
40
DrawSpriteXY(0, TempValue0, Object.YPos)
41
end if
42
43
// Hover up at a rate of 0.375 pixels per frame
44
Object.YPos -= 0x6000
45
46
Object.Angle += 8
47
Object.Angle &= 511
48
49
Object.Timer++
50
51
end sub
52
53
54
sub ObjectStartup
55
LoadSpriteSheet("R7/Objects2.gif")
56
57
// Love Heart Frames
58
SpriteFrame(-8, -8, 16, 16, 193, 134)
59
SpriteFrame(-8, -8, 16, 16, 193, 150)
60
61
end sub
62
63
64
// ========================
65
// Editor Subs
66
// ========================
67
68
sub RSDKDraw
69
DrawSprite(0)
70
end sub
71
72
73
sub RSDKLoad
74
LoadSpriteSheet("R7/Objects2.gif")
75
SpriteFrame(-8, -8, 16, 16, 193, 150)
76
77
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
78
end sub
79
80