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/Guage.txt
1480 views
1
// ----------------------------------
2
// RSDK Project: Sonic 2
3
// Script Description: Guage Object
4
// Script Author: Christian Whitehead/Simon Thomley
5
// Unpacked by Rubberduckycooly's script unpacker
6
// ----------------------------------
7
8
// Note - May Guage be a typo?
9
// Normally the word Gauge is used...
10
// But then again, this game's half Australian as well
11
12
// ========================
13
// Function Declarations
14
// ========================
15
16
reserve function Guage_DebugDraw
17
reserve function Guage_DebugSpawn
18
19
20
// ========================
21
// Function Declarations
22
// ========================
23
24
private function Guage_DebugDraw
25
DrawSprite(0)
26
end function
27
28
29
private function Guage_DebugSpawn
30
CreateTempObject(TypeName[Guage], 0, object.xpos, object.ypos)
31
end function
32
33
34
// ========================
35
// Events
36
// ========================
37
38
event ObjectDraw
39
// Just a simple decoration object - no further code needed
40
DrawSprite(0)
41
end event
42
43
44
event ObjectStartup
45
LoadSpriteSheet("MPZ/Objects.gif")
46
47
// Guage frame
48
SpriteFrame(-8, -8, 16, 16, 330, 157)
49
50
// Add the Guage to the debug mode item list
51
SetTableValue(TypeName[Guage], DebugMode_ObjCount, DebugMode_TypesTable)
52
SetTableValue(Guage_DebugDraw, DebugMode_ObjCount, DebugMode_DrawTable)
53
SetTableValue(Guage_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(-8, -8, 16, 16, 330, 157)
70
71
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
72
end event
73
74