function OnSceneLoad(screen)
    LoadData(screen)
    DefaultOnSceneLoad('data/Scenes/17_Bedroom_AboveTheBed_HO.lua', 'hidden_object', 'data/Scenes/17_Bedroom_Main.lua')
    
    play_field:IgnoreOnTestPoint('Layer_album');
    
    AddTask(CreateTask('GLASS_17', '', 'Glass'))
    
    AddRandomTasks( CreateTask('A',                '', 'A'),
                    CreateTask('BOTTLE',           '', 'Bottle'),
                    CreateTask('BRACELET',         '', 'Bracelet'),
                    CreateTask('BROOCH',           '', 'Brooch'),
                    CreateTask('BUTTERFLY',        '', 'Butterfly'),
                    CreateTask('CARDS',            '', 'Cards'),
                    CreateTask('CHRISTMAS_BALL',   '', 'ChristmasBall'),
                    CreateTask('FEATHER',          '', 'Feather'),
                    CreateTask('HEART',            '', 'Heart'),
                    CreateTask('KEY',              '', 'Key'),
                    CreateTask('MAGNIFYING_GLASS', '', 'MagnifyingGlass'),
                    CreateTask('PHOTO',            '', 'Photo'),
                    CreateTask('PICKAXE',          '', 'Pick'),
                    CreateTask('PLIERS',          '', 'Pincers'),
                    CreateTask('POCKET_WATCH',     '', 'PocketWatch'),
                    CreateTask('POSTCARD',         '', 'Postcard'),
                    CreateTask('PURSE',            '', 'Purse'),
                    CreateTask('SCISSORS',         '', 'Scissors'),
                    CreateTask('SHELL',            '', 'Shell'),
                    CreateTask('STARFISH',         '', 'Starfish'));
    
    game_state.fly = CreateAnimationsGroup("Fly", 'Fly_anim1', 3,
                                                  'Fly_anim2', 0,
                                                  'Fly_anim3', 0,
                                                  'Fly_anim4', 0,
                                                  'Fly_anim5', 0,
                                                  'Fly_anim6', 3,
                                                  'Fly_anim7', 0,
                                                  'Fly_anim8', 5);
    game_state.fly.Play();
    
    RegisterToolFindInfo('17_glass');
end

function OnSceneFree(screen)
    DefaultOnSceneFree()
    FreeData(screen)
end

function OnUpdate(dt)
    DefaultOnUpdate(dt)
end

function OnAllItemsFound()
    DefaultOnAllItemsFound()
end

function OnLose()
    DefaultOnLose()
end

function OnExit()
    DefaultOnExit()
end

function OnClose()
    DefaultOnClose()
end

function OnObjectMouseEnter(object)
    DefaultOnObjectMouseEnter(object)
end

function OnObjectMouseLeave(object)
    DefaultOnObjectMouseLeave(object)
end

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

    DefaultOnObjectMouseDownProcessed(is_wrong_click);
end

function OnObjectMouseUp(object)
    DefaultOnObjectMouseUp(object)
end

function OnObjectFound(object)
    DefaultOnObjectFound(object)
end

function OnToolFound(tool)
    DefaultOnToolFound(tool)
end

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

function OnObjectReachPanel(object)
    DefaultOnObjectReachPanel(object)
end

function OnButtonPress(title)
    DefaultOnButtonPress(title)
end

function OnMouseMove(previous_pos, current_pos)
    DefaultOnMouseMove(previous_pos, current_pos)
end

function OnSetTool(tool)
    DefaultOnSetTool(tool)
end

function LevelLoaded(level)
end

