dofile('data/Scripts/scenes/10_hotel/anim/10_hotel_anim_bg.lua')
dofile('data/Scripts/scenes/10_hotel/comics/10_hotel_comics_headwaiter.lua')
dofile('data/Scripts/scenes/10_hotel/comics/10_hotel_comics_headwaiter_with_note.lua')
dofile('data/Scripts/scenes/10_hotel/comics/10_hotel_comics_dupin.lua')

class 'l_10_hotel' (LevelEventHandler)

function l_10_hotel:__init(name)
	LevelEventHandler.__init(self, name)
	
	-- animations ----------------------------------
	self.anim_bg = AnimationBundle(Loader_10_BG_Animations(Object('bg')))
	self.anim_bg:PlayAnimation('highlight')
	self.anim_bg:PlayAnimation('bg')
	
	-- link scenes ---------------------------------
	LinkScene('area_link_08', 'CursorDoorDown', 'l_08_street')
	LinkScene('area_link_11', 'CursorDoorUp',   'l_11_corridor')
	
	ObjectOpacity('layer_gate_open',    0)
	ObjectOpacity('layer_headwaiter',   0)
	ObjectOpacity('layer_headwaiter_2', 0)
	ObjectOpacity('layer_flower_pot',   0)
	ObjectOpacity('layer_bell',         0)
	ObjectOpacity('layer_open_door',    0)
	
	ObjectVisible('area_apply_note', false)
	ObjectVisible('area_link_11',    false)
	ObjectVisible('area_hint_gate',  false)
	
	
	if HasActionCompletedState('animRunCompleted') then
	    ObjectOpacity('layer_shoe', 1)
	    ObjectVisible('area_hint_gate', true)
	    
	    self:createComicsDupin()
	else
	    -- run animation
	    do
            self.video_cutscene = CreateVideoEntity('data/Video/Scenes/10_hotel/10_cutscene.ogg', '', false)
            self.video_cutscene:AttachTo(Object('bg'))
            self.video_cutscene:SetZ(101)
            self.video_cutscene:SetXY(0, 0)
            self.video_cutscene:SetScale(SCR_W/800)
            self.video_cutscene:SetLoop(false)
            self.video_cutscene:SetHideOnStop(false)
            self.video_cutscene:PlayVideo()
            
            MakeSoundEntity('10_cutscene_sound'):PlaySound(false)
        end
            
        local callback = function()
            AddActionCompletedState('animRunCompleted')
            ObjectVisible('area_hint_gate', true)
            
            self.video_cutscene:SetHideOnStop(true)
            self.video_cutscene:StopVideo()
            
            self:createComicsDupin()
        end
        
        SetCutSceneMode(self.video_cutscene:GetDuration(), callback)
	    
	    do
            local fadeTime = 0.2
            self.timer:Add( function()
                                ObjectOpacity('layer_shoe', 1)
                                self.video_cutscene:ChangeOpacity(1, 0, fadeTime)
                            end,
                            self.video_cutscene:GetDuration() - fadeTime)
        end
	end
	
	local function on_find_shoe(e)
	    ObjectVisible(e.target, false)
	    ObjectOpacity('layer_shoe', 0)
	end
	
	RegisterToolFindInfo('10_shoe', 'area_find_shoe', on_find_shoe)
	RegisterMonologObject('area_hint_gate', 'BBT_10_CLOSED_GATE')
	
	-- zoom zones ----------------------------------
	
	-- ZOOM BELL
	do
	    CreateSmartZoomZone('bell')
	    ---------------------
	    
	    self.zoom_bell.on_open = function()
	        if not self.bSetted then
	            self.bSetted = true
	            
	            local anim = Object('z_bell_button_out'):GetAnimation()
                anim:SetMask('data/Texture/Common/area_round.png')
                anim:SetMaskHotSpot(64, 64)
                anim:SetMaskScale(2.93, 2.93)
	        end
	    end
	    ---------------------
	    
	    ObjectVisible('area_get_zb_button',  false)
	    ObjectVisible('area_drop_zb_button', false)
	    ObjectVisible('area_click_zb_bell',  false)
	    ---------------------
	    
	    ObjectOpacity('z_bell_cover',            0)
	    ObjectOpacity('z_bell_button_in',        0)
	    ObjectOpacity('z_bell_button_in_shadow', 0)
	    ---------------------
	    
	    local function on_apply_bell(e)
	        ObjectVisible(e.target, false)
	        
	        if e.save then
	            ObjectOpacity('z_bell_cover',    1)
	            ObjectOpacity('layer_bell',      1)
	            ObjectOpacity('layer_bell_part', 0)
	            
	            ObjectVisible('area_get_zb_button',  true)
	            ObjectVisible('area_drop_zb_button', true)
	        else
	            local time = 0.5
	            ObjectOpacity('z_bell_cover',    1, time)
	            ObjectOpacity('layer_bell',      1, time)
	            ObjectOpacity('layer_bell_part', 0, time)
	            
	            MakeSoundEntity('10_apply_bell'):PlaySound(false)
	            
	            self.timer:Add( function()
	                                ObjectVisible('area_get_zb_button',  true)
	                                ObjectVisible('area_drop_zb_button', true)
	                            end,
	                            time)
	        end
	    end
	    ---------------------
	    
	    local function on_get_button(e)
	    end
	    ---------------------
	    
	    local function on_drop_button(e)
	    end
	    ---------------------
	    
	    local function on_drop_target_button(e)
	        ObjectVisible('area_get_zb_button',  false)
            ObjectVisible('area_drop_zb_button', false)
            
            if e.save then
                ObjectOpacity('z_bell_button_out',       0)
                ObjectOpacity('z_bell_button_in',        1)
                ObjectOpacity('z_bell_button_in_shadow', 1)
                
                ObjectVisible('area_click_zb_bell', true)
            else
                local time = 0.5
                ObjectOpacity('z_bell_button_out',       0, time)
                ObjectOpacity('z_bell_button_in',        1, time)
                ObjectOpacity('z_bell_button_in_shadow', 1, time)
                
                MakeSoundEntity('10_drop_target_button'):PlaySound(false)
                
                self.timer:Add( function()
                                    ObjectVisible('area_click_zb_bell', true)
                                end,
                                time)
            end
	    end
	    ---------------------
	    
	    local function on_click_bell(e)
	        ObjectVisible(e.target, false)
	        
	        if e.save then
	            self.zoom_bell:Disable()
	            ObjectOpacity('layer_headwaiter', 1)
	            
	            self:createComicsHeadwaiter()
	        else
	            local time = 0.5
	            MakeSoundEntity('10_click_bell'):PlaySound(false)
	            
	            self.mouseBlocker:Push()
	            self.timer:Add( function()
	                                self.zoom_bell:CloseAndDisable()
	                                
	                                self.timer:Add( function()
	                                                    local openDoorTime = 0.5
	                                                    ObjectOpacity('layer_open_door', 1, openDoorTime)
	                                                    MakeSoundEntity('10_door_open'):PlaySound(false)
	                                                    
	                                                    self.timer:Add( function()
                                                                            local headwaiterAppearTime = 0.5
                                                                            ObjectOpacity('layer_headwaiter', 1, headwaiterAppearTime)
                                                                            
                                                                            self.timer:Add( function()
                                                                                                local closeDoorTime = 0.5
                                                                                                ObjectOpacity('layer_open_door', 0, closeDoorTime)
                                                                                                MakeSoundEntity('10_door_close'):PlaySound(false)
                                                                                                
                                                                                                self.timer:Add( function()
                                                                                                                    self.mouseBlocker:Pop()
                                                                                                                    self:createComicsHeadwaiter()
                                                                                                                end,
                                                                                                                closeDoorTime)
                                                                                            end,
                                                                                            headwaiterAppearTime)
                                                                        end,
                                                                        openDoorTime)
	                                                end,
	                                                ZOOM_ZONE_APPEARING_TIME)
	                            end,
	                            time)
	        end
	    end
	    ---------------------
	    
	    RegisterToolApplyInfo('09_bell', 'area_apply_zb_bell', on_apply_bell, 'BBT_10_NEED_APPLY_BELL')
	    do
	        local x,y,w,h = self.zoom_bell:GetClippingInfo()
	        local rect = {x=x,y=y,w=w,h=h}
	        local info = RegisterDragObject('z_bell_button_out', 'area_get_zb_button', 'area_drop_zb_button', on_get_button, on_drop_button, on_drop_target_button, rect, true)
	        info.deltaZ = 10
	    end
	    RegisterActiveObject('area_click_zb_bell', on_click_bell)
	end
	
	-- ZOOM FLOWER
	do
	    CreateSmartZoomZone('orchid')
	    ---------------------
	    
	    ObjectOpacity('z_orchid_flowerpot', 0)
	    ObjectOpacity('z_orchid_in_pot',    0)
	    ObjectOpacity('z_orchid_in_drag',   0)
	    ---------------------
	    
	    ObjectVisible('area_get_zo_orchid',  false)
        ObjectVisible('area_drop_zo_orchid', false)
        ObjectVisible('area_apply_zo_flowerpot',      false)
        ObjectVisible('area_find_zo_vase_with_water', false)
	    ---------------------
	    
	    local function on_find_snake(e)
	        ObjectVisible(e.target, false)
	        ObjectVisible('area_apply_zo_flowerpot', true)
	        
	        ObjectOpacity('z_orchid_snake', 0)
	        ObjectOpacity('layer_snake',    0)
	    end
	    ---------------------
	    
	    local function on_apply_flowerpot(e)
	        ObjectVisible(e.target, false)
	        
	        if e.save then
	            ObjectOpacity('z_orchid_flowerpot', 1)
	            ObjectOpacity('layer_flower_pot',   1)
	            
	            ObjectVisible('area_get_zo_orchid',  true)
                ObjectVisible('area_drop_zo_orchid', true)
	        else
	            local time = 0.5
	            ObjectOpacity('z_orchid_flowerpot', 1, time)
	            ObjectOpacity('layer_flower_pot',   1, time)
	            
	            MakeSoundEntity('10_apply_flower_pot'):PlaySound(false)
	            
	            self.timer:Add( function()
	                                ObjectVisible('area_get_zo_orchid',  true)
	                                ObjectVisible('area_drop_zo_orchid', true)
	                            end,
	                            time)
	        end
	    end
	    ---------------------
	    
	    local function on_get_orchid(e)
	        ObjectOpacity('z_orchid_in_vase', 0)
	        ObjectOpacity('z_orchid_in_drag', 1)
	    end
	    ---------------------
	    
	    local function on_drop_orchid(e)
	        local time = 0.1
	        
	        self.timer:Add( function()
                                ObjectOpacity('z_orchid_in_vase', 1, time)
                                ObjectOpacity('z_orchid_in_drag',  0, time)
                            end,
                            e.time - time)
	    end
	    ---------------------
	    
	    local function on_drop_target_orchid(e)
	        ObjectVisible('area_get_zo_orchid',  false)
            ObjectVisible('area_drop_zo_orchid', false)
            
            local layer_orchid_target_pos = Vector(82, 344)
            
            if e.save then
                ObjectOpacity('z_orchid_in_vase', 0)
                ObjectOpacity('z_orchid_in_pot',  1)
                                                
                ObjectOpacity('layer_roots_in_vase', 0)
                Object('layer_orchid'):SetXY(layer_orchid_target_pos.x,
                                             layer_orchid_target_pos.y)
                
                ObjectVisible('area_find_zo_vase_with_water', true)
            else
                local moveTime = 0.5
                Object('z_orchid_in_drag'):MoveTo(Object('z_orchid_in_pot'):GetX(),
                                                  Object('z_orchid_in_pot'):GetY(),
                                                  moveTime)
                
                ObjectOpacity('layer_roots_in_vase', 0, moveTime)
                Object('layer_orchid'):MoveTo(layer_orchid_target_pos.x,
                                              layer_orchid_target_pos.y,
                                              moveTime)
                
                MakeSoundEntity('10_drop_flower'):PlaySound(false)
                
                local fadeTimePercent = 0.2
                self.timer:Add( function()
                                    local fadeTime = moveTime * fadeTimePercent
                                    ObjectOpacity('z_orchid_in_drag', 0, fadeTime)
                                    ObjectOpacity('z_orchid_in_pot',  1, fadeTime)
                                end,
                                moveTime * (1-fadeTimePercent))
                                
                self.timer:Add( function()
                                    ObjectVisible('area_find_zo_vase_with_water', true)
                                end,
                                moveTime)
            end
	    end
	    ---------------------
	    
	    local function on_find_vase_with_water(e)
	        ObjectOpacity('layer_vase_with_water', 0)
	    end
	    ---------------------
	    
	    RegisterToolFindInfo('10_snake', 'area_find_zo_snake', on_find_snake, false)
	    RegisterToolApplyInfo('08_flowerpot', 'area_apply_zo_flowerpot', on_apply_flowerpot, 'BBT_10_NEED_APPLY_FLOWERPOT')
	    do
	        local x,y,w,h = self.zoom_orchid:GetClippingInfo()
	        local rect = {x=x,y=y,w=w,h=h}
	        
	        Object('z_orchid_in_drag'):SetClippingRect(x,y,w,h)
	        local info = RegisterDragObject('z_orchid_in_drag', 'area_get_zo_orchid', 'area_drop_zo_orchid', on_get_orchid, on_drop_orchid, on_drop_target_orchid, rect, true)
	        info.deltaZ = 10
	    end
	    RegisterToolFindInfo('10_vase_with_water', 'area_find_zo_vase_with_water', on_find_vase_with_water)
	end
	
	-- ZOOM WHEEL
	do
	    CreateSmartZoomZone('wheel')
	    ---------------------
	    
	    self.wheel_tools_found_count = 0
	    
	    local function on_find_tool(e)
	        local id = string.sub(e.target, 14)
	        
	        ObjectVisible(e.target, false)
	        ObjectOpacity('z_wheel_'..id, 0)
	        ObjectOpacity('layer_'..id, 0)
	        
	        self.wheel_tools_found_count = self.wheel_tools_found_count + 1
	        
	        if self.wheel_tools_found_count == 3 then
	            self.zoom_wheel:CloseAndDisable()
	        end
	    end
	    ---------------------
        
        RegisterToolFindInfo('10_weight_1',       'area_find_zw_weight_1',       on_find_tool, false)
        RegisterToolFindInfo('10_weight_2',       'area_find_zw_weight_2',       on_find_tool, false)
        RegisterToolFindInfo('10_piece_of_glass', 'area_find_zw_piece_of_glass', on_find_tool, false)
	end
	
	--ZOOM CHEST
	do
	    CreateSmartZoomZone('chest')
	    ---------------------
	    
	    local function on_click_open_doors(e)
	        if e.save then
	            self.timer:Add( function()
	                                ObjectVisible(e.target, false)
	                            end,
	                            0)
	                            
                ObjectOpacity('z_chest_close', 0)
	        else
	            ObjectVisible(e.target, false)
	            
	            local time = 0.5
	            ObjectOpacity('z_chest_close', 0, time)
	        end
	    end
	    ---------------------
	    
	    RegisterActiveObject('area_click_zc_open_doors', on_click_open_doors)
	end
	
	--ZOOM LOCK
	do
	    CreateSmartZoomZone('lock')
	end
	
	-- main logic -------------------------------
	
	local function on_apply_note(e)
	    ObjectVisible(e.target, false)
	    
	    if e.save then
	        self:createComicsHeadwaiterWithNote()
	    else
	        self:createComicsHeadwaiterWithNote()
	    end
	end
	-------------------------
	
	RegisterToolApplyInfo('09_note', 'area_apply_note', on_apply_note, 'BBT_10_NEED_APPLY_NOTE')
