Subversion Repositories Games.Chess Giants

Rev

Rev 119 | Rev 130 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 119 Rev 124
Line 50... Line 50...
50
   options.want_autorotateon1vs1 = (INIFile_ReadEntryAsBool (inifile, L"options", L"auto-rotate board",true) > 0);
50
   options.want_autorotateon1vs1 = (INIFile_ReadEntryAsBool (inifile, L"options", L"auto-rotate board",true) > 0);
51
   options.rotate_speed = INIFile_ReadEntryAsLong (inifile, L"options", L"rotation speed", 5);
51
   options.rotate_speed = INIFile_ReadEntryAsLong (inifile, L"options", L"rotation speed", 5);
52
 
52
 
53
   // [display]
53
   // [display]
54
   READ_WIDESTRING (temp_string, inifile, L"display", L"language", L"auto"); // first, try to read the language from the config file
54
   READ_WIDESTRING (temp_string, inifile, L"display", L"language", L"auto"); // first, try to read the language from the config file
-
 
55
   is_language_auto = (wcscmp (temp_string, L"auto") == 0); // remember is language is set to be automatically chosen
55
   for (language_index = 0; language_index < language_count; language_index++)
56
   for (language_index = 0; language_index < language_count; language_index++)
56
      if (_wcsicmp (languages[language_index].name, temp_string) == 0)
57
      if (_wcsicmp (languages[language_index].name, temp_string) == 0)
57
      {
58
      {
58
         language_id = language_index; // identify the claimed language's ID among the list of known languages
59
         language_id = language_index; // identify the claimed language's ID among the list of known languages
59
         break; // stop searching as soon as we find it
60
         break; // stop searching as soon as we find it
Line 78... Line 79...
78
         }
79
         }
79
   }
80
   }
80
   if (language_index == language_count)
81
   if (language_index == language_count)
81
      language_id = 0; // if still not found, fallback to the first language known
82
      language_id = 0; // if still not found, fallback to the first language known
82
   options.want_fullscreen = (INIFile_ReadEntryAsBool (inifile, L"display", L"fullscreen", false) > 0);
83
   options.want_fullscreen = (INIFile_ReadEntryAsBool (inifile, L"display", L"fullscreen", false) > 0);
-
 
84
   options.want_maximized = (INIFile_ReadEntryAsBool (inifile, L"display", L"maximized", false) > 0);
83
   options.window_width = INIFile_ReadEntryAsLong (inifile, L"display", L"window width", 1024);
85
   options.window_width = INIFile_ReadEntryAsLong (inifile, L"display", L"window width", 1024);
84
   options.window_height = INIFile_ReadEntryAsLong (inifile, L"display", L"window height", 768);
86
   options.window_height = INIFile_ReadEntryAsLong (inifile, L"display", L"window height", 768);
85
   options.want_filtering = (INIFile_ReadEntryAsBool (inifile, L"display", L"enable texture filtering", true) > 0);
87
   options.want_filtering = (INIFile_ReadEntryAsBool (inifile, L"display", L"enable texture filtering", true) > 0);
86
   options.want_hiquality = (INIFile_ReadEntryAsBool (inifile, L"display", L"enable high quality filtering", true) > 0);
88
   options.want_hiquality = (INIFile_ReadEntryAsBool (inifile, L"display", L"enable high quality filtering", true) > 0);
87
   options.want_specularlighting = (INIFile_ReadEntryAsBool (inifile, L"display", L"enable specular lighting", true) > 0);
89
   options.want_specularlighting = (INIFile_ReadEntryAsBool (inifile, L"display", L"enable specular lighting", true) > 0);
Line 292... Line 294...
292
   INIFile_WriteEntryAsBool (inifile, L"options", L"use sepia filter for past moves", options.want_sepiafilter);
294
   INIFile_WriteEntryAsBool (inifile, L"options", L"use sepia filter for past moves", options.want_sepiafilter);
293
   INIFile_WriteEntryAsBool (inifile, L"options", L"auto-rotate board", options.want_autorotateon1vs1);
295
   INIFile_WriteEntryAsBool (inifile, L"options", L"auto-rotate board", options.want_autorotateon1vs1);
294
   INIFile_WriteEntryAsLong (inifile, L"options", L"rotation speed", options.rotate_speed);
296
   INIFile_WriteEntryAsLong (inifile, L"options", L"rotation speed", options.rotate_speed);
295
 
297
 
296
   // [display]
298
   // [display]
297
   WRITE_WIDESTRING (L"display", L"language", languages[language_id].name);
299
   WRITE_WIDESTRING (L"display", L"language", (is_language_auto ? L"auto" : languages[language_id].name));
298
   INIFile_WriteEntryAsBool (inifile, L"display", L"fullscreen", options.want_fullscreen);
300
   INIFile_WriteEntryAsBool (inifile, L"display", L"fullscreen", options.want_fullscreen);
-
 
301
   INIFile_WriteEntryAsBool (inifile, L"display", L"maximized", options.want_maximized);
299
   INIFile_WriteEntryAsLong (inifile, L"display", L"window width", max (options.window_width, 640));
302
   INIFile_WriteEntryAsLong (inifile, L"display", L"window width", options.window_width);
300
   INIFile_WriteEntryAsLong (inifile, L"display", L"window height", max (options.window_height, 480));
303
   INIFile_WriteEntryAsLong (inifile, L"display", L"window height", options.window_height);
301
   INIFile_WriteEntryAsBool (inifile, L"display", L"enable texture filtering", options.want_filtering);
304
   INIFile_WriteEntryAsBool (inifile, L"display", L"enable texture filtering", options.want_filtering);
302
   INIFile_WriteEntryAsBool (inifile, L"display", L"enable high quality filtering", options.want_hiquality);
305
   INIFile_WriteEntryAsBool (inifile, L"display", L"enable high quality filtering", options.want_hiquality);
303
   INIFile_WriteEntryAsBool (inifile, L"display", L"enable specular lighting", options.want_specularlighting);
306
   INIFile_WriteEntryAsBool (inifile, L"display", L"enable specular lighting", options.want_specularlighting);
304
   INIFile_WriteEntryAsBool (inifile, L"display", L"enable board reflections", options.want_reflections);
307
   INIFile_WriteEntryAsBool (inifile, L"display", L"enable board reflections", options.want_reflections);
305
 
308