144 lines
4.3 KiB
C
144 lines
4.3 KiB
C
/*
|
|
=======================================================================================
|
|
Name : Scr_Fct.h
|
|
|
|
Author : vincent lhullier Date :08/09/97
|
|
|
|
Description : script functions
|
|
=======================================================================================
|
|
*/
|
|
|
|
|
|
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
|
#ifndef __SCR_FCT_H__
|
|
#define __SCR_FCT_H__
|
|
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
|
|
|
#include "SCR.h"
|
|
|
|
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
|
|
|
/*
|
|
=======================================================================================
|
|
Structures
|
|
=======================================================================================
|
|
*/
|
|
|
|
/*
|
|
* structure to save a reference that own to a section
|
|
*/
|
|
typedef struct tdstReference_
|
|
{
|
|
SCR_tdst_DyAr_Header stHeader; /* Header of element */
|
|
SCR_tdst_Link_Value *p_stRef;
|
|
unsigned int uiLine;
|
|
} tdstReference;
|
|
|
|
/*
|
|
* structure to store data about an entry
|
|
*/
|
|
typedef struct tdstEntry_
|
|
{
|
|
SCR_tdst_DyAr_Header stHeader; /* Header of element */
|
|
char *szName;
|
|
char *szSample;
|
|
char cNumberOfParams;
|
|
char cNumberOfRefs;
|
|
char a_cIsRef[20];
|
|
} tdstEntry;
|
|
|
|
/*
|
|
* structure to store computed script stat
|
|
*/
|
|
typedef struct tdstScriptStat_
|
|
{
|
|
unsigned long ulNbFiles;
|
|
char szBiggestFile[MAX_PATH];
|
|
unsigned long ulMaxSize;
|
|
unsigned long ulNbChars;
|
|
unsigned long ulNbLines;
|
|
unsigned long ulNbDirectiveLines;
|
|
unsigned long ulNbBeginSectionLines;
|
|
unsigned long ulNbEntryLines;
|
|
unsigned long ulNbEndSectionLines;
|
|
unsigned long ulNbMaxSectionInAFile;
|
|
char szFileWithMaxSection[ SCR_CV_ui_Cfg_MaxLenWord ];
|
|
unsigned long ulSectionNameMinLength;
|
|
char szSectionNameMin[ SCR_CV_ui_Cfg_MaxLenWord ];
|
|
unsigned long ulSectionNameMaxLength;
|
|
char szSectionNameMax[ SCR_CV_ui_Cfg_MaxLenWord ];
|
|
unsigned long ulSectionExtMaxLength;
|
|
char szSectionExtMax[ SCR_CV_ui_Cfg_MaxLenWord ];
|
|
float fSectionExtAverageLength;
|
|
unsigned long ulEntryMinLength;
|
|
char szEntryMin[ SCR_CV_ui_Cfg_MaxLenWord ];
|
|
unsigned long ulEntryMaxLength;
|
|
char szEntryMax[ SCR_CV_ui_Cfg_MaxLenWord ];
|
|
unsigned long ulFormatMaxLength;
|
|
char cMaxParams;
|
|
unsigned long ulParamsMaxLength;
|
|
} tdstScriptStat;
|
|
|
|
/*
|
|
* structure to store statistic on mod files
|
|
*/
|
|
typedef struct
|
|
{
|
|
unsigned long ulNumber;
|
|
|
|
unsigned long ulMaxPoints;
|
|
unsigned long ulMinPoints;
|
|
|
|
unsigned long ulMaxEdges;
|
|
unsigned long ulMinEdges;
|
|
|
|
unsigned long ulMinElement;
|
|
unsigned long ulMaxElement;
|
|
|
|
unsigned long ulNumberOfITElement;
|
|
unsigned long ulMinTriangles;
|
|
unsigned long ulMaxTriangles;
|
|
unsigned long ulMinUV;
|
|
unsigned long ulMaxUV;
|
|
} tdstModStat;
|
|
|
|
/*
|
|
=======================================================================================
|
|
Globals
|
|
=======================================================================================
|
|
*/
|
|
extern SCR_tdst_Link_Table g_stSectionTypeLinkTable;
|
|
extern SCR_tdst_Link_Table g_stSectionLinkTable;
|
|
extern SCR_tdst_Link_Table g_stRefLinkTable;
|
|
extern SCR_tdst_Link_Table g_stFileLinkTable;
|
|
/*
|
|
=======================================================================================
|
|
Functions
|
|
=======================================================================================
|
|
*/
|
|
void fn_Scr_vSaveSectionTypes( void );
|
|
void fn_Scr_vLoadSectionTypes( void );
|
|
|
|
tdstEntry *fn_Scr_p_stFindEntry( SCR_tdst_DyAr_Description *_p_stSectionEntryDyAr, char *_szEntryName );
|
|
void fn_Scr_vAddEntryToSection( SCR_tdst_DyAr_Description *_p_stSectionEntryDyAr, SCR_tdst_Cxt_Description *_p_stContext );
|
|
|
|
void fn_Scr_vResetUsedCounters( void );
|
|
void fn_Scr_vComputeSectionTypeHasRef( void );
|
|
|
|
void fn_Scr_vFreeSectionTypeList( void );
|
|
void fn_Scr_vFreeSectionList( void );
|
|
void fn_Scr_vFreeLTFile( void );
|
|
|
|
void fn_Scr_vParseFileToBuildListOfSectionTypes(char *_p_szFileName);
|
|
void fn_Scr_vParseFileToBuildListOfSectionsAndRefs(char *_p_szFileName);
|
|
void fn_Scr_vNewParseFileToBuildListOfSectionsAndRefs( char *_szFileName, SCR_tdst_Link_Value *_p_stLVFile );
|
|
|
|
void fn_Scr_vInitStat( tdstScriptStat *_stStat );
|
|
void fn_Scr_vParseFileForStat(char *_p_szFileName, tdstScriptStat *_stStat );
|
|
|
|
void fn_Scr_vInitModStat( tdstModStat *_pst_Stat );
|
|
void fn_Scr_vParseFileToCountModData( char *_sz_FileName, tdstModStat *_pst_Stat );
|
|
|
|
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
|
#endif /* __SCR_FCT_H__ */
|