function OnSceneLoad(screen)
    LoadData(screen)
    DefaultOnSceneLoad('data/Scenes/09_Bank_Office_Table_HO.lua', 'hidden_object', 'data/Scenes/09_Bank_Office_Main.lua')
    
    play_field:IgnoreOnTestPoint('BG_pin1');
    play_field:IgnoreOnTestPoint('BG_pin3');
    
    AddTask(CreateTask('BUTTON_5',    '',            'Button_5'))
    AddTask(CreateTask('BUG',         'BUGS',        'Bug', 'Bug1', 'Bug2', 'Bug3'));
    AddTask(CreateTask('SAFETY_PIN',  'SAFETY_PINS', 'Pin', 'Pin1', 'Pin2', 'Pin3'));
    
    AddRandomTasks( CreateTask('AUTUMN_LEAF',      '', 'Autumn_leaf'),
                    CreateTask('BELL',             '', 'Bell'),
                    CreateTask('BROOCH',           '', 'Brooch'),
                    CreateTask('CAT',              '', 'Cat'),
                    CreateTask('COIN',             '', 'Coin'),
                    CreateTask('CRYSTAL',          '', 'Crystal'),
                    CreateTask('DOG',              '', 'Dog'),
                    CreateTask('EARRINGS',         '', 'Earrings'),
                    CreateTask('HORSE',            '', 'Horse'),
                    CreateTask('INKPOT',           '', 'Inkpot'),
                    CreateTask('KEY',              '', 'Key'),
                    CreateTask('KNIFE',            '', 'Knife'),
                    CreateTask('LOCK',             '', 'Lock'),
                    CreateTask('MAGNIFYING_LENS',  '', 'Magnifying_lens'),
                    CreateTask('NEEDLE',           '', 'Needle'),
                    CreateTask('PEARL_NECKLACE',   '', 'Pearl_necklace'),
                    CreateTask('PISTOL',           '', 'Pistol'),
                    CreateTask('RING',             '', 'Ring'),
                    CreateTask('SHELL',            '', 'Shell'),
                    CreateTask('UMBRELLA',         '', 'Umbrella'));
    
    RegisterToolFindInfo('09_tail');
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

    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_HO2/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_HO2/Items/Autumn_leaf.png',0,0,86,97,1,0)
	anim:SetHotSpot(43,48)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Autumn_leaf',anim,801,308,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Bell.png',0,0,34,61,1,0)
	anim:SetHotSpot(17,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bell',anim,400,195,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Brooch.png',0,0,40,75,1,0)
	anim:SetHotSpot(20,37)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Brooch',anim,529,83,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Bug.png',0,0,51,42,1,0)
	anim:SetHotSpot(25,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bug',anim,260,50,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Coin.png',0,0,35,22,1,0)
	anim:SetHotSpot(17,11)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Coin',anim,194,631,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Crystal.png',0,0,29,29,1,0)
	anim:SetHotSpot(14,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Crystal',anim,1003,174,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Dog.png',0,0,111,70,1,0)
	anim:SetHotSpot(55,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Dog',anim,860,634,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Earrings.png',0,0,63,86,1,0)
	anim:SetHotSpot(31,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Earrings',anim,708,126,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Horse.png',0,0,70,59,1,0)
	anim:SetHotSpot(35,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Horse',anim,91,38,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Inkpot.png',0,0,54,125,1,0)
	anim:SetHotSpot(27,62)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Inkpot',anim,332,561,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Key.png',0,0,57,21,1,0)
	anim:SetHotSpot(28,10)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Key',anim,996,306,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Knife.png',0,0,30,110,1,0)
	anim:SetHotSpot(15,55)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Knife',anim,94,302,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Lock.png',0,0,46,61,1,0)
	anim:SetHotSpot(23,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Lock',anim,912,102,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Needle.png',0,0,14,180,1,0)
	anim:SetHotSpot(7,90)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Needle',anim,381,432,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Pearl_necklace.png',0,0,82,40,1,0)
	anim:SetHotSpot(41,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Pearl_necklace',anim,515,618,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Pistol.png',0,0,88,40,1,0)
	anim:SetHotSpot(44,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Pistol',anim,191,387,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Ring.png',0,0,33,35,1,0)
	anim:SetHotSpot(16,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Ring',anim,912,469,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Shell.png',0,0,50,34,1,0)
	anim:SetHotSpot(25,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Shell',anim,631,398,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Layers/horce.png',0,0,48,29,1,0)
	anim:SetHotSpot(24,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('horce',anim,91,62,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Layers/zontik.png',0,0,62,148,1,0)
	anim:SetHotSpot(31,74)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('zontik',anim,964,639,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Button_5.png',0,0,44,35,1,0)
	anim:SetHotSpot(22,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Button_5',anim,774,376,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_flame1',anim,403,408,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/Animations/candle.png',0,0,20,40,25,18)
	anim:SetHotSpot(10,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('candle_flame2',anim,496,411,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/Animations/candle.png',0,0,20,40,25,16)
	anim:SetHotSpot(10,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('candle_flame3',anim,451,429,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Cat.png',0,0,39,51,1,0)
	anim:SetHotSpot(19,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Cat',anim,105,610,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Magnifying_lens.png',0,0,26,45,1,0)
	anim:SetHotSpot(13,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Magnifying_lens',anim,531,378,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Umbrella.png',0,0,77,260,1,0)
	anim:SetHotSpot(38,130)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Umbrella',anim,988,591,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Bug1.png',0,0,38,47,1,0)
	anim:SetHotSpot(19,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bug1',anim,792,492,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Bug2.png',0,0,51,32,1,0)
	anim:SetHotSpot(25,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bug2',anim,423,574,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Bug3.png',0,0,35,34,1,0)
	anim:SetHotSpot(17,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bug3',anim,166,590,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Pin.png',0,0,40,73,1,0)
	anim:SetHotSpot(20,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Pin',anim,610,383,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Pin1.png',0,0,30,76,1,0)
	anim:SetHotSpot(15,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Pin1',anim,924,620,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Pin2.png',0,0,51,79,1,0)
	anim:SetHotSpot(25,39)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Pin2',anim,985,410,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Items/Pin3.png',0,0,24,76,1,0)
	anim:SetHotSpot(12,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Pin3',anim,401,563,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Layers/BG_pin1.png',0,0,34,44,1,0)
	anim:SetHotSpot(17,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('BG_pin1',anim,916,633,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Layers/BG_pin2.png',0,0,34,53,1,0)
	anim:SetHotSpot(17,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('BG_pin2',anim,965,423,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/09_Bank_Office/Zone_HO2/Layers/BG_pin3.png',0,0,17,17,1,0)
	anim:SetHotSpot(8,8)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('BG_pin3',anim,406,540,102,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
