function OnSceneLoad(screen)
    LoadData(screen)
    DefaultOnSceneLoad('data/Scenes/34_Prison_Cell.lua', 'quest')
    
    LoadSound('34_Acid_on_bars', 'data/Sound/34_Prison_Cell/Acid_on_bars.ogg')
    LoadSound('34_Girl_moving_in', 'data/Sound/34_Prison_Cell/Girl_moving_in.ogg')

    play_field:GetObject('Rust_main_2'):SetOpacity(0.)
	play_field:GetObject('acid_smoke'):Hide()
	play_field:GetObject('acid_smoke'):GetAnimation():Stop()
	play_field:GetObject('acid_smoke'):GetAnimation():SetMode(HGEANIM_FWD + HGEANIM_NOLOOP)

	--play_field:GetObject('boy_3'):SetOpacity(0.)
    play_field:GetObject('Layer_Door_Inside'):SetOpacity(0.);
	play_field:GetObject('Layer_Door_Open'):SetOpacity(0.);
	play_field:GetObject('Layer_Door_Light'):SetOpacity(0.);

	ShowGirl()
	
end

function ShowGirl()
    if not HasGameState('ComicsShown', '34_Girl')
    then
        local compos = CreateGirlComposition();
        compos:SetZ(45);
        compos:AttachTo(play_field);
        compos:SetDestroysOnEnd(false);
        play_field.girlCompos = compos;
        TimerDoString("ShowGirlComics()", 9.44, play_field:GetTimer())
        MakeSoundEntity('34_Girl_moving_in'):Play(false);
    else
        RegisterCellZone();
        play_field:GetObject('boy_3'):SetOpacity(0.);
	end
end

function ShowGirlComics()
    local c = CreateComics('34_Girl',
                           CreateComicsFrame('Girl', 'C_34_GIRL', 'Daughter_BIG'))
	assert(c)

	c.on_finish = function()
	
	    play_field:GetObject('boy_3'):ChangeOpacity(1., 0., 0.6, 1.)
			    
	    local eff = CreateAnimationEffector();
	    eff:SetKey(_TRACK_O, 0, 1);
	    eff:SetKey(_TRACK_O, 0.6, 0);
	    eff:AttachTo(play_field.girlCompos);
	    eff:PlayAt(1);
	    
		OnComicsShown()
    end

	c.SetVisible(true)
end

function OnComicsShown()
    RegisterCellZone();
end

function RegisterCellZone()
    zone_cell = CreateZoomZone('area_cell',
                               'CloseZoneCell',
                               'BG_Zoom_Cell', true,
                               'Rusty_lattice_rod', true,
							   'area_rust', true)

	play_field:GetObject('area_rust'):SetMaxOpacity(0.001)

    RegisterMonologObject('Rusty_lattice_rod', 'C_34_RUSTY_CELL')

	play_field:GetObject('Rust_main_2'):SetOpacity(0.)
	play_field:GetObject('area_35'):SetVisible(false);

	RegisterMonologObject('area_cell_door', 'C_34_GATE_WONT_OPEN', true)
	
	RegisterMonologObject('area_rust', 'C_34_RUSTY_CELL')

	local on_apply = function()
		--play_field:GetObject('Layer_Cell_M1'):ChangeOpacity(1., 0., 0.4)
		zone_cell.SetObjectVisible('Rusty_lattice_rod', false)
		play_field:GetObject('Rusty_lattice_rod'):ChangeOpacity(1., 0., 0.4, 0.5)
		TimerDoString("zone_cell.SetVisible(false)", 1.3, play_field:GetTimer())
		--zone_cell.Disable()
		play_field:GetObject('Rust_main_1'):SetOpacity(0.)
		play_field:GetObject('Rust_main_2'):SetOpacity(1.)
		zone_cell.Disable();
		play_field:GetObject('area_35'):SetVisible(true);
		LinkScene('area_35', 'CursorDoorUp', 'data/Scenes/35_Prison_Corridor_Main.lua')
		TimerDoString("ShowMonolog('C_34_MADE_HOLE', 'C_34_MADE_HOLE');", 1.5, play_field:GetTimer());

		play_field:GetObject('acid_smoke'):Show()
		play_field:GetObject('acid_smoke'):GetAnimation():Play()
		play_field:GetObject('acid_smoke'):SetXY(GetMousePos().x, GetMousePos().y)
		
		MakeSoundEntity('34_Acid_on_bars'):Play(false);
	end
	local on_load_when_applied = function()
		--play_field:GetObject('Layer_Cell_M1'):SetOpacity(0.)
		zone_cell.SetObjectVisible('Rusty_lattice_rod', false)
		--zone_cell.Disable()
		play_field:GetObject('Rust_main_1'):SetOpacity(0.)
		play_field:GetObject('Rust_main_2'):SetOpacity(1.)
		zone_cell.Disable();
		play_field:GetObject('area_35'):SetVisible(true);
		LinkScene('area_35', 'CursorDoorUp', 'data/Scenes/35_Prison_Corridor_Main.lua')
	end
	RegisterToolApplyInfo('31_bulb_half', 'area_rust', nil, nil, on_apply, on_load_when_applied)
