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

// ========================
// Function Declarations
// ========================

reserve function RotatingLight_DebugDraw
reserve function RotatingLight_DebugSpawn


private function RotatingLight_DebugDraw
	DrawSprite(SYZSetup_RLightFrame)
end function


private function RotatingLight_DebugSpawn
	CreateTempObject(TypeName[Rotating Light], 0, object.xpos, object.ypos)
end function


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

event ObjectDraw
	DrawSprite(SYZSetup_RLightFrame)
end event


event ObjectStartup
	LoadSpriteSheet("SYZ/Objects.gif")
	SpriteFrame(-16, -8, 32, 16, 143, 152)
	SpriteFrame(-16, -8, 32, 16, 143, 169)
	SpriteFrame(-16, -8, 32, 16, 143, 186)
	SpriteFrame(-16, -8, 32, 16, 143, 203)
	SpriteFrame(-16, -8, 32, 16, 143, 220)
	SpriteFrame(-16, -8, 32, 16, 143, 237)

	SetTableValue(TypeName[Rotating Light], DebugMode_ObjCount, DebugMode_TypesTable)
	SetTableValue(RotatingLight_DebugDraw, DebugMode_ObjCount, DebugMode_DrawTable)
	SetTableValue(RotatingLight_DebugSpawn, DebugMode_ObjCount, DebugMode_SpawnTable)
	DebugMode_ObjCount++
end event


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

event RSDKDraw
	DrawSprite(0)
end event


event RSDKLoad
	LoadSpriteSheet("SYZ/Objects.gif")
	SpriteFrame(-16, -8, 32, 16, 143, 152)
	
	SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
end event
