local zoom_table;
local zoom_cell;
local zoom_photo;
local zoom_gate;

function OnPhotoFound()
    zoom_photo.Disable();
    
    local comics_photo = CreateComics('09_Photo',
                                        CreateComicsFrame('Dupen', 'C_09_PHOTO_1_DUPEN', 'body', 'head1'),
                                        CreateComicsFrame('Dupen', 'C_09_PHOTO_2_DUPEN', 'body', 'head2'),
                                        CreateComicsFrame('Dupen', 'C_09_FINAL_1_DUPEN', 'body', 'head2'));
                                    
    if comics_photo then
        comics_photo.on_finish = function()
            game_state.parent_scene = nil;
            AddNoteToNotebook('Witness_Banker');
            TimerDoString('CompleteLevel(\'Bank\')', ZOOM_ZONE_APPEARING_TIME, play_field:GetTimer());
        end
        
        comics_photo.SetVisible(true);
    else
        game_state.parent_scene = nil;
        AddNoteToNotebook('Witness_Banker');
        TimerDoString('CompleteLevel(\'Bank\')', 1, play_field:GetTimer());
    end
end

function RunComicsBankerReward()
    local comics_reward = CreateComics('09_Reward',
                                        CreateComicsFrame('Banker', 'C_09_REWARD_BANKER', 'Banker', 'Banker_hand'));
    
    if comics_reward then
        comics_reward.AddNoFadeOnFineshObject('Banker');
        comics_reward.AddNoFadeOnFineshObject('Banker_hand');
            
        comics_reward.on_finish = function()
            play_field:GetObject('area_banker'):SetVisible(true);
        end
        
        comics_reward.SetVisible(true);
    else
        play_field:GetObject('Banker'     ):SetOpacity(1.);
        play_field:GetObject('Banker_hand'):SetOpacity(1.);
        play_field:GetObject('area_banker'):SetVisible(true);
    end
end

function OnThankComicsCompleted()
    play_field:GetObject('area_table'   ):SetVisible(true);
    play_field:GetObject('area_lock'    ):SetVisible(true);
    play_field:GetObject('Banker_hand'  ):SetOpacity(0.);
    
    RegisterMonologObject('area_statue', 'C_09_STATUE_HINT');
end

function RunThankComics()
    local comics_final = CreateComics('09_Thank', CreateComicsFrame('Banker', 'C_09_THANK_BANKER', 'Banker', 'Banker_gold'));
    
    if comics_final then
        play_field:GetObject('Banker'     ):SetOpacity(1.);
        play_field:GetObject('Banker_gold'):SetOpacity(1.);
        
        comics_final.on_finish = function()
            OnThankComicsCompleted();
        end
        
        comics_final.SetVisible(true);
    else
        OnThankComicsCompleted();
    end
end

function OnKeyApply()
    zoom_gate.SetObjectVisible('area_open_lock', true);
    zoom_gate.SetObjectVisible('lock_anim',      true);
    zoom_gate.SetObjectVisible('Lock_in_zoom',   false);
    
    RegisterActiveObject('area_open_lock',
                            function(obj_name)
                                local lock_anim = play_field:GetObject('lock_anim'):GetAnimation();
                                lock_anim:Play();
                                game_state.lock_clicked = true;
                                
                                TimerDoString('OnLockOpen()', GetAnimationLength(lock_anim), play_field:GetTimer());
                                
                                PlaySound("09_OpenLock");
                            end,
                            function(obj_name)
                                game_state.lock_clicked = true;
                                OnLockOpen();
                             end);
end

function OnLockOpen()
    local delay = 0;
    
    play_field:GetObject('lock_small_vs_key'):SetOpacity(0.);
    play_field:GetObject('lock_small_open'):SetOpacity(1.);
    
    if zoom_gate.IsVisible() then
        zoom_gate.SetVisible(false);
        delay = ZOOM_ZONE_APPEARING_TIME;
    end
    zoom_gate.Disable();
    play_field:GetObject('area_gate'):SetVisible(false);
    
    if not HasGameState('ActionCompleted', game_state.scene_path..'(gateOpened)') then
        CreateOpenGateAnim(delay);
        PlaySound("09_OpenGate");
    else
        OnGateOpen();
    end
end

