dofile('data/Scenes/3_ship_galley_Anim_Sea.lua')
dofile('data/Scenes/3_ship_galley_Anim_phone_calling.lua')

local PATH_COMICS_3_ON_SHOWN              = 'data/Scenes/Comics/HelpersComicsReplic.lua'
local PATH_COMICS_3_ON_WIN                = 'data/Scenes/Comics/HelpersComicsReplic.lua'
local PATH_COMICS_3_SCISSORS			  = 'data/Scenes/Comics/HelpersComicsReplic.lua'
local PATH_COMICS_3_CHARGER               = 'data/Scenes/Comics/HelpersComicsReplic.lua'

function OnSceneLoad(screen)
    LoadData(screen)
    DefaultOnSceneLoad(screen:GetName())

    local pf = play_field
    local level = pf:GetLevelScreen()
    ---------------------------------------------------------------------------------------------
    level:AddTaskSafe(CreateTask('COFFEE_JAR', '', 'coffee_jar'))
    AddRandomTasks(12,
                   CreateTask('AIRPLANE', '', 'airplane'),
                   CreateTask('ALARM_CLOCK', '', 'alarm_clock'),
                   CreateTask('ORANGE', '', 'apple'),
                   CreateTask('BALL', '', 'ball'),
                   CreateTask('BANANAS', '', 'bananas'),
                   CreateTask('BELL', 'BELLS', 'bell', 'bell2'),
                   CreateTask('BROOM', '', 'broom'),
                   CreateTask('JEWELRY_BOX', '', 'chest'),
                   CreateTask('HAT', 'HATS', 'hat', 'hat2', 'hat3', 'hat4'),
                   CreateTask('KNIFE', 'KNIVES', 'knife', 'knife_2', 'knife2', 'knife3'),
                   CreateTask('MATCHES', '', 'matchs'),
                   CreateTask('MEDICINE_CHEST', '', 'medicine_chest'),
                   CreateTask('COMPASS', '', 'compass'),
                   CreateTask('ROLLER', '', 'roller'),
                   CreateTask('SAW', '', 'saw'),
                   CreateTask('TELESCOPE_2', '', 'sextant'),
                   CreateTask('STAR', '', 'star'),
                   CreateTask('TOASTER', '', 'toaster'),
                   CreateTask('VACUUM_CLEANER', '', 'vacuum_cleaner'),
                   
                   CreateTask('LIME', '', 'lemon'),
                   CreateTask('SALT_SHAKER', '', 'salt_shaker'),
                   CreateTask('SPOON', '', 'spoon'),
				   CreateTask('RABBIT', 'RABBITS', 'rabbit1', 'rabbit2', 'rabbit3'),
				   
				   CreateTask('ARROW', '', 'arrow'),               
				   CreateTask('BICYCLE', '', 'bicycle'),
				   CreateTask('CABLE', '', 'cable'),
				   CreateTask('DUMBBELL', '', 'dumbbell'),
				   CreateTask('DUSTPAN', '', 'dustbin'),
				   CreateTask('JELLYFISH', '', 'jellyfish'),
				   CreateTask('PEN', '', 'pen')
                  )
    ---------------------------------------------------------------------------------------------
    local anim_phone_calling = createCompositionzaryadka_work()
    anim_phone_calling:AttachTo(screen)
    anim_phone_calling:SetXY(347, 263)
    anim_phone_calling:SetZ(850)
    anim_phone_calling:SetCyclic(true)
    game_state.anim_phone_calling = anim_phone_calling
    ---------------------------------------------------------------------------------------------
    local zone_kitchen_range = CreateZoomZone('close_zone_kitchen_range',
                                              'pixel_open_kitchen_range',
                                              'bg_kitchen_range',
                                              'pixel_apply_changer',
                                              'knife_2',
                                              'lemon',
                                              'salt_shaker',
                                              'spoon',
                                              'pixel_take_phone'
                                              )
    local DefaultSetVisible = zone_kitchen_range.SetVisible
    zone_kitchen_range.SetVisible = function(is_visible)
        if is_visible == zone_kitchen_range.IsVisible() then
            return
        end
        if zone_kitchen_range.blocker then
            return
        end
    
        DefaultSetVisible(is_visible) 
    end
    anim_phone_calling:SetOpacity(0)
    pf:GetObject('pixel_apply_changer'):SetMaxOpacity(0.01)
    pf:GetObject('pixel_take_phone'):SetMaxOpacity(0.01)
    pf:IgnoreOnTestPoint('pixel_take_phone')
    --------------------------------------------------------------------------------------------
    pf:IgnoreOnTestPoint('charger')
    local apply_action_scissors = function(save)
                                if save then
                                    pf:GetObject('patch'):SetOpacity(0)
                                else
                                    pf:GetObject('patch'):ChangeOpacity(1, 0, 0.3)
                                    PlaySound('03_cut_scissors')
                                end
								pf:GetObject('target_scissors'):SetOpacity(0)
								pf:DoNotIgnoreOnTestPoint('charger')
                             end
    local photo_scissors = CreatePhotoZone('scissors',
                                           'SCISSORS', 
                                           'scissors_photo', 
                                           nil, 'target_scissors', apply_action_scissors)
    level:GetTask('scissors'):SetUse(true)
    --------------------------------------------------------------------------------------------
    local apply_action_charger = function(save)
                                    if save then
                                        pf:GetObject('pixel_take_phone'):SetMaxOpacity(1)
                                    else
                                        local time_blocked = 0.25
                                        game_state.anim_phone_calling:ChangeOpacity(0, 1, 0.25)
                                        zone_kitchen_range.Blocked(time_blocked)
                                        TimerDo(pf:GetTimer(), time_blocked, function()
                                                                                game_state.anim_phone_calling:Play()
                                                                                MakeSoundEntity('03_input_changer_telefon'):Play(false)
                                                                                
                                                                                local duration = game_state.anim_phone_calling:GetDuration()
                                                                                zone_kitchen_range.Blocked(duration)
                                                                                TimerDo(pf:GetTimer(), duration, function()
                                                                                                                    game_state.anim_phone_calling:SetVisible(false)                                    
                                                                                                                    pf:GetObject('pixel_take_phone'):SetOpacity(1)
                                                                                                                    pf:GetObject('pixel_take_phone'):SetMaxOpacity(1)
                                                                                                                 end )                                        
                                                                             end )
                                    end
                                    
                                    local state = game_state.scene_path 
                                    local value = 'AddChanger'
                                    if not HasGameState(state, value) then
                                        AddGameState(state, value)
                                    end
                                    pf:DoNotIgnoreOnTestPoint('pixel_take_phone')
                                 end
    local photo_charger = CreatePhotoZone('charger', 
                                          'CHARGER', 
                                          'charger_photo', 
                                          nil, 'pixel_apply_changer', apply_action_charger)
    --------------------------------------------------------------------------------------------
    -- Обработка взятия телефона
    local clickOnCharger = function(save)
        if pf:GetObject('pixel_take_phone'):GetOpacity() ~= 1 then
            return
        end
    
        if save then
            pf:GetObject('pixel_take_phone'):SetMaxOpacity(0)
        else
            pf:GetObject('pixel_take_phone'):ChangeOpacity(1, 0, 0.25)
            pf:GetObject('pixel_take_phone'):SetMaxOpacity(0)
            zone_kitchen_range.Blocked(0.25)
            TimerDo(pf:GetTimer(), 0.25, function()
                                            DisableZoomZoneRequest(zone_kitchen_range)            
                                         end )
        end
        
        pf:IgnoreOnTestPoint('pixel_take_phone')
        SetUseChanger()
        OnWin()
        
        UnregisterActiveObject('pixel_take_phone')
    end
    RegisterActiveObject('pixel_take_phone', clickOnCharger, true, GetCursorArms())
    if IsUseChanger() then
        pf:GetObject('pixel_take_phone'):SetMaxOpacity(0)
        pf:GetObject('pixel_take_phone'):SetOpacity(0)
        UnregisterActiveObject('pixel_take_phone')
        OnWin()
    end
    --------------------------------------------------------------------------------------------
    -- Обработка подушки
    pf:GetObject('cushion_open'):SetOpacity(0)
    pf:GetObject('scissors'):SetOpacity(0)
    local clickOnCushion = function(save)
        if save then
            pf:GetObject('cushion_open'):SetOpacity(1)
            pf:GetObject('scissors'):SetOpacity(1)
            pf:GetObject('cushion_close'):SetOpacity(0)
        else
            pf:GetObject('cushion_open'):ChangeOpacity(0, 1, 0.3)
            pf:GetObject('scissors'):ChangeOpacity(0, 1, 0.3)
            pf:GetObject('cushion_close'):ChangeOpacity(1, 0, 0.3)
            
            PlaySound('03_move_cushion')
        end
        
        pf:IgnoreOnTestPoint('cushion_open')
    end
    RegisterActiveObject('cushion_close', clickOnCushion, false, GetCursorArms())
    ---------------------------------------------------------------------------------------------
    local periodically_time_gull_start = 2
    local periodically_time_gull_end = 20
    
    local anim_sea = createCompositionlok3()
    anim_sea:AttachTo(screen)
    anim_sea:SetZ(85)
    anim_sea:SetCyclic(true)
    
    local sea_gull_1 = createComposition_chayka_1()
    sea_gull_1:AttachTo(screen)
    sea_gull_1:SetZ(86.1)
    PlayCompositionPeriodicallyVsRandDelay(sea_gull_1, periodically_time_gull_start, periodically_time_gull_end)
    
    local sea_gull_2 = createComposition_chayka_2()
    sea_gull_2:AttachTo(screen)
    sea_gull_2:SetZ(86.2)
    PlayCompositionPeriodicallyVsRandDelay(sea_gull_2, periodically_time_gull_start, periodically_time_gull_end)
    
    local sea_gull_3 = createComposition_chayka_3()
    sea_gull_3:AttachTo(screen)
    sea_gull_3:SetZ(86.3)
    PlayCompositionPeriodicallyVsRandDelay(sea_gull_3, periodically_time_gull_start, periodically_time_gull_end)
    local sea_maska = createComposition_maska()
    sea_maska:AttachTo(screen)
    sea_maska:SetZ(87)
    ---------------------------------------------------------------------------------------------
    local internoise_sea = MakeSoundEntity("internoise_sea")
    internoise_sea:Play(true)
    ---------------------------------------------------------------------------------------------
	game_state.chain_scissors = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_3_SCISSORS, 'COMICS_3_SCISSORS')
                                                 end)
    game_state.chain_charger = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_3_CHARGER, 'COMICS_3_CHARGER')
                                                 end)
    game_state.chain_on_shown = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_3_ON_SHOWN, 'COMICS_3_ON_SHOWN')
                                               end )
    game_state.chain_on_win = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_3_ON_WIN, 'COMICS_3_ON_WIN')
                                               end )
    game_state.chain_on_win.OnHidden = function()
        OnWinLevel()
    end
	SetHintComicsPhotoZoneEx(photo_scissors, game_state.chain_scissors)
	SetHintComicsPhotoZoneEx(photo_charger, game_state.chain_charger)
	---------------------------------------------------------------------------------------------
