local zone_chest;
local zone_book;
local zone_candle;
local zone_paper;
local zone_vase;

function RunFlash()
    local window      = play_field:GetObject('flash_window');
    local door        = play_field:GetObject('flash_door');
    local flash_time  = 1
    local flash_delay = 2 + math.random(4);
    
    if game_state.window_fe ~= nil then
        game_state.window_fe:Destroy();
    end
    
    game_state.window_fe = CreateAnimationEffector();
    game_state.window_fe:AttachTo( window );
    game_state.window_fe:SetMode(HGEANIM_FWD + HGEANIM_NOLOOP);
    
    game_state.window_fe:SetKey(_TRACK_O, 0.0,              1.0);
    game_state.window_fe:SetKey(_TRACK_O, flash_time * 0.2, 0.3);
    game_state.window_fe:SetKey(_TRACK_O, flash_time * 0.3, 0.9);
    game_state.window_fe:SetKey(_TRACK_O, flash_time,       0);
    game_state.window_fe:Play();
    
    if game_state.door_fe ~= nil then
        game_state.door_fe:Destroy();
    end
    
    if game_state.exit_door_open then
        game_state.door_fe = CreateAnimationEffector();
        game_state.door_fe:AttachTo( door );
        game_state.door_fe:SetMode(HGEANIM_FWD + HGEANIM_NOLOOP);
        
        game_state.door_fe:SetKey(_TRACK_O, 0.0,              1.0);
        game_state.door_fe:SetKey(_TRACK_O, flash_time * 0.2, 0.3);
        game_state.door_fe:SetKey(_TRACK_O, flash_time * 0.3, 0.9);
        game_state.door_fe:SetKey(_TRACK_O, flash_time,       0);
        game_state.door_fe:Play();
    end
end

function SetStateDoorOpen()
    game_state.exit_door_open = true
    
    local state = game_state.scene_path..'(doorOpened)';
    
    if not HasGameState('ActionCompleted', state) then
        AddGameState('ActionCompleted', state);
        
        game_state.ignore_on_highlight['area_exit'] = nil;
    end
end

function OpenDoor()
    local door_anim = play_field:GetObject('door_02_animation'):GetAnimation();
    local anim_time = GetAnimationLength( door_anim );
    local light1    = play_field:GetObject('light_from_door_01');
    local light2    = play_field:GetObject('light_from_door_02');
    
    door_anim:SetFrame(0);
    door_anim:SetMode(HGEANIM_FWD + HGEANIM_NOLOOP);
    door_anim:Play();
    
    if game_state.door_light1_effect == nil or game_state.door_light2_effect == nil then
        CreateDoorLightEffectors(light1, light2, anim_time);
    end
    
    game_state.door_light1_effect:SetMode( HGEANIM_FWD + HGEANIM_NOLOOP )
    game_state.door_light2_effect:SetMode( HGEANIM_FWD + HGEANIM_NOLOOP )
    
    game_state.door_light1_effect:Play();
    game_state.door_light2_effect:Play();
    
    PlaySound('OpenDoor');
    
    TimerDoString('SetStateDoorOpen()', GetAnimationLength(door_anim), play_field:GetTimer());
end

function CloseDoor()
    local door_anim = play_field:GetObject('door_02_animation'):GetAnimation();
    local anim_time = GetAnimationLength( door_anim );
    local light1    = play_field:GetObject('light_from_door_01');
    local light2    = play_field:GetObject('light_from_door_02');
    
    door_anim:SetFrame(door_anim:GetFrames() - 1)
    door_anim:SetMode(HGEANIM_REV + HGEANIM_NOLOOP);
    door_anim:Play();
    
    if game_state.door_light1_effect == nil or game_state.door_light2_effect == nil then
        CreateDoorLightEffectors(light1, light2, anim_time);
    end
    
    game_state.door_light1_effect:SetMode( HGEANIM_REV + HGEANIM_NOLOOP );
    game_state.door_light2_effect:SetMode( HGEANIM_REV + HGEANIM_NOLOOP );
    
    game_state.door_light1_effect:Play();
    game_state.door_light2_effect:Play();
    
    game_state.ignore_on_highlight['area_exit'] = true;
    
    PlaySound('CloseDoor')
end

function ShowDupen(time)
    play_field:GetObject('DupenBG'):ChangeOpacity(0.0, 1.0, time);
    play_field:GetObject('Tors'   ):ChangeOpacity(0.0, 1.0, time);
    play_field:GetObject('head_1' ):ChangeOpacity(0.0, 1.0, time);
    play_field:GetObject('area_dupen_big'):SetOpacity(1.0);
    
    TimerDoString('CreateDupenAnimation()', time, play_field:GetTimer());
end

function HideDupen(time)
    local bg    = play_field:GetObject('DupenBG');
    local tors  = play_field:GetObject('Tors');
    local head1 = play_field:GetObject('head_1');
    local head2 = play_field:GetObject('head_2');
    
    head1:DestroyChildren();
    head2:DestroyChildren();
    
    bg:ChangeOpacity(bg:GetOpacity(), 0.0, time);
    tors:ChangeOpacity(tors:GetOpacity(), 0.0, time);
    head1:ChangeOpacity( head1:GetOpacity(), 0.0, time);
    head2:ChangeOpacity( head2:GetOpacity(), 0.0, time);
end

function CreateDupenAnimation()
    local head1 = play_field:GetObject('head_1');
    local head2 = play_field:GetObject('head_2');
    
    local head1_eff = CreateAnimationEffector();
    head1_eff:SetMode(HGEANIM_FWD + HGEANIM_LOOP);
    head1_eff:AttachTo(head1);
    
    local head2_eff = CreateAnimationEffector();
    head2_eff:SetMode(HGEANIM_FWD + HGEANIM_LOOP);
    head2_eff:AttachTo(head2);
    
    head1_eff:SetKey(_TRACK_O, 0.0, 1);
    head1_eff:SetKey(_TRACK_O, 3.0, 1);
    head1_eff:SetKey(_TRACK_O, 4.0, 0);
    head1_eff:SetKey(_TRACK_O, 7.0, 0);
    head1_eff:SetKey(_TRACK_O, 8.0, 1);
    head1_eff:Play();
    
    head2_eff:SetKey(_TRACK_O, 0.0, 0);
    head2_eff:SetKey(_TRACK_O, 3.0, 0);
    head2_eff:SetKey(_TRACK_O, 4.0, 1);
    head2_eff:SetKey(_TRACK_O, 7.0, 1);
    head2_eff:SetKey(_TRACK_O, 8.0, 0);
    head2_eff:Play();
end