function CreateOpenGateAnim(delay)
    local anim_time = 2;
    
    local LGate = play_field:GetObject('gate');
    local RGate = play_field:GetObject('gate2');
    
    local lock = play_field:GetObject('lock_small_open');
    local dX   = LGate:GetX() - lock:GetX();
    
    local eff3 = CreateAnimationEffector();
    eff3:AttachTo( lock );
    eff3:SetMode( _ANIM_FWD + _ANIM_NOLOOP );
    
    eff3:SetKey(_TRACK_X, 0,                        lock:GetX());
    eff3:SetKey(_TRACK_X, delay,                    lock:GetX());
    eff3:SetKey(_TRACK_X, delay + anim_time * 0.1,  lock:GetX() + 5);
    eff3:SetKey(_TRACK_X, delay + anim_time,        -280);
    eff3:Play();
    
    local eff1 = CreateAnimationEffector();
    eff1:AttachTo( LGate );
    eff1:SetMode( _ANIM_FWD + _ANIM_NOLOOP );
    
    eff1:SetKey(_TRACK_X, 0,                        LGate:GetX());
    eff1:SetKey(_TRACK_X, delay,                    LGate:GetX());
    eff1:SetKey(_TRACK_X, delay + anim_time * 0.1,  LGate:GetX() + 5);
    eff1:SetKey(_TRACK_X, delay + anim_time,        -280 + dX);
    eff1:Play();
    
    local eff2 = CreateAnimationEffector();
    eff2:AttachTo( RGate );
    eff2:SetMode( _ANIM_FWD + _ANIM_NOLOOP );
    
    eff2:SetKey(_TRACK_X, 0,                        RGate:GetX());
    eff2:SetKey(_TRACK_X, delay,                    RGate:GetX());
    eff2:SetKey(_TRACK_X, delay + anim_time * 0.1,  RGate:GetX() - 5);
    eff2:SetKey(_TRACK_X, delay + anim_time,        1300);
    eff2:Play();
    
    TimerDoString('OnGateOpen()', delay + anim_time, play_field:GetTimer());
end

function OnGateOpen() 
    if not HasGameState('ActionCompleted', game_state.scene_path..'(gateOpened)') then
        AddGameState('ActionCompleted', game_state.scene_path..'(gateOpened)');
    end
    
    play_field:GetObject('gate'           ):SetVisible(false);
    play_field:GetObject('gate2'          ):SetVisible(false);
    play_field:GetObject('lock_small_open'):SetVisible(false);
    
    RunComicsBankerReward();
end

