WriteToConsole("1___2 \n")

loadresource("data\\1\\2\\tab_all2.png","tab_all2",14);
loadresource("data\\1\\2\\tab_0014.jpg","0237",15);
loadresource("data\\1\\2\\tab_all1.png","tab_all1",3 );


AddObjForCur()

-- Corners={}
-- Corners["xl"]=165
-- Corners["yl"]=144
-- Corners["xr"]=165+492
-- Corners["yr"]=144+477


addstaticobjecttogame(20,"tab_all2",0,0,"",31+493,52+418,142,200)
addstaticobjecttogame(21,"tab_all2",0,0,"",143+31+493,52+418,83,204)
speciale_action(2,20)
speciale_action(2,21)
object=0;
i=0
xg=0;
yg=0;

SetFlagsForSatButtons()
addstaticobjecttogame(3 ,"tab_all2",160,136 ,"",0,418,493,483); --рамка  --168,63
CloseBtnX,CloseBtnY=Coords(3)
CloseWidth=34
CloseHeight=34
CreateCloseBtn(CloseBtnX,CloseBtnY);

addstaticobjecttogame(4 ,"tab_all1",0  ,193,"",0,406,644,418); --целый табурет
speciale_action(2,4);


addactivobjecttogame(5 ,"tab_all2",536,286,"","",0,0,71+493,0+418,105-71,21); --гвоздь1
speciale_action(2,5);
addstaticobjecttogame(6 ,"tab_all2",540,297,"",0+493,0+418,11,14); --шл гв1
speciale_action(2,6);
addactivobjecttogame(7 ,"tab_all2",544,515,"","",0,0,11+493,0+418,41-11,26); --гвоздь2
speciale_action(2,7);
addstaticobjecttogame(8 ,"tab_all2",546,529,"",0+493,14+418,11,28-14); --шл гв2
speciale_action(2,8);
addactivobjecttogame(9 ,"tab_all2",328,534,"","",0,0,41+493,0+418,71-41,26); --гвоздь3
speciale_action(2,9);
addstaticobjecttogame(10,"tab_all2",331,546,"",0+493,28+418,11,42-28); --шл гв3
speciale_action(2,10);

addstaticobjecttogame(12,"tab_all2",306,544,"",0+493,42+418,11,56-42); --шл гв4
speciale_action(2,12);
addstaticobjecttogame(13,"tab_all2",0  ,213,"",0,0,644,418); --табурет собранный
speciale_action(2,13);
addactivobjecttogame(14,"tab_all1",136,225,"","",0,0,0,0,555,406); --табурет лежачий
Set_Anim_Cur(14,4);
addstaticobjecttogame(15,"0237",175,154 ,"",0,0,472,457); --фон
if flags.gvozdi then
  Set_Anim_Cur(14,3);
  speciale_action(2,13);
  speciale_action(2,14);
  speciale_action(2,5);
  Set_Anim_Cur(5,4);
  speciale_action(2,7);
  Set_Anim_Cur(7,4);
  speciale_action(2,9);
  Set_Anim_Cur(9,4);
  speciale_action(2,12);

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