text: /*+-----------------------------------------------------------------------------------------------------------------+*/
  //
  // (C) Kriss@XIXs.com 2013
  //
  /*+-----------------------------------------------------------------------------------------------------------------+*/
  #include "all.h"
  
  
  
  /*+-----------------------------------------------------------------------------------------------------------------+*/
  //
  // allocate an bone
  //
  /*+-----------------------------------------------------------------------------------------------------------------+*/
  bool t3d_bone::setup(void)
  {
  	DMEM_ZERO(this);
  
  	return true;
  }
  
  /*+-----------------------------------------------------------------------------------------------------------------+*/
  //
  // allocate an bone
  //
  /*+-----------------------------------------------------------------------------------------------------------------+*/
  bool t3d_bone::reset(void)
  {
  	clean();
  	return setup();
  }
  
  /*+-----------------------------------------------------------------------------------------------------------------+*/
  //
  // allocate an bone
  //
  /*+-----------------------------------------------------------------------------------------------------------------+*/
  void t3d_bone::clean(void)
  {
  }
  
  
  
  /*+-----------------------------------------------------------------------------------------------------------------+*/
  //
  // allocate an bone
  //
  /*+-----------------------------------------------------------------------------------------------------------------+*/
  t3d_bone *thunk3d::AllocBone(void)
  {
  t3d_bone *ret;
  
  
  	if(!(ret=(t3d_bone *)bones->alloc()))
  	{
  		DBG_Error("Failed to allocate thunk3D.bone.\n");
  		goto bogus;
  	}
  
  	if(!ret->setup())
  	{
  		DBG_Error("Failed to setup thunk3D.bone.\n");
  		goto bogus;
  	}
  
  	DLIST_PASTE(bones->atoms->last,ret,0);
  
  	return ret;
  
  bogus:
  	FreeBone(ret);
  	return 0;
  }
  
  /*+-----------------------------------------------------------------------------------------------------------------+*/
  //
  // free an bone
  //
  /*+-----------------------------------------------------------------------------------------------------------------+*/
  void thunk3d::FreeBone(t3d_bone *item)
  {
  	if(item)
  	{
  		DLIST_CUT(item);
  
  		item->clean();
  
  		bones->free((llatom*)item);
  	}
  }
  
  
  