dofile('data/Scenes/19_skeleton_Anim_door.lua')

PATH_COMICS_19_ON_SHOWN_1         = 'data/Scenes/Comics/HelpersComicsReplic.lua'
PATH_COMICS_19_ON_SHOWN_2         = 'data/Scenes/Comics/HelpersComicsOneSMS.lua'
PATH_COMICS_19_SUN   		      = 'data/Scenes/Comics/HelpersComicsOneReplicHeroes.lua'
PATH_COMICS_19_BULB		          = 'data/Scenes/Comics/HelpersComicsOneReplicHeroes.lua'
PATH_COMICS_19_BULB_USED          = 'data/Scenes/Comics/HelpersComicsReplic.lua'
PATH_COMICS_19_ON_WIN  		      = 'data/Scenes/Comics/HelpersComicsOneReplicHeroes.lua'
PATH_MINIGAME_19_REPEAT           = 'data/Scenes/Minigames/19_repeat.lua'

function OnSceneLoad(screen)
    LoadData(screen)
    DefaultOnSceneLoad(screen:GetName())

    local pf = play_field
    local level = pf:GetLevelScreen()
	
	AddRandomTasks(15,
               CreateTask('WING', '', 'wing'),
               CreateTask('ARROW', '', 'arrow'),
               CreateTask('BICYCLE', '', 'bicycle'),
               CreateTask('BIRD', '', 'bird'),
               --CreateTask('BOTTLE', '', 'bottle'),
               CreateTask('BROOM', 'BROOMS', 'broom1', 'broom2'),
               CreateTask('BUTTERFLY', '', 'butterfly'),
               CreateTask('CHAIN', '', 'chain'),
               CreateTask('CHINESE_COIN', '', 'chinese_coin'),
               CreateTask('FAN', '', 'fan'),
               CreateTask('FRAME', '', 'frame'),
               CreateTask('GAUNTLET', '', 'gauntlet'),
               CreateTask('GLASSES', '', 'glasses'),
               CreateTask('MANDOLIN', '', 'guitar'),
               CreateTask('INFINITY', '', 'infinity'),
               CreateTask('JOLLY_ROGER', '', 'Jolly_Roger'),
               CreateTask('LIZZARD', 'LIZZARDS', 'lizzard01', 'lizzard02'),
               CreateTask('LOUPE', '', 'magnifying_glass'),
               CreateTask('MAPLE_LEAF', '', 'maple_leaf'),
               --CreateTask('MASK', '', 'mask'),
               CreateTask('METAL_BALL', '', 'metal_ball'),
               --CreateTask('NECKLACE', '', 'necklace'),
               CreateTask('NOTE', '', 'note'),
               CreateTask('PEACE', '', 'peace'),
               CreateTask('PIPE', '', 'pipe'),
               CreateTask('RING', '', 'ring'),
               CreateTask('SEASHELL', 'SEASHELLS', 'seashell01', 'seashell02', 'seashell03', 'seashell04'),
               CreateTask('SMILE', '', 'smile'),
               CreateTask('SPEAR', '', 'spear'),
               CreateTask('STARFISH', 'STARFISH', 'starfish01', 'starfish02', 'starfish03', 'starfish04'),               
               CreateTask('SWORD', '', 'sword')
	)
	local object = pf:GetObject('cube')
	object:GetAnimation():SetMode(HGEANIM_FWD + HGEANIM_NOLOOP)
	object:GetAnimation():Stop()
	---------------------------------------------------------------------------------------------		
    local zone_cube = CreateZoomZone('close_zone_cube',
                               '',
                               'ZoomCubeBg',
                               'bulb',
                               'pixel_bulb'
							   );     
	pf:GetObject('bulb'):SetMaxOpacity(0)
	pf:GetObject('pixel_bulb'):SetMaxOpacity(0.01)
	---------------------------------------------------------------------------------------------	
	game_state.door_animation = createComposition19_back()
	game_state.door_animation:AttachTo(screen)
	game_state.door_animation:SetX(202)
	game_state.door_animation:SetZ(90)
	game_state.door_animation:SetDestroysOnEnd(false)
	
	game_state.gas1 = createCompositionPre_comp_1()
	local gas1 = game_state.gas1
	gas1:AttachTo(play_field)
	gas1:SetHotSpot(411.5, 384)
	gas1:SetXY(613.5, 384)
	gas1:SetZ(100)
	gas1:Stop()

	game_state.gas2 = createCompositionPre_comp_1()
	local gas2 = game_state.gas2
	gas2:AttachTo(play_field)	
	gas2:SetHotSpot(411.5, 384)	
	gas2:SetXY(613.5, 384)
	gas2:SetZ(100)
	gas2:Stop()
	---------------------------------------------------------------------------------------------
	pf:GetObject('pixel_cube'):SetOpacity(0)
	local clickOnDoor = function(save)		
		if save then
		    pf:GetObject('door'):SetOpacity(0)
			game_state.door_animation:Rewind(true)
			if game_state.gas1 and game_state.gas2 then
				game_state.gas1:Go()
				game_state.gas2:Go()
			end
			
			pf:GetObject('pixel_cube'):SetOpacity(1)
		else
			PlayRegisterMiniGame(PATH_MINIGAME_19_REPEAT)
		end
    end
    RegisterActiveObject('pixel_door', clickOnDoor, false, GetCursorArms())
	---------------------------------------------------------------------------------------------	
	local photo_action_sun = function()                                
                             end
    local apply_action_sun = function(save)
                                local anim_cube = pf:GetObject('cube'):GetAnimation()
                                if save then
                                    anim_cube:Rewind(true)
									game_state.gas1:SetOpacity(0)
									game_state.gas2:SetOpacity(0)
                                else
                                    anim_cube:Play()
									MakeSoundEntity('19_sun'):Play(false)
                                end
                                RegisterZoomZone(zone_cube, 'pixel_cube')
                             end
    local photo_sun = CreatePhotoZone('sun', 
                                            'SUN_MASK', 
                                            'sun_photo', 
                                            photo_action_sun,
											'pixel_cube',
											apply_action_sun)  
	---------------------------------------------------------------------------------------------	
	play_field:GetObject('fire1'):SetOpacity(0)
	play_field:GetObject('fire2'):SetOpacity(0)
	
	local photo_action_bulb = function()                                
                             end
    local apply_action_bulb = function(save)
                                local anim_cube = pf:GetObject('cube'):GetAnimation()
								MakeSoundEntity('19_fire'):Play(true)
                                if save then
                                    UnregisterZoomZone(zone_cube)
                                    anim_cube:Rewind(false)
                                    OnWin()
									pf:GetObject('fire1'):SetOpacity(1)
									pf:GetObject('fire2'):SetOpacity(1)									
                                else
									MakeSoundEntity('19_bulb'):Play(false)
                                    pf:GetObject('bulb'):SetMaxOpacity(1)
                                    pf:GetObject('bulb'):ChangeOpacity(0, 1, 0.1)
									pf:GetObject('fire1'):ChangeOpacity(0, 1, 0.5)
									pf:GetObject('fire2'):ChangeOpacity(0, 1, 0.5)
									game_state.gas1:Destroy()
									game_state.gas2:Destroy()
                                    zone_cube.Blocked(0.3)
                                    TimerDo(pf:GetTimer(), 0.3, function()
                                                                          DisableZoomZoneRequest(zone_cube)
                                                                end)
                                    TimerDo(pf:GetTimer(), 0.7, function()
                                                                          anim_cube:SetMode(HGEANIM_REV + HGEANIM_NOLOOP)
                                                                          anim_cube:Play()
																		  MakeSoundEntity('19_after_bulb'):Play(false)
																		  game_state.chain_bulb_used.Play()
                                                                          OnWin()
                                                                        end)
                                end
							  end
	photo_bulb = CreatePhotoZoneEx(nil, 'kolba_small', 
									     'ANCIENT_ARTEFACT',
									     'bulb_photo',
									     photo_action_bulb,
									     'pixel_bulb',
									     apply_action_bulb)
	photo_bulb.zone.SetPhotoMade()
	---------------------------------------------------------------------------------------------		
    game_state.chain_on_shown = RegisterComicsEx(function()
                                                    LoadComics(PATH_COMICS_19_ON_SHOWN_1)
                                                    CreateOneReplicHeroes('COMICS_19_ON_SHOWN_1', 1)
                                                    CreateOneSMS('COMICS_19_ON_SHOWN_2', 2)
                                                end )
                                        
	game_state.chain_sun = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_19_SUN, 'COMICS_19_SUN');
											end)
	game_state.chain_bulb = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_19_BULB, 'COMICS_19_BULB');
											end)
	game_state.chain_bulb_used = RegisterComicsEx(function()
                                                    LoadComics(PATH_COMICS_19_BULB_USED, 'COMICS_19_BULB_USED_1')
													CreateOneSMS('COMICS_19_BULB_USED_1', 1)
                                                    CreateOneReplicHeroes('COMICS_19_BULB_USED_2', 2)                                                    
                                                end )
	game_state.chain_bulb_used.OnHidden = function()
											OnWin()
											NotesFound('Notes_10')
										  end
	game_state.chain_on_win = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_19_ON_WIN, 'COMICS_19_ON_WIN');
											end)
	game_state.chain_on_win.OnHidden = function()
										 OnWinLevel()
									   end
	---------------------------------------------------------------------------------------------										
	SetHintComicsPhotoZoneEx(photo_sun, game_state.chain_sun)
	SetHintComicsPhotoZoneEx(photo_bulb, game_state.chain_bulb)
	---------------------------------------------------------------------------------------------			
	RegisterMiniGame(PATH_MINIGAME_19_REPEAT, function()
                                                LoadMiniGames(PATH_MINIGAME_19_REPEAT)
                                            end )
	--------------------------------------------------------------------------------------------		
