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

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

private alias object.value0 : object.timer

// ========================
// Tables
// ========================

private table SmokePuff_delayTable
	4, 8, 8, 8, 8
end table


event ObjectUpdate
	object.timer++
	GetTableValue(temp0, object.frame, SmokePuff_delayTable)

	if object.timer > temp0
		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")
	SpriteFrame(-8, -8, 16, 16, 230, 18)
	SpriteFrame(-16, -16, 32, 32, 1, 1)
	SpriteFrame(-16, -16, 32, 32, 1, 34)
	SpriteFrame(-16, -16, 32, 32, 1, 67)
	SpriteFrame(-16, -16, 32, 32, 1, 100)
end event


event RSDKDraw
	DrawSprite(0)
end event


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