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

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

reserve function SmallCog_DebugDraw
reserve function SmallCog_DebugSpawn


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

private function SmallCog_DebugDraw
	DrawSprite(0)
end function


private function SmallCog_DebugSpawn
	CreateTempObject(TypeName[Small Cog], 0, object.xpos, object.ypos)
end function


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

event ObjectUpdate
	// Empty :(
end event


event ObjectDraw
	DrawSprite(MPZSetup_cogFrame)
end event


event ObjectStartup
	LoadSpriteSheet("MPZ/Objects.gif")
	SpriteFrame(-12, -12, 24, 24, 133, 126)
	SpriteFrame(-12, -12, 24, 24, 158, 126)
	SpriteFrame(-12, -12, 24, 24, 158, 126)
	SpriteFrame(-12, -12, 24, 24, 183, 126)

	SetTableValue(TypeName[Small Cog], DebugMode_ObjCount, DebugMode_TypesTable)
	SetTableValue(SmallCog_DebugDraw, DebugMode_ObjCount, DebugMode_DrawTable)
	SetTableValue(SmallCog_DebugSpawn, DebugMode_ObjCount, DebugMode_SpawnTable)
	DebugMode_ObjCount++
end event


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

event RSDKDraw
	DrawSprite(0)
end event


event RSDKLoad
	LoadSpriteSheet("MPZ/Objects.gif")
	SpriteFrame(-12, -12, 24, 24, 133, 126)

	SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
end event
