dofile("script\\gamemenu.lua");
dofile("script\\lib.lua");
set_inpun_fun("gameinput");
location={}
location["bob"] = true
location["bob"] = {}
location["bob"]["id"] = 23
location["bob"]["sub_id"] = 0
function LevelComplete()
  -- if not flags.impress then
    -- AddElement("gr",129);
    -- MoveObjectToTree(129);
    -- flags.impress = true;
     -- LevelComplete();
  -- return;end;
  if not flags.doc then
    AddElement("gr",130);
    MoveObjectToTree(130);
    flags.doc=true;
    LevelComplete();
  return;end;  
  if not flags.money then
  speciale_action(2,131)
    AddElement("gr",131);
    MoveObjectToTree(131);
    flags.money=true;
    LevelComplete();
  return;end;
  DeleteElement("gr",116);
  flags.levelcomplete=true;
    whole_darkness=false;
  DarkScreen(true);
  ShowMenu(false)
end;
function LoadingLevel(param)
SetAlfaValue(503,0);
     SLevel=param;
return;end;
flags={};
flags["comx"]=false;
flags["comx1"]=false;
flags["minicomplete"]=false;
flags["minicomplete1"]=false;
flags["minicomplete2"]=false;
skip= false;

flags["money"]=false;
flags["doc"]=false;
flags["impress"]=false;
flags["levelcomplete"]= false;
flags["nohints"]=false;
flags["HintCount"]=5;
flags["collected"]= false;
flags["Blocking"]= false;
flags["Blocking2"]= false;
flags["migalka"]= false;
flags["arest"]= false;
flags["maping"]= false;
flags["endmap"]= false;
flags["maincomics"]= false;
flags["doexal"]= false;
flags["first"]= true;
flags["skip123"]= false;
add_tree_leaf("Root","bob",23,0);

  addstaticobjecttogame(877777777,"buttons",114,625,"",60,0,61,61);
  SetCurrentRM("menu");
  AddSheet(1002,"re","red_b",103,656,37,41,"",99,657,650,80,92,21,5,5,0,59,877777777,nil,"buttonsY");
  SetCurrentRM("main");
loadresource("data\\photoaparat.png","photoaparat",2000029);
loadresource("data\\animationMENU3.png","menuAn",2000030);
AddImgToBook("photoaparat",821,637);
AddHints()
dofile("./data/23/0/res.lua");
setcurentleaf("bob",23,0);
WaitRender()
flags.comx= true


ShowMenu(false);
playfile(".\\sound\\game_theme2.ogg",true,true);
function StartLevel()
  DarkScreen(false);
  SetCurrentRM("menu");
  AddImgToBook("photoaparat",821,637);
  AddHints()
  SetCurrentRM("main");
  ShowMenu(true);
  if not flags.endcomics then
    speciale_action(2,800);
    Set_Cursor(800,1);
    AddParticleToObject(800,"lebedka",553,259);
    MoveEmiter("lebedka",553,259);
    if not flags.minicomplete131 then
    StartEmiter("lebedka"); 
    end;
    flags.endcomics= true;
    end;

AddParticleToObject(555,"doc",907,536);
MoveEmiter("doc",907,536);
if (not flags.minicomplete8) then
  StartEmiter("doc");
end;
    if not flags.minicomplete131 then
    StartEmiter("lebedka"); 
    end;
    
-- if (not flags.minicomplete43) then
-- StartEmiter("Svet2");
-- end;
end