1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
libfizmo initialization
2011-08-23
Overview
There are six initialization steps:
1. fizmo_register_screen_interface
2. fizmo_register_sound_interface
[3. optional: parse_fizmo_config_files]
4. fizmo_start
5. (parse_fizmo_config_files if not happened before)
[6. implicit: link_active_interface_to_story]
fizmo config files:
1. /etc/fizmo.conf, always parsed.
2. All "fizmo/config" files in all directories from colon-spearated
XDG_CONFIG_DIRS path.
3. $HOME/.config.fizmo
Color initialization
The screen default colors are stored in variables "default_foreground_colour"
and "default_background_colour" inside "output.c". By default, the foreground
is initialized as white, the background as black. Initialization is as
follows:
1. By default, the foreground color is set to white, the background to
black in "output.c".
2. The screen interface's functions "get_default_foreground_colour" and
"get_default_background_colour" are evaluated. In case these return
valid z_colour values, these are used as the default colors. That means
that by returning -1 for one or both of the functions, the screen
interface may choose not to alter the interpreter's default values.
3. The "foreground-color" and "background-color" config variables are
evaluated from the configuration file(s).
4. The "fizmo-start" function's variables "screen_default_foreground_color"
and "screen_default_background_colour" are evaluated. In case these
contains valid z_colour values, they're used as the new default. As in
step 2, that means that the default, as evaluated up to this step, may
be kept by setting one or both of the values to -1.
Why the additional step 4? While it's already possible to read color
information from the screen interface in step 2, step 4 ensures that it's
possible to still override the information parsed from the config files
in step 3 from the screen interface.
---------
CVS-Id: $Id: libfizmo-initialization.txt,v 1.3 2011-08-23 10:01:13 chrender Exp $
CVS-Revision: $Revision: 1.3 $
|