function OnSceneLoad(screen)
    LoadData(screen)
    DefaultOnSceneLoad('data/Scenes/09_Bank_Office_Depositary.lua', 'quest', 'data/Scenes/09_Bank_Office_Main.lua')
    
    play_field:GetObject('area_banker'  ):SetVisible(false);
    play_field:GetObject('body'         ):SetOpacity(0.);
    play_field:GetObject('head1'        ):SetOpacity(0.);
    play_field:GetObject('head2'        ):SetOpacity(0.);
    play_field:GetObject('Banker'       ):SetOpacity(0.);
    play_field:GetObject('Banker_hand'  ):SetOpacity(0.);
    play_field:GetObject('Banker_gold'  ):SetOpacity(0.);
    
    play_field:GetObject('lock_small_vs_key'  ):SetOpacity(0.);
    play_field:GetObject('lock_small_open'    ):SetOpacity(0.);
    
    play_field:GetObject('cell_open' ):GetAnimation():SetMode(HGEANIM_FWD + HGEANIM_NOLOOP);
    play_field:GetObject('cell_open' ):GetAnimation():Stop();
    
    play_field:GetObject('chain_anim'):GetAnimation():SetMode(HGEANIM_FWD + HGEANIM_NOLOOP);
    play_field:GetObject('chain_anim'):GetAnimation():Stop();
    
    play_field:GetObject('lock_anim' ):GetAnimation():SetMode(HGEANIM_FWD + HGEANIM_NOLOOP);
    play_field:GetObject('lock_anim' ):GetAnimation():Stop();
    
    play_field:GetObject('area_table'):SetVisible(false);
    play_field:GetObject('area_lock' ):SetVisible(false);
    
    zoom_table = CreateZoomZone(  'area_table',
                                  'CloseZoneTable',
                                  'ZOOM_table',     true,
                                  'lupa_dust_1',    true,
                                  'lupa_dust_2',    false,
                                  'lupa_dust_3',    false);
                                  
    zoom_table.on_open = function()
      --  ShowMonolog('C_09_PASSWORD_HINT', 'C_09_PASSWORD_HINT');
        
        if not HasGameState('ActionCompleted', '09_PasswordShown') then
            AddGameState('ActionCompleted', '09_PasswordShown');
        end
    end
    
    zoom_cell = CreateZoomZone(  'area_cell',
                                 'CloseZoneCell',
                                 'ZOOM_cell',   true,
                                 'area_photo',  true);
    
    play_field:GetObject('area_photo'):GetAnimation():SetColor('0x01FFFFFF');
    
    zoom_photo = CreateZoomZone( nil,
                                 'CloseZonePhoto',
                                 'ZOOM_photo', true);
                                 
    zoom_photo.on_close = function()
        OnPhotoFound();
    end
    
    zoom_gate = CreateZoomZone( 'area_gate',
                                'CloseZoneGate',
                                'ZOOM_gate',        true,
                                'lock_anim',        false,
                                'Lock_in_zoom',     true,
                                'area_open_lock',   false,
                                'area_use_key',     true);
                                
    zoom_gate.on_open = function()
    --[[
        if not game_state.key_used then
            ShowMonolog('C_09_GATE_HINT_1', 'C_09_GATE_HINT_1');
        else
            ShowMonolog('C_09_GATE_HINT_2', 'C_09_GATE_HINT_2');
        end
    --]]
    end
                                
    play_field:GetObject('area_open_lock'):GetAnimation():SetColor('0x01FFFFFF');
    play_field:GetObject('area_use_key'  ):GetAnimation():SetColor('0x01FFFFFF'); 
    
    RegisterWrongApplyDialog('09_duster', 'lupa_dust_1', 'C_09_HINT_NEED_WET_DUSTER');
    
    RegisterToolApplyInfo('09_duster_wet', {'lupa_dust_1',
                                            'lupa_dust_2',
                                            'lupa_dust_3'}, nil, nil,   function(tool_name, obj_name)
                                                                            if obj_name == 'lupa_dust_1' then
                                                                                zoom_table.SetObjectVisible('lupa_dust_1', false, 1);
                                                                                zoom_table.SetObjectVisible('lupa_dust_2', true,  0.5);
                                                                                
                                                                                PlaySound('09_CleanUpGlass1')
                                                                                
                                                                            elseif obj_name == 'lupa_dust_2' then
                                                                                zoom_table.SetObjectVisible('lupa_dust_2', false, 1);
                                                                                zoom_table.SetObjectVisible('lupa_dust_3', true,  0.5);
                                                                                
                                                                                PlaySound('09_CleanUpGlass2')
                                                                                
                                                                            elseif obj_name == 'lupa_dust_3' then
                                                                                zoom_table.SetObjectVisible('lupa_dust_3', false, 1);
                                                                                
                                                                                PlaySound('09_CleanUpGlass1')
                                                                                AddNoteToNotebook('SAFETY_DEPOSIT_ROOM');
                                                                            end
                                                                        end,
                                                                        function(tool_name, obj_name)
                                                                            if obj_name == 'lupa_dust_1' then
                                                                                zoom_table.SetObjectVisible('lupa_dust_1', false);
                                                                                zoom_table.SetObjectVisible('lupa_dust_2', true);
                                                                            elseif obj_name == 'lupa_dust_2' then
                                                                                zoom_table.SetObjectVisible('lupa_dust_2', false);
                                                                                zoom_table.SetObjectVisible('lupa_dust_3', true);
                                                                            elseif obj_name == 'lupa_dust_3' then
                                                                                zoom_table.SetObjectVisible('lupa_dust_3', false);
                                                                            else
                                                                                zoom_table.SetObjectVisible('lupa_dust_1', false);
                                                                            end
                                                                        end,
                                                                        function(tool_name, obj_name)
                                                                            if obj_name == 'lupa_dust_1' then
                                                                                ShowMonolog('C_09_DUSTER_WET_FIRST_APPLY_HINT', 'C_09_DUSTER_WET_FIRST_APPLY_HINT');
                                                                            else
                                                                                ShowMonolog('C_09_DUSTER_WET_APPLY_HINT', 'C_09_DUSTER_WET_APPLY_HINT');
                                                                            end
                                                                        end);
    
    RegisterToolApplyInfo('09_key', 'area_use_key', nil, nil,   function(tool_name)
                                                                    local time = 1;
                                                                    play_field:GetObject('area_use_key'):SetVisible(false);
                                                                    play_field:GetObject('lock_anim'   ):ChangeOpacity(0., 1., time);
                                                                    play_field:GetObject('Lock_in_zoom'):ChangeOpacity(1., 0., time);
                                                                    play_field:GetObject('lock_small_vs_key'):ChangeOpacity(0., 1., time);
                                                                    play_field:GetObject('lock_small'       ):ChangeOpacity(1., 0., time);
                                                                    
                                                                    game_state.key_used = true;
                                                                    
                                                                    PlaySound('09_KeyPlaced');
                                                                    
                                                                    --TimerDoString("ShowMonolog('C_09_GATE_HINT_2', 'C_09_GATE_HINT_2')", 1, play_field:GetTimer());
                                                                    TimerDoString('OnKeyApply()', time, play_field:GetTimer());
                                                                end,
                                                                
                                                                function(tool_name)
                                                                    play_field:GetObject('area_use_key'):SetVisible(false);
                                                                    play_field:GetObject('Lock_in_zoom'):SetVisible(false);
                                                                    play_field:GetObject('lock_small_vs_key'):SetOpacity(1.);
                                                                    play_field:GetObject('lock_small'       ):SetOpacity(0.);
                                                                    
                                                                    game_state.key_used = true;
                                                                    
                                                                    OnKeyApply();
                                                                end);
    
    RegisterToolApplyInfo('02_gold', 'area_banker', nil, nil,   function(tool_name)
                                                                    local time = 0.5;
                                                                    play_field:GetObject('Banker_hand'):ChangeOpacity(1., 0., time);
                                                                    play_field:GetObject('Banker_gold'):ChangeOpacity(0., 1., time);
                                                                    play_field:GetObject('area_banker'):SetVisible(false);
                                                                    
                                                                    TimerDoString('RunThankComics()', time, play_field:GetTimer());
                                                                end,
                                                                
                                                                function(tool_name)
                                                                    play_field:GetObject('area_banker'):SetVisible(false);
                                                                    
                                                                    RunThankComics();
                                                                end);
    
    RegisterActiveObject('area_photo',                          function(obj_name)
                                                                    zoom_cell.Disable();
                                                                    zoom_cell.SetVisible(false);
                                                                    
                                                                    zoom_photo.SetVisible(true);
                                                                    
                                                                    --TimerDoString('OnPhotoFound()', ZOOM_ZONE_APPEARING_TIME, play_field:GetTimer());
                                                                end,
                                                                function(obj_name)
                                                                    zoom_cell.Disable();
                                                                    
                                                                    if not HasGameState('ComicsShown', '09_Photo') then
                                                                        zoom_photo.SetVisible(true);
                                                                    else
                                                                        OnPhotoFound();
                                                                    end
                                                                 end);
    
    LinkScene(  'area_lock',
                'CursorGlass',
                'data/Scenes/Minigames/09_combi_lock.lua',
                false);
    
    if HasGameState('MiniGameCompleted', '09_combi_lock') then
        if not HasGameState('ActionCompleted', game_state.scene_path..'(cellOpen)') then
            local chain_time = GetAnimationLength(  play_field:GetObject('chain_anim'):GetAnimation() );
            local cell_time  = GetAnimationLength(  play_field:GetObject('cell_open'):GetAnimation() );
            
            play_field:GetObject('chain_anim'):GetAnimation():Play();
            
            PlaySound("09_OpenCell");
            
            TimerDoString("play_field:GetObject('cell_open' ):GetAnimation():Play()", chain_time, play_field:GetTimer());
            TimerDoString('SetOpenCellState()', chain_time + cell_time, play_field:GetTimer());
        else
            local cell_anim  = play_field:GetObject('cell_open'):GetAnimation();
            local chain_anim = play_field:GetObject('chain_anim'):GetAnimation();
            
            cell_anim:SetFrame(cell_anim:GetFrames() - 1);
            chain_anim:SetFrame(chain_anim:GetFrames() - 1);
        end
        
        zoom_table.Disable();
    else
        play_field:GetObject('area_cell'):SetVisible(false);
    end
