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


location={}
location["photolab"] = true
location["photolab"] = {}
location["photolab"]["id"] = 16
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",105);
	DeleteElement("gr",106);
	DeleteElement("gr",107);	
	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;
	if flags.caseopen then
		AddParticleToObject(27,"Powder",0,0);
		AddParticleToObject(19,"MGlass",0,0);
		AddParticleToObject(21,"Gor",0,0);
		AddParticleToObject(23,"Book",0,0);
		AddParticleToObject(30,"Glass",0,0);
		AddParticleToObject(100,"Note",0,0);								
		MoveEmiter("Powder",588,358);
		MoveEmiter("Book",492,430);
		MoveEmiter("Gor",317,415);
		MoveEmiter("MGlass",589,446);	
		MoveEmiter("Glass",61,417);
		MoveEmiter("Note",717,420);		
		if not flags.minicomplete then
			StartEmiter("Powder");
		end;	
		if not flags.minicomplete3 then
			StartEmiter("Book");
		end;
		if not flags.minicomplete1 then
			StartEmiter("MGlass");
		end;	
		if not flags.minicomplete2 then
			StartEmiter("Gor");
		end;
		if not flags.glass_in then
			StartEmiter("Glass");
		end;
		if not flags.note_in then
			StartEmiter("Note");	
		end;	
	end;
end;


ffingerprint=false;
water=false;
him1=false;
him2=false;
ok=false;

flags={};

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

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

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

flags["inv"]=false;
flags["caseopen"]=false;
flags["handle"]=false;
flags["note"]=false;
flags["wine"]=false;
flags["powder"]=false;

flags["glass"]=false;
flags["levelcomplete"]=false;

flags["newspaperopen"]=false;
flags["line1"]=false;
flags["line2"]=false;
flags["line3"]=false;
flags["glass_in"]=false;
flags["note_in"]=false;
flags["HintCount"]=5;
flags["comics"]=false

add_tree_leaf("Root","photolab",16,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");
	loadresource("data\\photoaparat.png","photoaparat",112121212);
	AddImgToBook("photoaparat",838,580);
	AddHints()
	ShowMenu(false);


dofile("./data/16/0/res.lua");

setcurentleaf("photolab",16,0);
DarkScreen(true);
speciale_action(2,503,true);	
speciale_action(4,503)

playfile(".\\sound\\Music_2.ogg",true,true);