end

function SetUseChanger()
    local state = game_state.scene_path 
    local value = 'UseChanger'
    if not HasGameState(state, value) then
        AddGameState(state, value)
    end
end

function IsUseChanger()
    local state = game_state.scene_path 
    local value = 'UseChanger'
    return HasGameState(state, value)
end

function OnSceneFree()
    FreeData()
end

function OnScreenShown(fade_out)
    if fade_out then
        game_state.chain_on_shown.Play()
    end
end

function OnWin()
    if play_field:GetLevelScreen():IsCompleteLevel() and IsUseChanger() then
        game_state.chain_on_win:Play()
    end
end

function OnHiddenComics(comics)
end

function OnUpdate(dt)
    DefaultOnUpdate(dt)
--[[
    local state = game_state.scene_path 
    local value = 'AddChanger'
    if HasGameState(state, value) and IsUseChanger() == false and game_state.anim_phone_calling then
        local op = play_field:GetObject('bg_kitchen_range'):GetOpacity()
        game_state.anim_phone_calling:SetOpacity(op)
    end
]]
end

function OnLose()
end

function OnExit()
end

function OnObjectMouseEnter(object)
    DefaultOnObjectMouseEnter(object)
end

function OnObjectMouseLeave(object)
    DefaultOnObjectMouseLeave(object)