function OnSceneDestroy(playfield)
    DefaultOnSceneDestroy(playfield)
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/17_Bedroom/Zone_HO_above_the_bed/Layers/background.jpg',0,0,1024,768,1,0)
	anim:SetHotSpot(512,384)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('background',anim,512,384,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/A.png',0,0,59,67,1,0)
	anim:SetHotSpot(29,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('A',anim,775,362,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/Bottle.png',0,0,69,70,1,0)
	anim:SetHotSpot(34,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bottle',anim,848,554,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/Bracelet.png',0,0,46,35,1,0)
	anim:SetHotSpot(23,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bracelet',anim,239,489,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/Brooch.png',0,0,53,51,1,0)
	anim:SetHotSpot(26,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Brooch',anim,545,489,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/Butterfly.png',0,0,84,75,1,0)
	anim:SetHotSpot(42,37)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Butterfly',anim,568,353,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/Cards.png',0,0,77,59,1,0)
	anim:SetHotSpot(38,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Cards',anim,157,524,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/ChristmasBall.png',0,0,43,55,1,0)
	anim:SetHotSpot(21,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ChristmasBall',anim,408,113,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/Feather.png',0,0,102,59,1,0)
	anim:SetHotSpot(51,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Feather',anim,991,624,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/Heart.png',0,0,42,44,1,0)
	anim:SetHotSpot(21,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Heart',anim,421,35,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/Key.png',0,0,44,50,1,0)
	anim:SetHotSpot(22,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Key',anim,525,367,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/MagnifyingGlass.png',0,0,90,74,1,0)
	anim:SetHotSpot(45,37)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('MagnifyingGlass',anim,832,279,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/Photo.png',0,0,95,97,1,0)
	anim:SetHotSpot(47,48)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Photo',anim,132,468,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/Pick.png',0,0,111,93,1,0)
	anim:SetHotSpot(55,46)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Pick',anim,427,225,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/Pincers.png',0,0,94,43,1,0)
	anim:SetHotSpot(47,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Pincers',anim,800,168,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/PocketWatch.png',0,0,49,46,1,0)
	anim:SetHotSpot(24,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('PocketWatch',anim,897,216,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/Postcard.png',0,0,91,85,1,0)
	anim:SetHotSpot(45,42)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Postcard',anim,183,41,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/Purse.png',0,0,58,59,1,0)
	anim:SetHotSpot(29,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Purse',anim,891,450,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/Scissors.png',0,0,54,39,1,0)
	anim:SetHotSpot(27,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Scissors',anim,377,482,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/Shell.png',0,0,52,33,1,0)
	anim:SetHotSpot(26,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Shell',anim,539,280,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/Starfish.png',0,0,86,78,1,0)
	anim:SetHotSpot(43,39)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Starfish',anim,747,609,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Layers/Layer_lampa.png',0,0,99,84,1,0)
	anim:SetHotSpot(49,42)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_lampa',anim,142,405,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Layers/Layer_nogka.png',0,0,25,51,1,0)
	anim:SetHotSpot(12,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_nogka',anim,873,568,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Layers/Layer_shetka.png',0,0,131,101,1,0)
	anim:SetHotSpot(65,50)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_shetka',anim,504,184,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Layers/Layer_ugol.png',0,0,54,46,1,0)
	anim:SetHotSpot(27,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_ugol',anim,411,130,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Layers/Layer_album.png',0,0,95,81,1,0)
	anim:SetHotSpot(47,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_album',anim,465,212,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_above_the_bed/Items/Glass.png',0,0,80,84,1,0)
	anim:SetHotSpot(40,42)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Glass',anim,483,364,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/12_Restaurant_Kitchen/Zone_HO/Animations/Fly_anim1.png',0,0,84,68,9,25)
	anim:SetHotSpot(42,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fly_anim1',anim,255,100,151,0,0.4,0.4)
	local anim = CreateAnimation('data/Texture/Scenes/12_Restaurant_Kitchen/Zone_HO/Animations/Fly_anim2.png',0,0,84,68,3,25)
	anim:SetHotSpot(42,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fly_anim2',anim,255,100,151,0,0.4,0.4)
	local anim = CreateAnimation('data/Texture/Scenes/12_Restaurant_Kitchen/Zone_HO/Animations/Fly_anim3.png',0,0,84,68,2,15)
	anim:SetHotSpot(42,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fly_anim3',anim,255,100,151,0,0.4,0.4)
	local anim = CreateAnimation('data/Texture/Scenes/12_Restaurant_Kitchen/Zone_HO/Animations/Fly_anim4.png',0,0,84,68,4,5)
	anim:SetHotSpot(42,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fly_anim4',anim,255,100,151,0,0.4,0.4)
	local anim = CreateAnimation('data/Texture/Scenes/12_Restaurant_Kitchen/Zone_HO/Animations/Fly_anim5.png',0,0,84,68,4,15)
	anim:SetHotSpot(42,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fly_anim5',anim,255,100,151,0,0.4,0.4)
	local anim = CreateAnimation('data/Texture/Scenes/12_Restaurant_Kitchen/Zone_HO/Animations/Fly_anim6.png',0,0,84,68,17,25)
	anim:SetHotSpot(42,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fly_anim6',anim,255,100,151,0,0.4,0.4)
	local anim = CreateAnimation('data/Texture/Scenes/12_Restaurant_Kitchen/Zone_HO/Animations/Fly_anim7.png',0,0,84,68,9,15)
	anim:SetHotSpot(42,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fly_anim7',anim,255,100,151,0,0.4,0.4)
	local anim = CreateAnimation('data/Texture/Scenes/12_Restaurant_Kitchen/Zone_HO/Animations/Fly_anim8.png',0,0,84,68,18,15)
	anim:SetHotSpot(42,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fly_anim8',anim,255,100,151,0,0.4,0.4)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
