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

//-------Aliases-------//
private alias 68 : TYPE_ACCESSORY

// Function declarations
reserve function Accessory_DebugDraw
reserve function Accessory_DebugSpawn

// Static Values
public value Accessory_value49 = 0;

// Tables

function Accessory_DebugDraw
	temp0 = object[0].value17
	temp0 -= Accessory_value49
	DrawSprite(temp0)
end function


function Accessory_DebugSpawn
	temp0 = object[0].value17
	temp0 -= Accessory_value49
	CreateTempObject(TypeName[Accessory], temp0, object.xpos, object.ypos)
end function


event ObjectMain
end event


event ObjectDraw
	DrawSprite(object.propertyValue)
end event


event ObjectStartup
	LoadSpriteSheet("CPZ/Objects.gif")
	SpriteFrame(-8, -48, 16, 48, 198, 207)
	SpriteFrame(-4, -40, 8, 39, 215, 216)
	temp0 = 0
	Accessory_value49 = DebugMode_ObjCount
	while temp0 < 2
		SetTableValue(TypeName[Accessory], DebugMode_ObjCount, DebugMode_TypesTable)
		SetTableValue(Accessory_DebugDraw, DebugMode_ObjCount, DebugMode_DrawTable)
		SetTableValue(Accessory_DebugSpawn, DebugMode_ObjCount, DebugMode_SpawnTable)
		DebugMode_ObjCount++
		temp0++
	loop
end event

event RSDKDraw
	DrawSprite(0)
end event

event RSDKLoad
	LoadSpriteSheet("Global/Display.gif")
	SpriteFrame(-16, -16, 32, 32, 1, 143)
end event