end

function l_10_hotel:createComicsHeadwaiter()
    local comics_name = '10_comics_headwaiter_first'
    
    local comics_finish = function(save)
        ObjectVisible('area_apply_note', true)
        
        if save then
        else
            local time = 0.5
            
            self.timer:Add( function()
                            end,
                            time)
        end
    end
    
    if IsComicsShown(comics_name) then
        comics_finish(true)
    else
        local comics_headwaiter = l_10_hotel_comics_headwaiter()
		comics_headwaiter:LoadData(play_field)
		
        local c = Comics(comics_name,
                            CreateComicsVideoFrame('Headwaiter',  'C_10_HEADWAITER_FIRST_01', nil, {path='data/Video/Scenes/10_hotel/C_10_HEADWAITER_FIRST_01.ogg', x=604, y=373}, 'comics_headwaiter_bg')
                            )
        
        c.on_finish = function()
            comics_finish(false)
        end
            
        c:Start()
    end
end

function l_10_hotel:createComicsHeadwaiterWithNote()
    local comics_name = '10_comics_headwaiter_second'
    
    local comics_finish = function(save)
        ObjectVisible('area_hint_gate', false)
        ObjectOpacity('layer_headwaiter',   0)
        
        if not IsSceneVisited('l_11_corridor') then
            ObjectOpacity('layer_headwaiter_2', 1)
        end
        
        if save then
            ObjectOpacity('layer_gate_open',  1)
            ObjectOpacity('layer_gate_close', 0)
            
            ObjectVisible('area_link_11', true)
        else
            local time = 0.5
            ObjectOpacity('layer_gate_open',  1, time)
            ObjectOpacity('layer_gate_close', 0, time)
            
            self.mouseBlocker:Push()
            self.timer:Add( function()
                                self.mouseBlocker:Pop()
                                ObjectVisible('area_link_11', true)
                            end,
                            time)
        end
    end
    
    if IsComicsShown(comics_name) then
        comics_finish(true)
    else
        local comics_headwaiter = l_10_hotel_comics_headwaiter_with_note()
		comics_headwaiter:LoadData(play_field)
		
        local c = Comics(comics_name,
                            CreateComicsVideoFrame('Headwaiter',  'C_10_HEADWAITER_SECOND_01', nil, {path='data/Video/Scenes/10_hotel/C_10_HEADWAITER_SECOND_01.ogg', x=606, y=370}, 'comics_headwaiter_with_note_bg'),
                            CreateComicsVideoFrame('Headwaiter',  'C_10_HEADWAITER_SECOND_02', nil, {path='data/Video/Scenes/10_hotel/C_10_HEADWAITER_SECOND_02.ogg', x=545, y=368}, 'comics_headwaiter_with_note_bg')
                            )
        
        c:SetInstantlyFrames('C_10_HEADWAITER_SECOND_02')
        
        c.on_finish = function()
            comics_finish(false)
        end
            
        c:Start()
    end