function CreateDoorLightEffectors(light1, light2, anim_time)
    
    if game_state.door_light1_effect ~= nil then
        game_state.door_light1_effect:Destroy();
    end
    
    if game_state.door_light2_effect ~= nil then
        game_state.door_light2_effect:Destroy();
    end
    
    game_state.door_light1_effect = CreateAnimationEffector();
    game_state.door_light2_effect = CreateAnimationEffector();
    
    game_state.door_light1_effect:AttachTo( light1 );
    game_state.door_light2_effect:AttachTo( light2 );
    
    game_state.door_light1_effect:SetMode( HGEANIM_FWD + HGEANIM_NOLOOP )
    game_state.door_light2_effect:SetMode( HGEANIM_FWD + HGEANIM_NOLOOP )
    
    
    game_state.door_light1_effect:SetKey(_TRACK_O, 0,               0);
    game_state.door_light1_effect:SetKey(_TRACK_O, anim_time * 0.2, 0);
    game_state.door_light1_effect:SetKey(_TRACK_O, anim_time * 0.6, 1);
    game_state.door_light1_effect:SetKey(_TRACK_O, anim_time,       0);
    
    game_state.door_light2_effect:SetKey(_TRACK_O, 0,               0);
    game_state.door_light1_effect:SetKey(_TRACK_O, anim_time * 0.2, 0);
    game_state.door_light2_effect:SetKey(_TRACK_O, anim_time * 0.6, 0);
    game_state.door_light2_effect:SetKey(_TRACK_O, anim_time,       1);
end

function ShowPaperZoom()
    zone_paper.on_close = function(zone)
        if not HasGameState('ActionCompleted', game_state.scene_path..'(paperShown)') then
            AddGameState('ActionCompleted', game_state.scene_path..'(paperShown)');
            
            play_field:GetObject('dupen_legs'):SetVisible(false);
            play_field:GetObject('dupen_anim'):SetVisible(false);
            play_field:GetObject('area_paper'):SetVisible(true);
            
            TimerDoString('ShowDupenDialogGO()', ZOOM_ZONE_APPEARING_TIME, play_field:GetTimer());
        end
    end
    
    zone_paper.SetVisible(true);
end

function ShowDupenDialogGO()
    local dupen_comics = CreateComics('02_Dupen_Go',
                                    CreateComicsFrame('Dupen', 'C_02_DUPEN_GO',   'body', 'head2'),
                                    CreateComicsFrame('Dupen', 'C_02_DUPEN_GO_A', 'body', 'head2'));
    if dupen_comics then
        dupen_comics.on_finish = function()
            OpenDoor();
        end
        
        dupen_comics.SetVisible(true);
    else
        OpenDoor();
    end
end

function SetLighterZoneEnable()
    LinkScene(  'area_lighter',
                'CursorGlass',
                'data/Scenes/Minigames/02_lighter.lua',
                false);
                
    game_state.lighter_linked = true;
    play_field:GetObject('area_lighter'):SetVisible(true);
end

function RegisterCandleFlame()
    RegisterToolApplyInfo('02_lighter', 'area_candle_flame', nil,
                                                             nil,
                                                             function(tool_name)
                                                                 game_state.candle_fire = true;
                                                                 game_state.flame = CreateFlameAnim();
                                                                 game_state.flame:Play();
                                                                 
                                                                 zone_candle.SetObjectVisible('flame', true);
                                                                 zone_candle.Disable();
                                                                 
                                                                 play_field:GetObject('candle_flame_small'):SetVisible(true);
                                                                 play_field:GetObject('candle_flame_small'):GetAnimation():Play();
                                                                 
                                                                 PlaySound('02_CandleFire');
                                                                 
                                                                 TimerDoString("CloseCandleZoom();", 2, play_field:GetTimer());
                                                             end,
                                                             
                                                             function(tool_name)
                                                                 game_state.candle_fire = true;
                                                                 game_state.flame = CreateFlameAnim();
                                                                 
                                                                 zone_candle.SetObjectVisible('flame', true)
                                                                 zone_candle.Disable();
                                                                 
                                                                 play_field:GetObject('candle_flame_small'):SetVisible(true);
                                                                 play_field:GetObject('candle_flame_small'):GetAnimation():Play();
                                                             end);
end

function CloseCandleZoom()
    if zone_candle.IsVisible() then
        zone_candle.SetVisible(false)
    end
end