end

function SetOpenCellState()
    local state = game_state.scene_path..'(cellOpen)'
    
    if not HasGameState('ActionCompleted', state) then
        AddGameState('ActionCompleted', state);
    end
end

function OnSceneFree(screen)
    DefaultOnSceneFree()
    FreeData(screen)
end

function OnUpdate(dt)  
    DefaultOnUpdate(dt)
end

function OnAllItemsFound()
    DefaultOnAllItemsFound()
end

function OnLose()
    DefaultOnLose()
end

function OnExit()
    DefaultOnExit()
end

function OnClose()
    DefaultOnClose()
end

function OnObjectMouseEnter(object)
    DefaultOnObjectMouseEnter(object)
end

function OnObjectMouseLeave(object)
    DefaultOnObjectMouseLeave(object)
end

function OnObjectMouseDown(object)
    local is_wrong_click = not DefaultOnObjectMouseDown(object)
    local obj_name = object:GetName()
    local pf = play_field
    
    if obj_name == 'ZOOM_gate'
    or obj_name == 'area_open_lock'
    or obj_name == 'area_use_key'
    then
        if not game_state.key_used then
            ShowMonolog('C_09_GATE_HINT_1', 'C_09_GATE_HINT_1');
        elseif obj_name ~= 'area_open_lock' and not game_state.lock_clicked then
            ShowMonolog('C_09_GATE_HINT_2', 'C_09_GATE_HINT_2');
        end
    end
    
    if obj_name == 'ZOOM_photo' then
        ShowMonolog('C_09_ERIC_PHOTO_HINT', 'C_09_ERIC_PHOTO_HINT');
    end
    
    if obj_name == 'background' then
     --   SetLevelCompletedState('Bank');
     --   GoToMap();
    end
    
    if obj_name == 'ZOOM_table' and HasGameState('ToolApplied', '09_duster_wet') then
        ShowMonolog('C_09_PASSWORD_HINT', 'C_09_PASSWORD_HINT');
    end
    
    if obj_name == 'ZOOM_cell' then
        --ShowMonolog('', '');
    end
    
    if obj_name == 'area_banker' then
        ShowMonolog('C_09_HINT_REWARD', 'C_09_HINT_REWARD');
    end
    
    DefaultOnObjectMouseDownProcessed(is_wrong_click);
