function OnSceneLoad(screen)
    LoadData(screen)
    DefaultOnSceneLoad('data/Scenes/17_Bedroom_UnderTheBed_HO.lua', 'hidden_object', 'data/Scenes/17_Bedroom_Main.lua')
    
    play_field:IgnoreOnTestPoint('Layer_zont');
    play_field:IgnoreOnTestPoint('Layer_bumaga');
    
    AddTask(CreateTask('SHELL', '', 'Shell'));
    
    AddRandomTasks( CreateTask('BINOCULAR',     '', 'Binocular'),
                    CreateTask('FEATHER_DUSTER','', 'Brush'),
                    CreateTask('FISH',          '', 'Fish'),
                    CreateTask('GLOBE',         '', 'Globe'),
                    CreateTask('GLOVES',        '', 'Gloves'),
                    CreateTask('HAMMER',        '', 'Hammer'),
                    CreateTask('HARE',          '', 'Hare'),
                    CreateTask('K',             '', 'K'),
                    CreateTask('LEAF',          '', 'Leaf'),
                    CreateTask('MONEY',         '', 'Money'),
                    CreateTask('MOON',          '', 'Moon'),
                    CreateTask('NOTE',          '', 'Note'),
                    --CreateTask('PEARL',        '', 'Pearl'),  -- EAP-708
                    CreateTask('POCKET_WATCH',  '', 'PocketWatch'),
                    CreateTask('SHIP',          '', 'Ship'),
                    CreateTask('SOCK',          '', 'Sock'),
                    CreateTask('STONE',         '', 'Stone'),
                    CreateTask('WIG',           '', 'Wig'),
                    CreateTask('WING',          '', 'Wing'));
    
    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_seashell');
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_under_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_under_the_bed/Items/Binocular.png',0,0,95,57,1,0)
	anim:SetHotSpot(47,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Binocular',anim,415,297,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Items/Brush.png',0,0,169,87,1,0)
	anim:SetHotSpot(84,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Brush',anim,243,521,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Items/Fish.png',0,0,73,61,1,0)
	anim:SetHotSpot(36,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fish',anim,483,407,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Items/Globe.png',0,0,140,195,1,0)
	anim:SetHotSpot(70,97)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Globe',anim,918,388,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Items/Gloves.png',0,0,153,93,1,0)
	anim:SetHotSpot(76,46)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Gloves',anim,275,632,107,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Items/Hammer.png',0,0,94,147,1,0)
	anim:SetHotSpot(47,73)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Hammer',anim,640,467,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Items/Hare.png',0,0,93,96,1,0)
	anim:SetHotSpot(46,48)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Hare',anim,313,551,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Items/K.png',0,0,64,61,1,0)
	anim:SetHotSpot(32,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('K',anim,428,493,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Items/Leaf.png',0,0,72,44,1,0)
	anim:SetHotSpot(36,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Leaf',anim,122,494,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Items/Money.png',0,0,122,195,1,0)
	anim:SetHotSpot(61,97)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Money',anim,789,365,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Items/Moon.png',0,0,63,100,1,0)
	anim:SetHotSpot(31,50)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Moon',anim,822,542,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Items/Note.png',0,0,90,138,1,0)
	anim:SetHotSpot(45,69)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Note',anim,814,130,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Items/Pearl.png',0,0,27,26,1,0)
	anim:SetHotSpot(13,13)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Pearl',anim,463,628,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Items/PocketWatch.png',0,0,81,57,1,0)
	anim:SetHotSpot(40,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('PocketWatch',anim,380,625,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Items/Ship.png',0,0,162,158,1,0)
	anim:SetHotSpot(81,79)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Ship',anim,986,344,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Items/Sock.png',0,0,98,200,1,0)
	anim:SetHotSpot(49,100)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Sock',anim,89,216,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Items/Stone.png',0,0,30,28,1,0)
	anim:SetHotSpot(15,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Stone',anim,912,623,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Items/Wig.png',0,0,195,298,1,0)
	anim:SetHotSpot(97,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Wig',anim,498,129,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Items/Wing.png',0,0,116,70,1,0)
	anim:SetHotSpot(58,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Wing',anim,376,126,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Layers/Layer_bumaga.png',0,0,246,103,1,0)
	anim:SetHotSpot(123,51)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_bumaga',anim,150,605,108,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Layers/Layer_nogka.png',0,0,45,142,1,0)
	anim:SetHotSpot(22,71)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_nogka',anim,496,402,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Layers/Layer_nogka_big.png',0,0,72,247,1,0)
	anim:SetHotSpot(36,123)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_nogka_big',anim,844,327,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Layers/Layer_stol.png',0,0,59,76,1,0)
	anim:SetHotSpot(29,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_stol',anim,183,517,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Layers/Layer_zont.png',0,0,261,493,1,0)
	anim:SetHotSpot(130,246)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_zont',anim,399,428,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Layers/Layer_larez.png',0,0,194,169,1,0)
	anim:SetHotSpot(97,84)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_larez',anim,918,475,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Layers/Layer_books.png',0,0,172,143,1,0)
	anim:SetHotSpot(86,71)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_books',anim,298,644,106,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_under_the_bed/Items/Shell.png',0,0,64,48,1,0)
	anim:SetHotSpot(32,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Shell',anim,47,487,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,104,520,151,0,0.7,0.7)
	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,104,520,151,0,0.7,0.7)
	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,104,520,151,0,0.7,0.7)
	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,104,520,151,0,0.7,0.7)
	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,104,520,151,0,0.7,0.7)
	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,104,520,151,0,0.7,0.7)
	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,104,520,151,0,0.7,0.7)
	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,104,520,151,0,0.7,0.7)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
