function OnSceneLoad(screen)
    game_state = {}    
    LoadData(screen)
    local pf = play_field
    local level = pf:GetLevelScreen()
    game_state.custom_cursors = {}
    game_state.locked_objects = {}
    --level:AddTaskSafe(CreateTask('', '', ''))
    --zone = CreateZoomZone('')
    game_state.locker = ReferenceCounter()
    game_state.active_zone = nil
    game_state.inventory_zones = {}
	game_state.active_objects = {}
	play_field:GetObject('vydacha'):GetAnimation():SetMode(HGEANIM_FWD + HGEANIM_NOLOOP)
	play_field:GetObject('vydacha'):GetAnimation():Stop()
	play_field:GetObject('card02'):SetOpacity(0)
	
	play_field:IgnoreOnTestPoint('vydacha');
	play_field:GetObject('vydacha'):SetOpacity(0)
	
	play_field:GetObject('dver'):GetAnimation():SetMode(HGEANIM_FWD + HGEANIM_NOLOOP)
	play_field:GetObject('dver'):GetAnimation():Stop()
	
	local af = CreateAnimationEffector()
	local obj = play_field:GetObject('cherepax')
	local duration = GetAnimationLength(obj:GetAnimation())
	af:SetMode(_ANIM_LOOP)
	af:SetKey(_TRACK_O, 0, 0)
	af:SetKey(_TRACK_O, duration * 5 - 0.001, 0)
	af:SetKey(_TRACK_O, duration * 5, 1)
	af:SetKey(_TRACK_O, duration * 6, 1)
	af:SetKey(_TRACK_O, duration * 6 + 0.001, 0)
	af:AttachTo(obj)
	af:Play()
	game_state.meta_object = 'cigar29'
end

function OnMinigameCompleted()
end

function OnSceneFree(screen)
    FreeData(screen)
end

function OnUpdate(dt)
end

function OnScreenShown()
end

function OnExit()
end

function OnObjectMouseEnter(object)
    DefaultOnObjectMouseEnter(object)
end

function OnObjectMouseLeave(object)
    DefaultOnObjectMouseLeave(object)
end

function OnObjectMouseDown(object)
    obj_name = object:GetName()
    local pf = play_field
    local is_wrong_click = true

    is_wrong_click = DefaultOnObjectMouseDown(object)

    if is_wrong_click then
        --pf:ShowWrongObjectEffect()
    end

    return is_wrong_click;    
end

function OnObjectMouseUp(object)
end

function OnObjectWillBeFound(object)
end

function OnObjectWasFound(object)
end

function OnToolFound(tool)
end

function OnToolApply(tool, object)
    DefaultOnToolApply(tool, object)
end

function OnObjectReachPanel(object)
end

function OnButtonPress(title)
    DefaultOnButtonPress(title)
end

function OnMouseMove(previous_pos, current_pos)
end

function OnSetTool(tool)
end

