Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-1-Sonic-2-2013-Script-Decompilation
Path: blob/master/Sonic 2/Scripts/MPZ/SmallCog.txt
1479 views
1
// ----------------------------------
2
// RSDK Project: Sonic 2
3
// Script Description: Small Cog 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 SmallCog_DebugDraw
13
reserve function SmallCog_DebugSpawn
14
15
16
// ========================
17
// Function Definitions
18
// ========================
19
20
private function SmallCog_DebugDraw
21
DrawSprite(0)
22
end function
23
24
25
private function SmallCog_DebugSpawn
26
CreateTempObject(TypeName[Small Cog], 0, object.xpos, object.ypos)
27
end function
28
29
30
// ========================
31
// Events
32
// ========================
33
34
event ObjectUpdate
35
// Empty :(
36
end event
37
38
39
event ObjectDraw
40
DrawSprite(MPZSetup_cogFrame)
41
end event
42
43
44
event ObjectStartup
45
LoadSpriteSheet("MPZ/Objects.gif")
46
SpriteFrame(-12, -12, 24, 24, 133, 126)
47
SpriteFrame(-12, -12, 24, 24, 158, 126)
48
SpriteFrame(-12, -12, 24, 24, 158, 126)
49
SpriteFrame(-12, -12, 24, 24, 183, 126)
50
51
SetTableValue(TypeName[Small Cog], DebugMode_ObjCount, DebugMode_TypesTable)
52
SetTableValue(SmallCog_DebugDraw, DebugMode_ObjCount, DebugMode_DrawTable)
53
SetTableValue(SmallCog_DebugSpawn, DebugMode_ObjCount, DebugMode_SpawnTable)
54
DebugMode_ObjCount++
55
end event
56
57
58
// ========================
59
// Editor Events
60
// ========================
61
62
event RSDKDraw
63
DrawSprite(0)
64
end event
65
66
67
event RSDKLoad
68
LoadSpriteSheet("MPZ/Objects.gif")
69
SpriteFrame(-12, -12, 24, 24, 133, 126)
70
71
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
72
end event
73
74