function OnSceneLoad(screen)
    LoadData(screen)
    DefaultOnSceneLoad('data/Scenes/02_Dupens_House_Corner_HO.lua', 'hidden_object', 'data/Scenes/02_Dupens_House_Room.lua')
    
    play_field:GetObject('CutterPart'   ):SetOpacity(0.);
    play_field:GetObject('Apple'        ):SetOpacity(0.);
    play_field:GetObject('Oyster'       ):SetOpacity(0.);
    
    play_field:GetObject('open_01_tumba'):SetOpacity(0.);
    play_field:GetObject('open_02_tumba'):SetOpacity(0.);
    
    RegisterActiveObject('area_tumba2',
                            function(obj_name)
                                play_field:GetObject('area_tumba2'  ):SetVisible(false);
                                play_field:GetObject('open_02_tumba'):ChangeOpacity(0., 1., 0.3);
                                play_field:GetObject('CutterPart'   ):ChangeOpacity(0., 1., 0.3);
                                
                                PlaySound('02_OpenShelf');
                            end,
                            
                            function(obj_name)
                                play_field:GetObject('area_tumba2'  ):SetVisible(false);
                                play_field:GetObject('open_02_tumba'):SetOpacity(1.);
                                play_field:GetObject('CutterPart'   ):SetOpacity(1.);
                            end
                            );
    
    RegisterActiveObject('area_tumba',
                            function(obj_name)
                                play_field:GetObject('area_tumba'   ):SetVisible(false);
                                play_field:GetObject('open_01_tumba'):ChangeOpacity(0., 1., 0.3);
                                play_field:GetObject('Apple'        ):ChangeOpacity(0., 1., 0.3);
                                play_field:GetObject('Oyster'       ):ChangeOpacity(0., 1., 0.3);
                                
                                PlaySound('02_OpenShelf_2');
                            end,
                            
                            function(obj_name)
                                play_field:GetObject('area_tumba'   ):SetVisible(false);
                                play_field:GetObject('open_01_tumba'):SetOpacity(1.);
                                play_field:GetObject('Apple'        ):SetOpacity(1.);
                                play_field:GetObject('Oyster'       ):SetOpacity(1.);
                            end
                            );
    
    AddTask(CreateTask('CUTTER_PART', '',      'CutterPart'));
    AddTask(CreateTask('APPLE',       '',      'Apple'     ));
    AddTask(CreateTask('OYSTER',      '',      'Oyster'    ));
    AddTask(CreateTask('RING',        'RINGS', 'Ring', 'Ring1', 'Ring2', 'Ring3'));
    AddTask(CreateTask('BOLT',        'BOLTS', 'Screw', 'Screw1', 'Screw2'));
    AddTask(CreateTask('NOTE',        'NOTES', 'Note', 'Note2'));
    
    AddRandomTasks( CreateTask('BINOCULAR',    '', 'Binocular'),
                    CreateTask('BOOK',         '', 'Book'),
                    CreateTask('BRICK',        '', 'Brick'),
                    CreateTask('COINS',        '', 'coins'),
                    CreateTask('EGG',          '', 'Egg'),
                    CreateTask('FOOT',         '', 'Foot'),
                    CreateTask('FORK',         '', 'Fork'),
                    CreateTask('GLASSES',      '', 'Glasses'),
                    CreateTask('INFINITY',     '', 'Infinity'),
                    CreateTask('JUG',          '', 'Jug'),
                    CreateTask('PEPPER',       '', 'Pepper'),
                    CreateTask('TYPEWRITER',   '', 'Printing_device'),
                    CreateTask('ROPE',         '', 'Rope'),
                    CreateTask('RULER',        '', 'Ruler'),
                    CreateTask('SEVEN',        '', 'Seven'),
                    CreateTask('SKULL',        '', 'Skull'),
                    CreateTask('UMBRELLA',     '', 'Umbrella'),
                    CreateTask('COMPASS',      '', 'Compass'),
                    CreateTask('BLUEBOTTLE',   '', 'BlueBottle'),
                    --CreateTask('BRUSH',        '', 'Brush'),
                    CreateTask('CARD',         '', 'Card'),
                    CreateTask('CHISEL',       '', 'Chisel'),
                    CreateTask('DRILL',        '', 'Drill'),
                    CreateTask('GOBLET',       '', 'Goblet'),
                    CreateTask('HARE',         '', 'Hare'),
                    CreateTask('HERBARIUM',    '', 'Herbarium'),
                    CreateTask('GREEN_ONION',  '', 'Onion'),
                    CreateTask('RAG',          '', 'Rag'));
    
    RegisterToolFindInfo('02_cutter_part', 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_HO2/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/Common/area.png',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_tumba',anim,324,116,104,-4,20,9)
	local anim = CreateAnimation('data/Texture/Scenes/Common/area.png',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_tumba2',anim,328,261,103,-5,20,9)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/CutterPart.png',0,0,166,71,1,0)
	anim:SetHotSpot(83,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('CutterPart',anim,334,263,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Apple.png',0,0,46,39,1,0)
	anim:SetHotSpot(23,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Apple',anim,285,130,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Binocular.png',0,0,150,91,1,0)
	anim:SetHotSpot(75,45)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Binocular',anim,824,538,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Book.png',0,0,160,114,1,0)
	anim:SetHotSpot(80,57)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Book',anim,373,431,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Brick.png',0,0,106,72,1,0)
	anim:SetHotSpot(53,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Brick',anim,234,449,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/coins.png',0,0,75,68,1,0)
	anim:SetHotSpot(37,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('coins',anim,253,589,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Egg.png',0,0,56,48,1,0)
	anim:SetHotSpot(28,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Egg',anim,408,332,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Foot.png',0,0,113,94,1,0)
	anim:SetHotSpot(56,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Foot',anim,241,358,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Fork.png',0,0,124,77,1,0)
	anim:SetHotSpot(62,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fork',anim,685,521,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Glasses.png',0,0,97,80,1,0)
	anim:SetHotSpot(48,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Glasses',anim,1008,530,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Infinity.png',0,0,56,30,1,0)
	anim:SetHotSpot(28,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Infinity',anim,976,323,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Jug.png',0,0,75,86,1,0)
	anim:SetHotSpot(37,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Jug',anim,664,173,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Note.png',0,0,78,56,1,0)
	anim:SetHotSpot(39,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Note',anim,889,104,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Oyster.png',0,0,104,58,1,0)
	anim:SetHotSpot(52,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Oyster',anim,349,118,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Pepper.png',0,0,73,48,1,0)
	anim:SetHotSpot(36,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Pepper',anim,291,633,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Printing_device.png',0,0,187,164,1,0)
	anim:SetHotSpot(93,82)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Printing_device',anim,392,599,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Ring.png',0,0,38,33,1,0)
	anim:SetHotSpot(19,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Ring',anim,1005,306,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Rope.png',0,0,124,112,1,0)
	anim:SetHotSpot(62,56)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Rope',anim,151,321,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Ruler.png',0,0,50,220,1,0)
	anim:SetHotSpot(25,110)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Ruler',anim,39,474,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Screw.png',0,0,80,72,1,0)
	anim:SetHotSpot(40,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Screw',anim,818,434,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Seven.png',0,0,28,42,1,0)
	anim:SetHotSpot(14,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Seven',anim,517,430,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Skull.png',0,0,66,70,1,0)
	anim:SetHotSpot(33,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Skull',anim,66,114,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Umbrella.png',0,0,91,239,1,0)
	anim:SetHotSpot(45,119)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Umbrella',anim,497,259,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Layers/layer_01_over.png',0,0,307,117,1,0)
	anim:SetHotSpot(153,58)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_01_over',anim,318,472,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Layers/layer_02_over.png',0,0,58,126,1,0)
	anim:SetHotSpot(29,63)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_02_over',anim,501,313,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Layers/layer_03_over.png',0,0,75,131,1,0)
	anim:SetHotSpot(37,65)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_03_over',anim,121,308,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Layers/open_01_tumba.png',0,0,196,153,1,0)
	anim:SetHotSpot(98,76)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('open_01_tumba',anim,341,147,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Layers/open_02_tumba.png',0,0,192,133,1,0)
	anim:SetHotSpot(96,66)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('open_02_tumba',anim,346,282,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Compass.png',0,0,127,125,1,0)
	anim:SetHotSpot(63,62)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Compass',anim,931,624,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Note2.png',0,0,39,52,1,0)
	anim:SetHotSpot(19,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Note2',anim,251,546,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Ring1.png',0,0,49,28,1,0)
	anim:SetHotSpot(24,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Ring1',anim,471,34,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Ring2.png',0,0,53,45,1,0)
	anim:SetHotSpot(26,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Ring2',anim,654,270,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Ring3.png',0,0,52,32,1,0)
	anim:SetHotSpot(26,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Ring3',anim,473,400,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Screw1.png',0,0,81,31,1,0)
	anim:SetHotSpot(40,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Screw1',anim,253,55,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Screw2.png',0,0,53,42,1,0)
	anim:SetHotSpot(26,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Screw2',anim,355,340,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Layers/BG_Ring3.png',0,0,44,25,1,0)
	anim:SetHotSpot(22,12)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('BG_Ring3',anim,476,392,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/BlueBottle.png',0,0,60,101,1,0)
	anim:SetHotSpot(30,50)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('BlueBottle',anim,470,509,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Brush.png',0,0,63,104,1,0)
	anim:SetHotSpot(31,52)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Brush',anim,596,464,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Card.png',0,0,66,68,1,0)
	anim:SetHotSpot(33,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Card',anim,904,192,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Chisel.png',0,0,54,51,1,0)
	anim:SetHotSpot(27,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Chisel',anim,596,227,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Drill.png',0,0,151,94,1,0)
	anim:SetHotSpot(75,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Drill',anim,730,596,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Goblet.png',0,0,55,95,1,0)
	anim:SetHotSpot(27,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Goblet',anim,497,620,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Hare.png',0,0,57,50,1,0)
	anim:SetHotSpot(28,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Hare',anim,348,641,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Herbarium.png',0,0,81,111,1,0)
	anim:SetHotSpot(40,55)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Herbarium',anim,866,327,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Onion.png',0,0,90,102,1,0)
	anim:SetHotSpot(45,51)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Onion',anim,608,558,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Items/Rag.png',0,0,109,90,1,0)
	anim:SetHotSpot(54,45)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Rag',anim,706,478,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Layers/BG_Luk.png',0,0,66,83,1,0)
	anim:SetHotSpot(33,41)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('BG_Luk',anim,622,563,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO2/Layers/BG_peshka.png',0,0,30,45,1,0)
	anim:SetHotSpot(15,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('BG_peshka',anim,301,342,102,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