function CreateFlameAnim()
    local flame    = play_field:GetObject('flame');
    local effector = CreateAnimationEffector();
    effector:AttachTo( flame );
    effector:SetMode(_ANIM_FWD + _ANIM_LOOP);
    effector:SetLifeTime(0, 4.96);
    
    effector:SetKey(_TRACK_SX, 0, 0.82857142857143);
    effector:SetKey(_TRACK_SY, 0, 0.82857142857143);
    effector:SetKey(_TRACK_SX, 0.0769140625, 0.71484969634083);
    effector:SetKey(_TRACK_SY, 0.0769140625, 0.81893856624042);
    effector:SetKey(_TRACK_SX, 0.153828125, 0.7673265785699);
    effector:SetKey(_TRACK_SY, 0.153828125, 0.88248847926267);
    effector:SetKey(_TRACK_SX, 0.23078125, 0.94815698721274);
    effector:SetKey(_TRACK_SY, 0.23078125, 0.92912533951842);
    effector:SetKey(_TRACK_SX, 0.3076953125, 0.76512863551744);
    effector:SetKey(_TRACK_SY, 0.3076953125, 0.95070802941984);
    effector:SetKey(_TRACK_SX, 0.384609375, 0.78619556260872);
    effector:SetKey(_TRACK_SY, 0.384609375, 0.73123905148473);
    effector:SetKey(_TRACK_SX, 0.4615234375, 0.80968657490768);
    effector:SetKey(_TRACK_SY, 0.4615234375, 0.85262184514908);
    effector:SetKey(_TRACK_SX, 0.5384765625, 0.87800531022065);
    effector:SetKey(_TRACK_SY, 0.5384765625, 0.89802087466048);
    effector:SetKey(_TRACK_SX, 0.615390625, 0.93077974791711);
    effector:SetKey(_TRACK_SY, 0.615390625, 0.87846156193732);
    effector:SetKey(_TRACK_SX, 0.6923046875, 0.86900723288675);
    effector:SetKey(_TRACK_SY, 0.6923046875, 0.79510238959929);
    effector:SetKey(_TRACK_SX, 0.76921875, 0.85011841181677);
    effector:SetKey(_TRACK_SY, 0.76921875, 0.73167943357646);
    effector:SetKey(_TRACK_SX, 0.846171875, 0.70710135196997);
    effector:SetKey(_TRACK_SY, 0.846171875, 0.72915219580676);
    effector:SetKey(_TRACK_SX, 0.9230859375, 0.70714896084475);
    effector:SetKey(_TRACK_SY, 0.9230859375, 0.73854304635762);
    effector:SetKey(_TRACK_SX, 1, 0.76589434492019);
    effector:SetKey(_TRACK_SY, 1, 0.80731406598102);
    effector:SetKey(_TRACK_SX, 1.0769140625, 0.94288827173681);
    effector:SetKey(_TRACK_SY, 1.0769140625, 0.70281258583331);
    effector:SetKey(_TRACK_SX, 1.153828125, 0.87970732749413);
    effector:SetKey(_TRACK_SY, 1.153828125, 0.78805627613147);
    effector:SetKey(_TRACK_SX, 1.23078125, 0.95375896481216);
    effector:SetKey(_TRACK_SY, 1.23078125, 0.77830042420728);
    effector:SetKey(_TRACK_SX, 1.3076953125, 0.87398632770776);
    effector:SetKey(_TRACK_SY, 1.3076953125, 0.79146824549089);
    effector:SetKey(_TRACK_SX, 1.384609375, 0.91636219367046);
    effector:SetKey(_TRACK_SY, 1.384609375, 0.89748130741295);
    effector:SetKey(_TRACK_SX, 1.4615234375, 0.87205420087283);
    effector:SetKey(_TRACK_SY, 1.4615234375, 0.78214880825221);
    effector:SetKey(_TRACK_SX, 1.5384765625, 0.7315723136082);
    effector:SetKey(_TRACK_SY, 1.5384765625, 0.81034913174841);
    effector:SetKey(_TRACK_SX, 1.615390625, 0.82811914426099);
    effector:SetKey(_TRACK_SY, 1.615390625, 0.76179601428266);
    effector:SetKey(_TRACK_SX, 1.6923046875, 0.73243720816675);
    effector:SetKey(_TRACK_SY, 1.6923046875, 0.89583086642048);
    effector:SetKey(_TRACK_SX, 1.76921875, 0.81082125309);
    effector:SetKey(_TRACK_SY, 1.76921875, 0.822370372631);
    effector:SetKey(_TRACK_SX, 1.846171875, 0.75520218512528);
    effector:SetKey(_TRACK_SY, 1.846171875, 0.91826654866176);
    effector:SetKey(_TRACK_SX, 1.9230859375, 0.76828272347179);
    effector:SetKey(_TRACK_SY, 1.9230859375, 0.7958125553148);
    effector:SetKey(_TRACK_SX, 2, 0.77226599932859);
    effector:SetKey(_TRACK_SY, 2, 0.91185918759728);
    effector:SetKey(_TRACK_SX, 2.0769140625, 0.91174810022279);
    effector:SetKey(_TRACK_SY, 2.0769140625, 0.73125888851588);
    effector:SetKey(_TRACK_SX, 2.153828125, 0.86728537858211);
    effector:SetKey(_TRACK_SY, 2.153828125, 0.87684682760094);
    effector:SetKey(_TRACK_SX, 2.23078125, 0.91311685537278);
    effector:SetKey(_TRACK_SY, 2.23078125, 0.89148655659658);
    effector:SetKey(_TRACK_SX, 2.3076953125, 0.86715048677023);
    effector:SetKey(_TRACK_SY, 2.3076953125, 0.8398309274575);
    effector:SetKey(_TRACK_SX, 2.384609375, 0.77251197851497);
    effector:SetKey(_TRACK_SY, 2.384609375, 0.70872402111881);
    effector:SetKey(_TRACK_SX, 2.4615234375, 0.79709799493393);
    effector:SetKey(_TRACK_SY, 2.4615234375, 0.86471053193762);
    effector:SetKey(_TRACK_SX, 2.5384765625, 0.70090823084201);
    effector:SetKey(_TRACK_SY, 2.5384765625, 0.768235114597);
    effector:SetKey(_TRACK_SX, 2.615390625, 0.74026886806848);
    effector:SetKey(_TRACK_SY, 2.615390625, 0.95723838007752);
    effector:SetKey(_TRACK_SX, 2.6923046875, 0.73046937467574);
    effector:SetKey(_TRACK_SY, 2.6923046875, 0.746505630665);
    effector:SetKey(_TRACK_SX, 2.76921875, 0.90009186071352);
    effector:SetKey(_TRACK_SY, 2.76921875, 0.83470900601215);
    effector:SetKey(_TRACK_SX, 2.846171875, 0.90643177587207);
    effector:SetKey(_TRACK_SY, 2.846171875, 0.82407238990448);
    effector:SetKey(_TRACK_SX, 2.9230859375, 0.69968230231635);
    effector:SetKey(_TRACK_SY, 2.9230859375, 0.89747734000671);
    effector:SetKey(_TRACK_SX, 3, 0.83453840754418);
    effector:SetKey(_TRACK_SY, 3, 0.9157075716422);
    effector:SetKey(_TRACK_SX, 3.0769140625, 0.86733298745689);
    effector:SetKey(_TRACK_SY, 3.0769140625, 0.86366710409864);
    effector:SetKey(_TRACK_SX, 3.153828125, 0.85589892269662);
    effector:SetKey(_TRACK_SY, 3.153828125, 0.90222632526627);
    effector:SetKey(_TRACK_SX, 3.23078125, 0.75248054445021);
    effector:SetKey(_TRACK_SY, 3.23078125, 0.91383098849452);
    effector:SetKey(_TRACK_SX, 3.3076953125, 0.84066805017243);
    effector:SetKey(_TRACK_SY, 3.3076953125, 0.86972533341472);
    effector:SetKey(_TRACK_SX, 3.384609375, 0.80552079836421);
    effector:SetKey(_TRACK_SY, 3.384609375, 0.8969774468215);
    effector:SetKey(_TRACK_SX, 3.4615234375, 0.75490859706412);
    effector:SetKey(_TRACK_SY, 3.4615234375, 0.7601455732902);
    effector:SetKey(_TRACK_SX, 3.5384765625, 0.79505874813074);
    effector:SetKey(_TRACK_SY, 3.5384765625, 0.88462691122166);
    effector:SetKey(_TRACK_SX, 3.615390625, 0.72177678762169);
    effector:SetKey(_TRACK_SY, 3.615390625, 0.92095645008698);
    effector:SetKey(_TRACK_SX, 3.6923046875, 0.72326853236488);
    effector:SetKey(_TRACK_SY, 3.6923046875, 0.83439954832606);
    effector:SetKey(_TRACK_SX, 3.76921875, 0.90113132114628);
    effector:SetKey(_TRACK_SY, 3.76921875, 0.91529099398785);
    effector:SetKey(_TRACK_SX, 3.846171875, 0.77921689504685);
    effector:SetKey(_TRACK_SY, 3.846171875, 0.82743675038911);
    effector:SetKey(_TRACK_SX, 3.9230859375, 0.9200875881222);
    effector:SetKey(_TRACK_SY, 3.9230859375, 0.9403610339671);
    effector:SetKey(_TRACK_SX, 4, 0.73870174260689);
    effector:SetKey(_TRACK_SY, 4, 0.95714712973418);
    effector:SetKey(_TRACK_SX, 4.0769140625, 0.70679586169011);
    effector:SetKey(_TRACK_SY, 4.0769140625, 0.93843287453841);
    effector:SetKey(_TRACK_SX, 4.153828125, 0.74414899136326);
    effector:SetKey(_TRACK_SY, 4.153828125, 0.79904202398755);
    effector:SetKey(_TRACK_SX, 4.23078125, 0.72508560441908);
    effector:SetKey(_TRACK_SY, 4.23078125, 0.86333384197516);
    effector:SetKey(_TRACK_SX, 4.3076953125, 0.73037018951994);
    effector:SetKey(_TRACK_SY, 4.3076953125, 0.78095858638264);
    effector:SetKey(_TRACK_SX, 4.384609375, 0.74225653859065);
    effector:SetKey(_TRACK_SY, 4.384609375, 0.88853083895383);
    effector:SetKey(_TRACK_SX, 4.4615234375, 0.88995513779107);
    effector:SetKey(_TRACK_SY, 4.4615234375, 0.93699667348247);
    effector:SetKey(_TRACK_SX, 4.5384765625, 0.77709830011902);
    effector:SetKey(_TRACK_SY, 4.5384765625, 0.85273293252358);
    effector:SetKey(_TRACK_SX, 4.615390625, 0.90227790154729);
    effector:SetKey(_TRACK_SY, 4.615390625, 0.75530137028108);
    effector:SetKey(_TRACK_SX, 4.6923046875, 0.94344370860927);
    effector:SetKey(_TRACK_SY, 4.6923046875, 0.89711630603961);
    effector:SetKey(_TRACK_SX, 4.76921875, 0.95387005218665);
    effector:SetKey(_TRACK_SY, 4.76921875, 0.87191534165471);
    effector:SetKey(_TRACK_SX, 4.846171875, 0.87146702475051);
    effector:SetKey(_TRACK_SY, 4.846171875, 0.76401776177252);
    effector:SetKey(_TRACK_SX, 4.92, 0.82857142857143);
    effector:SetKey(_TRACK_SY, 4.92, 0.82857142857143);
    effector:SetKey(_TRACK_A, 0, 0);
    effector:SetKey(_TRACK_A, 0.2, 0.06261815443281);
    effector:SetKey(_TRACK_A, 0.4, -0.06751319389554);
    effector:SetKey(_TRACK_A, 0.6, 0.05081200103877);
    effector:SetKey(_TRACK_A, 0.8, -0.00724668246902);
    effector:SetKey(_TRACK_A, 1, -0.03304817447928);
    effector:SetKey(_TRACK_A, 1.2, 0.05242326266823);
    effector:SetKey(_TRACK_A, 1.4, -0.02254700984298);
    effector:SetKey(_TRACK_A, 1.6, 0.0809545781003);
    effector:SetKey(_TRACK_A, 1.8, -0.05788024626949);
    effector:SetKey(_TRACK_A, 2, 0.0458636967288);
    effector:SetKey(_TRACK_A, 2.2, -0.0640776112476);
    effector:SetKey(_TRACK_A, 2.4, -0.07101003111782);
    effector:SetKey(_TRACK_A, 2.6, 0.02684548301645);
    effector:SetKey(_TRACK_A, 2.8, -0.07317258391636);
    effector:SetKey(_TRACK_A, 3, -0.00813620541818);
    effector:SetKey(_TRACK_A, 3.2, 0.03128510803514);
    effector:SetKey(_TRACK_A, 3.4, 0.01116164874226);
    effector:SetKey(_TRACK_A, 3.6, 0.06020259360981);
    effector:SetKey(_TRACK_A, 3.8, 0.00855433446913);
    effector:SetKey(_TRACK_A, 4, -0.01349198580966);
    effector:SetKey(_TRACK_A, 4.2, 0.05456717277024);
    effector:SetKey(_TRACK_A, 4.4, 0.04160250894841);
    effector:SetKey(_TRACK_A, 4.6, 0.00947581632664);
    effector:SetKey(_TRACK_A, 4.8, 0.08456060825945);
    effector:SetKey(_TRACK_A, 4.92, 0);
    
    return effector;
