function OnSceneLoad(screen)
    LoadData(screen)
    DefaultOnSceneLoad('data/Scenes/17_Bedroom_Fireplace_HO.lua', 'hidden_object', 'data/Scenes/17_Bedroom_Main.lua')
    
    AddTask(CreateTask('MICROSCOPE', '', 'Microscope'))
    
    AddRandomTasks( CreateTask('ANGELS',           '', 'Angels'),
                    CreateTask('COMPACT',          '', 'Areolet'),
                    CreateTask('BROOCH',           '', 'Brooch'),
                    CreateTask('BUG',              '', 'Bug'),
                    CreateTask('CIGAR',            '', 'Cigar'),
                    CreateTask('CRAWFISH',         '', 'Crawfish'),
                    CreateTask('CURTAIN_CORD',     '', 'CurtainCord'),
                    CreateTask('FAN',              '', 'Fan'),
                    CreateTask('FOLDERS',          '', 'Folder'),
                    CreateTask('FROG',             '', 'Frog'),
                    CreateTask('GLASSES',          '', 'Glasses'),
                    CreateTask('GLOVES',           '', 'Gloves'),
                    CreateTask('HOOK',             '', 'Hook'),
                    CreateTask('HORSESHOE',        '', 'Horseshoe'),
                    CreateTask('ITALY',            '', 'Italy'),
                    CreateTask('KNIFE',            '', 'Knife'),
                    CreateTask('LEAF',             '', 'Leaf'),
                    CreateTask('LION',             '', 'Lion'),
                    CreateTask('MAGNIFYING_GLASS', '', 'MagnifyingGlass'),
                    CreateTask('PEN',              '', 'Pen'),
                    CreateTask('POCKET_WATCH',     '', 'PocketWatch'),
                    CreateTask('POT',              '', 'Pot'),
                    CreateTask('ROPE',             '', 'Rope'),
                    CreateTask('SCISSORS',         '', 'Scissors'),
                    CreateTask('SCORPION',         '', 'Scorpion'),
                    CreateTask('SCROLL',           '', 'Scroll'),
                    CreateTask('SOCK',             '', 'Sock'),
                    CreateTask('WALKING_STICK',    '', 'Stick'),
                    CreateTask('SUN',              '', 'Sun'),
                    CreateTask('PUSH_BROOM',       '', 'Swab'),
                    CreateTask('TELESCOPE',        '', 'Telescope'),
                    CreateTask('UMBRELLA',         '', 'Umbrella'),
                    CreateTask('VIOLIN',           '', 'Violin'));
    
    RegisterToolFindInfo('17_microscope')
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_fireplace/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_fireplace/Items/Angels.png',0,0,205,132,1,0)
	anim:SetHotSpot(102,66)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Angels',anim,288,410,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Areolet.png',0,0,66,102,1,0)
	anim:SetHotSpot(33,51)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Areolet',anim,1015,413,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Brooch.png',0,0,41,42,1,0)
	anim:SetHotSpot(20,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Brooch',anim,738,194,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Bug.png',0,0,46,46,1,0)
	anim:SetHotSpot(23,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bug',anim,798,185,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Cigar.png',0,0,111,62,1,0)
	anim:SetHotSpot(55,31)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Cigar',anim,142,532,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Crawfish.png',0,0,86,141,1,0)
	anim:SetHotSpot(43,70)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Crawfish',anim,111,391,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/CurtainCord.png',0,0,102,151,1,0)
	anim:SetHotSpot(51,75)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('CurtainCord',anim,512,231,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Fan.png',0,0,156,129,1,0)
	anim:SetHotSpot(78,64)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fan',anim,929,302,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Folder.png',0,0,222,180,1,0)
	anim:SetHotSpot(111,90)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Folder',anim,653,526,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Frog.png',0,0,84,45,1,0)
	anim:SetHotSpot(42,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Frog',anim,775,531,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Glasses.png',0,0,103,78,1,0)
	anim:SetHotSpot(51,39)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Glasses',anim,51,267,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Gloves.png',0,0,164,139,1,0)
	anim:SetHotSpot(82,69)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Gloves',anim,536,612,106,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Hook.png',0,0,45,211,1,0)
	anim:SetHotSpot(22,105)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Hook',anim,304,140,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Horseshoe.png',0,0,152,155,1,0)
	anim:SetHotSpot(76,77)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Horseshoe',anim,285,282,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Italy.png',0,0,131,119,1,0)
	anim:SetHotSpot(65,59)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Italy',anim,840,379,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Knife.png',0,0,126,114,1,0)
	anim:SetHotSpot(63,57)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Knife',anim,650,627,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Leaf.png',0,0,91,60,1,0)
	anim:SetHotSpot(45,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Leaf',anim,776,626,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Lion.png',0,0,108,129,1,0)
	anim:SetHotSpot(54,64)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Lion',anim,505,405,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/MagnifyingGlass.png',0,0,78,58,1,0)
	anim:SetHotSpot(39,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('MagnifyingGlass',anim,719,586,107,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Pen.png',0,0,122,51,1,0)
	anim:SetHotSpot(61,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Pen',anim,370,636,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/PocketWatch.png',0,0,52,44,1,0)
	anim:SetHotSpot(26,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('PocketWatch',anim,319,618,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Pot.png',0,0,174,121,1,0)
	anim:SetHotSpot(87,60)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Pot',anim,862,488,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Rope.png',0,0,142,115,1,0)
	anim:SetHotSpot(71,57)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Rope',anim,905,596,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Scissors.png',0,0,121,104,1,0)
	anim:SetHotSpot(60,52)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Scissors',anim,266,590,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Scorpion.png',0,0,111,50,1,0)
	anim:SetHotSpot(55,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Scorpion',anim,811,580,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Scroll.png',0,0,173,132,1,0)
	anim:SetHotSpot(86,66)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Scroll',anim,918,302,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Sock.png',0,0,71,117,1,0)
	anim:SetHotSpot(35,58)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Sock',anim,984,183,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Stick.png',0,0,69,277,1,0)
	anim:SetHotSpot(34,138)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Stick',anim,899,164,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Sun.png',0,0,98,110,1,0)
	anim:SetHotSpot(49,55)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Sun',anim,125,617,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Swab.png',0,0,211,347,1,0)
	anim:SetHotSpot(105,173)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Swab',anim,413,462,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Telescope.png',0,0,256,239,1,0)
	anim:SetHotSpot(128,119)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Telescope',anim,742,119,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Umbrella.png',0,0,277,253,1,0)
	anim:SetHotSpot(138,126)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Umbrella',anim,826,214,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Violin.png',0,0,202,446,1,0)
	anim:SetHotSpot(101,223)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Violin',anim,593,353,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Layers/Layer_kamin.png',0,0,262,153,1,0)
	anim:SetHotSpot(131,76)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_kamin',anim,315,76,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Layers/Layer_kreslo.png',0,0,233,221,1,0)
	anim:SetHotSpot(116,110)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_kreslo',anim,699,482,106,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Layers/Layer_kreslo_slypa.png',0,0,320,411,1,0)
	anim:SetHotSpot(160,205)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_kreslo_slypa',anim,698,205,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Layers/Layer_reshetka.png',0,0,415,215,1,0)
	anim:SetHotSpot(207,107)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_reshetka',anim,344,566,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Layers/Layer_ugol.png',0,0,212,572,1,0)
	anim:SetHotSpot(106,286)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_ugol',anim,562,384,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Layers/Layer_zveti.png',0,0,185,170,1,0)
	anim:SetHotSpot(92,85)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_zveti',anim,840,260,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/17_Bedroom/Zone_HO_fireplace/Items/Microscope.png',0,0,197,270,1,0)
	anim:SetHotSpot(98,135)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Microscope',anim,966,483,101,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