end

function OnSceneFree()
    FreeData()
end

function OnScreenShown(fade_out)
	if fade_out then
       game_state.chain_on_shown.Play()
    end
end

function OnHiddenComics()
end

function OnMinigameCompleted(mini_game)
	play_field:GetObject('door'):SetOpacity(0)
	game_state.door_animation:Play()
	
	TimerDo(play_field:GetTimer(), 5.0, function()
                                        	play_field:GetObject('pixel_cube'):SetOpacity(1)
                                        end)
	
	game_state.gas1:Go()
	game_state.gas2:Go()
	
	MakeSoundEntity('19_minigame_complete'):Play(false)
end

function OnUpdate(dt)
    DefaultOnUpdate(dt)
end

function OnLose()
end

function OnExit()
end

function OnButtonMouseEnter(title)
end

function OnButtonMouseLeave(title)
end

function OnObjectMouseEnter(object)
    DefaultOnObjectMouseEnter(object)
end

function OnObjectMouseLeave(object)
    DefaultOnObjectMouseLeave(object)
end

function OnObjectMouseDown(object)
    obj_name = object:GetName()
    local pf = play_field
    local is_wrong_click = true

    is_wrong_click = DefaultOnObjectMouseDown(object)
    
    return is_wrong_click
end

function OnObjectMouseUp(object)
end

