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

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

reserve function BoltEnd_DebugDraw
reserve function BoltEnd_DebugSpawn


// ========================
// Function Definitions
// ========================

private function BoltEnd_DebugDraw
	DrawSprite(0)
end function


private function BoltEnd_DebugSpawn
	CreateTempObject(TypeName[Bolt End], 0, object.xpos, object.ypos)
end function


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

event ObjectDraw
	DrawSprite(0)
end event


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

	// End frame
	SpriteFrame(-14, -4, 28, 8, 144, 83)

	// Add this object to the debug mode object list
	SetTableValue(TypeName[Bolt End], DebugMode_ObjCount, DebugMode_TypesTable)
	SetTableValue(BoltEnd_DebugDraw, DebugMode_ObjCount, DebugMode_DrawTable)
	SetTableValue(BoltEnd_DebugSpawn, DebugMode_ObjCount, DebugMode_SpawnTable)
	DebugMode_ObjCount++
end event


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

event RSDKDraw
	DrawSprite(0)
end event


event RSDKLoad
	LoadSpriteSheet("MPZ/Objects.gif")
	SpriteFrame(-14, -4, 28, 8, 144, 83)
	
	SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
end event
