- Screen width
- Screen height
- Screen color depth (bits per pixel (bpp))
- Windowed, fullscreen required, or fullscreen requested
- Alpha-blended lines (on, 'fake', or off)
- Anti-aliased lines (on or off)
- Gamma-corrected anti-aliasing (on or off)
- Todo:
- Support gamma values
- Backgrounds (on or off)
- Background bitmap scaling quality (best or fast)
Options such as rendering quality settings and screen resolution can come from various places. They are listed below, in the most reasonable order that they should be picked up:
- Defaults
- Global libcrtxy configuration file
- Local (user's) libcrtxy configuration file
- Global game configuration file
- Local (user's) game configuration file
- Environment variables
- Command-line options
The
XY_default_options() function sets some base values for the various options, in case no others are sent elsewhere. These are the values compiled into libcrtxy.
The
XY_load_options() function loads options from configuration files specific to libcrtxy.
XY_load_options_from_file() may be used by applications to load options from arbitrary files (such as a game's own config. file).
crtxy-width=NNN
crtxy-height=NNN
crtxy-bpp={16|24|32|any}
crtxy-windowed
crtxy-fullscreen
crtxy-fullscreen-or-window
crtxy-alpha={on|fake|off}
crtxy-antialias={on|off}
crtxy-backgrounds={on|off}
crtxy-scaling={best|fast}
crtxy-gamma-correction={on|off} - Todo:
- Support gamma values
crtxy-blur={on|off}
crtxy-additive={on|off}
XY_parse_envvars() examines the application's runtime enviroment for libcrtxy-related variables.
CRTXY_WIDTH
CRTXY_HEIGHT
CRTXY_BPP (16|24|32|ANY)
CRTXY_FULLSCREEN (ON|OPTIONAL|OFF)
CRTXY_ALPHA (ON|FAKE|OFF)
CRTXY_ANTIALIAS (ON|OFF)
CRTXY_BACKGROUNDS (ON|OFF)
CRTXY_SCALING (BEST|FAST)
CRTXY_GAMMA_CORRECTION (ON|OFF) - Todo:
- Support gamma values
CRTXY_BLUR (ON|OFF)
CRTXY_ADDITIVE (ON|OFF)
Finally, the
XY_parse_options() function can look for and parse and libcrtxy-related options found in the command-line arguments to an application.
--crtxy-width NNN
--crtxy-height NNN
--crtxy-bpp {16|24|32|any}
--crtxy-windowed
--crtxy-fullscreen
--crtxy-fullscreen-or-window
--crtxy-alpha {on|fake|off}
--crtxy-antialias {on|off}
--crtxy-backgrounds {on|off}
--crtxy-scaling {best|fast}
--crtxy-gamma-correction {on|off} - Todo:
- Support gamma values
--crtxy-blur {on|off}
--crtxy-additive {on|off}
--help-crtxy - Presents a list of libcrtxy-related usage, and quits.