end
--------------------------------------------------------------------------------------

function OnSceneLoad(screen)
    LoadData(screen)
    DefaultOnSceneLoad('data/Scenes/02_Dupens_House_Main.lua', 'quest')
    
    game_state.exit_door_open    = HasGameState('ActionCompleted', game_state.scene_path..'(doorOpened)');
    game_state.dupen_shown       = HasGameState('ActionCompleted', game_state.scene_path..'(DupenShown)');
    game_state.coin_found        = HasGameState('ToolFound',       '02_coin');
    game_state.has_lighter       = HasGameState('ToolFound',       '02_lighter');
    game_state.cutter_part_found = HasGameState('ToolFound',       '02_cutter_part');
    game_state.gold_found        = HasGameState('ToolFound',       '02_gold');
    game_state.lighter_linked    = false;
    game_state.candle_fire       = false;
    
    play_field:GetObject('area_room_door'):SetVisible( game_state.coin_found or (not InteractiveHelpBeingShown()));
    
    play_field:GetObject('newspaper'    ):SetVisible(false);
    play_field:GetObject('dupen_legs'   ):SetVisible(false);
    play_field:GetObject('area_paper'   ):SetVisible(false);
    play_field:GetObject('area_lighter' ):SetVisible(false);
    play_field:GetObject('area_room'    ):SetVisible(false);
    play_field:GetObject('candle_small' ):SetVisible(false);
    play_field:GetObject('area_vase'    ):SetVisible(false);
    
    play_field:GetObject('dupen_anim'):SetVisible(false);
    play_field:GetObject('dupen_anim'):GetAnimation():SetMode(HGEANIM_FWD + HGEANIM_NOLOOP);
    play_field:GetObject('dupen_anim'):GetAnimation():Stop();
    
    play_field:GetObject('flash_door'        ):SetOpacity(0.0);
    play_field:GetObject('flash_window'      ):SetOpacity(0.0);
    play_field:GetObject('light_from_door_01'):SetOpacity(0.0);
    play_field:GetObject('light_from_door_02'):SetOpacity(0.0);
    play_field:GetObject('door_open'         ):SetOpacity(0.);
    play_field:GetObject('door_02_animation'):GetAnimation():Stop();
    play_field:GetObject('DupenBG'):SetOpacity(0.0);
    play_field:GetObject('Tors'   ):SetOpacity(0.0);
    play_field:GetObject('head_1' ):SetOpacity(0.0);
    play_field:GetObject('head_2' ):SetOpacity(0.0);
    play_field:GetObject('area_dupen_big'):SetOpacity(0.0);
    play_field:GetObject('DupenBG'):GetAnimation():SetColor('0xFFFFFFFF');
    play_field:GetObject('Tors'   ):GetAnimation():SetColor('0xFFFFFFFF');
    play_field:GetObject('head_1' ):GetAnimation():SetColor('0xFFFFFFFF');
    play_field:GetObject('head_2' ):GetAnimation():SetColor('0xFFFFFFFF');
    play_field:GetObject('area_dupen_big'):GetAnimation():SetColor('0x01FFFFFF');
    play_field:GetObject('body' ):SetOpacity(0.0);
    play_field:GetObject('head2'):SetOpacity(0.0);
    
    play_field:GetObject('candle_flame_small'):SetVisible(false);
    play_field:GetObject('candle_flame_small'):GetAnimation():Stop();
    play_field:GetObject('candle_flame_small'):GetAnimation():SetMode(HGEANIM_FWD + HGEANIM_LOOP);
    
    RegisterMonologObject('area_crack',  'C_02_CRACK_HINT');
    RegisterMonologObject('area_picture', {'C_02_PICTURE_HINT_1', 'C_02_PICTURE_HINT_2'});
    
    LinkScene(  'area_fireplace',
                'CursorGlass',
                'data/Scenes/02_Dupens_House_Fireplace_HO.lua',
                true);
    
    LinkScene(  'area_exit',
                'CursorRight',
                'data/Scenes/03_Dupens_House_Exit_Main.lua',
                false,
                function()
                    return game_state.exit_door_open;
                end,
                function()
                    ShowMonolog('C_02_NOT_COMPLETED', 'C_02_NOT_COMPLETED');
                end)
    
    zone_chest = CreateZoomZone(  'area_chest',
                                  'CloseZoneChest',
                                  'ZOOM_chest', true,
                                  'shelf',      false,
                                  'kucha',      false,
                                  'area_shelf', true
                               );
    
    zone_book = CreateZoomZone(  'area_book',
                                 'CloseZoneBook',
                                 'ZOOM_book', true);
                                             
    zone_book.on_open = function()
        AddNoteToNotebook('DUPINS_FOYER');
        
        if not HasGameState('ActionCompleted', 'DupensHouseScorpionScatchShown') then
            AddGameState('ActionCompleted', 'DupensHouseScorpionScatchShown')
        end
