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

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

private alias object.value0 : object.timer

event ObjectUpdate
	object.ypos -= 0x20000
	object.timer++
	if object.timer == 24
		object.type = TypeName[Blank Object]
	end if
end event


event ObjectDraw
#platform: USE_ORIGINS
	if game.playMode == BOOT_PLAYMODE_MIRRORING
		object.direction = FACING_LEFT
		DrawSpriteFX(object.propertyValue, FX_FLIP, object.xpos, object.ypos)
	else
		DrawSprite(object.propertyValue)
	end if
#endplatform

#platform: USE_STANDALONE
	DrawSprite(object.propertyValue)
#endplatform
end event


event ObjectStartup
	LoadSpriteSheet("Global/Items.gif")
	
	SpriteFrame(-6, 0, 14, 8, 193, 226)
	SpriteFrame(-7, 0, 15, 8, 240, 197)
	SpriteFrame(-7, 0, 15, 8, 224, 197)
	SpriteFrame(-9, 0, 19, 8, 193, 226)
	SpriteFrame(-9, 0, 19, 8, 193, 226)
	SpriteFrame(-9, 0, 19, 8, 193, 226)
	SpriteFrame(-9, 0, 19, 8, 193, 226)
	SpriteFrame(-9, 0, 19, 8, 193, 226)
	SpriteFrame(-9, 0, 19, 8, 193, 226)
	SpriteFrame(-9, 0, 19, 8, 193, 226)
	SpriteFrame(-9, 0, 19, 8, 193, 226)
	SpriteFrame(-9, 0, 19, 8, 193, 226)
	SpriteFrame(-9, 0, 19, 8, 193, 226)
	SpriteFrame(-9, 0, 19, 8, 193, 226)
	SpriteFrame(-9, 0, 19, 8, 193, 226)
	SpriteFrame(-12, 0, 24, 8, 193, 226)
	SpriteFrame(-4, 0, 9, 8, 193, 226)
end event


event RSDKDraw
	DrawSprite(0)
end event


event RSDKLoad
	LoadSpriteSheet("Global/Items.gif")
	SpriteFrame(-6, 0, 14, 8, 193, 226)
	
	// used in-game, but shouldn't be placed in editor so
	SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
end event
