function OnSceneLoad(screen)
    game_state = {}
    LoadData(screen)
    local pf = play_field
    local level = pf:GetLevelScreen()
    game_state.custom_cursors = {}
    game_state.locked_objects = {}
    game_state.active_objects = {}
    --level:AddTaskSafe(CreateTask('', '', ''))
    --zone = CreateZoomZone('')
        

	play_field:GetObject('dashboard_active_zone'):GetAnimation():SetColor('0x01FFFFFF')
	play_field:GetObject('dashboard_over_active_zone'):GetAnimation():SetColor('0x01FFFFFF')
	
    game_state.locker = ReferenceCounter()
    game_state.active_zone = nil    		
	
	local obj = play_field:GetObject('safe_rama_02')	
	obj:SetOpacity(0)
	obj:GetAnimation():Stop()
	obj:GetAnimation():SetMode(HGEANIM_FWD + HGEANIM_NOLOOP)    
		

    --GTimerDoString("game_state.comics.SetVisible(true)", 1)
    local object = play_field:GetObject('ray1')
    local af = CreateAnimationEffector()
    af:AttachTo(object)
    af:SetMode(_ANIM_LOOP + _ANIM_PINGPONG)
    af:SetKey(_TRACK_O, 0.0, 0)
    af:SetKey(_TRACK_O, 8, 1.0)    
    af:Play()
    
    local object = play_field:GetObject('ray2')
    local af = CreateAnimationEffector()
    af:AttachTo(object)
    af:SetMode(_ANIM_LOOP + _ANIM_PINGPONG)
    af:SetKey(_TRACK_O, 0.0, 1)
    af:SetKey(_TRACK_O, 8, 0.0)    
    af:Play()
	
	play_field:IgnoreOnTestPoint('ray1')
	play_field:IgnoreOnTestPoint('ray2')	
		
	play_field:IgnoreOnTestPoint('chain')
	
	game_state.meta_object = 'cigar1'
end


function OnScreenShown()    
end

function OnSceneFree()
    FreeData()
end

function OnUpdate(dt)
end

function OnNotebookOpened()
    --OnSceneStateChanged(play_field)
end


function OnExit()
end

function OnObjectMouseEnter(object)
    DefaultOnObjectMouseEnter(object)
end

function OnObjectMouseLeave(object)
    DefaultOnObjectMouseLeave(object)
end

function OnObjectMouseDown(object)    
    is_wrong_click = DefaultOnObjectMouseDown(object)
    
    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 OnPhotographing(phone_screen_center_pos)
end

