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 = {}

    -------------------------------------------------------------------------------------------
	game_state.meta_object = 'cigar34'
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 OnLostFocus()
end

function OnGainFocus()
end

function CanBeHinted(obj)
    if locked_object[obj] ~= true then
        return true
    else
        return false
    end
end

function OnMinigameCompleted()
	OnWin();
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/34_ cave_13/Layers/bg.jpg',0,0,1024,768,1,0)
	anim:SetHotSpot(512,384)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bg',anim,510,385,70,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/apple_core.png',0,0,27,21,1,0)
	anim:SetHotSpot(13,10)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('apple_core',anim,397,644,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/axe.png',0,0,57,97,1,0)
	anim:SetHotSpot(28,48)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('axe',anim,810,640,125,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/banana_skin.png',0,0,57,23,1,0)
	anim:SetHotSpot(28,11)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('banana_skin',anim,608,592,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/basket.png',0,0,83,63,1,0)
	anim:SetHotSpot(41,31)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('basket',anim,189,642,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/broom.png',0,0,24,122,1,0)
	anim:SetHotSpot(12,61)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('broom',anim,581,530,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/butterfly.png',0,0,40,27,1,0)
	anim:SetHotSpot(20,13)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('butterfly',anim,521,353,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/frog.png',0,0,41,33,1,0)
	anim:SetHotSpot(20,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('frog',anim,235,750,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/horseshoe.png',0,0,27,28,1,0)
	anim:SetHotSpot(13,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('horseshoe',anim,511,413,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/leaf.png',0,0,55,41,1,0)
	anim:SetHotSpot(27,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('leaf',anim,947,712,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/medusa.png',0,0,62,109,1,0)
	anim:SetHotSpot(31,54)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('medusa',anim,407,386,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/pitchfork.png',0,0,41,205,1,0)
	anim:SetHotSpot(20,102)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pitchfork',anim,943,569,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/rapier.png',0,0,58,127,1,0)
	anim:SetHotSpot(29,63)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('rapier',anim,542,707,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/spider.png',0,0,46,49,1,0)
	anim:SetHotSpot(23,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('spider',anim,322,26,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/starfish.png',0,0,75,49,1,0)
	anim:SetHotSpot(37,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('starfish',anim,960,104,141,180,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/starfish.png',0,0,75,49,1,0)
	anim:SetHotSpot(37,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('starfish2',anim,888,736,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_electro_board',anim,897,443,150,0,5,7)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/breaker.png',0,0,38,71,1,0)
	anim:SetHotSpot(19,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('breaker',anim,999,731,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/breaker.png',0,0,38,71,1,0)
	anim:SetHotSpot(19,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('breaker_tool',anim,981,721,1,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/breaker.png',0,0,38,71,1,0)
	anim:SetHotSpot(19,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('breaker_tool_visual_inventory',anim,981,721,1,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/protection_device.png',0,0,62,28,1,0)
	anim:SetHotSpot(31,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('protection_device',anim,671,712,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/protection_device.png',0,0,62,28,1,0)
	anim:SetHotSpot(31,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('protection_device_tool',anim,672,712,1,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/protection_device.png',0,0,62,28,1,0)
	anim:SetHotSpot(31,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('protection_device_tool_visual_inventory',anim,672,711,1,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,5000,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,5000,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,5000,0,128,96)
	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,505,390,400,0,1,1)
	local anim = CreateAnimation('data/Texture/Comics/eyes.png',0,0,79,33,1,0)
	anim:SetHotSpot(39,16)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('eyes',anim,499,212,500,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/protection_device.png',0,0,62,28,1,0)
	anim:SetHotSpot(31,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('protection_device_2',anim,302,748,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/protection_device.png',0,0,62,28,1,0)
	anim:SetHotSpot(31,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('protection_device_tool_2',anim,302,748,1,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/protection_device.png',0,0,62,28,1,0)
	anim:SetHotSpot(31,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('protection_device_tool_visual_inventory_2',anim,302,749,1,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_lift',anim,691,278,135,0,7,7)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Zoom/bg_barrel.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('bg_barrel',anim,512,384,500,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Zoom/pinion.png',0,0,257,134,1,0)
	anim:SetHotSpot(128,67)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('pinion',anim,529,502,510,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_pixel_barrel',anim,545,541,100,0,2.5,2.5)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Zoom/pinion.png',0,0,257,134,1,0)
	anim:SetHotSpot(128,67)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pinion_tool',anim,476,734,1,0,0.3,0.3)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Zoom/pinion.png',0,0,257,134,1,0)
	anim:SetHotSpot(128,67)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pinion_tool_visual_inventory',anim,475,733,1,0,0.3,0.3)	
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/accumulator.png',0,0,104,92,1,0)
	anim:SetHotSpot(52,46)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('accumulator',anim,462,632,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/accumulator.png',0,0,104,92,1,0)
	anim:SetHotSpot(52,46)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('accumulator_tool',anim,462,631,1,0,0.8,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/accumulator.png',0,0,104,92,1,0)
	anim:SetHotSpot(52,46)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('accumulator_tool_visual_inventory',anim,462,633,1,0,0.8,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Layers/bg_lift.png',0,0,509,173,1,0)
	anim:SetHotSpot(254,86)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bg_lift',anim,780,85,140,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Layers/layer_hay_2.png',0,0,101,105,1,0)
	anim:SetHotSpot(50,52)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_hay_2',anim,831,666,127,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/pinion_in_lift.png',0,0,69,70,1,0)
	anim:SetHotSpot(34,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pinion_in_lift',anim,687,236,125,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Layers/layer_lifta.png',0,0,212,688,1,0)
	anim:SetHotSpot(106,344)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_lifta',anim,706,339,120,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Layers/layer_bucket.png',0,0,136,113,1,0)
	anim:SetHotSpot(68,56)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_bucket',anim,682,658,130,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Layers/layer_light.png',0,0,162,166,1,0)
	anim:SetHotSpot(81,83)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_light',anim,268,426,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Layers/layer_wall.png',0,0,172,197,1,0)
	anim:SetHotSpot(86,98)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_wall',anim,508,384,90,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/bone.png',0,0,72,28,1,0)
	anim:SetHotSpot(36,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bone',anim,589,642,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/seashell2.png',0,0,26,22,1,0)
	anim:SetHotSpot(13,11)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('seashell2',anim,395,741,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/seashell.png',0,0,35,27,1,0)
	anim:SetHotSpot(17,13)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('seashell',anim,771,729,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/shovel.png',0,0,34,104,1,0)
	anim:SetHotSpot(17,52)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('shovel',anim,596,525,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/cigar34.png',0,0,49,33,1,0)
	anim:SetHotSpot(24,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cigar34',anim,866,721,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Layers/layer_gate.png',0,0,113,127,1,0)
	anim:SetHotSpot(56,63)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_gate',anim,510,505,88,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_ cave_13/Items/hat.png',0,0,70,41,1,0)
	anim:SetHotSpot(35,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('hat',anim,963,380,100,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