function OnObjectRightMouseDown(object)
end

function OnObjectRightMouseUp(object)
end

function OnObjectFound(object)
    DefaultOnObjectFound(object);
end

function OnToolFound(tool)
end

function OnToolApply(tool, object)
    DefaultOnToolApply(tool, object)
end

function OnObjectReachPanel(object)
    DefaultOnObjectReachPanel(object)
end

function OnPhotographing()
	DefaultOnPhotographing()
end

function OnButtonPress(title)
    DefaultOnButtonPress(title)
end

function OnMouseMove(previous_pos, current_pos)
end

function OnSetTool(tool)
end

function OnLostFocus()
end

function OnGainFocus()
end

function OnWin()
    if  IsUnregisterPhotoZone(photo_bulb.zone) and
        play_field:GetLevelScreen():HasTaskObjects() == false and
        game_state.chain_bulb_used.played
    then
        game_state.chain_on_win.Play()
    end
end

-- CLEAR_ON_SAVE_BEGIN
-- Do not edit code listed below (generated by the editor on each save)
function LoadData(screen)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/arrow.png',0,0,60,49,1,0)
	anim:SetHotSpot(30,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('arrow',anim,401,152,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/bicycle.png',0,0,61,57,1,0)
	anim:SetHotSpot(30,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bicycle',anim,487,257,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/bird.png',0,0,78,69,1,0)
	anim:SetHotSpot(39,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bird',anim,581,703,200,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/bottle.png',0,0,49,64,1,0)
	anim:SetHotSpot(24,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bottle',anim,780,422,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/broom1.png',0,0,60,118,1,0)
	anim:SetHotSpot(30,59)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('broom1',anim,549,245,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/broom2.png',0,0,82,96,1,0)
	anim:SetHotSpot(41,48)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('broom2',anim,897,264,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/butterfly.png',0,0,62,34,1,0)
	anim:SetHotSpot(31,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('butterfly',anim,836,350,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/chain.png',0,0,44,229,1,0)
	anim:SetHotSpot(22,114)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('chain',anim,753,295,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/chinese_coin.png',0,0,47,41,1,0)
	anim:SetHotSpot(23,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('chinese_coin',anim,403,228,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/fan.png',0,0,83,45,1,0)
	anim:SetHotSpot(41,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fan',anim,404,288,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/frame.png',0,0,82,64,1,0)
	anim:SetHotSpot(41,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('frame',anim,776,620,200,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/gauntlet.png',0,0,69,111,1,0)
	anim:SetHotSpot(34,55)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('gauntlet',anim,987,120,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/glasses.png',0,0,95,45,1,0)
	anim:SetHotSpot(47,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('glasses',anim,665,691,200,12,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/guitar.png',0,0,84,97,1,0)
	anim:SetHotSpot(42,48)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('guitar',anim,733,63,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/infinity.png',0,0,48,27,1,0)
	anim:SetHotSpot(24,13)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('infinity',anim,451,17,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/Jolly_Roger.png',0,0,74,62,1,0)
	anim:SetHotSpot(37,31)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Jolly_Roger',anim,584,52,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/lizzard02.png',0,0,128,77,1,0)
	anim:SetHotSpot(64,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lizzard02',anim,948,675,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/magnifying_glass.png',0,0,68,64,1,0)
	anim:SetHotSpot(34,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('magnifying_glass',anim,823,242,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/maple_leaf.png',0,0,55,56,1,0)
	anim:SetHotSpot(27,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('maple_leaf',anim,469,187,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/mask.png',0,0,45,112,1,0)
	anim:SetHotSpot(22,56)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('mask',anim,896,375,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/metal_ball.png',0,0,28,26,1,0)
	anim:SetHotSpot(14,13)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('metal_ball',anim,829,313,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/note.png',0,0,74,44,1,0)
	anim:SetHotSpot(37,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('note',anim,909,723,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/peace.png',0,0,96,56,1,0)
	anim:SetHotSpot(48,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('peace',anim,892,173,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/pipe.png',0,0,48,98,1,0)
	anim:SetHotSpot(24,49)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pipe',anim,787,103,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/ring.png',0,0,43,34,1,0)
	anim:SetHotSpot(21,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ring',anim,294,680,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/seashell01.png',0,0,32,45,1,0)
	anim:SetHotSpot(16,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('seashell01',anim,410,512,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/seashell02.png',0,0,40,40,1,0)
	anim:SetHotSpot(20,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('seashell02',anim,358,72,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/seashell03.png',0,0,28,69,1,0)
	anim:SetHotSpot(14,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('seashell03',anim,305,294,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/seashell04.png',0,0,60,77,1,0)
	anim:SetHotSpot(30,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('seashell04',anim,970,248,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/smile.png',0,0,31,30,1,0)
	anim:SetHotSpot(15,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('smile',anim,435,693,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/spear.png',0,0,49,404,1,0)
	anim:SetHotSpot(24,202)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('spear',anim,991,486,100,-7,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/starfish01.png',0,0,49,44,1,0)
	anim:SetHotSpot(24,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('starfish01',anim,607,547,200,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/starfish02.png',0,0,55,67,1,0)
	anim:SetHotSpot(27,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('starfish02',anim,387,375,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/starfish03.png',0,0,59,38,1,0)
	anim:SetHotSpot(29,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('starfish03',anim,681,193,70,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/starfish04.png',0,0,55,49,1,0)
	anim:SetHotSpot(27,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('starfish04',anim,728,744,200,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/sword.png',0,0,177,32,1,0)
	anim:SetHotSpot(88,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('sword',anim,671,140,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/wing.png',0,0,115,77,1,0)
	anim:SetHotSpot(57,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('wing',anim,256,107,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Layers/bg.jpg',0,0,823,768,1,0)
	anim:SetHotSpot(411,384)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bg',anim,613,384,60,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('pixel_door',anim,676,307,116,0,13.38,36)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Animations/anim.png',0,0,48,85,15,5)
	anim:SetHotSpot(24,42)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cube',anim,656,354,70,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('pixel_cube',anim,649,346,71,0,4,8.05)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/ZoomCube/kolba_small.png',0,0,142,187,1,0)
	anim:SetHotSpot(71,93)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('kolba_small',anim,151,162,810,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/ZoomCube/ZoomCubeBg.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('ZoomCubeBg',anim,512,384,800,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('pixel_bulb',anim,512,376,810,0,25,40)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/ZoomCube/kolba_small.png',0,0,142,187,1,0)
	anim:SetHotSpot(71,93)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('bulb',anim,498,383,810,0,1.55,1.56)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Photos/sun_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('sun_photo',anim,99,423,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Photos/bulb_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bulb_photo',anim,97,615,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/sun.png',0,0,59,58,1,0)
	anim:SetHotSpot(29,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('sun',anim,785,478,200,0,0.9,0.9)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Layers/door.png',0,0,123,307,1,0)
	anim:SetHotSpot(61,153)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('door',anim,671,303,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Animations/m1.png',0,0,182,173,1,0)
	anim:SetHotSpot(91,86)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('m1',anim,522,320,91,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Animations/m2.png',0,0,185,189,1,0)
	anim:SetHotSpot(92,94)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('m2',anim,817,335,91,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Animations/m3.png',0,0,171,175,1,0)
	anim:SetHotSpot(85,87)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('m3',anim,670,79,91,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Animations/m4.png',0,0,180,363,1,0)
	anim:SetHotSpot(90,181)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('m4',anim,652,603,120,0,1,1)
	local anim = CreateAnimation('data/Texture/Animations/fire/fire.png',0,0,157,284,36,20)
	anim:SetHotSpot(78,142)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fire2',anim,913,510,124,0,0.6,1)
	local anim = CreateAnimation('data/Texture/Animations/fire/fire.png',0,0,157,284,36,20)
	anim:SetHotSpot(78,142)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fire1',anim,308,445,124,0,0.6,1)
	local anim = CreateAnimation('data/Texture/Scenes/19_skeleton_/Items/lizzard01.png',0,0,60,125,1,0)
	anim:SetHotSpot(30,62)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lizzard01',anim,931,67,100,32,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
