#ifndef D_THROW_PRT
/*******************************************************/
/**** For the structures and variables declarations ****/
/*******************************************************/
#define D_MSPrtSrc_StructureDefine
#define D_MSPrtSrc_VariableDefine
 
#include "ToolsCPA.h"
 
#include "Options/Options.h"
#include "Macros.h"
 
#include "Actions/AllActs.h"
 
#include "Structur/MemGame.h"
#include "Structur/ErrGame.h"
#include "Structur/Objects.h"
#include "Structur/GameScpt.h"
#include "Structur/StdObjSt.h"
#include "Structur/EngMode.h" 
 
#include "Basic.h"
#include "ObjInit.h"
#include "ZeMem.h"
#include "MainChar.h"
#include "Effect.h"
 
#include "ldt.h"
 
#define lTagGeneratorActivation		'eneG'
#define lTagParticleGenerator			'traP'
#define lTagWaterStreakGenerator	'etaW'
#define lTagFootPathEffect				'tooF'
 
/*OS NOTE : these callbacks were not tested because there is no 'MSPrtSrc' section in data files*/
 
 
/*****************************************************************
Function name   : fn_iCreateMSPrtSrc
Description     : 
Author          : Ovidiu Scripa (oscripa@ubisoft.ro) - ROMTEAM
Creation Date   : 13-Oct-98
Modified        : 
Return type     : int 
Argument        : LDT_tdst_Link *pLink
*****************************************************************/
int fn_iCreateMSPrtSrc( LDT_tdst_Link *pLink )
{
	MS_tdxHandleToMSPrtSrc		h_MSPrtSrc;
	struct tdstEngineObject_	*p_stEngineObject = (struct tdstEngineObject_	*)pLink->pParent->pObject;
 
    MMG_fn_vBeginMemoryInfo (MMG_C_lTypeMiniStructure , MMG_C_lSubTypePrtSrc , p_stEngineObject);
	h_MSPrtSrc = fn_h_MSPrtSrcRealAlloc();
    MMG_fn_vEndMemoryInfo ();
	p_stEngineObject->h_MSPrtSrc=h_MSPrtSrc;
	h_MSPrtSrc->ucGeneratorActivation = 1;
	pLink->pObject = (void*)h_MSPrtSrc;
 
  return 0;
}
 
 
 
/*****************************************************************
Function name   : fn_iLoadMSPrtSrc
Description     : 
Author          : Ovidiu Scripa (oscripa@ubisoft.ro) - ROMTEAM
Creation Date   : 13-Oct-98
Modified        : 
Return type     : int 
Argument        : LDT_tdst_Link *pLink
*****************************************************************/
int fn_iLoadMSPrtSrc( LDT_tdst_Link *pLink )
{
  LDT_tdeParseResult result=ParseResult_BeginSection;
	MS_tdxHandleToMSPrtSrc		h_MSPrtSrc = (MS_tdxHandleToMSPrtSrc)pLink->pObject;
	SCR_tdst_Cxt_Values *		p_stValues;
 
 
  while( result!=ParseResult_EndSection ) 
  {
  	result=LDT_GetNextEntry();
  	switch( result )
  	{
  	  case ParseResult_Entry: /* an entry */
  	  {
  	    char *szEntry=LDT_szGetEntryName();
  	    switch (*(long*)szEntry)
  	    {
 
  	      case  lTagGeneratorActivation : /*  */
  	      {
						h_MSPrtSrc->ucGeneratorActivation = (unsigned char) ((strcmp(LDT_szGetParam(1), "OFF") == 0) ? 0 : 1);
  	      }
  	      break;
  	      case  lTagParticleGenerator : /*  */
  	      {
/* -> OS : THIS CODE SHOULD BE CHANGED 01-Sep-98*/
						p_stValues=SCR_fnp_st_RdL0_AnalyseSection(LDT_szGetParam(1), SCR_CDF_uw_Anl_Normal);
/* <- OS : THIS CODE SHOULD BE CHANGED 01-Sep-98*/
						h_MSPrtSrc->p_stParticleGenerator = (tdstParticleGenerator *)(p_stValues->a_ulValues[0]);
 
  	      }
  	      break;
  	      case  lTagWaterStreakGenerator : /*  */
  	      {
/* -> OS : THIS CODE SHOULD BE CHANGED 01-Sep-98*/
						p_stValues=SCR_fnp_st_RdL0_AnalyseSection(LDT_szGetParam(1), SCR_CDF_uw_Anl_Normal);
/* <- OS : THIS CODE SHOULD BE CHANGED 01-Sep-98*/
						h_MSPrtSrc->hWaterStreakGenerator = (GAM_tdxHandleToWaterStreakEffect)(p_stValues->a_ulValues[0]);
  	      }
  	      break;
  	      case  lTagFootPathEffect : /*  */
  	      {
/* -> OS : THIS CODE SHOULD BE CHANGED 01-Sep-98*/
						p_stValues = SCR_fnp_st_RdL0_AnalyseSection( LDT_szGetParam(1), SCR_CDF_uw_Anl_Normal );
/* <- OS : THIS CODE SHOULD BE CHANGED 01-Sep-98*/
						h_MSPrtSrc->hFootPath = (GAM_tdxHandleToFootPathEffect) ( p_stValues->a_ulValues[0] );
 
  	      }
  	      break;
  	    }
  	  }
  	}
  }
 
 
  return 0;
}
 
#endif /* D_THROW_PRT */
