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('book'):SetOpacity(0)
	play_field:GetObject('flyingbook'):SetClipping(0, 57, 1024, 768)
	
	game_state.meta_object = 'cigar27'
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/27_room_11/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/27_room_11/Items/belt.png',0,0,186,45,1,0)
	anim:SetHotSpot(93,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('belt',anim,851,736,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/binocular.png',0,0,84,40,1,0)
	anim:SetHotSpot(42,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('binocular',anim,857,446,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/broom.png',0,0,60,214,1,0)
	anim:SetHotSpot(30,107)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('broom',anim,1000,441,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/clew.png',0,0,67,72,1,0)
	anim:SetHotSpot(33,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('clew',anim,866,645,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/drill.png',0,0,66,28,1,0)
	anim:SetHotSpot(33,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('drill',anim,756,537,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/feather.png',0,0,92,30,1,0)
	anim:SetHotSpot(46,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('feather',anim,327,671,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/goggles.png',0,0,76,53,1,0)
	anim:SetHotSpot(38,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('goggles',anim,587,737,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/gramophone.png',0,0,106,92,1,0)
	anim:SetHotSpot(53,46)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('gramophone',anim,948,190,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/hat.png',0,0,86,56,1,0)
	anim:SetHotSpot(43,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('hat',anim,747,467,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/lamp.png',0,0,141,57,1,0)
	anim:SetHotSpot(70,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lamp',anim,273,740,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/medallion.png',0,0,69,69,1,0)
	anim:SetHotSpot(34,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('medallion',anim,675,215,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/mirror.png',0,0,57,77,1,0)
	anim:SetHotSpot(28,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('mirror',anim,835,574,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/necklace.png',0,0,60,70,1,0)
	anim:SetHotSpot(30,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('necklace',anim,340,490,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/phone.png',0,0,88,81,1,0)
	anim:SetHotSpot(44,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('phone',anim,256,458,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/pillow.png',0,0,114,84,1,0)
	anim:SetHotSpot(57,42)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pillow',anim,564,569,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/pine.png',0,0,41,38,1,0)
	anim:SetHotSpot(20,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pine',anim,160,658,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/rose.png',0,0,88,35,1,0)
	anim:SetHotSpot(44,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('rose',anim,559,446,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/scroll.png',0,0,80,46,1,0)
	anim:SetHotSpot(40,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('scroll',anim,474,611,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/tie.png',0,0,29,108,1,0)
	anim:SetHotSpot(14,54)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('tie',anim,345,253,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/towel.png',0,0,39,106,1,0)
	anim:SetHotSpot(19,53)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('towel',anim,576,330,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Layers/bysu layer.png',0,0,14,9,1,0)
	anim:SetHotSpot(7,4)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bysu layer',anim,331,459,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Layers/gramofon layer.png',0,0,89,26,1,0)
	anim:SetHotSpot(44,13)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('gramofon layer',anim,940,222,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Layers/medalion layer.png',0,0,52,22,1,0)
	anim:SetHotSpot(26,11)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('medalion layer',anim,675,195,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Layers/metla layer.png',0,0,9,39,1,0)
	anim:SetHotSpot(4,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('metla layer',anim,982,526,107,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Layers/polotence layer.png',0,0,19,31,1,0)
	anim:SetHotSpot(9,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('polotence layer',anim,586,296,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Layers/remen layer.png',0,0,76,23,1,0)
	anim:SetHotSpot(38,11)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('remen layer',anim,797,728,105,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('active_zone_under_bed',anim,790,563,100,0,11,5)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/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/27_room_11/Zoom/perforator.png',0,0,411,172,1,0)
	anim:SetHotSpot(205,86)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('perforator',anim,581,505,305,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/Shadowless/goggles1.png',0,0,64,39,1,0)
	anim:SetHotSpot(32,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('goggles_scaled',anim,586,733,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('cellar_acrtive_zone',anim,391,57,110,0,8,8)
	local anim = CreateAnimation('data/Texture/Comics/Sheriff.dds',0,0,530,636,1,0)
	anim:SetHotSpot(266,256)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('Sheriff',anim,756,390,400,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('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/27_room_11/Layers/cellar.png',0,0,60,21,1,0)
	anim:SetHotSpot(30,10)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cellar',anim,397,61,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/book.png',0,0,81,53,1,0)
	anim:SetHotSpot(40,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('book',anim,386,642,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/Items/flyingbook.png',0,0,38,56,1,0)
	anim:SetHotSpot(19,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('flyingbook',anim,387,40,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_room_11/cigar27.png',0,0,69,17,1,0)
	anim:SetHotSpot(34,8)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cigar27',anim,524,206,100,-10,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
