Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R1/LogInterior.txt
1625 views
1
//----------------Sonic CD Log Interior Script----------------//
2
//--------Scripted by Christian Whitehead 'The Taxman'--------//
3
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
4
5
// Not directly used, just here for reference (and in the editor section)
6
#alias 0 : LOGINTERIOR_SPR_WHOLE
7
#alias 1 : LOGINTERIOR_SPR_CONCAVE
8
9
10
sub ObjectDraw
11
DrawSprite(Object.PropertyValue)
12
end sub
13
14
15
sub ObjectStartup
16
LoadSpriteSheet("R1/Objects2.gif")
17
18
SpriteFrame(-16, -16, 32, 32, 190, 197) // #0 - Log Interior 0
19
SpriteFrame(-16, -16, 32, 32, 223, 197) // #1 - Log Interior 1
20
end sub
21
22
23
// ========================
24
// Editor Subs
25
// ========================
26
27
sub RSDKEdit
28
if Editor.ReturnVariable == true
29
switch Editor.VariableID
30
case EDIT_VAR_PROPVAL // Property Value
31
CheckResult = Object.PropertyValue
32
CheckResult &= 1
33
break
34
case 0 // frameID
35
CheckResult = Object.PropertyValue
36
CheckResult &= 1
37
break
38
end switch
39
else
40
switch Editor.VariableID
41
case EDIT_VAR_PROPVAL // Property Value
42
Object.PropertyValue = Editor.VariableValue
43
Object.PropertyValue &= 1
44
break
45
case 0 // frameID
46
Object.PropertyValue = Editor.VariableValue
47
Object.PropertyValue &= 1
48
break
49
end switch
50
end if
51
end sub
52
53
54
sub RSDKDraw
55
DrawSprite(Object.PropertyValue)
56
end sub
57
58
59
sub RSDKLoad
60
LoadSpriteSheet("R1/Objects2.gif")
61
SpriteFrame(-16, -16, 32, 32, 190, 197) // #0 - Log Interior 0
62
SpriteFrame(-16, -16, 32, 32, 223, 197) // #1 - Log Interior 1
63
64
AddEditorVariable("frameID")
65
SetActiveVariable("frameID")
66
AddEnumVariable("Whole", LOGINTERIOR_SPR_WHOLE)
67
AddEnumVariable("Concave Dip", LOGINTERIOR_SPR_CONCAVE)
68
end sub
69
70