203 lines
7.0 KiB
C
203 lines
7.0 KiB
C
/*=========================================================================
|
|
*
|
|
* IniData.h - general functions for saving, loading
|
|
*
|
|
* Version 1.0
|
|
* Revision date
|
|
*
|
|
*=======================================================================*/
|
|
|
|
#ifndef __INIDATA_H__
|
|
#define __INIDATA_H__
|
|
|
|
|
|
//--- Defines --------------------------------------------------------
|
|
|
|
// constants for main window min size
|
|
#define C_iMainWindowWidth 615
|
|
#define C_iMainWindowHeight 665
|
|
|
|
// File .ini
|
|
#define C_szIniFile "GIData.ini"
|
|
#define C_szIniConfDirFile "ConfDirs.ini"
|
|
#define C_szIniConfSelectFile "ConfSelects.ini"
|
|
#define C_szIniConfOptionFile "ConfOptions.ini"
|
|
|
|
|
|
|
|
//--- Structures --------------------------------------------------------
|
|
|
|
|
|
typedef struct tdstInitialValue_
|
|
{
|
|
char szTempGameData[MAX_PATH]; // temporary path for the game data path
|
|
char szTempRawData[MAX_PATH]; // temporary path for the rawdata path
|
|
char szTempTextures[MAX_PATH]; // temporary path for the textures sub-directory
|
|
char szTempDefault[MAX_PATH]; // temporary path for the default sub-directory
|
|
char szTempVersion[MAX_PATH]; // temporary path for the version
|
|
char szTempModifLst[MAX_PATH]; // temporary path for the ModifLst
|
|
char szTempGameSpecific1[MAX_PATH]; // temporary path for the game Specific1 path
|
|
char szTempGameSpecific2[MAX_PATH]; // temporary path for the game Specific2 path
|
|
char szTempRawSpecific1[MAX_PATH]; // temporary path for the raw Specific1 path
|
|
char szTempRawSpecific2[MAX_PATH]; // temporary path for the raw Specific2 path
|
|
char szTempFamily[MAX_PATH]; // temporary path for the family directory
|
|
char szTempRawSp1[MAX_PATH]; // temporary path for the Raw Sp1 name
|
|
char szTempRawSp2[MAX_PATH]; // temporary path for the Raw Sp2 name
|
|
char szTempGameSp1[MAX_PATH]; // temporary path for the Game Sp1 name
|
|
char szTempGameSp2[MAX_PATH]; // temporary path for the Game Sp2 name
|
|
char szTempConfDirs[MAX_PATH]; // temporary path for the config directories
|
|
char szTempConfSelects[MAX_PATH]; // temporary path for the config selections
|
|
char szTempConfOptions[MAX_PATH]; // temporary path for the config options
|
|
|
|
char szGameData[MAX_PATH]; // name of game data path
|
|
char szRawData[MAX_PATH]; // name of raw data path
|
|
char szTextures[MAX_PATH]; // name of textures path
|
|
char szDefault[MAX_PATH]; // name of default path
|
|
char szVersion[MAX_PATH]; // name of version path
|
|
char szModifLst[MAX_PATH]; // name of ModifLst path
|
|
char szGameSpecific1[MAX_PATH]; // name of game Specific1 path
|
|
char szGameSpecific2[MAX_PATH]; // name of game Specific2 path
|
|
char szRawSpecific1[MAX_PATH]; // name of raw Specific1 path
|
|
char szRawSpecific2[MAX_PATH]; // name of raw Specific2 path
|
|
char szFamily[MAX_PATH]; // name of family directory
|
|
char szRawSp1[MAX_PATH]; // name of Raw Sp1
|
|
char szRawSp2[MAX_PATH]; // name of Raw Sp2
|
|
char szGameSp1[MAX_PATH]; // name of Game Sp1
|
|
char szGameSp2[MAX_PATH]; // name of Game Sp2
|
|
char szConfDirs[MAX_PATH]; // name of config for directories
|
|
char szConfSelects[MAX_PATH]; // name of config for selections
|
|
char szConfOptions[MAX_PATH]; // name of config for options
|
|
}
|
|
tdstInitialValue;
|
|
|
|
|
|
typedef struct tdstInitialDirValue_
|
|
{
|
|
char szTempAnims[MAX_PATH];
|
|
char szTempBanks[MAX_PATH];
|
|
char szTempClasses[MAX_PATH];
|
|
char szTempFamilies[MAX_PATH];
|
|
char szTempLevels[MAX_PATH];
|
|
char szTempTextures[MAX_PATH];
|
|
|
|
char szAnims[MAX_PATH];
|
|
char szBanks[MAX_PATH];
|
|
char szClasses[MAX_PATH];
|
|
char szFamilies[MAX_PATH];
|
|
char szLevels[MAX_PATH];
|
|
char szTextures[MAX_PATH];
|
|
|
|
}
|
|
tdstInitialDirValue;
|
|
|
|
|
|
typedef struct tdstInitialSelectValue_
|
|
{
|
|
char szAnims[MAX_PATH];
|
|
char szBanks[MAX_PATH];
|
|
char szClasses[MAX_PATH];
|
|
char szFamilies[MAX_PATH];
|
|
char szLevels[MAX_PATH];
|
|
char szTextures[MAX_PATH];
|
|
}
|
|
tdstInitialSelectValue;
|
|
|
|
|
|
typedef struct tdstInitialOptionValue_
|
|
{
|
|
char szIgnoreZoo[MAX_PATH];
|
|
char szIgnoreSct[MAX_PATH];
|
|
char szIgnoreSpo[MAX_PATH];
|
|
char szIgnoreGmt[MAX_PATH];
|
|
char szIgnoreTex[MAX_PATH];
|
|
|
|
char szCopyAnims[MAX_PATH];
|
|
char szCopyTextures[MAX_PATH];
|
|
char szGenerateRLI[MAX_PATH];
|
|
char szUpdateGameDSC[MAX_PATH];
|
|
char szCreateBasicFamily[MAX_PATH];
|
|
|
|
char szEraseDuplicated[MAX_PATH];
|
|
char szEraseUnused[MAX_PATH];
|
|
|
|
char szCommonFamily[MAX_PATH];
|
|
char szSpecificFamily[MAX_PATH];
|
|
char szAskFamily[MAX_PATH];
|
|
}
|
|
tdstInitialOptionValue;
|
|
|
|
typedef struct tdstWindowsPosSize_
|
|
{
|
|
RECT stMainPos; // window dimension
|
|
}
|
|
tdstWindowsPosSize;
|
|
|
|
|
|
//--- Globals --------------------------------------------------------
|
|
|
|
extern tdstWindowsPosSize g_stWinPosSize; // program options
|
|
|
|
extern tdstInitialValue g_stInitialData; // initial data
|
|
extern tdstInitialDirValue g_stInitialDirData; // initial data
|
|
extern tdstInitialSelectValue g_stInitialSelectData; // initial data
|
|
extern tdstInitialOptionValue g_stInitialOptionData; // initial data
|
|
|
|
extern char g_szIniFile[MAX_PATH]; // ini file
|
|
extern char g_szIniConfDirFile[MAX_PATH]; // ini file
|
|
extern char g_szIniConfSelectFile[MAX_PATH]; // ini file
|
|
extern char g_szIniConfOptionFile[MAX_PATH]; // ini file
|
|
|
|
|
|
|
|
//--- Statics --------------------------------------------------------
|
|
|
|
static COLORREF gs_a_xLineColor[5] = { RGB(0,155,0), RGB(0,0,0), RGB(0,155,0), RGB(0,0,255), RGB(255,0,0), };
|
|
|
|
|
|
|
|
//--- Functions --------------------------------------------------------
|
|
|
|
// set the paths
|
|
void fn_IniData_vSetGameData (char *_szPath);
|
|
void fn_IniData_vSetGameSpecific1 (char *_szPath);
|
|
void fn_IniData_vSetGameSpecific2 (char *_szPath);
|
|
void fn_IniData_vSetRawData (char *_szPath);
|
|
void fn_IniData_vSetRawSpecific1 (char *_szPath);
|
|
void fn_IniData_vSetRawSpecific2 (char *_szPath);
|
|
|
|
// set the names
|
|
void fn_IniData_vSetRawSp1 (char *_szPath);
|
|
void fn_IniData_vSetRawSp2 (char *_szPath);
|
|
void fn_IniData_vSetGameSp1 (char *_szPath);
|
|
void fn_IniData_vSetGameSp2 (char *_szPath);
|
|
|
|
// obtaining all the datas in the .ini file
|
|
void fn_IniData_vGetDatasFromFile (BOOL _bFirst);
|
|
|
|
// directory config
|
|
void fn_IniData_vGetDatasFromConfigDirsFile (BOOL _bFirst, char *szTag);
|
|
void fn_IniData_vSetConfigDirNames (char *_szPath);
|
|
void fn_IniData_vSetConfigDirPath (char* szConf, char *szDirName, char *_szPath );
|
|
|
|
// select configs
|
|
void fn_IniData_vGetDatasFromConfigSelectFile (BOOL _bFirst, char *szTag);
|
|
void fn_IniData_vSetSelectConfigNames (char *_szPath);
|
|
void fn_IniData_vSetSelectConfigValues (char *szName, char *szType, char *szPath);
|
|
|
|
// option configs
|
|
void fn_IniData_vGetDatasFromConfigOptionsFile (BOOL _bFirst, char *szTag);
|
|
void fn_IniData_vSetOptionConfigNames (char *_szPath);
|
|
void fn_IniData_vSetOptionConfigValues (BOOL bSetIgnore, char *szName, char *szNew);
|
|
|
|
// window position
|
|
void fn_IniData_vGetWindowPosSize (void);
|
|
void fn_IniData_vWriteWindowPosSize (void);
|
|
void fn_IniData_vStudyRect (char *_szString, RECT *_p_stRect);
|
|
|
|
|
|
// rich edit
|
|
void fn_ComRes_vDeleteLines (CRichEditCtrl *_oRichEdit);
|
|
void fn_ComRes_vWriteLine (char *szLine, char cLineType ,CRichEditCtrl* _oRichEdit, CHARFORMAT* _stCharFormat);
|
|
|
|
#endif //__INIDATA_H__
|