--        ShowMonolog('C_02_BOOK_OPEN', 'C_02_BOOK_OPEN');
    end
    
    if HasGameState('MiniGameCompleted', '02_Scorpion') or HasGameState('MiniGameCompleted', '02_lock') then
        zone_book.Disable();
    end
    
    zone_candle = CreateZoomZone( 'area_candle',
                                  'CloseZoneCandle',
                                  'ZOOM_candle',        true,
                                  'candle',             false,
                                  'flame',              false,
                                  'podsvechnik_over',   true,
                                  'area_canble_place',  true,
                                  'area_candle_flame',  false
                               );
    zone_candle.on_open = function()
    --[[
        if not game_state.candle_placed then
            ShowMonolog('C_02_CANDLE_EMPTY', 'C_02_CANDLE_EMPTY');
        elseif not game_state.candle_fire then
            ShowMonolog('C_02_CANDLE_NO_FLAME', 'C_02_CANDLE_NO_FLAME');
        end
    --]]
        if game_state.flame then
            game_state.flame:Play();
        end
    end
    
    zone_candle.on_close = function()
        if game_state.flame then
            game_state.flame:Stop();
        end
    end
    
    zone_vase = CreateZoomZone( 'area_vase',
                                'CloseZoneVase',
                                'ZOOM_vase',  true,
                                'area_stone', true,
                                'Fly_anim1',  true,
                                'Fly_anim2',  true,
                                'Fly_anim3',  true,
                                'Fly_anim4',  true,
                                'Fly_anim5',  true,
                                'Fly_anim6',  true,
                                'Fly_anim7',  true,
                                'Fly_anim8',  true);
    
    RegisterMonologObject('area_stone', 'C_02_VASE_ZOOM_HINT');
    
    zone_vase.fly = CreateAnimationsGroup("Fly", 'Fly_anim1', 3,
                                                 'Fly_anim2', 0,
                                                 'Fly_anim3', 0,
                                                 'Fly_anim4', 0,
                                                 'Fly_anim5', 0,
                                                 'Fly_anim6', 3,
                                                 'Fly_anim7', 0,
                                                 'Fly_anim8', 5);
    
    zone_vase.on_open = function()
        AddNoteToNotebook('VASE_BROKEN');
        zone_vase.fly.Play();
    end
    
    zone_vase.on_close = function()
        zone_vase.fly.Stop();
    end
                               
    play_field:GetObject('area_canble_place'):GetAnimation():SetColor('0x01FFFFFF');
    play_field:GetObject('area_candle_flame'):GetAnimation():SetColor('0x01FFFFFF');
                               
    zone_paper = CreateZoomZone( 'area_paper',
                                 'CloseZonePaper',
                                 'ZOOM_paper', true
                                );
    
    play_field:GetObject('area_shelf'):GetAnimation():SetColor('0x01FFFFFF');
    
    RegisterActiveObject('area_shelf',
                         function(obj_name)
                            zone_chest.SetObjectVisible('area_shelf', false);
                            zone_chest.SetObjectVisible('shelf', true);
                            zone_chest.SetObjectVisible('kucha', true);
                            
                            PlaySound('02_OpenCupboard');
                         end,
                         
                         function(obj_name)
                            zone_chest.SetObjectVisible('area_shelf', false);
                            zone_chest.SetObjectVisible('shelf', true);
                            zone_chest.SetObjectVisible('kucha', true);
                         end
                        );
    
    RegisterActiveObject('area_room_door',
                            function(obj_name)
                                play_field:GetObject('area_room_door'):SetVisible(false);
                                play_field:GetObject('area_room'     ):SetVisible(true);
                                play_field:GetObject('door_open'     ):ChangeOpacity(0., 1., 0.5);
                                
                                LinkScene(  'area_room',
                                            'CursorUpLeft',
                                            'data/Scenes/02_Dupens_House_Room.lua',
                                            false,
                                            nil,
                                            nil,
                                            nil);
                                
                                PlaySound('OpenDoor');
                            end,
                            
                            function(obj_name)
                                play_field:GetObject('area_room_door'):SetVisible(false);
                                play_field:GetObject('area_room'     ):SetVisible(true);
                                play_field:GetObject('door_open'     ):SetOpacity(1.);
                                
                                LinkScene(  'area_room',
                                            'CursorUpLeft',
                                            'data/Scenes/02_Dupens_House_Room.lua',
                                            false,
                                            nil,
                                            nil,
                                            nil);
                            end
                            );
                        
    RegisterToolFindInfo('02_lighter_parts', 'kucha',   function(tool_name)
                                                            zone_chest.Disable();
                                                            game_state.lighter_parts_found = true;
                                                            
                                                            if game_state.can_found and (not game_state.lighter_linked) then
                                                                SetLighterZoneEnable()
                                                            end
                                                        end,
                                                        
                                                        function(tool_name)
                                                            play_field:GetObject('area_lighter'):SetVisible(true);
                                                            
                                                            zone_chest.Disable();
                                                            game_state.lighter_parts_found = true;
                                                        end);
    
    RegisterToolFindInfo('02_can', 'gas',               function(tool_name)
                                                            game_state.can_found = true;
                                                            
                                                            if game_state.lighter_parts_found and (not game_state.lighter_linked) then
                                                                SetLighterZoneEnable()
                                                            end
                                                        end,
                                                        
                                                        function(tool_name)
                                                            play_field:GetObject('gas'):SetVisible(false);
                                                            game_state.can_found = true;
                                                        end);
                                                        
    RegisterToolApplyInfo('01_newspaper', 'area_dupen_big', nil,
                                                            nil,
                                                            function(tool_name)
                                                                game_state.newspaper_applied = true;
                                                                
                                                                local dupen_anim = play_field:GetObject('dupen_anim'):GetAnimation();
                                                                
                                                                play_field:GetObject('area_dupen_big'):SetVisible(false);
                                                                play_field:GetObject('newspaper'):SetVisible(true);
                                                                play_field:GetObject('dupen_legs'):SetVisible(true);
                                                                play_field:GetObject('dupen_anim'):SetVisible(true);
                                                                dupen_anim:Play();
                                                                
                                                                TimerDoString('ShowPaperZoom()', GetAnimationLength(dupen_anim), play_field:GetTimer());
                                                                
                                                                HideDupen(ZOOM_ZONE_APPEARING_TIME);
                                                            end,
                                                            
                                                            function(tool_name)
                                                                game_state.newspaper_applied = true;
                                                                
                                                                play_field:GetObject('area_dupen_big'):SetVisible(false);
                                                                play_field:GetObject('newspaper'):SetVisible(true);
                                                                
                                                                if not HasGameState('ActionCompleted', game_state.scene_path..'(paperShown)') then
                                                                    ShowPaperZoom();
                                                                else
                                                                    play_field:GetObject('area_paper'):SetVisible(true);
                                                                    
                                                                    if not game_state.exit_door_open then
                                                                        ShowDupenDialogGO()
                                                                    end
                                                                end
                                                                
                                                            end)
    
    RegisterToolApplyInfo('02_candle', 'area_canble_place', nil,
                                                            nil,
                                                            function(tool_name)
                                                                game_state.candle_placed = true;
                                                                
                                                                zone_candle.SetObjectVisible('candle', true);
                                                                zone_candle.SetObjectVisible('area_candle_flame', true);
                                                                play_field:GetObject('candle_small'):SetVisible(true);
                                                                
                                                                PlaySound('02_CandlePlaced');
                                                                
                                                                RegisterCandleFlame();
                                                            end,
                                                            
                                                            function(tool_name)
                                                                game_state.candle_placed = true;
                                                                
                                                                zone_candle.SetObjectVisible('candle', true);
                                                                zone_candle.SetObjectVisible('area_candle_flame', true);
                                                                play_field:GetObject('candle_small'):SetVisible(true);
                                                                
                                                                RegisterCandleFlame();
                                                            end);
    
    if not HasGameState('ActionCompleted', game_state.scene_path..'(doorClosed)') then
        AddGameState('ActionCompleted', game_state.scene_path..'(doorClosed)');
        
        play_field:GetObject('light_from_door_02'):SetOpacity(1.0);
        local door_anim = play_field:GetObject('door_02_animation'):GetAnimation();
        door_anim:SetFrame(door_anim:GetFrames() - 1);
        
        TimerDoString('CloseDoor()', 1, play_field:GetTimer());
    elseif game_state.exit_door_open then
        local door_anim = play_field:GetObject('door_02_animation'):GetAnimation();
        
        play_field:GetObject('light_from_door_02'):SetOpacity(1.0);
        door_anim:SetFrame(door_anim:GetFrames() - 1);
    end
    
    if game_state.dupen_shown and not game_state.newspaper_applied then
        ShowDupen(0);
    end
    
    if game_state.can_found
        and game_state.lighter_parts_found
        and (not game_state.has_lighter)
    then
        SetLighterZoneEnable();
    end
    
    if not game_state.exit_door_open then
        game_state.ignore_on_highlight['area_exit'] = true;
    end
    
    game_state.flash_time = 0;
    
    --StopCyclicSound('02_Fireplace');
    --PlayCyclicSound('02_Fireplace', 4.);
    
    local value = game_state.scene_path..'(BallCompositionCompleted)'
    
    if not HasGameState('ActionCompleted', value) then
        play_field:GetObject('Vase_layer'   ):SetVisible(false);
        play_field:GetObject('Glass_broken' ):SetVisible(false);
        play_field:GetObject('Vase_broken'  ):SetVisible(false);
    else
        play_field:GetObject('area_vase'):SetVisible(true);
    end
    
    if HasGameState('SceneVisited', 'data/Scenes/02_Dupens_House_Room.lua') then
 --   if game_state.gold_found then
        TimerDoString("RunBallComposition();", 2, play_field:GetTimer());
    end
    
    MakeSoundEntity('02_Fireplace'):Play(true);
