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


location={}
location["black_rose"] = true
location["black_rose"] = {}
location["black_rose"]["id"] = 10
location["black_rose"]["sub_id"] = 0


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

function LevelComplete()
	flags.levelcomplete=true;
	DeleteElement("gr",19);
	DeleteElement("gr",26);
	DeleteElement("gr",25);
	DeleteElement("gr",55);
	DarkScreen(true);
	ShowMenu(false);
end;

function StartLevel()

	if flags.handle and not flags.minicomplete then	
		AddParticleToObject(53,"Handle",0,0);
		StartEmiter("Handle");
		MoveEmiter("Handle",232,285);	
	end;
	if not flags.mirror then
		AddParticleToObject(5,"Switch",0,0);
		StartEmiter("Switch");
		MoveEmiter("Switch",246,322);	
		AddParticleToObject(64,"TT",0,0);
		StartEmiter("TT");
		MoveEmiter("TT",67,270)
		AddParticleToObject(3,"Lamp",0,0);
		StartEmiter("Lamp");
		MoveEmiter("Lamp",653,152)	
	end;
	if not flags.water then
		AddParticleToObject(1,"Water",0,0);
		StartEmiter("Water");
		MoveEmiter("Water",268,501)		
	end;	
end;


flags={};
flags["whole_darkness"]=false;
flags["minicomplete"]=false;
flags["stand"]=false;
flags["handle"]=false;
flags["on"]=false
flags["lamp"]=false;
flags["clean"]=false;
flags["mirror"]=false;
flags["water"]=false;
flags["levelcomplete"]=false;
flags["HintCount"]=5;
flags["comics"]=false
add_tree_leaf("Root","black_rose",10,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/10/0/res.lua");


setcurentleaf("black_rose",10,0);
SwitchToSheet("re");
DarkScreen(true);
speciale_action(2,503,true);
speciale_action(4,503)

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