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


location={}
location["mother_room"] = true
location["mother_room"] = {}
location["mother_room"]["id"] = 18
location["mother_room"]["sub_id"] = 0


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

function LevelComplete()
	flags.levelcomplete=true;
		DeleteElement("gr",11);
		DeleteElement("gr",100);
		DeleteElement("gr",17);
		DeleteElement("gr",13);		
		DeleteElement("gr",23);
		DeleteElement("gr",65);
		DeleteElement("gr",48);
		DeleteElement("gr",52);
		DeleteElement("gr",54);
	DarkScreen(true);
	ShowMenu(false);
end;
function StartLevel()
	if not flags.minicomplete then
		AddParticleToObject(62,"Mirror",0,0);
		StartEmiter("Mirror");
		MoveEmiter("Mirror",69,408);	
	end;	
	if not flags.wardrobe then	
		AddParticleToObject(59,"Aqua",0,0);
		StartEmiter("Aqua");
		MoveEmiter("Aqua",775,340)	
	end;	
	if not flags.map then	
		AddParticleToObject(52,"Map",0,0);
		StartEmiter("Map");
		MoveEmiter("Map",852,84)	
	end;	
end;


flags={};
flags["whole_darkness"]=false;
flags["minicomplete"]=false;
flags["minicomplete1"]=false;
flags["minicomplete2"]=false;
flags["chair"]=false;
flags["spool"]=false;
flags["cane"]=false;
flags["earring"]=false;
flags["map"]=false;
flags["newspaper"]=false;
flags["all"]=false;
flags["minitext1"]=false;
flags["minirun2"]=false;
flags["wardrobe"]=false;
flags["HintCount"]=5;
flags["comics"]=false
add_tree_leaf("Root","mother_room",18,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/18/0/res.lua");

setcurentleaf("mother_room",18,0);
SwitchToSheet("re");

DarkScreen(true);
speciale_action(2,503,true);
speciale_action(4,503)

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