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

// ========================
// Aliases
// ========================

private alias object.value0 : object.timer


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

event ObjectUpdate
	object.timer++
	if object.timer == 6
		object.timer = 0
		object.frame++
		if object.frame == 4
			object.type = TypeName[Blank Object]
			object.frame = 0
		end if
	end if
end event


event ObjectDraw
	CallFunction(SpecialSetup_GetBlockPos)
	DrawSpriteXY(object.frame, temp0, temp1)
end event


event ObjectStartup
	LoadSpriteSheet("Special/Objects.gif")
	SpriteFrame(-8, -8, 16, 16, 1, 455)
	SpriteFrame(-8, -8, 16, 16, 18, 455)
	SpriteFrame(-8, -8, 16, 16, 1, 472)
	SpriteFrame(-8, -8, 16, 16, 18, 472)
end event


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

event RSDKDraw
	DrawSprite(0)
end event


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