end

function OnButtonMouseEnter(title)
end

function OnButtonMouseLeave(title)
end

function OnObjectMouseDown(object)
    obj_name = object:GetName()
    local is_wrong_click = DefaultOnObjectMouseDown(object)
        
    return is_wrong_click
end

function OnObjectMouseUp(object)
end

function OnObjectFound(object)
    DefaultOnObjectFound(object)
end

function OnToolFound(tool)
end

function OnToolApply(tool, object)
    DefaultOnToolApply(tool, object)
end

function OnObjectReachPanel(object)
    DefaultOnObjectReachPanel()
end

function OnPhotographing(phone_screen_center_pos)
	DefaultOnPhotographing()
end

function OnButtonPress(title)
    DefaultOnButtonPress(title)
end

function OnMouseMove(previous_pos, current_pos)
end

function OnSetTool(tool)
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/3_ship_galley_/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/3_ship_galley_/Items/airplane.png',0,0,92,142,1,0)
	anim:SetHotSpot(46,71)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('airplane',anim,375,481,150,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/alarm_clock.png',0,0,83,79,1,0)
	anim:SetHotSpot(41,39)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('alarm_clock',anim,959,589,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/ball.png',0,0,28,34,1,0)
	anim:SetHotSpot(14,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ball',anim,587,409,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/bananas.png',0,0,49,41,1,0)
	anim:SetHotSpot(24,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bananas',anim,275,385,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/bell.png',0,0,31,36,1,0)
	anim:SetHotSpot(15,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bell',anim,919,274,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/broom.png',0,0,82,126,1,0)
	anim:SetHotSpot(41,63)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('broom',anim,428,422,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/hat.png',0,0,97,67,1,0)
	anim:SetHotSpot(48,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('hat',anim,978,391,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/knife.png',0,0,66,43,1,0)
	anim:SetHotSpot(33,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('knife',anim,846,140,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/matchs.png',0,0,46,24,1,0)
	anim:SetHotSpot(23,12)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('matchs',anim,612,629,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/medicine_chest.png',0,0,40,40,1,0)
	anim:SetHotSpot(20,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('medicine_chest',anim,349,189,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/compass.png',0,0,53,41,1,0)
	anim:SetHotSpot(26,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('compass',anim,982,749,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/saw.png',0,0,161,54,1,0)
	anim:SetHotSpot(80,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('saw',anim,276,687,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/sextant.png',0,0,43,42,1,0)
	anim:SetHotSpot(21,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('sextant',anim,863,275,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/star.png',0,0,69,33,1,0)
	anim:SetHotSpot(34,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('star',anim,387,69,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/vacuum_cleaner.png',0,0,123,170,1,0)
	anim:SetHotSpot(61,85)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('vacuum_cleaner',anim,795,384,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Layers/vacuum_cleaner_layer.png',0,0,142,131,1,0)
	anim:SetHotSpot(71,65)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('vacuum_cleaner_layer',anim,800,418,120,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Layers/knife_layer.png',0,0,33,31,1,0)
	anim:SetHotSpot(16,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('knife_layer',anim,870,130,120,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/roller.png',0,0,53,90,1,0)
	anim:SetHotSpot(26,45)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('roller',anim,641,709,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Layers/broom_layer.png',0,0,32,54,1,0)
	anim:SetHotSpot(16,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('broom_layer',anim,416,474,130,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/apple.png',0,0,41,33,1,0)
	anim:SetHotSpot(20,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('apple',anim,714,392,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_open_kitchen_range',anim,311,365,105,0,10,5)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/ZoomKitchenRange/bg_kitchen_range.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bg_kitchen_range',anim,512,384,700,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Layers/cushion_close.png',0,0,141,88,1,0)
	anim:SetHotSpot(70,44)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cushion_close',anim,921,533,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Layers/cushion_open.png',0,0,149,78,1,0)
	anim:SetHotSpot(74,39)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cushion_open',anim,909,512,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Layers/patch.png',0,0,61,115,1,0)
	anim:SetHotSpot(30,57)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('patch',anim,259,584,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('pixel_apply_changer',anim,269,283,785,0,11,11)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Photo/scissors_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('scissors_photo',anim,101,158,10,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/ZoomKitchenRange/Items/lemon.png',0,0,54,47,1,0)
	anim:SetHotSpot(27,23)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('lemon',anim,293,473,750,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/ZoomKitchenRange/Items/salt_shaker.png',0,0,54,91,1,0)
	anim:SetHotSpot(27,45)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('salt_shaker',anim,809,292,750,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/ZoomKitchenRange/Items/spoon.png',0,0,145,29,1,0)
	anim:SetHotSpot(72,14)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('spoon',anim,409,237,750,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/scissors.png',0,0,80,26,1,0)
	anim:SetHotSpot(40,13)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('scissors',anim,935,549,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/chest.png',0,0,82,47,1,0)
	anim:SetHotSpot(41,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('chest',anim,662,463,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/toaster.png',0,0,58,54,1,0)
	anim:SetHotSpot(29,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('toaster',anim,217,403,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('target_scissors',anim,249,588,140,0,11,18)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/coffee_jar.png',0,0,77,69,1,0)
	anim:SetHotSpot(38,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('coffee_jar',anim,728,481,140,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/ZoomKitchenRange/Items/knife.png',0,0,136,49,1,0)
	anim:SetHotSpot(68,24)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('knife_2',anim,729,434,750,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/arrow.png',0,0,33,50,1,0)
	anim:SetHotSpot(16,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('arrow',anim,248,194,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/bell2.png',0,0,102,68,1,0)
	anim:SetHotSpot(51,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bell2',anim,260,734,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/bicycle.png',0,0,70,41,1,0)
	anim:SetHotSpot(35,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bicycle',anim,776,675,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/cable.png',0,0,86,74,1,0)
	anim:SetHotSpot(43,37)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cable',anim,615,679,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/dumbbell.png',0,0,115,72,1,0)
	anim:SetHotSpot(57,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('dumbbell',anim,430,768,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/dustbin.png',0,0,83,55,1,0)
	anim:SetHotSpot(41,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('dustbin',anim,336,591,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/hat2.png',0,0,50,33,1,0)
	anim:SetHotSpot(25,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('hat2',anim,222,269,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/hat3.png',0,0,59,44,1,0)
	anim:SetHotSpot(29,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('hat3',anim,792,213,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/hat4.png',0,0,65,43,1,0)
	anim:SetHotSpot(32,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('hat4',anim,801,479,130,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/jellyfish.png',0,0,59,96,1,0)
	anim:SetHotSpot(29,48)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('jellyfish',anim,247,69,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/knife2.png',0,0,31,94,1,0)
	anim:SetHotSpot(15,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('knife2',anim,348,262,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/knife3.png',0,0,49,127,1,0)
	anim:SetHotSpot(24,63)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('knife3',anim,546,687,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/pen.png',0,0,87,21,1,0)
	anim:SetHotSpot(43,10)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pen',anim,775,629,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/rabbit1.png',0,0,58,93,1,0)
	anim:SetHotSpot(29,46)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('rabbit1',anim,393,617,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/rabbit2.png',0,0,77,88,1,0)
	anim:SetHotSpot(38,44)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('rabbit2',anim,580,494,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/rabbit3.png',0,0,70,69,1,0)
	anim:SetHotSpot(35,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('rabbit3',anim,830,706,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Items/charger.png',0,0,42,71,1,0)
	anim:SetHotSpot(21,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('charger',anim,258,602,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Layers/charger_layer.png',0,0,36,73,1,0)
	anim:SetHotSpot(18,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('charger_layer',anim,254,601,108,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Photo/charger_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('charger_photo',anim,99,609,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Layers/rabbit2_over.png',0,0,115,105,1,0)
	anim:SetHotSpot(57,52)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('rabbit2_over',anim,580,519,120,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Animations/phone_charge/zaryadka_work_end.png',0,0,222,280,1,0)
	anim:SetHotSpot(151,240)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pixel_take_phone',anim,398,503,855,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/3_ship_galley_/Layers/10_lock.png',0,0,56,39,1,0)
	anim:SetHotSpot(28,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('10_lock',anim,714,396,120,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
