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

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

reserve function PlatConveyor_DebugDraw
reserve function PlatConveyor_DebugSpawn

private function PlatConveyor_DebugDraw
	DrawSprite(0)
end function


private function PlatConveyor_DebugSpawn
	CreateTempObject(TypeName[Plat Conveyor], 0, object.xpos, object.ypos)
end function


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

event ObjectDraw
	DrawSprite(object.propertyValue)
end event


event ObjectStartup
	LoadSpriteSheet("MPZ/Objects.gif")
	SpriteFrame(-2, -8, 4, 16, 173, 53)
	SpriteFrame(-2, -8, 4, 16, 178, 53)

	SetTableValue(TypeName[Plat Conveyor], DebugMode_ObjCount, DebugMode_TypesTable)
	SetTableValue(PlatConveyor_DebugDraw, DebugMode_ObjCount, DebugMode_DrawTable)
	SetTableValue(PlatConveyor_DebugSpawn, DebugMode_ObjCount, DebugMode_SpawnTable)
	DebugMode_ObjCount++
end event


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

event RSDKDraw
	DrawSprite(object.propertyValue)
end event


event RSDKLoad
	LoadSpriteSheet("MPZ/Objects.gif")
	SpriteFrame(-2, -8, 4, 16, 173, 53)
	SpriteFrame(-2, -8, 4, 16, 178, 53)
	
	SetVariableAlias(ALIAS_VAR_PROPVAL, "frameID")
end event
