/*=========================================================================
*
* System.h	- System functions 
*
* Version			1.0
* Revision date
*
*=======================================================================*/
#ifndef SYSTEM_H
#define SYSTEM_H


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

#include "typedef.h"

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

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


//--- Globals ---------------------------------------------------------

// index of chosen directories
extern int  g_iData;
extern int  g_iRaw;

// directories
extern xString g_sGameCommon, g_sGameSpecific1, g_sGameSpecific2;
extern xString g_sRawCommon,  g_sRawSpecific1,  g_sRawSpecific2;

extern xString g_sFileIn;
extern xString g_sFileMaterial;
extern xString g_sDirectorySave;

extern xString g_sGameTextureDirectory;


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

// main function
extern void MLT_fn_vMainConvert(int argc, char **argv);
// system
extern void MLT_vInitSystem();
extern void MLT_vExitSystem();
// init
extern void MLT_vInitVariables();
extern void MLT_vSetData();
// find & copy
extern long MLT_bFindFile			(char *sDir, char *sFile);
extern void MLT_vCopyFiles			(char *sFile, char *sSrc, char *sDst);
extern void MLT_vCopyAndRenameFile	(char *_sFileSrc, char *_sDirSrc, char *_sFileDst, char *_sDirDst, int bErase);
extern void MLT_vCopyAndUpdateFile	(char *_sFileSrc, char *_sDirSrc, char *_sFileDst, char *_sDirDst, char *_SrcRef, char *_DstRef, int bErase);
extern void MLT_vCopyOneTexture		(char *sTextureName, char *sRawData, char * sGameData);
// names
extern char *MLT_vRemoveFromName			(char *szName);
extern char *MLT_p_cGetFileNameWithoutExt	(char *sFileName);
extern char *MLT_p_cGetFileNameWithoutPath	(char *sFileName);
extern char *MLT_p_cEraseSpace				(char *sFileName);
extern char *MLT_p_cGetSectionName			(char *sSection);
extern void MLT_vRemoveFlags				(char **sIdent);
extern void MLT_vRemoveGeomProp				(char **sIdent);
extern void MLT_vExtractPropFromName		(char **sIdent, char *szExtract);
extern void MLT_vSplitModuleSectionName		(char *sSection, char *sForme, char *sHabillage, long *p_lNoPhy, long *p_lNoLod, char *sName);
extern void MLT_vComputePhysicalSectionName	(char *sSection, char *sForme, char *sHabillage, long lNoPhy, char *sName);
extern void MLT_vComputeVisualSetSectionName(char *sSection, char *sForme, char *sHabillage, char *sName);


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


#endif // SYSTEM_H 