function OnButtonPress(title)
    DefaultOnButtonPress(title)
    if title == 'zoom_dashboard_close' then        
        --inventory_dashboard_door.Hide(false);
        inventory_dashboard_over.Hide(false);
    end
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/2_ crime_place_1/Layers/safe.png',0,0,64,55,1,0)
	anim:SetHotSpot(32,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('safe1',anim,856,391,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Animations/vitrage.dds',0,0,150,73,14,8)
	anim:SetHotSpot(75,37)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('vitrage',anim,501,37,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/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,94,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Zoom/dashboard_door_bg.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('dashboard_door_bg',anim,512,384,213,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Zoom/dashboard_over.png',0,0,429,322,1,0)
	anim:SetHotSpot(214,161)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('dashboard_over',anim,584,430,214,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Animations/safe_rama_01.dds',0,0,214,218,26,8)
	anim:SetHotSpot(107,109)
	anim:SetBlendMode(3)
	anim:SetColor('0xCC222222')
	screen:CreateObject('safe_rama_01',anim,493,358,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Animations/safe_rama_02.dds',0,0,215,251,12,8)
	anim:SetHotSpot(108,126)
	anim:SetBlendMode(3)
	anim:SetColor('0xCC222222')
	screen:CreateObject('safe_rama_02',anim,487,339,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Layers/Glass01.png',0,0,220,230,1,0)
	anim:SetHotSpot(110,115)
	anim:SetBlendMode(3)
	anim:SetColor('0xFF444444')
	screen:CreateObject('Glass01',anim,494,364,96,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,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',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/2_ crime_place_1/Animations/stai.dds',0,0,196,84,56,10)
	anim:SetHotSpot(98,42)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('stai',anim,500,71,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Animations/ray1.png',0,0,487,768,1,0)
	anim:SetHotSpot(243,384)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ray1',anim,500,376,129,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Animations/ray2.png',0,0,487,768,1,0)
	anim:SetHotSpot(243,384)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ray2',anim,491,381,128,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('dashboard_active_zone',anim,856,393,104,0,7,7)
	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('dashboard_over_active_zone',anim,433,330,225,0,15,15)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/anchor.png',0,0,76,81,1,0)
	anim:SetHotSpot(38,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('anchor',anim,643,613,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/brush.png',0,0,36,63,1,0)
	anim:SetHotSpot(18,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('brush',anim,574,739,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/carbine.png',0,0,37,31,1,0)
	anim:SetHotSpot(18,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('carbine',anim,331,535,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/iron.png',0,0,43,50,1,0)
	anim:SetHotSpot(21,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('iron',anim,875,695,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/oracle.png',0,0,52,48,1,0)
	anim:SetHotSpot(26,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('oracle',anim,910,452,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/pliers.png',0,0,34,45,1,0)
	anim:SetHotSpot(17,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pliers',anim,325,420,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/rope.png',0,0,34,57,1,0)
	anim:SetHotSpot(17,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('rope',anim,269,90,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/screwdriver.png',0,0,59,14,1,0)
	anim:SetHotSpot(29,7)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('screwdriver',anim,241,684,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/shoe.png',0,0,72,52,1,0)
	anim:SetHotSpot(36,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('shoe',anim,479,744,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/trumpet.png',0,0,117,93,1,0)
	anim:SetHotSpot(58,46)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('trumpet',anim,368,610,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/vase.png',0,0,88,66,1,0)
	anim:SetHotSpot(44,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('vase',anim,247,733,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/wrench.png',0,0,14,57,1,0)
	anim:SetHotSpot(7,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('wrench',anim,665,517,109,-10,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Layers/curtain.png',0,0,72,151,1,0)
	anim:SetHotSpot(36,75)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('curtain',anim,681,482,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Layers/chain.png',0,0,59,27,1,0)
	anim:SetHotSpot(29,13)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('chain',anim,671,512,133,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Layers/picture.png',0,0,82,143,1,0)
	anim:SetHotSpot(41,71)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('picture',anim,858,372,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/wig.png',0,0,74,97,1,0)
	anim:SetHotSpot(37,48)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('wig',anim,775,355,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Layers/kresl.png',0,0,36,40,1,0)
	anim:SetHotSpot(18,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('kresl',anim,398,750,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Layers/kreslo.png',0,0,67,59,1,0)
	anim:SetHotSpot(33,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('kreslo',anim,373,647,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/frame.png',0,0,128,162,1,0)
	anim:SetHotSpot(64,81)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('frame',anim,495,359,95,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Layers/lamp.png',0,0,58,30,1,0)
	anim:SetHotSpot(29,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lamp',anim,269,75,120,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('safe',anim,856,393,103,0,7,7)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/hammer.png',0,0,56,74,1,0)
	anim:SetHotSpot(28,37)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('hammer',anim,898,669,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/axe.png',0,0,98,37,1,0)
	anim:SetHotSpot(49,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('axe',anim,400,752,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Layers/shtora_3.png',0,0,82,174,1,0)
	anim:SetHotSpot(41,87)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('shtora_3',anim,681,483,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Layers/chair.png',0,0,157,42,1,0)
	anim:SetHotSpot(78,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('chair',anim,657,551,113,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/pazl_01.png',0,0,54,29,1,0)
	anim:SetHotSpot(27,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pazl_01',anim,689,713,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/pazl_02.png',0,0,31,26,1,0)
	anim:SetHotSpot(15,13)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pazl_02',anim,314,434,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/pazl_03.png',0,0,47,48,1,0)
	anim:SetHotSpot(23,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pazl_03',anim,965,499,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/pazl_04.png',0,0,52,22,1,0)
	anim:SetHotSpot(26,11)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pazl_04',anim,303,688,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/pazl_05.png',0,0,68,19,1,0)
	anim:SetHotSpot(34,9)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pazl_05',anim,451,657,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/pazl_06.png',0,0,34,42,1,0)
	anim:SetHotSpot(17,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pazl_06',anim,837,136,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/ball.png',0,0,66,156,1,0)
	anim:SetHotSpot(33,78)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ball',anim,601,282,115,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/cigar1.png',0,0,75,81,1,0)
	anim:SetHotSpot(37,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cigar1',anim,669,727,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/2_ crime_place_1/Items/binocular.png',0,0,55,43,1,0)
	anim:SetHotSpot(27,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('binocular',anim,311,720,100,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