end

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

function OnUpdate(dt)
    if not game_state.dupen_shown then
        local completedAll = (game_state.gold_found and game_state.candle_fire and game_state.coin_found and game_state.cutter_part_found);
        
        if completedAll and game_state.locker:GetNReferences() == 0 and game_state.fly_tools:GetNReferences() == 0 then
            ShowDupen(ZOOM_ZONE_APPEARING_TIME);
            
            comics_give_paper = CreateComics('02_give_paper',
                                            CreateComicsFrame('Dupen', 'C_02_GIVE_PAPER')
                                            )
            assert(comics_give_paper)
            comics_give_paper.SetVisible(true)
            
            game_state.dupen_shown = true;
            AddGameState('ActionCompleted', game_state.scene_path..'(DupenShown)');
        end
    end
    
    game_state.flash_time = game_state.flash_time - dt;
    if game_state.flash_time <= 0 then
        game_state.flash_time = 2 + math.random(4);
        RunFlash();
    end
    
    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 game_state.dupen_shown and
        not game_state.newspaper_applied and
        not game_state.comics
    then
        if obj_name == 'Tors'
        or obj_name == 'head_1'
        or obj_name == 'head_2'
        or obj_name == 'area_dupen_big'
        then
            ShowMonolog('C_02_I_MUST_GIVE_PAPER', 'C_02_I_MUST_GIVE_PAPER')
        end
    end
    
    if obj_name == 'ZOOM_candle'
    or obj_name == 'area_canble_place'
    or obj_name == 'area_candle_flame'
    then
        if not game_state.candle_placed then
            ShowMonolog('C_02_CANDLE_EMPTY', 'C_02_CANDLE_EMPTY');
        elseif not game_state.candle_fire then
            ShowMonolog('C_02_CANDLE_NO_FLAME', 'C_02_CANDLE_NO_FLAME');
        end
    end
    
    if obj_name == 'ZOOM_book' then
        ShowMonolog('C_02_BOOK_OPEN', 'C_02_BOOK_OPEN');
    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

function RunBallComposition()
    local value = game_state.scene_path..'(BallCompositionCompleted)'
    
    if not HasGameState('ActionCompleted', value) then
        AddGameState('ActionCompleted', value)
        
        PlaySound('02_StoneFly');
        
        local compos = CreateBallComposition();
        compos:AttachTo( play_field )
        compos:SetZ(103);
        compos:SetDestroysOnEnd(false);
        
       play_field:GetObject('Vase_layer'):SetVisible(true);
       TimerDoString("RunBallCompositionCompleted()", compos:GetDuration() / compos:GetSpeed(), play_field:GetTimer());
    end
end

function RunBallCompositionCompleted()
    play_field:GetObject('Glass_broken' ):SetVisible(false);
    play_field:GetObject('Vase_broken'  ):SetVisible(false);
    
    play_field:GetObject('area_vase'):SetVisible(true);
end

