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('tripod_layer'):SetOpacity(0.);
    play_field:IgnoreOnTestPoint('tripod_layer');
									
	game_state.meta_object = 'cigar20'
end

function OnSceneFree(screen)
    FreeData(screen)
end

function OnNotebookOpened()
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 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

function OnMinigameCompleted()
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/20_bar_proof_9/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,70,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/bag.png',0,0,83,109,1,0)
	anim:SetHotSpot(41,54)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bag',anim,991,592,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/bell.png',0,0,41,76,1,0)
	anim:SetHotSpot(20,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bell',anim,865,648,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/burger.png',0,0,71,53,1,0)
	anim:SetHotSpot(35,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('burger',anim,978,510,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/candleholder.png',0,0,70,93,1,0)
	anim:SetHotSpot(35,46)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('candleholder',anim,302,328,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/chair.png',0,0,84,121,1,0)
	anim:SetHotSpot(42,60)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('chair',anim,870,489,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/coin.png',0,0,42,28,1,0)
	anim:SetHotSpot(21,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('coin',anim,552,393,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/dollar.png',0,0,60,45,1,0)
	anim:SetHotSpot(30,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('dollar',anim,623,693,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/glasses.png',0,0,57,35,1,0)
	anim:SetHotSpot(28,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('glasses',anim,562,473,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/guitar.png',0,0,187,73,1,0)
	anim:SetHotSpot(93,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('guitar',anim,431,60,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/hippocampus.png',0,0,35,63,1,0)
	anim:SetHotSpot(17,31)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('hippocampus',anim,279,244,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/pen.png',0,0,92,41,1,0)
	anim:SetHotSpot(46,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pen',anim,458,644,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/plunger.png',0,0,50,83,1,0)
	anim:SetHotSpot(25,41)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('plunger',anim,990,688,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/purse.png',0,0,64,52,1,0)
	anim:SetHotSpot(32,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('purse',anim,334,446,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/shoes_pair.png',0,0,69,50,1,0)
	anim:SetHotSpot(34,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('shoes_pair',anim,959,665,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('pixel_inventory_1',anim,774,400,102,0,6,15)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/tripod.png',0,0,74,130,1,0)
	anim:SetHotSpot(37,65)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('tripod',anim,580,654,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/tripod.png',0,0,74,130,1,0)
	anim:SetHotSpot(37,65)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('tripod_tool',anim,580,656,1,0,0.6,0.6)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/tripod.png',0,0,74,130,1,0)
	anim:SetHotSpot(37,65)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('tripod_tool_visual_inventory',anim,580,654,1,0,0.6,0.6)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/telescope.png',0,0,171,48,1,0)
	anim:SetHotSpot(85,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('telescope',anim,941,106,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/telescope.png',0,0,171,48,1,0)
	anim:SetHotSpot(85,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('telescope_tool',anim,941,106,1,0,0.5,0.5)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/telescope.png',0,0,171,48,1,0)
	anim:SetHotSpot(85,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('telescope_tool_visual_inventory',anim,941,106,1,0,0.5,0.5)
	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('pixel_inventory_2',anim,448,499,100,0,14,6)
	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('pixel_zoom_kitchen',anim,761,358,100,0,19,19)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Zoom/bg_kitchen.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('bg_kitchen',anim,512,384,400,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/thimble.png',0,0,49,41,1,0)
	anim:SetHotSpot(24,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('thimble_tool_123',anim,512,384,1,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/thimble.png',0,0,49,41,1,0)
	anim:SetHotSpot(24,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('thimble_3_tool_visual_inventory',anim,512,384,1,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Zoom/thimble_3_layer.png',0,0,40,30,1,0)
	anim:SetHotSpot(20,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('thimble_3_layer',anim,652,463,420,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/thimble.png',0,0,49,41,1,0)
	anim:SetHotSpot(24,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('thimble_1',anim,378,709,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/thimble.png',0,0,49,41,1,0)
	anim:SetHotSpot(24,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('thimble_tool_1',anim,377,709,1,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/thimble.png',0,0,49,41,1,0)
	anim:SetHotSpot(24,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('thimble_1_tool_visual_inventory',anim,801,740,1,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/thimble.png',0,0,49,41,1,0)
	anim:SetHotSpot(24,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('thimble_2',anim,801,740,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/thimble.png',0,0,49,41,1,0)
	anim:SetHotSpot(24,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('thimble_tool_12',anim,801,740,1,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/thimble.png',0,0,49,41,1,0)
	anim:SetHotSpot(24,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('thimble_2_tool_visual_inventory',anim,895,535,1,0,1,1)
	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,40,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',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('pixel2',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('pixel3',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('pixel4',anim,512,384,401,0,128,96)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Layers/burger_layer.png',0,0,25,44,1,0)
	anim:SetHotSpot(12,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('burger_layer',anim,1007,506,130,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Layers/dollar_layer.png',0,0,41,62,1,0)
	anim:SetHotSpot(20,31)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('dollar_layer',anim,607,688,130,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Layers/guitar_layer.png',0,0,124,96,1,0)
	anim:SetHotSpot(62,48)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('guitar_layer',anim,392,56,130,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Layers/shoes_pair_layer.png',0,0,55,34,1,0)
	anim:SetHotSpot(27,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('shoes_pair_layer',anim,960,534,130,0,1,1)
	local anim = CreateAnimation('data/Texture/Comics/Barman.png',0,0,540,550,1,0)
	anim:SetHotSpot(270,275)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('Barman',anim,771,496,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Layers/tripod_layer.png',0,0,114,237,1,0)
	anim:SetHotSpot(57,118)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('tripod_layer',anim,786,513,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/fan.png',0,0,108,57,1,0)
	anim:SetHotSpot(54,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fan',anim,970,745,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/hardboard.png',0,0,61,95,1,0)
	anim:SetHotSpot(30,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('hardboard',anim,629,404,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/machete.png',0,0,160,23,1,0)
	anim:SetHotSpot(80,11)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('machete',anim,769,180,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/pipe.png',0,0,77,36,1,0)
	anim:SetHotSpot(38,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pipe',anim,501,714,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/Items/towel.png',0,0,39,92,1,0)
	anim:SetHotSpot(19,46)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('towel',anim,694,425,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/20_bar_proof_9/cigar20.png',0,0,101,94,1,0)
	anim:SetHotSpot(50,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cigar20',anim,511,445,100,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
