123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- #ifndef CONFIG_H
- #define CONFIG_H
- # ifdef __cplusplus
- extern "C"
- {
- # endif
- typedef enum tagPALCFG_ITEM
- {
- PALCFG_ALL_MIN = 0,
- PALCFG_BOOLEAN_MIN = PALCFG_ALL_MIN,
-
- PALCFG_DOS = PALCFG_BOOLEAN_MIN,
- PALCFG_FULLSCREEN,
- PALCFG_KEEPASPECTRATIO,
- PALCFG_LAUNCHSETTING,
- PALCFG_STEREO,
- PALCFG_USEEMBEDDEDFONTS,
- PALCFG_USESURROUNDOPL,
- PALCFG_USETOUCHOVERLAY,
-
- PALCFG_BOOLEAN_MAX,
- PALCFG_INTEGER_MIN = PALCFG_BOOLEAN_MAX,
-
- PALCFG_SURROUNDOPLOFFSET = PALCFG_INTEGER_MIN,
-
- PALCFG_INTEGER_MAX,
- PALCFG_UNSIGNED_MIN = PALCFG_INTEGER_MAX,
-
- PALCFG_AUDIOBUFFERSIZE = PALCFG_UNSIGNED_MIN,
- PALCFG_CODEPAGE,
- PALCFG_OPLSAMPLERATE,
- PALCFG_RESAMPLEQUALITY,
- PALCFG_SAMPLERATE,
- PALCFG_VOLUME,
- PALCFG_WINDOWHEIGHT,
- PALCFG_WINDOWWIDTH,
-
- PALCFG_UNSIGNED_MAX,
- PALCFG_STRING_MIN = PALCFG_UNSIGNED_MAX,
-
- PALCFG_CD = PALCFG_STRING_MIN,
- PALCFG_GAMEPATH,
- PALCFG_MESSAGEFILE,
- PALCFG_MUSIC,
- PALCFG_OPL,
- PALCFG_RIXEXTRAINIT,
-
- PALCFG_STRING_MAX,
- PALCFG_ALL_MAX = PALCFG_STRING_MAX
- } PALCFG_ITEM;
- typedef enum tagPALCFG_TYPE
- {
- PALCFG_STRING,
- PALCFG_BOOLEAN,
- PALCFG_INTEGER,
- PALCFG_UNSIGNED,
- } PALCFG_TYPE;
- typedef union tagConfigValue
- {
- LPCSTR sValue;
- DWORD uValue;
- INT iValue;
- BOOL bValue;
- } ConfigValue;
- typedef struct tagConfigItem
- {
- PALCFG_ITEM Item;
- PALCFG_TYPE Type;
- const char* Name;
- int NameLength;
- const ConfigValue DefaultValue;
- const ConfigValue MinValue;
- const ConfigValue MaxValue;
- } ConfigItem;
- BOOL
- PAL_ParseConfigLine(
- const char * line,
- const ConfigItem ** pItem,
- ConfigValue * pValue
- );
- ConfigValue
- PAL_DefaultConfig(
- PALCFG_ITEM item
- );
- const char *
- PAL_ConfigName(
- PALCFG_ITEM item
- );
- BOOL
- PAL_LimitConfig(
- PALCFG_ITEM item,
- ConfigValue * pValue
- );
- # ifdef __cplusplus
- }
- # endif
- #endif
|