function CreateBallComposition()
    createCompositionfon = function()
    
        local compositionfon      = CreateCompositionSequence();
        local compositionDuration = 0.60606060606061;
        compositionfon:SetDuration(compositionDuration);
        compositionfon:SetSpeed(0.5);
        
        -- Layer Layer_1
        local element = CreateCompositionElement("data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/01.png");
        element:SetName("Layer_1");
        compositionfon:AddElement(element);
        element:SetHotSpot(104, 122.5);
        element:SetParentElement(compositionfon);
        element:SetXY(202, 522.5);
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 0.4040404040404);
        effector:Play();
    
    
        -- Layer Layer_2
        local element = CreateCompositionElement("data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/06.png");
        element:SetName("Layer_2");
        compositionfon:AddElement(element);
        element:SetHotSpot(100, 125.5);
        element:SetParentElement(compositionfon);
        element:SetXY(643, 391);
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0.23232323232323, 0.62626262626263);
        effector:Play();
    
    
        -- Layer Layer_3
        local element = CreateCompositionElement("data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/05.png");
        element:SetName("Layer_3");
        compositionfon:AddElement(element);
        element:SetHotSpot(100, 125.5);
        element:SetParentElement(compositionfon);
        element:SetXY(643, 391);
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 0.62626262626263);
        effector:Play();
    
    
        -- Layer Layer_4
        local element = CreateCompositionElement("data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/st.png");
        element:SetName("Layer_4");
        compositionfon:AddElement(element);
        element:SetHotSpot(71, 30);
        element:SetParentElement(compositionfon);
        element:SetXY(526, 505);
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 0.62626262626263);
        effector:Play();
    
    
        -- Layer Layer_5
        local element = CreateCompositionElement("data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/Glass_anim.png");
        element:SetName("Layer_5");
        compositionfon:AddElement(element);
            element:GetTexture():SetTextureRect(0,0,200,251);
            element:GetTexture():SetFrames(6);
            element:GetTexture():SetSpeed(30);
            element:GetTexture():SetMode(HGEANIM_FWD + HGEANIM_NOLOOP);
            element:GetTexture():Play();
        element:SetHotSpot(100, 125.5);
        element:SetParentElement(compositionfon);
        element:SetXY(643, 391);
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0.03336670003337, 0.23336670003337);
        effector:Play();
    
    
        -- Layer Layer_6
        local element = CreateCompositionElement("data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/kreslo.png");
        element:SetName("Layer_6");
        compositionfon:AddElement(element);
        element:SetHotSpot(81, 120);
        element:SetParentElement(compositionfon);
        element:SetXY(343.006561279297, 499.888717651367);
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 0.62626262626263);
        effector:Play();
    
    
        -- Layer Layer_7
        local element = CreateCompositionElement("data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/Vase_anim.png");
        element:SetName("Layer_7");
        compositionfon:AddElement(element);
            element:GetTexture():SetTextureRect(0,0,208,245);
            element:GetTexture():SetFrames(7);
            element:GetTexture():SetSpeed(30);
            element:GetTexture():SetMode(HGEANIM_FWD + HGEANIM_NOLOOP);
            element:GetTexture():Play();
        element:SetHotSpot(104, 122.5);
        element:SetParentElement(compositionfon);
        element:SetXY(202, 522.5);
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0.4004004004004, 0.62626262626263);
        effector:Play();
   
    
        -- Layer Layer_8
        local element = CreateCompositionElement("data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/kam.png");
        element:SetName("Layer_8");
        compositionfon:AddElement(element);
        element:SetHotSpot(5.5, 5);
        element:SetParentElement(compositionfon);
        element:SetXY(555, 395);
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0.1001001001001, 0.13346680013347);
        effector:Play();
    
    
        -- Layer Layer_9
        local element = CreateCompositionElement("data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/kam.png");
        element:SetName("Layer_9");
        compositionfon:AddElement(element);
        element:SetHotSpot(5.5, 5);
        element:SetParentElement(compositionfon);
        element:SetXY(455.5, 497);
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0.16683350016683, 0.2002002002002);
        effector:Play();
    
    
        -- Layer Layer_10
        local element = CreateCompositionElement("data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/kam.png");
        element:SetName("Layer_10");
        compositionfon:AddElement(element);
        element:SetHotSpot(5.5, 5);
        element:SetParentElement(compositionfon);
        element:SetXY(434, 533);
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0.2002002002002, 0.23356690023357);
        effector:Play();
    
    
        -- Layer Layer_11
        local element = CreateCompositionElement("data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/kam.png");
        element:SetName("Layer_11");
        compositionfon:AddElement(element);
        element:SetHotSpot(5.5, 5);
        element:SetParentElement(compositionfon);
        element:SetXY(424, 511);
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0.23356690023357, 0.26693360026693);
        effector:Play();
    
    
        -- Layer Layer_12
        local element = CreateCompositionElement("data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/kam.png");
        element:SetName("Layer_12");
        compositionfon:AddElement(element);
        element:SetHotSpot(5.5, 5);
        element:SetParentElement(compositionfon);
        element:SetXY(401.5, 492.5);
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0.26693360026693, 0.3003003003003);
        effector:Play();
    
    
        -- Layer Layer_13
        local element = CreateCompositionElement("data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/kam.png");
        element:SetName("Layer_13");
        compositionfon:AddElement(element);
        element:SetHotSpot(5.5, 5);
        element:SetParentElement(compositionfon);
        element:SetXY(351.5, 460);
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0.3003003003003, 0.33366700033367);
        effector:Play();
    
    
        -- Layer Layer_14
        local element = CreateCompositionElement("data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/kam.png");
        element:SetName("Layer_14");
        compositionfon:AddElement(element);
        element:SetHotSpot(5.5, 5);
        element:SetParentElement(compositionfon);
        element:SetXY(300, 446);
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0.33366700033367, 0.36703370036703);
        effector:Play();
    
    
        -- Layer Layer_15
        local element = CreateCompositionElement("data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/kam.png");
        element:SetName("Layer_15");
        compositionfon:AddElement(element);
        element:SetHotSpot(5.5, 5);
        element:SetParentElement(compositionfon);
        element:SetXY(249, 449.5);
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0.36703370036703, 0.4004004004004);
        effector:Play();
    
    
        -- Layer Layer_16
        local element = CreateCompositionElement("data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/kam.png");
        element:SetName("Layer_16");
        compositionfon:AddElement(element);
        element:SetHotSpot(5.5, 5);
        element:SetParentElement(compositionfon);
        element:SetXY(499.5, 447);
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0.13346680013347, 0.16683350016683);
        effector:Play();
        
        
        -- Layer Layer_17
        local element = CreateCompositionElement("data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/Ball_anim.png");
        element:SetName("Layer_17");
        compositionfon:AddElement(element);
            element:GetTexture():SetTextureRect(0,0,90,17);
            element:GetTexture():SetFrames(3);
            element:GetTexture():SetSpeed(30);
            element:GetTexture():SetMode(HGEANIM_FWD + HGEANIM_NOLOOP);
            element:GetTexture():Play();
        element:SetHotSpot(45, 8.5);
        element:SetParentElement(compositionfon);
        element:SetXY(676.5, 323);
        element:SetScaleX(1.06);
        element:SetScaleY(1.13);
        element:SetAngle(-0.41887902);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 0.1);
        effector:Play();
    
        compositionfon:Play();
    
        return compositionfon;
    end
    
    return createCompositionfon();
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/02_Dupens_House/Zone_main/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/Common/area.png',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_exit',anim,838,398,105,0,12,30)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/Layers/gas.png',0,0,58,65,1,0)
	anim:SetHotSpot(29,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('gas',anim,873,603,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/Animations/fire.png',0,0,85,91,10,12)
	anim:SetHotSpot(42,45)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fire',anim,512,436,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/Layers/flash_window.png',0,0,235,266,1,0)
	anim:SetHotSpot(117,133)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('flash_window',anim,616,273,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/Layers/flash_door.png',0,0,246,336,3,0)
	anim:SetHotSpot(123,168)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('flash_door',anim,771,441,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/Layers/light_from_door_01.png',0,0,196,94,1,0)
	anim:SetHotSpot(98,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('light_from_door_01',anim,743,567,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/Layers/light_from_door_02.png',0,0,196,94,1,0)
	anim:SetHotSpot(98,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('light_from_door_02',anim,743,567,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/Animations/door_02_animation.png',0,0,99,277,3,6)
	anim:SetHotSpot(49,138)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('door_02_animation',anim,844,403,103,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_fireplace',anim,505,356,105,0,20,15)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zoom_chest/ZOOM_chest.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('ZOOM_chest',anim,512,384,150,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zoom_chest/shelf.png',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('shelf',anim,512,384,151,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_chest',anim,941,520,106,12,20,5)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zoom_chest/kucha.png',0,0,161,143,1,0)
	anim:SetHotSpot(80,71)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('kucha',anim,518,459,152,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_shelf',anim,517,445,152,-7,52,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_candle',anim,637,432,106,0,5,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_book',anim,550,509,101,0,8,5)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zoom_book/ZOOM_book.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('ZOOM_book',anim,512,384,160,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zoom_candle/ZOOM_candle.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('ZOOM_candle',anim,512,384,170,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/Characters/DupenBG.jpg',0,0,1024,768,1,0)
	anim:SetHotSpot(512,384)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('DupenBG',anim,512,384,180,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/Characters/Tors.png',0,0,635,582,1,0)
	anim:SetHotSpot(317,291)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('Tors',anim,460,477,181,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/Characters/head_1.png',0,0,160,182,1,0)
	anim:SetHotSpot(80,91)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('head_1',anim,388,213,182,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/Characters/head_2.png',0,0,233,533,1,0)
	anim:SetHotSpot(116,266)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('head_2',anim,425,392,183,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_dupen_big',anim,383,434,184,0,50,80)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/Animations/dupen_anim.png',0,0,197,148,4,8)
	anim:SetHotSpot(98,74)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('dupen_anim',anim,375,430,106,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/Characters/dupen_legs.png',0,0,204,174,1,0)
	anim:SetHotSpot(102,87)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('dupen_legs',anim,395,540,106,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zoom_paper/ZOOM_paper.jpg',0,0,1024,768,1,0)
	anim:SetHotSpot(512,384)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('ZOOM_paper',anim,512,384,190,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/Layers/newspaper.png',0,0,68,30,1,0)
	anim:SetHotSpot(34,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('newspaper',anim,484,492,110,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_paper',anim,473,486,111,0,8,5)
	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,339,508,120,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,369,202,121,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_lighter',anim,990,439,101,0,10,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_room',anim,316,364,104,0,20,30)
	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_room_door',anim,314,363,105,0,20,30)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/Layers/door_open.png',0,0,140,244,1,0)
	anim:SetHotSpot(70,122)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('door_open',anim,304,362,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zoom_candle/candle.png',0,0,33,247,1,0)
	anim:SetHotSpot(16,123)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('candle',anim,523,394,181,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('0xFFFFFFFF')
	screen:CreateObject('area_canble_place',anim,520,434,183,0,12,40)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zoom_candle/podsvechnik_over.png',0,0,83,30,1,0)
	anim:SetHotSpot(41,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('podsvechnik_over',anim,520,524,183,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_candle_flame',anim,524,273,184,0,10,10)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/Layers/candle_small.png',0,0,5,33,1,0)
	anim:SetHotSpot(2,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('candle_small',anim,639,430,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zoom_candle/flame.png',0,0,35,145,1,0)
	anim:SetHotSpot(20,126)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('flame',anim,523,273,182,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_flame_small',anim,639,405,105,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_crack',anim,306,111,101,0,18,6)
	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_picture',anim,71,223,101,0,15,30)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/Vase_layer.jpg',0,0,110,121,1,0)
	anim:SetHotSpot(55,60)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Vase_layer',anim,170,448,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/Vase_broken.png',0,0,208,245,1,0)
	anim:SetHotSpot(104,122)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Vase_broken',anim,202,522,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/Effects/06.png',0,0,200,251,1,0)
	anim:SetHotSpot(100,125)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Glass_broken',anim,643,391,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_Dupens_House/Zone_main/ZOOM_vase/ZOOM_vase.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ZOOM_vase',anim,512,384,190,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_vase',anim,187,494,103,0,20,10)
	local anim = CreateAnimation('data/Texture/Scenes/12_Restaurant_Kitchen/Zone_HO/Animations/Fly_anim1.png',0,0,84,68,9,25)
	anim:SetHotSpot(42,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fly_anim1',anim,324,277,191,0,0.8,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/12_Restaurant_Kitchen/Zone_HO/Animations/Fly_anim2.png',0,0,84,68,3,25)
	anim:SetHotSpot(42,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fly_anim2',anim,324,277,191,0,0.8,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/12_Restaurant_Kitchen/Zone_HO/Animations/Fly_anim3.png',0,0,84,68,2,15)
	anim:SetHotSpot(42,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fly_anim3',anim,324,277,191,0,0.8,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/12_Restaurant_Kitchen/Zone_HO/Animations/Fly_anim4.png',0,0,84,68,4,5)
	anim:SetHotSpot(42,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fly_anim4',anim,324,277,191,0,0.8,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/12_Restaurant_Kitchen/Zone_HO/Animations/Fly_anim5.png',0,0,84,68,4,15)
	anim:SetHotSpot(42,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fly_anim5',anim,324,277,191,0,0.8,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/12_Restaurant_Kitchen/Zone_HO/Animations/Fly_anim6.png',0,0,84,68,17,25)
	anim:SetHotSpot(42,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fly_anim6',anim,324,277,191,0,0.8,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/12_Restaurant_Kitchen/Zone_HO/Animations/Fly_anim7.png',0,0,84,68,9,15)
	anim:SetHotSpot(42,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fly_anim7',anim,324,277,191,0,0.8,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/12_Restaurant_Kitchen/Zone_HO/Animations/Fly_anim8.png',0,0,84,68,18,15)
	anim:SetHotSpot(42,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fly_anim8',anim,324,277,191,0,0.8,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/Common/area_circle.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_stone',anim,522,447,191,0,1.5,1.5)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
