#ifndef __MAINCHAR_H__
#define __MAINCHAR_H__
 
/******************************************/
#if _MSC_VER >= 1000
#pragma once
#endif /* _MSC_VER >= 1000 */
/******************************************/
 
#include "GAM/Header.h"
 
#if defined(__cplusplus)
extern "C"
{
#endif /* __cplusplus */
 
/*----------------------------------------------------------------------
 * Lists initialisations
 *--------------------------------------------------------------------*/
/*LST2_M_DynamicUseListOf(MC_tdxHandleToMainCharacterNode);*/
/*----------------------------------------------------------------------
 * Structures
 *--------------------------------------------------------------------*/
#if defined(D_MainChar_StructureDefine)
 
typedef struct tdstNodeMainCharacter_
{
   /* O.D. 15/8/97*/
   HIE_tdxHandleToSuperObject hNewCharacterForTheNextFrame;
   HIE_tdxHandleToSuperObject hCharacter; 
   LST2_M_DynamicElementDeclaration(MC_tdxHandleToMainCharacterNode)
 
} tdstNodeMainCharacter;
 
#endif /* D_MainChar_StructureDefine */
/*----------------------------------------------------------------------
 * Functions
 *--------------------------------------------------------------------*/
extern CPA_EXPORT MC_tdxHandleToMainCharacterNode MC_fn_hCreateMainCharacterNode();
extern CPA_EXPORT void MC_fn_vFreeMainCharacterNode(MC_tdxHandleToMainCharacterNode hMainCharNode);
extern CPA_EXPORT void MC_fn_vAddCharacterInMainCharacterList(HIE_tdxHandleToSuperObject hCharacter);
extern CPA_EXPORT void MC_fn_vRemoveCharacterinMainCharacterList(HIE_tdxHandleToSuperObject hCharacter);
extern CPA_EXPORT unsigned char MC_fn_ucIsCharacterInMainCharacterList(HIE_tdxHandleToSuperObject hCharacter);
extern CPA_EXPORT void MC_fn_vSetCharacterInMainCharacterNode(MC_tdxHandleToMainCharacterNode hMainCharNode,HIE_tdxHandleToSuperObject hCharacter);
extern CPA_EXPORT HIE_tdxHandleToSuperObject MC_fn_hGetCharacterInMainCharacterNode(MC_tdxHandleToMainCharacterNode hMainCharNode);
extern CPA_EXPORT MC_tdxHandleToMainCharacterNode MC_fn_hGetFirstMainCharNode();
extern CPA_EXPORT MC_tdxHandleToMainCharacterNode MC_fn_hGetNextMainCharNode(MC_tdxHandleToMainCharacterNode hMainCharNode);
 
/* O.D. 15/8/97*/
extern CPA_EXPORT void MC_fn_vSetNewMainCharacter(MC_tdxHandleToMainCharacterNode hMainCharNode,HIE_tdxHandleToSuperObject hCharacter);
extern CPA_EXPORT HIE_tdxHandleToSuperObject MC_fn_hGetNewMainCharacter(MC_tdxHandleToMainCharacterNode hMainCharNode);
 
/*----------------------------------------------------------------------
 * Add for new LstDef.h
 *--------------------------------------------------------------------*/
void MC_fn_vCopyStruct_MainCharNode(MC_tdxHandleToMainCharacterNode,MC_tdxHandleToMainCharacterNode);
/*----------------------------------------------------------------------
 * Macros
 *--------------------------------------------------------------------*/
#define MC_M_ForEachMainCharacterNode(_hFather,_hMainCharNode,_i) \
for														\
(														\
	_i=0,(_hMainCharNode)=MC_fn_hGetFirstMainCharNode();		\
	_hMainCharNode;									\
	_i++,(_hMainCharNode)=MC_fn_hGetNextMainCharNode(_hMainCharNode)			\
)
 
#if defined(__cplusplus)
}
#endif /* __cplusplus */
 
#endif /* __MAINCHAR_H__ */