function CanBeHinted(obj)
    if locked_object[obj] ~= true then
        return true
    else
        return false
    end
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/29_reception_12/Layers/BG.jpg',0,0,1024,768,1,0)
	anim:SetHotSpot(512,384)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('BG',anim,512,384,90,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/chesspiece.png',0,0,53,105,1,0)
	anim:SetHotSpot(26,52)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('chesspiece',anim,514,507,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/cube.png',0,0,38,32,1,0)
	anim:SetHotSpot(19,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cube',anim,354,292,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/cup.png',0,0,49,31,1,0)
	anim:SetHotSpot(24,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cup',anim,343,584,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/eifeltower.png',0,0,75,95,1,0)
	anim:SetHotSpot(37,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('eifeltower',anim,919,552,108,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/fan.png',0,0,86,53,1,0)
	anim:SetHotSpot(43,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fan',anim,902,715,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/feather01.png',0,0,103,25,1,0)
	anim:SetHotSpot(51,12)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('feather01',anim,260,43,100,25,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/feather02.png',0,0,24,111,1,0)
	anim:SetHotSpot(12,55)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('feather02',anim,514,682,100,-28,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/gargoyle.png',0,0,67,73,1,0)
	anim:SetHotSpot(33,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('gargoyle',anim,754,257,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/halberd.png',0,0,190,49,1,0)
	anim:SetHotSpot(95,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('halberd',anim,497,345,100,-10,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/helmet.png',0,0,91,81,1,0)
	anim:SetHotSpot(45,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('helmet',anim,334,683,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/hourglass.png',0,0,39,53,1,0)
	anim:SetHotSpot(19,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('hourglass',anim,865,485,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/lizzard.png',0,0,50,59,1,0)
	anim:SetHotSpot(25,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lizzard',anim,633,566,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/mask.png',0,0,53,64,1,0)
	anim:SetHotSpot(26,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('mask',anim,451,567,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/scrap_metal1.png',0,0,59,110,1,0)
	anim:SetHotSpot(29,55)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('scrap_metal1',anim,274,151,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/scrap_metal2.png',0,0,114,82,1,0)
	anim:SetHotSpot(57,41)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('scrap_metal2',anim,603,197,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/sign.png',0,0,42,42,1,0)
	anim:SetHotSpot(21,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('sign',anim,609,408,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/stick.png',0,0,52,276,1,0)
	anim:SetHotSpot(26,138)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('stick',anim,996,173,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/sword.png',0,0,24,185,1,0)
	anim:SetHotSpot(12,92)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('sword',anim,668,82,100,36,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/teapot.png',0,0,54,68,1,0)
	anim:SetHotSpot(27,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('teapot',anim,887,249,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/torch.png',0,0,62,157,1,0)
	anim:SetHotSpot(31,78)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('torch',anim,733,426,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/vase.png',0,0,34,76,1,0)
	anim:SetHotSpot(17,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('vase',anim,355,520,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Layers/sprajt_alebardy.png',0,0,120,20,1,0)
	anim:SetHotSpot(60,10)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('sprajt_alebardy',anim,540,336,105,-8,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Layers/sprajt_animacii_dverej.png',0,0,104,79,1,0)
	anim:SetHotSpot(52,39)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('sprajt_animacii_dverej',anim,453,556,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Layers/sprajt_chajnika.png',0,0,43,21,1,0)
	anim:SetHotSpot(21,10)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('sprajt_chajnika',anim,883,272,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Layers/sprajt_gorgulji.png',0,0,30,47,1,0)
	anim:SetHotSpot(15,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('sprajt_gorgulji',anim,773,245,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Layers/sprajt_shlema.png',0,0,28,25,1,0)
	anim:SetHotSpot(14,12)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('sprajt_shlema',anim,361,711,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Layers/sprajt_vazy.png',0,0,35,32,1,0)
	anim:SetHotSpot(17,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('sprajt_vazy',anim,355,544,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Layers/sprajt_veera.png',0,0,50,63,1,0)
	anim:SetHotSpot(25,31)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('sprajt_veera',anim,876,714,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Animations/vydacha.png',0,0,298,312,25,8)
	anim:SetHotSpot(148,156)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('vydacha',anim,829,417,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/card01.png',0,0,23,27,1,0)
	anim:SetHotSpot(11,13)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('card01',anim,914,385,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/card02.png',0,0,67,20,1,0)
	anim:SetHotSpot(33,10)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('card02',anim,713,559,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('robot_active_zone',anim,824,428,100,0,8,8)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Items/scrap_metal1.png',0,0,59,110,1,0)
	anim:SetHotSpot(29,55)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('scrap_metal1_scaled',anim,274,152,105,0,0.5,0.5)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Layers/sprajt_animacii_lapy01.png',0,0,73,60,1,0)
	anim:SetHotSpot(36,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('sprajt_animacii_lapy01',anim,833,286,108,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Layers/sprajt_animacii_lapy02.png',0,0,129,90,1,0)
	anim:SetHotSpot(64,45)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('sprajt_animacii_lapy02',anim,918,545,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Zoom/zoom_back.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('zoom_back',anim,512,384,300,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Zoom/claw.png',0,0,335,171,1,0)
	anim:SetHotSpot(167,85)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('claw',anim,663,394,3056,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('sofa_active_zone',anim,376,583,100,0,4,8)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('pixel_comics_1',anim,512,384,401,0,128,96)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('pixel_comics_2',anim,512,384,401,0,128,96)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('pixel_comics_3',anim,512,384,401,0,128,96)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Animations/cherepax.png',0,0,282,239,28,8)
	anim:SetHotSpot(141,120)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cherepax',anim,454,120,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/Animations/dver.png',0,0,127,200,4,10)
	anim:SetHotSpot(64,100)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('dver',anim,423,481,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/29_reception_12/cigar29.png',0,0,72,18,1,0)
	anim:SetHotSpot(36,9)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cigar29',anim,410,720,100,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
