Data Structures | |
| struct | XY_options |
| Structure containing libcrtxy options (rendering level, screen size, etc. More... | |
| void | XY_default_options (XY_options *opts) |
| Set opts to default (libcrtxy's compiled-time) options. | |
| XY_bool | XY_load_options (XY_options *opts) |
| Load global, then local (user) libcrtxy config files into opts. | |
| XY_bool | XY_load_options_from_file (char *fname, XY_options *opts, XY_bool ignore_unknowns) |
| Load arbitrary config file into opts. | |
| int | XY_parse_options (int *argc, char *argv[], XY_options *opts) |
| Parse libcrtxy-related command-line arguments into opts. | |
| XY_bool | XY_parse_envvars (XY_options *opts) |
| Read any libcrtxy-related environment variables into opts. | |
Defines | |
| #define | XY_INIT_LIB_CONFIG_FILE_GLOBAL CONFDIR "/libcrtxy.conf" |
| Where system-wide (global) config file lives. | |
| #define | XY_INIT_LIB_CONFIG_FILE_LOCAL ".libcrtxyrc" |
| Where user's (local) config file lives. | |
Enumerations | |
| enum | XY_opt_fullscreen { XY_OPT_WINDOWED, XY_OPT_FULLSCREEN_REQUEST, XY_OPT_FULLSCREEN_REQUIRED } |
| Display settings for options.fullscreen. More... | |
| enum | XY_opt_alpha { XY_OPT_ALPHA_BLEND, XY_OPT_ALPHA_FAKE, XY_OPT_ALPHA_OFF } |
| Alpha-blending settings for options.alpha. More... | |
| enum | XY_opt_scaling { XY_OPT_SCALE_BEST, XY_OPT_SCALE_FAST } |
| Bitmap scaling quality settings for options.scaling. More... | |
| #define XY_INIT_LIB_CONFIG_FILE_GLOBAL CONFDIR "/libcrtxy.conf" |
Where system-wide (global) config file lives.
| #define XY_INIT_LIB_CONFIG_FILE_LOCAL ".libcrtxyrc" |
| enum XY_opt_fullscreen |
| enum XY_opt_alpha |
| enum XY_opt_scaling |
| void XY_default_options | ( | XY_options * | opts | ) |
Set opts to default (libcrtxy's compiled-time) options.
Call this first, to get a base set of options, in case no other means is available.
| opts | is a pointer to an options structure to fill. |
| XY_bool XY_load_options | ( | XY_options * | opts | ) |
| XY_bool XY_load_options_from_file | ( | char * | fname, | |
| XY_options * | opts, | |||
| XY_bool | ignore_unknowns | |||
| ) |
Load arbitrary config file into opts.
| fname | is the name of a file to load options from. | |
| opts | is a pointer to an options structure to fill. | |
| ignore_unknowns | set to XY_TRUE to prevent function from aborting on unrecognized lines (useful if you want to let users put libcrtxy configuration options in an app-specific config file.) |
| int XY_parse_options | ( | int * | argc, | |
| char * | argv[], | |||
| XY_options * | opts | |||
| ) |
Parse libcrtxy-related command-line arguments into opts.
| argc | is a count of arguments to parse. | |
| argv | is an array of arguments to parse. | |
| opts | is a pointer to an options structure to fill. |
| XY_bool XY_parse_envvars | ( | XY_options * | opts | ) |
1.5.5