/*=========================================================================
*
* ModLoad.h	- Loading functions for MOD file
*
* Version			1.0
* Revision date
*
*=======================================================================*/
#ifndef _LOAD_H_
#define _LOAD_H_


//--- Includes --------------------------------------------------------

#include "SCR.h"

#include "typedef.h"

#include "geoobj.h"

//----------------------------------------------------------------------

#ifdef _WINDOWS
/********************************************************/
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus 
/********************************************************/
#endif // _WINDOWS


//--- Defines ---------------------------------------------------------

#define MLT_C_xIndexedTriangles   1
#define MLT_C_xFaceMapDescriptor  2
#define MLT_C_xSprite             3
#define MLT_C_xTMesh              4


//--- Structures ---------------------------------------------------------

// geometric info
typedef struct MLT_tdstGeometricInfo_
{
  xString					a_cSectionName;
  MLT_tdstGeometricObject	*hObject;
} 
MLT_tdstGeometricInfo;



//--- Functions ---------------------------------------------------------

// init
extern void MLT_vInitMODLoad ();

// file
extern SCR_tde_Anl_ReturnValue MLT_xLoadModCallback					(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
// geometric
extern SCR_tde_Anl_ReturnValue MLT_xLoadGeometric					(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
// element
extern SCR_tde_Anl_ReturnValue MLT_xLoadElementIndexedTriangles		(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern SCR_tde_Anl_ReturnValue MLT_xLoadElementFaceMapDescriptors	(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern SCR_tde_Anl_ReturnValue MLT_xLoadElementSprites				(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern SCR_tde_Anl_ReturnValue MLT_xLoadElementLines				(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern SCR_tde_Anl_ReturnValue MLT_xLoadElementSpheres				(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern SCR_tde_Anl_ReturnValue MLT_xLoadElementAlignedBoxes			(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern SCR_tde_Anl_ReturnValue MLT_xLoadElementPoints				(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern SCR_tde_Anl_ReturnValue MLT_xLoadElementTMeshes				(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern SCR_tde_Anl_ReturnValue MLT_xLoadElementMegaFace				(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
// object
extern SCR_tde_Anl_ReturnValue MLT_xLoadFaceMapDescriptor			(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern SCR_tde_Anl_ReturnValue MLT_xLoadSprite						(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);

// allocation
extern void MLT_xAllocateGeometric		(MLT_tdstGeometricObject *p_stGeometric);
extern void MLT_vCreateRotativSprite	(MLT_tdstSprite **p_hSprite , long xNbAngles);



#ifdef _WINDOWS
/********************************************************/
#ifdef __cplusplus
}
#endif // __cplusplus */
/********************************************************/
#endif // _WINDOWS

#endif // _LOAD_H_ 
