The gdefaults2 file is usually located inside the .crossfire directory.
This file applies to the new gtk-2 client for crossfire,
The older gtk-1 client used the gdefaults file as configuration file.
This configuration file does not exist in a fresh installation of the client.
This file gets created by pressing the 'Save' button in the client configuration sub window
found under Menubar > Client > Configure .
At the top of the file one reads :
# crossfire-client-gtk2 automatically generates this file. # Manual editing is allowed, but the client may be a bit # finicky about the keys and values. Comparisons are case # sensitive. 'True' and 'False' are the proper case, but # have been replaced with 1 and 0 respectively.
Where the part 'True' and 'False' are the proper case
once applied to the X11 cfclient configuration file defaults .
The code in function load_defaults() in file client/gtk-v2/src/config.c parses as follows :
if (inbuf[0]=='#') continue; /* Skip any setting line that does not contain a colon character */ if (!(cp=strchr(inbuf,':'))) continue; *cp='\0'; cp+=2; /* colon, space, then value */ val = -1; if (isdigit(*cp)) val=atoi(cp); else if (!strcmp(cp,"True")) val = TRUE; else if (!strcmp(cp,"False")) val = FALSE;
Meaning, that lines starting with # are ignored,
lines need to contain a colon : or are ignored,
and may have any content, but digits *not* -1 ,
and still recognizes True or False in case sensitive string comparison.
See also the gtk-1 gdefaults configfile, since the gdefaults2 does not differ much.
Range:
Default: 1
Menu Entry:
Range:
Default: 0
Menu Entry: (Old) Client > Configure > Map & Image Options
Range:
Default: 10
Menu Entry: (Old) Client > Configure > General Options
Range:
Default: 1
Menu Entry:
Range: 0 - 2
Default: 0
Menu Entry: (Old) Client > Configure > Map & Image Options
The displaymode entry can have three values for drawing the map:
Any other numerical values than those above will still be “acknowledged” by the client, but will lead to error messages as
[WARNING ] (common::finish_face_cmd) Got error on create_and_rescale_image_from_data, file=HOME/.crossfire/image-cache/la/lava_S.113.base.1
and
[WARNING ] (common::display_newpng) create_and_rescale_image_from_data failed for face 481
, thus the map would not be drawn.
If the SDL libraries were not available at client compiling time, then the displaymode would fall back to Pixmap mode.
The client then should print to stderr from function load_defaults() in client/gtk-v2/config.c
#if !defined(HAVE_SDL) if (want_config[CONFIG_DISPLAYMODE] == CFG_DM_SDL) { want_config[CONFIG_DISPLAYMODE] = CFG_DM_PIXMAP; LOG(LOG_ERROR, "config.c::load_defaults", "Display mode is set to SDL, but client " "is not compiled with SDL support. Reverting to pixmap mode."); } #endif
See also lighting modes for SDL.
The OpenGL mode is available on Linux, if the MESA package is found at compilation time.
If the gdefaults2 entry is set to 2, and MESA was not found at compilation time,
the client acts differently than started with the -opengl parameter.
the client prints
[ ERROR ] (config.c::load_defaults) Display mode is set to OpenGL, but client is not compiled with OpenGL support. Reverting to pixmap mode.
to the logging output.
When using OpenGL displaymode, the GLX and probably DRI extensions should be available to the X-Server,
when the X-Server Xorg is started to manage the monitor of the computer.
When the GLX extension is not available for the X-Server, then the client will either crash with
message Xlib: extension “GLX” missing on display “:0.0”.
and Segmentation fault
as for
version 1.10.0 for example; or
printing Direct rendering is not available!
to the loglevel INFO log output as it is for version 1.70.0 of the client,
and still would work in OpenGL drawing mode if libGL.so.1, libGLU.so.1 and libglut.so.3 are available on the system ( but GLX disabled for the X-Server ) .
Special kdrive X-Servers disbanded after version 1.4.x of the Xorg R7 release like Xvesa,
likely will not work with MESA and DRI.
The Xorg's own driver vesa_drv.so and probably some special framebuffer drivers will also not work
with OpenGL / MESA.
Screenshot of Scorn at nighttime of the client's opengl mode for the intel_drv.so driver:
Range:
Default: 0
Menu Entry: (Old) Client > Configure > Map & Image Options
Range:
Default: 0
Menu Entry: (Old) Client > Configure > General Options
Range:
Default: (null)
Menu Entry: (Old) Client > Configure > Map & Image Options
Range:
Default: 1
Menu Entry: (Old) Client > Configure > General Options
Range:
Default: 1
Menu Entry: (Old) Client > Configure > Map & Image Options
Range:
Default: 0
Menu Entry: (Old) Client > Configure > General Options
Range:
Default: 0
Menu Entry: (Old) Client > Configure > General Options
Range:
Default: 100 , until version 1.11.0 '90'
Menu Entry: (Old) Client > Configure > Map & Image Options
Range:
Default: 1
Menu Entry: (Old) Client > Configure > Map & Image Options
Range: 11 - 25
Default: 25 , until version 1.11.0 “15”
Menu Entry: (Old) Client > Configure > Map & Image Options
Functions: See client/gtk-v2/glade/dialogs.glade
Note: The code in function load_defaults() in client/gtk-v2/src/config.c still has as frame
a lower limit of 9 and an upper limit of MAP_MAX_SIZE set.
MAX_MAP_SIZE is defined in client/common/client.h as #define MAP_MAX_SIZE 31
still in version 1.70.0 of the client.
The user should be able to use the command line parameter -mapsize to use the full range of “supported” map sizes.
Note: The old gcfclients2 had an client/gtk-v2/interface.c file likely made by some GLADE-designer-UI, with settings as follows:
gtk_adjustment_new (25, 11, 25, 1, 10, 10);
, which according to https://developer.gnome.org/gtk2/stable/GtkAdjustment.html
consist of 6 variables (value, lower, upper, step_increment, page_increment, page_size) .
The setting of '10' for the “page-size” property seems to limit the upper max value to '15' , since the above gnome.org page says
The page size of the adjustment. Note that the page-size is irrelevant and should be set to zero if the adjustment is used for a simple scalar value, e.g. in a GtkSpinButton.
Therefore the user would have had the chance to spin from 11 - 15 .
GTK-2 has changed from version 2.4 to 2.14, and maybe “fixed” the proper handling of “page_size” .
Between GTK-2 versions 2.4 and 2.13 the code could have worked “flawlessly” .
Range:
Default: 100 , until version 1.11.0 '90'
Menu Entry: (Old) Client > Configure > Map & Image Options
Range:
Default: 1
Menu Entry:
Range: 11 - 25 ( offered by the GUI, real 9 - 31 )
Default: 25 , until version 1.11.0 “15”
Menu Entry: (Old) Client > Configure > Map & Image Options
Functions: See client/gtk-v2/glade/dialogs.glade
Note: The code in function load_defaults() in client/gtk-v2/src/config.c still has as frame
a lower limit of 9 and an upper limit of MAP_MAX_SIZE set.
MAX_MAP_SIZE is defined in client/common/client.h as #define MAP_MAX_SIZE 31
still in version 1.70.0 of the client.
The user should be able to use the command line parameter -mapsize to use the full range of “supported” map sizes.
Note: The old gcfclients2 had an client/gtk-v2/interface.c file likely made by some GLADE-designer-UI, with settings as follows:
config_spinbutton_mapwidth_adj = gtk_adjustment_new (25, 11, 25, 1, 10, 10);
, which according to https://developer.gnome.org/gtk2/stable/GtkAdjustment.html
consist of 6 variables (value, lower, upper, step_increment, page_increment, page_size) .
The setting of '10' for the “page-size” property seems to limit the upper max value to '15' , since the above gnome.org page says
The page size of the adjustment. Note that the page-size is irrelevant and should be set to zero if the adjustment is used for a simple scalar value, e.g. in a GtkSpinButton.
Therefore the user would have had the chance to spin from 11 - 15 .
GTK-2 has changed from version 2.4 to 2.14, and maybe “fixed” the proper handling of “page_size” .
Between GTK-2 versions 2.4 and 2.13 the code could have worked “flawlessly” .
Range:
Default: 0
Menu Entry:
Range:
Default: 1
Menu Entry:
Range:
Default: 0
Menu Entry:
Range:
Default:
Menu Entry:
Range:
Default: 0
Menu Entry:
Range:
Default: (null)
Menu Entry:
Range:
Default: 0
Menu Entry:
Range:
Default: 0
Menu Entry:
Range:
Default: 1
Menu Entry:
Range:
Default: 0
Menu Entry: (Old) Client > Configure > Map & Image Options
Range:
Default: 1
Menu Entry: (Old) Client > Configure > General Options
Range:
Default: 0
Menu Entry:
That leftover from the gtk-1 client does not work for the gtk-2 client.
Range:
Default: 0
Menu Entry:
That leftover from the gtk-1 client does not work for the gtk-2 client.
Range:
Default:Standard
Menu Entry: (Old) Client > Configure > Map & Image Options
Implemented since version 1.12
Range:
Default: 1
Menu Entry:
Range:
Default: 0
Menu Entry:
Range:
Default: gtk-v1.glade
Menu Entry: (Old) Client > Configure > Map & Image Options
Implemented since version 1.12