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


location={}
location["photolab"] = true
location["photolab"] = {}
location["photolab"]["id"] = 11
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",106);	
	frame=0;
	add_free_leaf("comics",11,50);
	dofile("./data/11/50/res.lua");
	set_satelite_leaf("photolab");
	dofile("data\\11\\50\\level.lua");
	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(30,"Glass",0,0);			
		MoveEmiter("Powder",588,358);
		MoveEmiter("Glass",61,417);			
		if not flags.minicomplete then
			StartEmiter("Powder");
		end;
		if not flags.glass_in then
			StartEmiter("Glass");		
		end;	
	end;	
end;

frame=0;

ffingerprint=false;
flags={};

flags["whole_darkness"]=false;
flags["minicomplete"]=false;
flags["minirun"]=false;
flags["minitext"]=false;
flags["inv"]=false;
flags["caseopen"]=false;
flags["hanlde"]=false;
flags["powder"]=false;
flags["glass_in"]=false;
flags["levelcomplete"]=false;
flags["comics"]=false
flags["HintCount"]=5;
add_tree_leaf("Root","photolab",11,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()
dofile("./data/11/0/res.lua");


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

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