function OnSceneLoad(screen)
    LoadData(screen)
    DefaultOnSceneLoad('data/Scenes/02_Dupens_House_Sideboard_HO.lua', 'hidden_object', 'data/Scenes/02_Dupens_House_Room.lua')
    
    play_field:IgnoreOnTestPoint('doska');
    
    AddTask(CreateTask('CANDLE', '',        'Candle'));
    AddTask(CreateTask('ANKH',   '',        'Cross1'));
    AddTask(CreateTask('X',      '',        'Cross'));
    AddTask(CreateTask('CROSS',  '',        'Cross2'));
    AddTask(CreateTask('CANDY',  'CANDIES', 'Candy',  'Candy1',  'Candy2'));
    AddTask(CreateTask('ORANGE', 'ORANGES', 'Orange', 'Orange1', 'Orange2'));
    
    AddRandomTasks( CreateTask('YELLOW_FLOWER','', 'Camomile'),
                    CreateTask('ENVELOPE',     '', 'Envelope'),
                    CreateTask('GRAPES',       '', 'Grapes'),
                    CreateTask('ANGEL',        '', 'Handbell'),
                    CreateTask('SHIPS_WHEEL',  '', 'Handwheel'),
                    CreateTask('FOUNTAIN_PEN', '', 'Ink_pen'),
                    CreateTask('INKPOT',       '', 'Inkpot'),
                    CreateTask('KNIFE',        '', 'Knife'),
                    CreateTask('LOCOMOTIVE',   '', 'Locomotive'),
                    CreateTask('NAPKIN',       '', 'Shawl'),
                    CreateTask('SHELL',        '', 'Shell'),
                    CreateTask('SHIP',         '', 'Ship'),
                    CreateTask('SKULL',        '', 'Skull'),
                    CreateTask('TELEPHONE',    '', 'Telephone'),
                    CreateTask('TASSEL',       '', 'Trinket'),
                    CreateTask('ARROW',        '', 'Arrow'),
                    CreateTask('BEADS',        '', 'Beads'),
                    CreateTask('SWAN',         '', 'Duck'),
                    CreateTask('GARLIC',       '', 'Garlic'),
                    CreateTask('GIRL',         '', 'Girl'),
                    CreateTask('HOOK',         '', 'Hook'),
                    CreateTask('PLATE',        '', 'Plate'),
                    CreateTask('WHEAT',        '', 'Spikelet'),
                    CreateTask('CLUB_02',      '', 'TrefoilCross'));
    
    RegisterToolFindInfo('02_candle', nil, nil, nil);
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/02_Dupens_House/Zone_HO3/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/02_Dupens_House/Zone_HO3/Items/Camomile.png',0,0,68,46,1,0)
	anim:SetHotSpot(34,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Camomile',anim,606,416,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Candy.png',0,0,49,31,1,0)
	anim:SetHotSpot(24,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Candy',anim,410,453,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Cross.png',0,0,74,72,1,0)
	anim:SetHotSpot(37,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Cross',anim,988,508,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Envelope.png',0,0,78,85,1,0)
	anim:SetHotSpot(39,42)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Envelope',anim,355,192,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Grapes.png',0,0,49,73,1,0)
	anim:SetHotSpot(24,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Grapes',anim,649,174,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Handbell.png',0,0,50,96,1,0)
	anim:SetHotSpot(25,48)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Handbell',anim,487,298,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Handwheel.png',0,0,91,80,1,0)
	anim:SetHotSpot(45,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Handwheel',anim,374,62,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Ink_pen.png',0,0,158,28,1,0)
	anim:SetHotSpot(79,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Ink_pen',anim,437,473,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Inkpot.png',0,0,93,90,1,0)
	anim:SetHotSpot(46,45)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Inkpot',anim,386,619,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Knife.png',0,0,35,62,1,0)
	anim:SetHotSpot(17,31)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Knife',anim,431,605,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Locomotive.png',0,0,107,59,1,0)
	anim:SetHotSpot(53,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Locomotive',anim,680,528,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Orange.png',0,0,46,46,1,0)
	anim:SetHotSpot(23,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Orange',anim,594,208,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Shawl.png',0,0,107,48,1,0)
	anim:SetHotSpot(53,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Shawl',anim,509,437,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Shell.png',0,0,41,34,1,0)
	anim:SetHotSpot(20,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Shell',anim,645,584,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Ship.png',0,0,120,106,1,0)
	anim:SetHotSpot(60,53)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Ship',anim,723,420,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Skull.png',0,0,92,95,1,0)
	anim:SetHotSpot(46,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Skull',anim,53,162,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Candle.png',0,0,124,32,1,0)
	anim:SetHotSpot(62,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Candle',anim,238,494,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Telephone.png',0,0,127,127,1,0)
	anim:SetHotSpot(63,63)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Telephone',anim,837,481,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Trinket.png',0,0,40,108,1,0)
	anim:SetHotSpot(20,54)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Trinket',anim,264,112,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Layers/doska.png',0,0,136,117,1,0)
	anim:SetHotSpot(68,58)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('doska',anim,502,409,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Layers/shkaf.png',0,0,76,162,1,0)
	anim:SetHotSpot(38,81)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('shkaf',anim,38,149,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Candy1.png',0,0,41,36,1,0)
	anim:SetHotSpot(20,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Candy1',anim,593,630,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Candy2.png',0,0,49,41,1,0)
	anim:SetHotSpot(24,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Candy2',anim,668,319,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Cross1.png',0,0,43,67,1,0)
	anim:SetHotSpot(21,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Cross1',anim,576,67,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Cross2.png',0,0,23,29,1,0)
	anim:SetHotSpot(11,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Cross2',anim,29,419,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Orange1.png',0,0,42,37,1,0)
	anim:SetHotSpot(21,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Orange1',anim,988,305,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Orange2.png',0,0,61,52,1,0)
	anim:SetHotSpot(30,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Orange2',anim,432,400,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Layers/korz.png',0,0,39,70,1,0)
	anim:SetHotSpot(19,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('korz',anim,863,510,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Arrow.png',0,0,77,28,1,0)
	anim:SetHotSpot(38,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Arrow',anim,794,362,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Beads.png',0,0,78,99,1,0)
	anim:SetHotSpot(39,49)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Beads',anim,883,578,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Duck.png',0,0,71,55,1,0)
	anim:SetHotSpot(35,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Duck',anim,523,206,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Garlic.png',0,0,70,61,1,0)
	anim:SetHotSpot(35,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Garlic',anim,280,205,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Girl.png',0,0,40,88,1,0)
	anim:SetHotSpot(20,44)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Girl',anim,394,291,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Hook.png',0,0,31,40,1,0)
	anim:SetHotSpot(15,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Hook',anim,943,152,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Plate.png',0,0,96,70,1,0)
	anim:SetHotSpot(48,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Plate',anim,476,74,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/Spikelet.png',0,0,47,80,1,0)
	anim:SetHotSpot(23,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Spikelet',anim,718,76,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Items/TrefoilCross.png',0,0,46,69,1,0)
	anim:SetHotSpot(23,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('TrefoilCross',anim,889,241,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Layers/BG_Busy.png',0,0,40,26,1,0)
	anim:SetHotSpot(20,13)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('BG_Busy',anim,880,537,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO3/Layers/BG_Tarelka.png',0,0,105,73,1,0)
	anim:SetHotSpot(52,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('BG_Tarelka',anim,477,78,102,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
