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.comics2_finished = false
	
    play_field:IgnoreOnTestPoint('wire');							  
	
	play_field:GetObject('orudie'):SetOpacity(0)
	play_field:GetObject('orudie'):GetAnimation():SetMode(HGEANIM_FWD + HGEANIM_NOLOOP)

	game_state.meta_object = 'cigar31'
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 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/31_roof_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/31_roof_12/Items/bag.png',0,0,122,69,1,0)
	anim:SetHotSpot(61,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bag',anim,307,740,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Items/boots.png',0,0,56,73,1,0)
	anim:SetHotSpot(28,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('boots',anim,247,659,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Items/bottle.png',0,0,56,25,1,0)
	anim:SetHotSpot(28,12)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bottle',anim,195,667,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Items/bow.png',0,0,87,258,1,0)
	anim:SetHotSpot(43,129)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bow',anim,751,441,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Items/broom.png',0,0,82,223,1,0)
	anim:SetHotSpot(41,111)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('broom',anim,839,509,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Items/brush.png',0,0,49,59,1,0)
	anim:SetHotSpot(24,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('brush',anim,564,656,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Items/crawbar.png',0,0,109,71,1,0)
	anim:SetHotSpot(54,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('crawbar',anim,773,628,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Items/fryingpan.png',0,0,62,58,1,0)
	anim:SetHotSpot(31,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fryingpan',anim,614,705,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Items/glove.png',0,0,77,40,1,0)
	anim:SetHotSpot(38,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('glove',anim,440,660,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Items/hammer.png',0,0,83,62,1,0)
	anim:SetHotSpot(41,31)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('hammer',anim,324,679,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Items/hat.png',0,0,56,44,1,0)
	anim:SetHotSpot(28,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('hat',anim,393,326,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Items/magnifyingglass.png',0,0,58,37,1,0)
	anim:SetHotSpot(29,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('magnifyingglass',anim,466,752,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Items/mushroom.png',0,0,38,31,1,0)
	anim:SetHotSpot(19,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('mushroom',anim,682,613,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Items/phone.png',0,0,62,52,1,0)
	anim:SetHotSpot(31,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('phone',anim,563,469,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Items/rifle.png',0,0,54,124,1,0)
	anim:SetHotSpot(27,62)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('rifle',anim,583,260,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Items/rope.png',0,0,84,48,1,0)
	anim:SetHotSpot(42,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('rope',anim,837,244,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Items/saw.png',0,0,71,59,1,0)
	anim:SetHotSpot(35,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('saw',anim,400,713,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Items/starfish.png',0,0,65,66,1,0)
	anim:SetHotSpot(32,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('starfish',anim,336,267,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Items/stick.png',0,0,75,196,1,0)
	anim:SetHotSpot(37,98)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('stick',anim,987,585,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Layers/bytulka layer.png',0,0,15,30,1,0)
	anim:SetHotSpot(7,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bytulka layer',anim,173,665,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Layers/fomka layer.png',0,0,44,31,1,0)
	anim:SetHotSpot(22,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fomka layer',anim,776,620,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Layers/lyk layer.png',0,0,95,247,1,0)
	anim:SetHotSpot(47,123)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lyk layer',anim,752,427,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Items/NoShadow/rope_tool.png',0,0,72,33,1,0)
	anim:SetHotSpot(36,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('rope_scaled',anim,834,239,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('scorpio_active_zone',anim,588,547,100,0,10,10)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/Animations/orudie.png',0,0,443,436,4,8)
	anim:SetHotSpot(222,218)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('orudie',anim,450,460,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_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/31_roof_12/Zoom/koshka.png',0,0,355,283,1,0)
	anim:SetHotSpot(177,141)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('koshka',anim,445,483,310,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('roof_active_zone',anim,766,90,100,0,8,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/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/31_roof_12/Zoom/wire.png',0,0,256,265,1,0)
	anim:SetHotSpot(128,132)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('wire',anim,396,452,315,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_roof_12/cigar31.png',0,0,79,30,1,0)
	anim:SetHotSpot(39,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cigar31',anim,689,668,100,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