end

function OnObjectMouseUp(object)
    DefaultOnObjectMouseUp(object)
end

function OnObjectFound(object)
    DefaultOnObjectFound(object)
end

function OnToolFound(tool)
    DefaultOnToolFound(tool)
end

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

function OnObjectReachPanel(object)
    DefaultOnObjectReachPanel(object)
end

function OnButtonPress(title)
    DefaultOnButtonPress(title)
end

function OnMouseMove(previous_pos, current_pos)
    DefaultOnMouseMove(previous_pos, current_pos)
end

function OnSetTool(tool)
    DefaultOnSetTool(tool)
end

function LevelLoaded(level)
end

function OnSceneDestroy(playfield)
    DefaultOnSceneDestroy(playfield)
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/09_Bank_Office/Zone_deposit/Layers/background.jpg',0,0,1024,768,1,0)
	anim:SetHotSpot(512,384)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('background',anim,512,384,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_deposit/Zoom_table/ZOOM_table.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('ZOOM_table',anim,512,384,150,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/area.png',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_table',anim,831,450,101,0,13,10)
	local anim = CreateAnimation('data/Texture/Scenes/Common/area.png',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_lock',anim,251,461,102,0,20,20)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_deposit/Zoom_cell/ZOOM_cell.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('ZOOM_cell',anim,512,384,160,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/area.png',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('area_photo',anim,532,415,161,-6,40,18)
	local anim = CreateAnimation('data/Texture/Characters/Banker/Banker.png',0,0,628,1164,1,0)
	anim:SetHotSpot(314,582)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Banker',anim,777,560,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Characters/Banker/Banker_hand.png',0,0,204,279,1,0)
	anim:SetHotSpot(102,139)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Banker_hand',anim,591,486,111,0,1,1)
	local anim = CreateAnimation('data/Texture/Characters/Dupen/body.png',0,0,376,520,1,0)
	anim:SetHotSpot(188,260)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('body',anim,246,509,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Characters/Dupen/head1.png',0,0,185,244,1,0)
	anim:SetHotSpot(92,122)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('head1',anim,278,203,111,0,1,1)
	local anim = CreateAnimation('data/Texture/Characters/Dupen/head2.png',0,0,214,252,1,0)
	anim:SetHotSpot(107,126)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('head2',anim,274,198,112,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/area.png',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_banker',anim,732,342,123,0,40,70)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_deposit/Animations/cell_open.png',0,0,159,97,8,8)
	anim:SetHotSpot(79,48)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cell_open',anim,256,193,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/area.png',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_cell',anim,255,193,102,0,18,12)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_deposit/Zoom_photo/ZOOM_photo.jpg',0,0,432,576,1,0)
	anim:SetHotSpot(216,288)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('ZOOM_photo',anim,512,344,150,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_deposit/Animations/chain_anim.png',0,0,124,156,12,12)
	anim:SetHotSpot(62,78)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('chain_anim',anim,176,439,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_deposit/Layers/gate.png',0,0,547,867,1,0)
	anim:SetHotSpot(273,433)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('gate',anim,265,376,130,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_deposit/Layers/gate.png',0,0,547,867,1,0)
	anim:SetHotSpot(273,433)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('gate2',anim,810,377,130,0,-1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/area.png',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_gate',anim,539,437,133,0,13,13)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_deposit/Zoom_gate/ZOOM_gate.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('ZOOM_gate',anim,512,384,170,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/area.png',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_open_lock',anim,532,396,173,0,20,20)
	local anim = CreateAnimation('data/Texture/Scenes/Common/area.png',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_use_key',anim,534,396,174,0,20,20)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_deposit/Animations/lock_anim.png',0,0,127,227,9,9)
	anim:SetHotSpot(63,113)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('lock_anim',anim,531,377,171,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_deposit/Zoom_gate/Lock_in_zoom.png',0,0,138,215,1,0)
	anim:SetHotSpot(69,107)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('Lock_in_zoom',anim,536,361,172,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_deposit/Layers/lock_small.png',0,0,89,137,1,0)
	anim:SetHotSpot(44,68)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lock_small',anim,535,449,132,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_deposit/Layers/lock_small_vs_key.png',0,0,67,129,1,0)
	anim:SetHotSpot(33,64)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lock_small_vs_key',anim,537,450,132,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_deposit/Layers/lock_small_open.png',0,0,71,133,1,0)
	anim:SetHotSpot(35,66)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lock_small_open',anim,527,455,132,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/Animations/candle.png',0,0,20,40,25,14)
	anim:SetHotSpot(10,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('candle',anim,834,209,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/Animations/candle.png',0,0,20,40,25,12)
	anim:SetHotSpot(10,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('candle_2',anim,851,195,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/Animations/candle.png',0,0,20,40,25,10)
	anim:SetHotSpot(10,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('candle_3',anim,867,207,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/Animations/candle.png',0,0,20,40,25,14)
	anim:SetHotSpot(10,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('candle_4',anim,950,187,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/Animations/candle.png',0,0,20,40,25,12)
	anim:SetHotSpot(10,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('candle_5',anim,961,172,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/Animations/candle.png',0,0,20,40,25,10)
	anim:SetHotSpot(10,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('candle_6',anim,968,195,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Characters/Banker/Banker_gold.png',0,0,204,279,1,0)
	anim:SetHotSpot(102,139)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Banker_gold',anim,591,486,112,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/area.png',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_statue',anim,501,242,101,0,15,25)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_deposit/Zoom_table/lupa_dust_1.png',0,0,361,364,1,0)
	anim:SetHotSpot(180,182)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('lupa_dust_1',anim,545,362,151,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_deposit/Zoom_table/lupa_dust_2.png',0,0,361,364,1,0)
	anim:SetHotSpot(180,182)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('lupa_dust_2',anim,545,362,152,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_deposit/Zoom_table/lupa_dust_3.png',0,0,361,364,1,0)
	anim:SetHotSpot(180,182)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('lupa_dust_3',anim,545,362,153,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