end

function l_10_hotel:createComicsDupin()
    local comics_name = '10_comics_dupin'
    
    local comics_finish = function(save)
        if save then
        else
            local time = 0.5
            self.timer:Add( function()
                            end,
                            time)
        end
    end
    
    if IsComicsShown(comics_name) then
        comics_finish(true)
    else
        local comics_dupin = l_10_hotel_comics_dupin()
		comics_dupin:LoadData(play_field)
		
        local c = Comics(comics_name,
                            CreateComicsVideoFrame('Dupin',  'C_10_DUPIN_01', nil, {path='data/Video/Scenes/10_hotel/C_10_DUPIN_01.ogg', isAlpha=true, x=362}, 'comics_dupin_bg')
                            )
        
        c.on_finish = function()
            comics_finish(false)
        end
        
        Object('comics_dupin_bg'):GetAnimation():SetColor('0x01FFFFFF')
        c:Start()
    end
end

function l_10_hotel:OnUpdate(dt)
    local obj = Object('z_bell_button_out')
    local pos = Vector(obj:GetX() - obj:GetAnimation():GetHotX(), obj:GetY() - obj:GetAnimation():GetHotY())
    
    Object('z_bell_button_out'):GetAnimation():SetMaskOffset(-pos.x, -pos.y)
end

