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

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

private alias object.value0 : object.timer

event ObjectUpdate
	object.timer++

	if object.timer > 7
		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
	DrawSprite(object.frame)
end event


event ObjectStartup
	LoadSpriteSheet("Global/Items2.gif")

	// Puff frames
	SpriteFrame(-16, -8, 32, 16, 1, 1)
	SpriteFrame(-16, -16, 32, 32, 1, 18)
	SpriteFrame(-16, -16, 32, 32, 1, 51)
	SpriteFrame(-20, -20, 40, 40, 34, 1)
	SpriteFrame(-20, -20, 40, 40, 34, 42)

end event


event RSDKDraw
	DrawSprite(0)
end event


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