#include "stdafx.h"
#include "Acp_Base.h"
#define HieFriend
#include "incgam.h"
#include "gmt.h"
#include "dpt.h"
#include "diameca.hpp"
#include "_interf.hpp"
#include "GMatObj.hpp"
#include "MMatObj.hpp"
#include "x:\cpa\main\inc\_editid.h"
#include "CopyPaste.hpp"
#include "MatList.hpp"
#include "TUT.h"

extern Material_Interface *gs_p_oMaterialInterface;

extern DiaMeca	*g_oMaterialMeca; // used for loading callbacks

#include "ldt.h"

#define lTagRebound 'obeR'
#define lTagSlide1  'dilS'


/*****************************************************************
Function name   : DiaMeca::fn_iLoadMecaDefault
Description     : 
Author          : Ovidiu Scripa (oscripa@ubisoft.ro) - ROMTEAM
Creation Date   : 15-Oct-98
Modified        : 
Return type     : int 
Argument        : LDT_tdst_Link *pLink
*****************************************************************/
int DiaMeca::fn_iLoadMecaDefault( LDT_tdst_Link *pLink )
{
  LDT_tdeParseResult result=ParseResult_BeginSection;


    while( result!=ParseResult_EndSection ) 
    {
  	  result=LDT_GetNextEntry();
	    if ( DNM_fn_bIsMatCharacteristicsValid(g_oMaterialMeca->m_hDefaultMechanicsMaterial) )
	    {

  	    switch( result )
  	    {
  	      case ParseResult_Entry: /* an entry */
  	      {
  	        char *szEntry=LDT_szGetEntryName();
   	        switch (*(long*)szEntry)
  	        {

  	          case  lTagRebound : /*  */
  	          {
                DNM_fn_xMatCharacteristicsSetRebound(g_oMaterialMeca->m_hDefaultMechanicsMaterial,  (float)atof(LDT_szGetParam(1)) );
  	          }
  	          break;
  	          case  lTagSlide1 : /*  */
  	          {
				        DNM_fn_xMatCharacteristicsSetSlide(g_oMaterialMeca->m_hDefaultMechanicsMaterial, (float)atof(LDT_szGetParam(1)));
  	          }
  	          break;
  	        }
  	      }
  	    }

      }
    }
  

  return 0;
}

