Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-1-Sonic-2-2013-Script-Decompilation
Path: blob/master/Sonic 1/Scripts/SYZ/RLight.txt
1480 views
1
// ----------------------------------
2
// RSDK Project: Sonic 1
3
// Script Description: Rotating Light Object
4
// Script Author: Christian Whitehead/Simon Thomley
5
// Unpacked by Rubberduckycooly's script unpacker
6
// ----------------------------------
7
8
// ========================
9
// Function Declarations
10
// ========================
11
12
reserve function RotatingLight_DebugDraw
13
reserve function RotatingLight_DebugSpawn
14
15
16
private function RotatingLight_DebugDraw
17
DrawSprite(SYZSetup_RLightFrame)
18
end function
19
20
21
private function RotatingLight_DebugSpawn
22
CreateTempObject(TypeName[Rotating Light], 0, object.xpos, object.ypos)
23
end function
24
25
26
// ========================
27
// Events
28
// ========================
29
30
event ObjectDraw
31
DrawSprite(SYZSetup_RLightFrame)
32
end event
33
34
35
event ObjectStartup
36
LoadSpriteSheet("SYZ/Objects.gif")
37
SpriteFrame(-16, -8, 32, 16, 143, 152)
38
SpriteFrame(-16, -8, 32, 16, 143, 169)
39
SpriteFrame(-16, -8, 32, 16, 143, 186)
40
SpriteFrame(-16, -8, 32, 16, 143, 203)
41
SpriteFrame(-16, -8, 32, 16, 143, 220)
42
SpriteFrame(-16, -8, 32, 16, 143, 237)
43
44
SetTableValue(TypeName[Rotating Light], DebugMode_ObjCount, DebugMode_TypesTable)
45
SetTableValue(RotatingLight_DebugDraw, DebugMode_ObjCount, DebugMode_DrawTable)
46
SetTableValue(RotatingLight_DebugSpawn, DebugMode_ObjCount, DebugMode_SpawnTable)
47
DebugMode_ObjCount++
48
end event
49
50
51
// ========================
52
// Editor Events
53
// ========================
54
55
event RSDKDraw
56
DrawSprite(0)
57
end event
58
59
60
event RSDKLoad
61
LoadSpriteSheet("SYZ/Objects.gif")
62
SpriteFrame(-16, -8, 32, 16, 143, 152)
63
64
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
65
end event
66
67