loadresource("data\\0\\3\\sh_0002.png","0215",3 );
loadresource("data\\0\\3\\sh_big.png","sh_big",4 );
loadresource("data\\0\\3\\sh_0009.jpg","0222",10);

AddObjForCur()



Book={
305,184,
443,184,
443,480,
305,480
}

addactivobjecttogame(6 ,"sh_big",87,478,"","",0,0,167,395,197,159); --код

addstaticobjecttogame(8 ,"sh_big",16,263,"",0,0,528,395); --старя книга
  speciale_action(2,6);
  speciale_action(2,8)
SetFlagsForSatButtons()
addstaticobjecttogame(3 ,"0215",78 ,2 ,""); --рамка
CloseBtnX,CloseBtnY=Coords(3)
CloseWidth=34
CloseHeight=34

CreateCloseBtn(CloseBtnX,CloseBtnY);
Corners={}
Corners["xl"]=75
Corners["yl"]=0
Corners["xr"]=75+548
Corners["yr"]=0+538+100
CreatePolygon(12,4,"Book")
speciale_action(2,12)

addstaticobjecttogame(4 ,"sh_big",438,1 ,"",0,395,167,466); --открытая дверка2
speciale_action(2,4);
addstaticobjecttogame(5 ,"sh_big",267,5 ,"",528,466,349,452); --приоткрытая дверка2
speciale_action(2,5)

addactivobjecttogame(7 ,"sh_big",283,5 ,"","",0,0,528,0,333,466); --закрытая дверка2
Set_Anim_Cur(7,4);

if flags.shkaf then  
    speciale_action(2,4); 
    speciale_action(2,7);
      speciale_action(2,12);
      Set_Anim_Cur(7,3)
      Set_Anim_Cur(12,2)
  
end;

if flags.books_open then  
        Set_Anim_Cur(12,3)
        speciale_action(2,12)
        speciale_action(2,8)
        speciale_action(2,6)
        Set_Anim_Cur(6,2)
  
end;

addstaticobjecttogame(10,"0222",85 ,8 ,"",0,0,528,518); --шкаф

  if s_obj>0 then
  AddObjToMouse(s_obj)
  s_obj=0
  end;
WaitRender();