dofile("script\\gamemenu.lua");
dofile("script\\lib.lua");
set_inpun_fun("gameinput");

location={}
location["photolab"] = true
location["photolab"] = {}
location["photolab"]["id"] = 4
location["photolab"]["sub_id"] = 0

function LoadingLevel(param)
    SetAlfaValue(501,0)
	SetAlfaValue(503,0)
	SLevel=param;
return;end;

function LevelComplete()
    flags.levelcomplete=true;
	DeleteElement("gr",101);
	DeleteElement("gr",102);
	DeleteElement("gr",103);
	DeleteElement("gr",104);
	DeleteElement("gr",105);
	DeleteElement("gr",106);	
	DarkScreen(true);
	ShowMenu(false);
end;

function StartLevel()
	AddParticleToObject(37,"water",0,0,0,0);
	AddParticleToObject(35,"probirka_b",0,0,0,0);
	AddParticleToObject(36,"probirka_y",0,0,0,0);
	AddParticleToObject(41,"banka",0,0,0,0);			
	StartEmiter("water");
	MoveEmiter("water",126,391);			
	StartEmiter("probirka_b");
	MoveEmiter("probirka_b",202,283);
	StartEmiter("probirka_y");
	MoveEmiter("probirka_y",365,183);
	StartEmiter("banka");
	MoveEmiter("banka",400,189);	
	if not flags.caseopen then
		AddParticleToObject(9,"Bag",0,0);
		StartEmiter("Bag");
		MoveEmiter("Bag",213,474);		
	end;
	AddParticleToObject(27,"Powder",0,0);
	AddParticleToObject(23,"Book",0,0);
	AddParticleToObject(14,"Micro",0,0);
	AddParticleToObject(30,"Glass",0,0);
	AddParticleToObject(40,"Ash",0,0);	
	AddParticleToObject(34,"Sigin",0,0);		
	MoveEmiter("Powder",588,358);
	MoveEmiter("Book",600,426);
	MoveEmiter("Micro",430,420);	
	MoveEmiter("Glass",61,417);
	MoveEmiter("Ash",685,211);
	MoveEmiter("Sigin",568,415);		
	if flags.caseopen then
		if not flags.minicomplete then	
			StartEmiter("Powder");
		end;
		if not flags.minicomplete2 then
			StartEmiter("Book");
		end;
		if not flags.minicomplete1 then
			StartEmiter("Micro");
		end;
		if not flags.glass_in then
			StartEmiter("Glass");
		end;
		if not flags.ash_in then
			StartEmiter("Ash");		
		end;
		if not flags.sig_in then
			StartEmiter("Sigin");		
		end;	
	end;	
end;

flags={};

flags["whole_darkness"]=false;
flags["minicomplete"]=false;
flags["minicomplete1"]=false;
flags["minicomplete2"]=false;

flags["minitext1"]=false;
flags["minitext2"]=false;
flags["minitext3"]=false;

flags["minirun1"]=false;
flags["minirun2"]=false;
flags["minirun3"]=false;

flags["inv"]=false;
flags["caseopen"]=false;
flags["hanlde"]=false;
flags["ashes"]=false;
flags["ash_in"]=false;
flags["glass_in"]=false;
flags["sig_in"]=false;
flags["powder"]=false;
flags["HintCount"]=5;
flags["comics"]=false
add_tree_leaf("Root","photolab",4,0);-- Добавляет лист в дерево 
	SetCurrentRM("menu");
		addstaticobjecttogame(877777777,"menubuttons",63,622,"",60,0,61,61);
		AddSheet(1002,"re","red_b",63,622,61,61,"",128,640,650,115,15,5,7,7,0,59,877777777);	
	SetCurrentRM("main");
	ShowMenu(false);
loadresource("data\\photoaparat.png","photoaparat",112121212);
AddImgToBook("photoaparat",838,580);
AddHints()
dofile("./data/4/0/res.lua");

BlockCursor(true);
setcurentleaf("photolab",4,0);
DarkScreen(true);
speciale_action(2,503,true);	
speciale_action(4,503)	
playfile(".\\sound\\Music_2.ogg",true,true);