end

function CreateGirlComposition()

    createCompositionBG_Prison_Cell = function()
    
        local compositionBG_Prison_Cell = CreateCompositionSequence();
        local compositionDuration = 9.44;
        --compositionBG_Prison_Cell:SetDuration(compositionDuration);
    
    
        -- Layer Cell_layer
        local element = CreateCompositionElement("data/Texture/Scenes/34_Prison_Cell/Zone_Main/Layers/Layer_Cell_Far.PNG");
        element:SetName("Cell_layer");
        compositionBG_Prison_Cell:AddElement(element);
        element:SetHotSpot(186.5, 271.5);
        element:SetParentElement(compositionBG_Prison_Cell);
        element:SetXY(186, 497);
    
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 30.25);
    
    
        effector:Play();
    
    
        -- Layer Door_open
        local element = CreateCompositionElement("data/Texture/Scenes/34_Prison_Cell/Zone_Main/Layers/Layer_Door_Open.png");
        element:SetName("Door_open");
        compositionBG_Prison_Cell:AddElement(element);
        element:SetHotSpot(56.5, 116);
        element:SetParentElement(compositionBG_Prison_Cell);
        element:SetXY(550.261871337891, 306.183288574219);
    
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 30.25);
    
        effector:SetKey(_TRACK_O, 0, 0);
        effector:SetKey(_TRACK_O, 1.08, 1);
    
        effector:Play();
    
    
        -- Layer dust_1
        local element = CreateCompositionElement("data/Texture/Scenes/34_Prison_Cell/Zone_Main/Layers/dust.png");
        element:SetName("dust_1");
        compositionBG_Prison_Cell:AddElement(element);
        element:SetHotSpot(100, 100);
        element:SetParentElement(compositionBG_Prison_Cell);
        element:SetScaleX(0.425);
        element:SetScaleY(0.425);
    
        effector = element:GetEffector();
        effector:SetLifeTime(1.2, 33.2650018751621);
    
        effector:SetKey(_TRACK_X, 1.2, 509);
        effector:SetKey(_TRACK_Y, 1.2, 316.5);
        effector:SetKey(_TRACK_X, 1.36961564123631, 405.208336138785);
        effector:SetKey(_TRACK_Y, 1.36961564123631, 331.998476328225);
        effector:SetKey(_TRACK_X, 1.53915314078331, 438.54967436344);
        effector:SetKey(_TRACK_Y, 1.53915314078331, 302.279212754613);
        effector:SetKey(_TRACK_X, 1.70872974395752, 342.060217735018);
        effector:SetKey(_TRACK_Y, 1.70872974395752, 316.558168496312);
        effector:SetKey(_TRACK_X, 2.09038443565369, 316);
        effector:SetKey(_TRACK_Y, 2.09038443565369, 226);
        effector:SetKey(_TRACK_A, 1.2, 0);
        effector:SetKey(_TRACK_A, 1.45442343950272, 1.989675345);
        effector:SetKey(_TRACK_A, 1.62403909564018, 5.1138147025);
        effector:SetKey(_TRACK_A, 1.96323127746582, 10.26253599);
        effector:SetKey(_TRACK_O, 1.2, 0);
        effector:SetKey(_TRACK_O, 1.36961564123631, 0.26948787849376);
        effector:SetKey(_TRACK_O, 1.75127034732951, 0.26948787849376);
        effector:SetKey(_TRACK_O, 2.09038443565369, 0);
    
        effector:Play();
    
    
        -- Layer dust_2
        local element = CreateCompositionElement("data/Texture/Scenes/34_Prison_Cell/Zone_Main/Layers/dust.png");
        element:SetName("dust_2");
        compositionBG_Prison_Cell:AddElement(element);
        element:SetHotSpot(100, 100);
        element:SetParentElement(compositionBG_Prison_Cell);
        element:SetScaleX(0.425);
        element:SetScaleY(0.425);
    
        effector = element:GetEffector();
        effector:SetLifeTime(1.12, 33.1850018751621);
    
        effector:SetKey(_TRACK_X, 1.12, 494.5);
        effector:SetKey(_TRACK_Y, 1.12, 353.5);
        effector:SetKey(_TRACK_X, 1.28961563110352, 390.708336138785);
        effector:SetKey(_TRACK_Y, 1.28961563110352, 368.998476328225);
        effector:SetKey(_TRACK_X, 1.45915314078331, 424.04967436344);
        effector:SetKey(_TRACK_Y, 1.45915314078331, 339.279212754613);
        effector:SetKey(_TRACK_X, 1.62872970104218, 327.560217735018);
        effector:SetKey(_TRACK_Y, 1.62872970104218, 353.558168496312);
        effector:SetKey(_TRACK_X, 2.01038443565369, 301.5);
        effector:SetKey(_TRACK_Y, 2.01038443565369, 263);
        effector:SetKey(_TRACK_A, 1.12, 0);
        effector:SetKey(_TRACK_A, 1.37442343950272, 1.989675345);
        effector:SetKey(_TRACK_A, 1.54403909564018, 5.1138147025);
        effector:SetKey(_TRACK_A, 1.88323127746582, 10.26253599);
        effector:SetKey(_TRACK_O, 1.12, 0);
        effector:SetKey(_TRACK_O, 1.28961563110352, 0.26948787849376);
        effector:SetKey(_TRACK_O, 1.6712703704834, 0.26948787849376);
        effector:SetKey(_TRACK_O, 2.01038443565369, 0);
    
        effector:Play();
    
    
        -- Layer dust_3
        local element = CreateCompositionElement("data/Texture/Scenes/34_Prison_Cell/Zone_Main/Layers/dust.png");
        element:SetName("dust_3");
        compositionBG_Prison_Cell:AddElement(element);
        element:SetHotSpot(100, 100);
        element:SetParentElement(compositionBG_Prison_Cell);
        element:SetScaleX(0.425);
        element:SetScaleY(0.425);
    
        effector = element:GetEffector();
        effector:SetLifeTime(1, 33.0650018751621);
    
        effector:SetKey(_TRACK_X, 1, 509);
        effector:SetKey(_TRACK_Y, 1, 316.5);
        effector:SetKey(_TRACK_X, 1.16961564123631, 405.208336138785);
        effector:SetKey(_TRACK_Y, 1.16961564123631, 331.998476328225);
        effector:SetKey(_TRACK_X, 1.33915314078331, 438.54967436344);
        effector:SetKey(_TRACK_Y, 1.33915314078331, 302.279212754613);
        effector:SetKey(_TRACK_X, 1.5087296962738, 342.060217735018);
        effector:SetKey(_TRACK_Y, 1.5087296962738, 316.558168496312);
        effector:SetKey(_TRACK_X, 1.89038443565369, 316);
        effector:SetKey(_TRACK_Y, 1.89038443565369, 226);
        effector:SetKey(_TRACK_A, 1, 0);
        effector:SetKey(_TRACK_A, 1.25442343950272, 1.989675345);
        effector:SetKey(_TRACK_A, 1.42403909564018, 5.1138147025);
        effector:SetKey(_TRACK_A, 1.76323127746582, 10.26253599);
        effector:SetKey(_TRACK_O, 1, 0);
        effector:SetKey(_TRACK_O, 1.16961564123631, 0.26948787849376);
        effector:SetKey(_TRACK_O, 1.55127034732951, 0.26948787849376);
        effector:SetKey(_TRACK_O, 1.89038443565369, 0);
    
        effector:Play();
    
    
        -- Layer dust_4
        local element = CreateCompositionElement("data/Texture/Scenes/34_Prison_Cell/Zone_Main/Layers/dust.png");
        element:SetName("dust_4");
        compositionBG_Prison_Cell:AddElement(element);
        element:SetHotSpot(100, 100);
        element:SetParentElement(compositionBG_Prison_Cell);
        element:SetScaleX(0.425);
        element:SetScaleY(0.425);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0.92, 32.9850018751621);
    
        effector:SetKey(_TRACK_X, 0.92, 494.5);
        effector:SetKey(_TRACK_Y, 0.92, 353.5);
        effector:SetKey(_TRACK_X, 1.0896155834198, 390.708336138785);
        effector:SetKey(_TRACK_Y, 1.0896155834198, 368.998476328225);
        effector:SetKey(_TRACK_X, 1.25915314078331, 424.04967436344);
        effector:SetKey(_TRACK_Y, 1.25915314078331, 339.279212754613);
        effector:SetKey(_TRACK_X, 1.42872977256775, 327.560217735018);
        effector:SetKey(_TRACK_Y, 1.42872977256775, 353.558168496312);
        effector:SetKey(_TRACK_X, 1.81038443565369, 301.5);
        effector:SetKey(_TRACK_Y, 1.81038443565369, 263);
        effector:SetKey(_TRACK_A, 0.92, 0);
        effector:SetKey(_TRACK_A, 1.17442343950272, 1.989675345);
        effector:SetKey(_TRACK_A, 1.34403909564018, 5.1138147025);
        effector:SetKey(_TRACK_A, 1.68323127746582, 10.26253599);
        effector:SetKey(_TRACK_O, 0.92, 0);
        effector:SetKey(_TRACK_O, 1.0896155834198, 0.26948787849376);
        effector:SetKey(_TRACK_O, 1.47127034732951, 0.26948787849376);
        effector:SetKey(_TRACK_O, 1.81038443565369, 0);
    
        effector:Play();
    
    
        -- Layer dust_5
        local element = CreateCompositionElement("data/Texture/Scenes/34_Prison_Cell/Zone_Main/Layers/dust.png");
        element:SetName("dust_5");
        compositionBG_Prison_Cell:AddElement(element);
        element:SetHotSpot(100, 100);
        element:SetParentElement(compositionBG_Prison_Cell);
        element:SetScaleX(0.425);
        element:SetScaleY(0.425);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0.8, 32.8650018751621);
    
        effector:SetKey(_TRACK_X, 0.8, 509);
        effector:SetKey(_TRACK_Y, 0.8, 316.5);
        effector:SetKey(_TRACK_X, 0.96961564123631, 405.208336138785);
        effector:SetKey(_TRACK_Y, 0.96961564123631, 331.998476328225);
        effector:SetKey(_TRACK_X, 1.13915314078331, 438.54967436344);
        effector:SetKey(_TRACK_Y, 1.13915314078331, 302.279212754613);
        effector:SetKey(_TRACK_X, 1.30872976779938, 342.060217735018);
        effector:SetKey(_TRACK_Y, 1.30872976779938, 316.558168496312);
        effector:SetKey(_TRACK_X, 1.69038443565369, 316);
        effector:SetKey(_TRACK_Y, 1.69038443565369, 226);
        effector:SetKey(_TRACK_A, 0.8, 0);
        effector:SetKey(_TRACK_A, 1.05442343950272, 1.989675345);
        effector:SetKey(_TRACK_A, 1.22403909564018, 5.1138147025);
        effector:SetKey(_TRACK_A, 1.56323127746582, 10.26253599);
        effector:SetKey(_TRACK_O, 0.8, 0);
        effector:SetKey(_TRACK_O, 0.96961564123631, 0.26948787849376);
        effector:SetKey(_TRACK_O, 1.35127034732951, 0.26948787849376);
        effector:SetKey(_TRACK_O, 1.69038443565369, 0);
    
        effector:Play();
    
    
        -- Layer dust_6
        local element = CreateCompositionElement("data/Texture/Scenes/34_Prison_Cell/Zone_Main/Layers/dust.png");
        element:SetName("dust_6");
        compositionBG_Prison_Cell:AddElement(element);
        element:SetHotSpot(100, 100);
        element:SetParentElement(compositionBG_Prison_Cell);
        element:SetScaleX(0.425);
        element:SetScaleY(0.425);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0.72, 32.7850018751621);
    
        effector:SetKey(_TRACK_X, 0.72, 494.5);
        effector:SetKey(_TRACK_Y, 0.72, 353.5);
        effector:SetKey(_TRACK_X, 0.88961565494537, 390.708336138785);
        effector:SetKey(_TRACK_Y, 0.88961565494537, 368.998476328225);
        effector:SetKey(_TRACK_X, 1.05915314078331, 424.04967436344);
        effector:SetKey(_TRACK_Y, 1.05915314078331, 339.279212754613);
        effector:SetKey(_TRACK_X, 1.22872972488403, 327.560217735018);
        effector:SetKey(_TRACK_Y, 1.22872972488403, 353.558168496312);
        effector:SetKey(_TRACK_X, 1.61038443565369, 301.5);
        effector:SetKey(_TRACK_Y, 1.61038443565369, 263);
        effector:SetKey(_TRACK_A, 0.72, 0);
        effector:SetKey(_TRACK_A, 0.97442343950272, 1.989675345);
        effector:SetKey(_TRACK_A, 1.14403909564018, 5.1138147025);
        effector:SetKey(_TRACK_A, 1.48323127746582, 10.26253599);
        effector:SetKey(_TRACK_O, 0.72, 0);
        effector:SetKey(_TRACK_O, 0.88961565494537, 0.26948787849376);
        effector:SetKey(_TRACK_O, 1.27127034732951, 0.26948787849376);
        effector:SetKey(_TRACK_O, 1.61038443565369, 0);
    
        effector:Play();
    
    
        -- Layer Girl_1
        local element = CreateCompositionElement("data/Texture/Scenes/34_Prison_Cell/Zone_Main/Characters/Daughter/Daughter_3.png");
        element:SetName("Girl_1");
        compositionBG_Prison_Cell:AddElement(element);
        element:SetHotSpot(175, 202.5);
        element:SetParentElement(compositionBG_Prison_Cell);
        element:SetXY(205.259017944336, 423.072128295898);
    
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
    
        effector = element:GetEffector();
        effector:SetLifeTime(6.24, 37.45);
    
        effector:SetKey(_TRACK_O, 6.44, 0);
        effector:SetKey(_TRACK_O, 6.96, 1);
    
        effector:Play();
    
    
        -- Layer Girl_hand
        local element = CreateCompositionElement("data/Texture/Scenes/34_Prison_Cell/Zone_Main/Characters/Daughter/Daughter_hand.png");
        element:SetName("Girl_hand");
        compositionBG_Prison_Cell:AddElement(element);
        element:SetHotSpot(2.5, 18);
        element:SetParentElement(compositionBG_Prison_Cell);
        element:SetXY(218.5, 310);
    
        element:SetScaleX(1);
        element:SetScaleY(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(6.24, 29.77);
    
        effector:SetKey(_TRACK_A, 7.32, 1.5497210761091);
        effector:SetKey(_TRACK_A, 7.4108984375, 1.51280831679303);
        effector:SetKey(_TRACK_A, 7.5018359375, 1.37988741154477);
        effector:SetKey(_TRACK_A, 7.592734375, 1.11711118125869);
        effector:SetKey(_TRACK_A, 7.6836328125, 0.74717918953197);
        effector:SetKey(_TRACK_A, 7.77453125, 0.40369226900928);
        effector:SetKey(_TRACK_A, 7.86546875, 0.17490472290174);
        effector:SetKey(_TRACK_A, 7.9563671875, 0.05117338306284);
        effector:SetKey(_TRACK_A, 8.047265625, 0.00319796643746);
        effector:SetKey(_TRACK_A, 8.08, 0);
        effector:SetKey(_TRACK_O, 6.44, 0);
        effector:SetKey(_TRACK_O, 6.96, 1);
    
        effector:Play();
    
    
        -- Layer Girl_2
        local element = CreateCompositionElement("data/Texture/Scenes/34_Prison_Cell/Zone_Main/Characters/Daughter/Daughter_2.png");
        element:SetName("Girl_2");
        compositionBG_Prison_Cell:AddElement(element);
        element:SetHotSpot(114, 138);
        element:SetParentElement(compositionBG_Prison_Cell);
        element:SetXY(254, 393);
    
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
    
        effector = element:GetEffector();
        effector:SetLifeTime(4.28, 35.53);
    
        effector:SetKey(_TRACK_O, 4.4, 0);
        effector:SetKey(_TRACK_O, 4.88, 1);
        effector:SetKey(_TRACK_O, 6.44, 1);
        effector:SetKey(_TRACK_O, 6.96, 0);
    
        effector:Play();
    
    
        -- Layer Girl_3
        local element = CreateCompositionElement("data/Texture/Scenes/34_Prison_Cell/Zone_Main/Characters/Daughter/Daughter_1.png");
        element:SetName("Girl_3");
        compositionBG_Prison_Cell:AddElement(element);
        element:SetHotSpot(81.5, 86);
        element:SetParentElement(compositionBG_Prison_Cell);
        element:SetXY(439, 340);
    
        element:SetScaleX(1.06976744186047);
        element:SetScaleY(1.06976744186047);
        element:SetAngle(0);
    
        effector = element:GetEffector();
        effector:SetLifeTime(2.96, 33.69);
    
        effector:SetKey(_TRACK_O, 3.16, 0);
        effector:SetKey(_TRACK_O, 3.6, 1);
        effector:SetKey(_TRACK_O, 4.4, 1);
        effector:SetKey(_TRACK_O, 4.88, 0);
    
        effector:Play();
    
    
        -- Layer Girl_4
        local element = CreateCompositionElement("data/Texture/Scenes/34_Prison_Cell/Zone_Main/Characters/Daughter/Daughter_1.png");
        element:SetName("Girl_4");
        compositionBG_Prison_Cell:AddElement(element);
        element:SetHotSpot(81.5, 86);
        element:SetParentElement(compositionBG_Prison_Cell);
        element:SetXY(484, 334);
    
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
    
        effector = element:GetEffector();
        effector:SetLifeTime(1.8, 32.05);
    
        effector:SetKey(_TRACK_O, 1.92, 0);
        effector:SetKey(_TRACK_O, 2.36, 1);
        effector:SetKey(_TRACK_O, 3.16, 1);
        effector:SetKey(_TRACK_O, 3.6, 0);
    
        effector:Play();
    
    
        -- Layer Door_light
        local element = CreateCompositionElement("data/Texture/Scenes/34_Prison_Cell/Zone_Main/Layers/Layer_Door_Light.png");
        element:SetName("Door_light");
        compositionBG_Prison_Cell:AddElement(element);
        element:SetHotSpot(145.5, 127);
        element:SetParentElement(compositionBG_Prison_Cell);
        element:SetXY(460.316696166992, 306.94026184082);
    
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 30.25);
    
        effector:SetKey(_TRACK_O, 0.56, 0);
        effector:SetKey(_TRACK_O, 1.52, 1);
    
        effector:Play();
    
    
        -- Layer Door_behind
        local element = CreateCompositionElement("data/Texture/Scenes/34_Prison_Cell/Zone_Main/Layers/Layer_Door_Inside.png");
        element:SetName("Door_behind");
        compositionBG_Prison_Cell:AddElement(element);
        element:SetHotSpot(30, 100);
        element:SetParentElement(compositionBG_Prison_Cell);
        element:SetXY(511.567108154297, 302.926345825195);
    
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 30.25);
    
        effector:SetKey(_TRACK_O, 0, 0);
        effector:SetKey(_TRACK_O, 1.08, 1);
    
        effector:Play();
    
        compositionBG_Prison_Cell:Play();
    
        return compositionBG_Prison_Cell;
    end
    
    return createCompositionBG_Prison_Cell();

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/34_Prison_Cell/Zone_Main/Layers/BG_Prison_Cell.jpg',0,0,1024,768,1,0)
	anim:SetHotSpot(512,384)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('BG_Prison_Cell',anim,512,384,40,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_Prison_Cell/Zone_Main/Layers/Layer_Cell_Door_Closed.png',0,0,236,555,1,0)
	anim:SetHotSpot(108,256)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_Cell_Door_Closed',anim,439,326,55,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_Prison_Cell/Zone_Main/Layers/Layer_Cell_Far.PNG',0,0,373,543,1,0)
	anim:SetHotSpot(186,271)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_Cell_Far',anim,186,496,51,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_Prison_Cell/Zone_Main/Layers/Layer_Door_Open.png',0,0,113,232,1,0)
	anim:SetHotSpot(56,116)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_Door_Open',anim,550,308,50,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_Prison_Cell/Zone_Main/Layers/Layer_Door_Inside.png',0,0,60,200,1,0)
	anim:SetHotSpot(30,100)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_Door_Inside',anim,510,302,52,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_Prison_Cell/Zone_Main/Layers/Layer_Door_Light.png',0,0,291,254,1,0)
	anim:SetHotSpot(145,127)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_Door_Light',anim,460,308,53,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_Prison_Cell/Zone_Main/Layers/dust.png',0,0,200,200,1,0)
	anim:SetHotSpot(100,100)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('dust',anim,943,659,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('0x00FFFFFF')
	screen:CreateObject('area_door',anim,541,305,54,0,15,25)
	local anim = CreateAnimation('data/Texture/Scenes/34_Prison_Cell/Zone_Main/Characters/Boy/boy_3.png',0,0,271,393,1,0)
	anim:SetHotSpot(135,196)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('boy_3',anim,691,567,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_Prison_Cell/Zone_Main/Characters/Boy/BG_Boy_Big.JPG',0,0,1024,768,1,0)
	anim:SetHotSpot(512,384)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('BG_Boy_Big',anim,512,384,120,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_Prison_Cell/Zone_Main/Characters/Daughter/Daughter_BIG.jpg',0,0,1024,768,1,0)
	anim:SetHotSpot(512,384)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('Daughter_BIG',anim,512,384,120,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_door',anim,435,343,100,0,20,50)
	local anim = CreateAnimation('data/Texture/Scenes/34_Prison_Cell/Zone_Main/Zoom_Cell/BG_Zoom_Cell.JPG',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('BG_Zoom_Cell',anim,512,384,150,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_Prison_Cell/Zone_Main/Zoom_Cell/Rusty_lattice_rod.png',0,0,105,518,1,0)
	anim:SetHotSpot(52,259)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('Rusty_lattice_rod',anim,506,391,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('0x01FFFFFF')
	screen:CreateObject('area_cell',anim,707,400,95,0,10,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_35',anim,707,400,96,0,10,20)
	local anim = CreateAnimation('data/Texture/Scenes/34_Prison_Cell/Zone_Main/Layers/Rust_main_1.png',0,0,86,279,1,0)
	anim:SetHotSpot(43,139)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Rust_main_1',anim,707,419,90,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/34_Prison_Cell/Zone_Main/Layers/Rust_main_2.png',0,0,86,279,1,0)
	anim:SetHotSpot(43,139)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Rust_main_2',anim,708,410,90,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/31_Draw_Well/Zone_Main/Animations/dim.png',0,0,37,207,12,12)
	anim:SetHotSpot(16,207)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('acid_smoke',anim,337,560,200,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_rust',anim,519,388,155,0,20,50)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
