// ----------------------------------
// RSDK Project: Sonic 2
// Script Description: Guage Object
// Script Author: Christian Whitehead/Simon Thomley
// Unpacked by Rubberduckycooly's script unpacker
// ----------------------------------

// Note - May Guage be a typo?
// Normally the word Gauge is used...
// But then again, this game's half Australian as well

// ========================
// Function Declarations
// ========================

reserve function Guage_DebugDraw
reserve function Guage_DebugSpawn


// ========================
// Function Declarations
// ========================

private function Guage_DebugDraw
	DrawSprite(0)
end function


private function Guage_DebugSpawn
	CreateTempObject(TypeName[Guage], 0, object.xpos, object.ypos)
end function


// ========================
// Events
// ========================

event ObjectDraw
	// Just a simple decoration object - no further code needed
	DrawSprite(0)
end event


event ObjectStartup
	LoadSpriteSheet("MPZ/Objects.gif")

	// Guage frame
	SpriteFrame(-8, -8, 16, 16, 330, 157)

	// Add the Guage to the debug mode item list
	SetTableValue(TypeName[Guage], DebugMode_ObjCount, DebugMode_TypesTable)
	SetTableValue(Guage_DebugDraw, DebugMode_ObjCount, DebugMode_DrawTable)
	SetTableValue(Guage_DebugSpawn, DebugMode_ObjCount, DebugMode_SpawnTable)
	DebugMode_ObjCount++
end event


// ========================
// Editor Events
// ========================

event RSDKDraw
	DrawSprite(0)
end event


event RSDKLoad
	LoadSpriteSheet("MPZ/Objects.gif")
	SpriteFrame(-8, -8, 16, 16, 330, 157)
	
	SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
end event
