Improved Game Settings (by Arynn)

- fixed corruption of ja2.set
- ja2.set will no be saved to ja2_settings.ini
- a few more minor game setting fixes and error tracings


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2844 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2009-05-12 11:52:35 +00:00
parent c9117c2939
commit 2e99cbe784
31 changed files with 827 additions and 1575 deletions
+17 -3
View File
@@ -21,23 +21,37 @@ class CIniReader
{
public:
CIniReader(const STR8 szFileName);
CIniReader(const STR8 szFileName, BOOL Force_Custom_Data_Path); // force path for nonexisting INI files
// Warning: the following function will be removed
int ReadInteger(const STR8 szSection, const STR8 szKey, int iDefaultValue);
int ReadInteger(const STR8 szSection, const STR8 szKey, int defaultValue, int minValue, int maxValue);
//UINT32 CIniReader::testReadUINT32(void);//various limit tests of UINT and double/float handling
//front end functions that control type interpretation and range control, each calls internal ReadUINT
UINT32 CIniReader::ReadUINT32(const STR8 szSection, const STR8 szKey, UINT32 defaultValue, UINT32 minValue, UINT32 maxValue);
UINT16 CIniReader::ReadUINT16(const STR8 szSection, const STR8 szKey, UINT16 defaultValue, UINT16 minValue, UINT16 maxValue);
UINT8 CIniReader::ReadUINT8 (const STR8 szSection, const STR8 szKey, UINT8 defaultValue, UINT8 minValue, UINT8 maxValue);
// Warning: the following function will be removed
//double ReadDouble(const STR8 szSection, const STR8 szKey, double fltDefaultValue);
double ReadDouble(const STR8 szSection, const STR8 szKey, double defaultValue, double minValue, double maxValue);
// Read_reals
DOUBLE ReadDouble(const STR8 szSection, const STR8 szKey, DOUBLE defaultValue, DOUBLE minValue, DOUBLE maxValue);
FLOAT ReadFloat (const STR8 szSection, const STR8 szKey, FLOAT defaultValue, FLOAT minValue, FLOAT maxValue);
bool ReadBoolean(const STR8 szSection, const STR8 szKey, bool bolDefaultValue);
BOOL ReadBoolean(const STR8 szSection, const STR8 szKey, BOOL bolDefaultValue);
STR8 ReadString(const STR8 szSection, const STR8 szKey, const STR8 szDefaultValue);
BOOL Is_CIniReader_File_Found(void) {return (CIniReader_File_Found);}
private:
char m_szFileName[MAX_PATH];
BOOL CIniReader_File_Found;
UINT32 CIniReader::ReadUINT(const STR8 szSection, const STR8 szKey, UINT32 defaultValue, UINT32 minValue, UINT32 maxValue);
};
#endif//INIREADER_H