function OnSceneLoad(screen)
    LoadData(screen)
    DefaultOnSceneLoad('data/Scenes/02_Dupens_House_Fireplace_HO.lua', 'hidden_object', 'data/Scenes/02_Dupens_House_Main.lua')
    
    play_field:IgnoreOnTestPoint('fire_place');
    
    play_field:GetObject('shuhlada' ):SetOpacity(0.);
    play_field:GetObject('Coin'     ):SetOpacity(0.);
    play_field:GetObject('Pipe'     ):SetOpacity(0.);
    
    RegisterActiveObject('area_shuhlada',
                            function(obj_name)
                                play_field:GetObject(obj_name):SetVisible(false);
                                play_field:GetObject('shuhlada' ):ChangeOpacity(0., 1., OPEN_DOOR_TIME);
                                play_field:GetObject('Coin'     ):ChangeOpacity(0., 1., OPEN_DOOR_TIME);
                                
                                PlaySound('02_OpenLumber');
                            end,
                            
                            function(obj_name)
                                play_field:GetObject(obj_name):SetVisible(false);
                                play_field:GetObject('shuhlada' ):SetOpacity(1.);
                                play_field:GetObject('Coin'     ):SetOpacity(1.);
                            end);
                            
    RegisterActiveObject('area_cover',
                            function(obj_name)
                                play_field:GetObject(obj_name):SetVisible(false);
                                
                                local time  = 1;
                                local cover = play_field:GetObject('kryshka');
                                local eff   = CreateAnimationEffector();
                                
                                eff:AttachTo( cover );
                                eff:SetMode(_ANIM_FWD + _ANIM_NOLOOP);
                                
                                eff:SetKey(_TRACK_X, 0,          cover:GetX());
                                eff:SetKey(_TRACK_X, time * 0.5, 894);
                                eff:SetKey(_TRACK_X, time,       855);
                                
                                eff:SetKey(_TRACK_Y, 0,          cover:GetY());
                                eff:SetKey(_TRACK_Y, time * 0.5, cover:GetY());
                                eff:SetKey(_TRACK_Y, time,       581);
                                
                                eff:SetKey(_TRACK_A, 0,          cover:GetAngle());
                                eff:SetKey(_TRACK_A, time * 0.5, -5  * M_PI / 180);
                                eff:SetKey(_TRACK_A, time,       -70 * M_PI / 180);
                                
                                eff:Play();
                                PlaySound('02_PanCoverMove');
                                
                                play_field:GetObject('Pipe'):ChangeOpacity(0., 1., time);
                            end,
                            
                            function(obj_name)
                                play_field:GetObject(obj_name):SetVisible(false);
                                
                                local cover = play_field:GetObject('kryshka');
                                cover:SetXY(855, 581);
                                cover:SetAngle(-70 * M_PI / 180);
                                
                                play_field:GetObject('Pipe'):SetOpacity(1.);
                            end);
    
    AddTask(CreateTask('COIN', '',     'Coin'));
    AddTask(CreateTask('PIPE', '',     'Pipe'));
    AddTask(CreateTask('KEY',  'KEYS', 'Key', 'Key2', 'Key3', 'Key4'));
    AddTask(CreateTask('BOW',  'BOWS', 'Bow', 'Bow2', 'Bow3', 'Bow4'));
    
    AddRandomTasks( CreateTask('BELL',          '',      'Bell'),
                    CreateTask('BRACELET',      '',      'Bracelet'),
                    CreateTask('BROOCH',        '',      'Brooch'),
                    CreateTask('FISH',          '',      'Fish'),
                    CreateTask('CUTTING_BOARD', '',      'Hardboard'),
                    CreateTask('KNIFE',         '',      'Knife'),
                    CreateTask('LEAF',          'LEAFS', 'Leaf', 'Leaf2'),
                    CreateTask('GREETING_CARD', '',      'Postcard'),
                    CreateTask('STAR',          '',      'Star'),
                    CreateTask('SPARROW',       '',      'Bird'),
                    CreateTask('CROSS',         '',      'Cross'),
                    CreateTask('ROSE_HIPS',     '',      'DogRose'),
                    CreateTask('FIFE',          '',      'Fife'),
                    CreateTask('PAW_PRINT',     '',      'Footprint'),
                    CreateTask('HERON',         '',      'Heron'),
                    CreateTask('LADYBIRD',      '',      'Ladybird'),
                    CreateTask('LION',          '',      'Lion'),
                    CreateTask('SHRIMP',        '',      'Shrimp'));
    
    RegisterToolFindInfo('02_coin', nil, nil, nil);
    
    --StopCyclicSound('02_Fireplace');
    --PlayCyclicSound('02_Fireplace', 4.);
    
    MakeSoundEntity("02_Fireplace"):Play(true);
    
    TimerDoString("ShowHiddenObjectTip();", 1, play_field:GetTimer());
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_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_HO/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_HO/Animations/fire_place.png',0,0,331,339,13,12)
	anim:SetHotSpot(165,169)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fire_place',anim,427,428,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/area.png',0,0,8,8,3,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_shuhlada',anim,830,388,103,0,20,18)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Layers/shuhlada.png',0,0,286,344,1,0)
	anim:SetHotSpot(143,172)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('shuhlada',anim,842,481,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Layers/Bottle.png',0,0,48,74,1,0)
	anim:SetHotSpot(24,37)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bottle',anim,510,143,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Layers/kryshka.png',0,0,161,101,1,0)
	anim:SetHotSpot(80,50)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('kryshka',anim,954,542,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Layers/Table.png',0,0,158,58,1,0)
	anim:SetHotSpot(79,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Table',anim,413,231,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Layers/Urn.png',0,0,52,52,1,0)
	anim:SetHotSpot(26,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Urn',anim,84,460,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Layers/Vase.png',0,0,40,41,1,0)
	anim:SetHotSpot(20,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Vase',anim,245,180,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Bell.png',0,0,61,100,1,0)
	anim:SetHotSpot(30,50)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bell',anim,994,58,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Bow.png',0,0,44,35,1,0)
	anim:SetHotSpot(22,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bow',anim,257,91,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Bracelet.png',0,0,54,43,1,0)
	anim:SetHotSpot(27,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bracelet',anim,247,192,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Brooch.png',0,0,64,66,1,0)
	anim:SetHotSpot(32,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Brooch',anim,429,259,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Coin.png',0,0,35,26,1,0)
	anim:SetHotSpot(17,13)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Coin',anim,804,392,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Fish.png',0,0,63,43,1,0)
	anim:SetHotSpot(31,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fish',anim,669,69,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Hardboard.png',0,0,143,77,1,0)
	anim:SetHotSpot(71,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Hardboard',anim,88,620,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Key.png',0,0,91,31,1,0)
	anim:SetHotSpot(45,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Key',anim,892,266,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Knife.png',0,0,93,20,1,0)
	anim:SetHotSpot(46,10)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Knife',anim,85,615,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Leaf.png',0,0,77,47,1,0)
	anim:SetHotSpot(38,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Leaf',anim,640,607,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Postcard.png',0,0,103,89,1,0)
	anim:SetHotSpot(51,44)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Postcard',anim,541,150,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Star.png',0,0,68,76,1,0)
	anim:SetHotSpot(34,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Star',anim,63,452,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/area_circle.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_cover',anim,954,541,106,0,1.3,0.85)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Pipe.png',0,0,104,55,1,0)
	anim:SetHotSpot(52,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Pipe',anim,972,558,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_Dupens_House_Entrance/Zone_door/Animations/ants_anim.png',0,0,118,57,26,10)
	anim:SetHotSpot(59,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ants_anim',anim,754,571,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Bow2.png',0,0,65,36,1,0)
	anim:SetHotSpot(32,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bow2',anim,671,169,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Bow3.png',0,0,47,39,1,0)
	anim:SetHotSpot(23,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bow3',anim,897,64,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Bow4.png',0,0,62,47,1,0)
	anim:SetHotSpot(31,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bow4',anim,448,161,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Key2.png',0,0,78,30,1,0)
	anim:SetHotSpot(39,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Key2',anim,403,60,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Key3.png',0,0,33,61,1,0)
	anim:SetHotSpot(16,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Key3',anim,167,316,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Key4.png',0,0,41,64,1,0)
	anim:SetHotSpot(20,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Key4',anim,105,479,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Bird.png',0,0,83,65,1,0)
	anim:SetHotSpot(41,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bird',anim,529,630,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Cross.png',0,0,29,36,1,0)
	anim:SetHotSpot(14,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Cross',anim,862,221,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/DogRose.png',0,0,78,58,1,0)
	anim:SetHotSpot(39,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('DogRose',anim,110,163,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Fife.png',0,0,126,40,1,0)
	anim:SetHotSpot(63,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fife',anim,239,592,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Footprint.png',0,0,52,51,1,0)
	anim:SetHotSpot(26,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Footprint',anim,373,348,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Heron.png',0,0,66,100,1,0)
	anim:SetHotSpot(33,50)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Heron',anim,93,69,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Ladybird.png',0,0,38,32,1,0)
	anim:SetHotSpot(19,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Ladybird',anim,731,268,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Leaf2.png',0,0,47,79,1,0)
	anim:SetHotSpot(23,39)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Leaf2',anim,230,509,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Lion.png',0,0,115,37,1,0)
	anim:SetHotSpot(57,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Lion',anim,972,198,102,38,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Items/Shrimp.png',0,0,46,91,1,0)
	anim:SetHotSpot(23,45)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Shrimp',anim,621,443,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_HO/Layers/BG_zvezda.png',0,0,17,20,1,0)
	anim:SetHotSpot(8,10)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('BG_zvezda',anim,46,421,104,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