function l_10_hotel:OnAllItemsFound()
end

function l_10_hotel:OnObjectMouseEnter(object)
end

function l_10_hotel:OnObjectMouseLeave(object)
end

function l_10_hotel:OnScreenObjectMouseDown(object, key)
end

function l_10_hotel:OnObjectMouseDownProcessed(is_wrong_click)
end

function l_10_hotel:OnMouseMove(previous_pos, current_pos)
end

function l_10_hotel:OnObjectMouseUp(object)
end

function l_10_hotel:OnObjectFound(object)
end

function l_10_hotel:OnToolFound(tool)
end

function l_10_hotel:OnToolApply(tool, object)
end

function l_10_hotel:OnToolAddToInventory(tool)
end

function l_10_hotel:OnObjectReachPanel(object)
end

function l_10_hotel:OnButtonPress(title)
end

function l_10_hotel:OnSetTool(tool)
end

function l_10_hotel:OnLoaded()
end

function l_10_hotel:OnDestroy()
end

--------------------------------------------------------------------------------
-- CLEAR_ON_SAVE_BEGIN
-- Do not edit code listed below (generated by the editor on each save)
function l_10_hotel:LoadData(screen)
	local anim
	anim = CreateAnimation('data/Texture/Scenes/10_hotel/main/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,50,0,1,1)
	
	anim = CreateAnimation('data/Texture/Common/area.png',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_link_08',anim,512,700,100,0,128,17)
	
	anim = CreateAnimation('data/Texture/Common/area.png',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_link_11',anim,498,226,100,0,25,35)
	
	anim = CreateAnimation('data/Texture/Common/area_round.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_zoom_wheel',anim,317,263,100,0,1.3,1.3)
	
	anim = CreateAnimation('data/Texture/Common/area_round.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_zoom_bell',anim,693,391,100,0,1.3,0.75)
	
	anim = CreateAnimation('data/Texture/Common/area_round.png',0,0,128,128,1,0)
	anim:SetHotSpot(63,84)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_zoom_orchid',anim,117,403,100,0,1.46,2)
	
	anim = CreateAnimation('data/Texture/Common/area.png',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_zoom_chest',anim,971,262,100,0,15,30)
	
	anim = CreateAnimation('data/Texture/Common/area_round.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_apply_note',anim,808,302,100,0,1.3,2)
	
	anim = CreateAnimation('data/Texture/Common/area_round.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_find_shoe',anim,419,494,100,0,1,1)
	
	anim = CreateAnimation('data/Texture/Scenes/10_hotel/main/layers/layer_shoe.png',0,0,69,44,1,0)
	anim:SetHotSpot(34,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_shoe',anim,418,500,52,0,1,1)
	
	anim = CreateAnimation('data/Texture/Scenes/10_hotel/main/layers/layer_gate_close.png',0,0,259,332,1,0)
	anim:SetHotSpot(129,166)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_gate_close',anim,492,219,55,0,1,1)
	
	anim = CreateAnimation('data/Texture/Scenes/10_hotel/main/layers/layer_gate_open.png',0,0,259,333,1,0)
	anim:SetHotSpot(129,166)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_gate_open',anim,492,219,56,0,1,1)
	
	anim = CreateAnimation('data/Texture/Common/area.png',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_hint_gate',anim,498,226,100,0,25,35)
	
	anim = CreateAnimation('data/Texture/Scenes/10_hotel/main/layers/layer_headwaiter.png',0,0,178,226,1,0)
	anim:SetHotSpot(89,113)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_headwaiter',anim,810,302,59,0,1,1)
	
	anim = CreateAnimation('data/Texture/Scenes/10_hotel/main/layers/layer_flower_pot.png',0,0,98,84,1,0)
	anim:SetHotSpot(49,42)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_flower_pot',anim,73,412,61,0,1,1)
	
	anim = CreateAnimation('data/Texture/Scenes/10_hotel/main/layers/layer_snake.png',0,0,56,28,1,0)
	anim:SetHotSpot(28,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_snake',anim,112,441,61,0,1,1)
	
	anim = CreateAnimation('data/Texture/Scenes/10_hotel/main/layers/layer_vase_with_water.png',0,0,114,82,1,0)
	anim:SetHotSpot(57,41)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_vase_with_water',anim,148,391,60,0,1,1)
	
	anim = CreateAnimation('data/Texture/Scenes/10_hotel/main/layers/layer_roots_in_vase.png',0,0,42,66,1,0)
	anim:SetHotSpot(21,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_roots_in_vase',anim,168,389,61,0,1,1)
	
	anim = CreateAnimation('data/Texture/Scenes/10_hotel/main/layers/layer_orchid.png',0,0,114,182,1,0)
	anim:SetHotSpot(57,91)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_orchid',anim,163,335,62,0,1,1)
	
	anim = CreateAnimation('data/Texture/Scenes/10_hotel/main/layers/layer_bell.png',0,0,42,34,1,0)
	anim:SetHotSpot(21,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_bell',anim,710,400,61,0,1,1)
	
	anim = CreateAnimation('data/Texture/Scenes/10_hotel/main/layers/layer_bell_part.png',0,0,42,26,1,0)
	anim:SetHotSpot(21,13)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_bell_part',anim,710,405,60,0,1,1)
	
	anim = CreateAnimation('data/Texture/Scenes/10_hotel/main/layers/layer_piece_of_glass.png',0,0,16,16,1,0)
	anim:SetHotSpot(8,8)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_piece_of_glass',anim,323,228,60,0,1,1)
	
	anim = CreateAnimation('data/Texture/Scenes/10_hotel/main/layers/layer_weight_1.png',0,0,26,20,1,0)
	anim:SetHotSpot(13,10)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_weight_1',anim,265,235,60,0,1,1)
	
	anim = CreateAnimation('data/Texture/Scenes/10_hotel/main/layers/layer_weight_2.png',0,0,26,30,1,0)
	anim:SetHotSpot(13,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_weight_2',anim,293,205,60,0,1,1)
	
	anim = CreateAnimation('data/Texture/Scenes/10_hotel/main/layers/layer_open_door.png',0,0,79,287,1,0)
	anim:SetHotSpot(39,143)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_open_door',anim,773,246,58,0,1,1)
	
	anim = CreateAnimation('data/Texture/Scenes/10_hotel/main/layers/layer_headwaiter_2.png',0,0,220,226,1,0)
	anim:SetHotSpot(110,113)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_headwaiter_2',anim,792,302,59,0,1,1)
	
end
-- CLEAR_ON_SAVE_END
