loadresource("data\\3\\1\\0004.png","derevo_5" ,5 );
loadresource("data\\3\\1\\0007.png","derevo_8" ,8 );
loadresource("data\\3\\1\\0008.png","derevo_14",10);
loadresource("data\\3\\1\\derevo.png","derevo" ,8 );
loadresource("data\\3\\1\\0009.jpg","derevo_10",10);
loadresource("data\\inventary\\provo_cel.png","provolka",11);

--set_activ_free_leaf("derevo");
AddObjForCur()

-- Corners={}
-- Corners["xl"]=154
-- Corners["yl"]=50
-- Corners["xr"]=154+786
-- Corners["yr"]=50+541

Raspil={
164+160,60+251,
164+160+239,60+251,
164+160+239,60+251+202,
164+160,60+251+202,
}

addstaticobjecttogame( 5,"derevo_5" ,155,53 ,""); --рамка
CloseBtnX,CloseBtnY=Coords(5)


  AddParticleToObject(5,"benzopila",458,388);
  MoveEmiter("benzopila",458,388);
  
SetFlagsForSatButtons()

CloseWidth=34
CloseHeight=34

CreateCloseBtn(CloseBtnX,CloseBtnY);


addstaticobjecttogame( 23,"derevo" ,164,339 ,"",5,132,321-5,402-132);
speciale_action(2,23);
add_animation(7)
add_animation_frame(7,"derevo",397,299,0+331,132,309,250,0.01);
add_animation_frame(7,"derevo",397,299,311+331,132,309,250,0.01);


speciale_action(2,7);
MoveSaw = {"InstantiationOfLine", 2, 397, 299, 372, 334, 2, false};


addstaticobjecttogame( 8,"derevo_8" ,164,59 ,""); --распиленное дерево
speciale_action(2,8);


addstaticobjecttogame( 12,"derevo" ,434,386 ,"",415,4,641-415,110-4);--опилки
addstaticobjecttogame( 13,"derevo" ,445,372 ,"",194,3,411-194,126-3);--опилки
addstaticobjecttogame( 14,"derevo" ,426,405 ,"",6,4,192-6,106-4);--опилки
speciale_action(2,12)
speciale_action(2,13)
speciale_action(2,14)

CreatePolygon(11,4,"Raspil")
Set_Anim_Cur(11,4)
addstaticobjecttogame( 9,"derevo" ,164,60 ,"",8,408,774-8,929-408); --целое дерево
speciale_action(2,9);
addstaticobjecttogame( 24,"derevo_14" ,164,60 ,""); --целое дерево

addstaticobjecttogame(10,"derevo_10",164,60 ,"",0,0,766,521); --фон


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