Rev 192 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 192 | Rev 193 | ||
---|---|---|---|
Line 19... | Line 19... | ||
19 | 19 | ||
20 | void *inifile; |
20 | void *inifile; |
21 | smiley_t *smiley; |
21 | smiley_t *smiley; |
22 | char *file_buffer; |
22 | char *file_buffer; |
23 | wchar_t temp_string[MAX_PATH]; |
23 | wchar_t temp_string[MAX_PATH]; |
24 | // wchar_t smiley_pathname[MAX_PATH]; |
- | |
25 | wchar_t *smiley_name; |
24 | wchar_t *smiley_name; |
26 | size_t smiley_namelen; |
25 | size_t smiley_namelen; |
27 | int candidate_index; |
26 | int candidate_index; |
28 | int language_index; |
27 | int language_index; |
29 | int program_index; |
28 | int program_index; |
Line 35... | Line 34... | ||
35 | swprintf_s (filename, WCHAR_SIZEOF (filename), L"%s/config.ini", app_path); |
34 | swprintf_s (filename, WCHAR_SIZEOF (filename), L"%s/config.ini", app_path); |
36 | inifile = INIFile_LoadINIFile (filename); |
35 | inifile = INIFile_LoadINIFile (filename); |
37 | 36 | ||
38 | // read the INI file (if it doesn't exist, default values will be fed) |
37 | // read the INI file (if it doesn't exist, default values will be fed) |
39 | 38 | ||
40 | // [gameplay] |
39 | // [options] -- FIXME: should be [gameplay] but would cause backwards compatibility problems |
41 | options.want_lastmove = (INIFile_ReadEntryAsBool (inifile, L"options", L"highlight last move", true) > 0); |
40 | options.want_lastmove = (INIFile_ReadEntryAsBool (inifile, L"options", L"highlight last move", true) > 0); |
42 | options.want_possiblemoves = (INIFile_ReadEntryAsBool (inifile, L"options", L"highlight possible moves", true) > 0); |
41 | options.want_possiblemoves = (INIFile_ReadEntryAsBool (inifile, L"options", L"highlight possible moves", true) > 0); |
43 | options.want_threats = (INIFile_ReadEntryAsBool (inifile, L"options", L"highlight king's threats", true) > 0); |
42 | options.want_threats = (INIFile_ReadEntryAsBool (inifile, L"options", L"highlight king's threats", true) > 0); |
44 | options.want_animations = (INIFile_ReadEntryAsBool (inifile, L"options", L"display part animations", true) > 0); |
43 | options.want_animations = (INIFile_ReadEntryAsBool (inifile, L"options", L"display part animations", true) > 0); |
45 | options.want_slidinganimations = (INIFile_ReadEntryAsBool (inifile, L"options", L"display part sliding animations", true) > 0); |
44 | options.want_slidinganimations = (INIFile_ReadEntryAsBool (inifile, L"options", L"display part sliding animations", true) > 0); |
46 | options.want_takenparts = (INIFile_ReadEntryAsBool (inifile, L"options", L"show taken parts", true) > 0); |
45 | options.want_takenparts = (INIFile_ReadEntryAsBool (inifile, L"options", L"show taken parts", true) > 0); |
47 | options.want_turn = (INIFile_ReadEntryAsBool (inifile, L"options", L"show turn", true) > 0); |
46 | options.want_turn = (INIFile_ReadEntryAsBool (inifile, L"options", L"show turn", true) > 0); |
48 | options.want_clock = (INIFile_ReadEntryAsBool (inifile, L"options", L"show game clock", true) > 0); |
47 | options.want_clock = (INIFile_ReadEntryAsBool (inifile, L"options", L"show game clock", true) > 0); |
49 | options.clock_color = INIFile_ReadEntryAsUnsignedLong (inifile, L"options", L"game clock color", 0x00007f00); // dark blue, in RGBA |
48 | options.clock_color = INIFile_ReadEntryAsUnsignedLong (inifile, L"options", L"game clock color", 0x00007f00); // dark blue, in RGBA |
50 | options.want_history = (INIFile_ReadEntryAsBool (inifile, L"options", L"show game history", true) > 0); |
49 | options.want_history = (INIFile_ReadEntryAsBool (inifile, L"options", L"show game history", true) > 0); |
51 | options.history_color = INIFile_ReadEntryAsUnsignedLong (inifile, L"options", L"game history color", 0xe7e7e700); // light grey, in RGBA |
50 | options.history_color = INIFile_ReadEntryAsUnsignedLong (inifile, L"options", L"game history color", 0xe7e7e700); // light grey, in RGBA |
52 | options. |
51 | options.want_playblackside = (INIFile_ReadEntryAsBool (inifile, L"options", L"local player prefers black", false) > 0); |
53 | options.want_autorotateon1vs1 = (INIFile_ReadEntryAsBool (inifile, L"options", L"auto-rotate board",true) > 0); |
52 | options.want_autorotateon1vs1 = (INIFile_ReadEntryAsBool (inifile, L"options", L"auto-rotate board", true) > 0); |
54 | options.rotate_speed = INIFile_ReadEntryAsLong (inifile, L"options", L"rotation speed", 10); |
53 | options.rotate_speed = INIFile_ReadEntryAsLong (inifile, L"options", L"rotation speed", 10); |
55 | 54 | ||
56 | // [display] |
55 | // [display] |
57 | READ_WIDESTRING (temp_string, inifile, L"display", L"language", L"auto"); // first, try to read the language from the config file |
56 | READ_WIDESTRING (temp_string, inifile, L"display", L"language", L"auto"); // first, try to read the language from the config file |
58 | is_language_auto = (wcscmp (temp_string, L"auto") == 0); // remember is language is set to be automatically chosen |
57 | is_language_auto = (wcscmp (temp_string, L"auto") == 0); // remember is language is set to be automatically chosen |
59 | for (language_index = 0; language_index < language_count; language_index++) |
58 | for (language_index = 0; language_index < language_count; language_index++) |
Line 81... | Line 80... | ||
81 | break; // stop searching as soon as we find it |
80 | break; // stop searching as soon as we find it |
82 | } |
81 | } |
83 | } |
82 | } |
84 | if (language_index == language_count) |
83 | if (language_index == language_count) |
85 | language_id = 0; // if still not found, fallback to the first language known |
84 | language_id = 0; // if still not found, fallback to the first language known |
86 | options.want_fullscreen = (INIFile_ReadEntryAsBool (inifile, L"display", L"fullscreen", false) > 0); |
85 | options.want_fullscreen = (INIFile_ReadEntryAsBool (inifile, L"display", L"fullscreen", false) > 0); |
87 | options.want_maximized = (INIFile_ReadEntryAsBool (inifile, L"display", L"maximized", false) > 0); |
86 | options.want_maximized = (INIFile_ReadEntryAsBool (inifile, L"display", L"maximized", false) > 0); |
88 | options.window_width = INIFile_ReadEntryAsLong (inifile, L"display", L"window width", 1024); |
87 | options.window_width = INIFile_ReadEntryAsLong (inifile, L"display", L"window width", 1024); |
89 | options.window_height = INIFile_ReadEntryAsLong (inifile, L"display", L"window height", 768); |
88 | options.window_height = INIFile_ReadEntryAsLong (inifile, L"display", L"window height", 768); |
90 | options.want_filtering = (INIFile_ReadEntryAsBool (inifile, L"display", L"enable texture filtering", true) > 0); |
89 | options.want_filtering = (INIFile_ReadEntryAsBool (inifile, L"display", L"enable texture filtering", true) > 0); |
91 | options.want_hiquality = (INIFile_ReadEntryAsBool (inifile, L"display", L"enable high quality filtering", true) > 0); |
90 | options.want_hiquality = (INIFile_ReadEntryAsBool (inifile, L"display", L"enable high quality filtering", true) > 0); |
92 | options.want_specularlighting = (INIFile_ReadEntryAsBool (inifile, L"display", L"enable specular lighting", true) > 0); |
91 | options.want_specularlighting = (INIFile_ReadEntryAsBool (inifile, L"display", L"enable specular lighting", true) > 0); |
93 | options.want_reflections = (INIFile_ReadEntryAsBool (inifile, L"display", L"enable board reflections", true) > 0); |
92 | options.want_reflections = (INIFile_ReadEntryAsBool (inifile, L"display", L"enable board reflections", true) > 0); |
- | 93 | options.want_sepiafilter = (INIFile_ReadEntryAsBool (inifile, L"display", L"use sepia filter for past moves", true) > 0); |
|
- | 94 | options.want_startwithtopview = (INIFile_ReadEntryAsBool (inifile, L"display", L"always start with top view", false) > 0); |
|
94 | 95 | ||
95 | // [sound] |
96 | // [sound] |
96 | options.want_sounds = (INIFile_ReadEntryAsBool (inifile, L"sound", L"play sounds", true) > 0); |
97 | options.want_sounds = (INIFile_ReadEntryAsBool (inifile, L"sound", L"play sounds", true) > 0); |
97 | 98 | ||
98 | // [theme] |
99 | // [theme] |
99 | READ_WIDESTRING (wantedtheme_name, inifile, L"theme", L"theme name", L"Default"); |
100 | READ_WIDESTRING (wantedtheme_name, inifile, L"theme", L"theme name", L"Default"); |
100 | want_grid = (INIFile_ReadEntryAsBool (inifile, L"theme", L"show grid", true) > 0); |
101 | want_grid = (INIFile_ReadEntryAsBool (inifile, L"theme", L"show grid", true) > 0); |
101 | want_flaticons = (INIFile_ReadEntryAsBool (inifile, L"theme", L"flat icons instead", true) > 0); |
102 | want_flaticons = (INIFile_ReadEntryAsBool (inifile, L"theme", L"flat icons instead", true) > 0); |
102 | want_custombackground = (INIFile_ReadEntryAsBool (inifile, L"theme", L"use custom background", false) > 0); |
103 | want_custombackground = (INIFile_ReadEntryAsBool (inifile, L"theme", L"use custom background", false) > 0); |
103 | READ_WIDESTRING (custombackground_pathname, inifile, L"theme", L"custom background picture", L""); |
104 | READ_WIDESTRING (custombackground_pathname, inifile, L"theme", L"custom background picture", L""); |
104 | 105 | ||
105 | // [engine] |
106 | // [engine] |
106 | Config_LoadEngines (); // discover all engine parameters from the engines folder |
107 | Config_LoadEngines (); // discover all engine parameters from the engines folder |
Line 118... | Line 119... | ||
118 | break; // identify a suitable engine, break as soon as we find it |
119 | break; // identify a suitable engine, break as soon as we find it |
119 | if (program_index == options.engine.program_count) |
120 | if (program_index == options.engine.program_count) |
120 | program_index = 0; // if NO engine is available, fallback on the first one |
121 | program_index = 0; // if NO engine is available, fallback on the first one |
121 | } |
122 | } |
122 | options.engine.selected_program = program_index; |
123 | options.engine.selected_program = program_index; |
123 | options.engine.depth = INIFile_ReadEntryAsLong (inifile, L"engine", L"allowed depth", 10); |
124 | options.engine.depth = INIFile_ReadEntryAsLong (inifile, L"engine", L"allowed depth", 10); |
124 | options.engine.max_depth = INIFile_ReadEntryAsLong (inifile, L"engine", L"maximum depth", 20); |
125 | options.engine.max_depth = INIFile_ReadEntryAsLong (inifile, L"engine", L"maximum depth", 20); |
125 | options.engine.blunder_chances = INIFile_ReadEntryAsLong (inifile, L"engine", L"blunder chances", 5); |
126 | options.engine.blunder_chances = INIFile_ReadEntryAsLong (inifile, L"engine", L"blunder chances", 5); |
126 | options.engine.obstinacy_level = INIFile_ReadEntryAsLong (inifile, L"engine", L"obstinacy", -1); |
127 | options.engine.obstinacy_level = INIFile_ReadEntryAsLong (inifile, L"engine", L"obstinacy", -1); |
127 | options.engine.is_expert_mode = (INIFile_ReadEntryAsBool (inifile, L"engine", L"expert mode", false) > 0); |
128 | options.engine.is_expert_mode = (INIFile_ReadEntryAsBool (inifile, L"engine", L"expert mode", false) > 0); |
128 | 129 | ||
129 | // [network] |
130 | // [network] |
130 | READ_WIDESTRING (options.network.server_address, inifile, L"network", L"server address", L"freechess.org"); |
131 | READ_WIDESTRING (options.network.server_address, inifile, L"network", L"server address", L"freechess.org"); |
131 | options.network.server_port = INIFile_ReadEntryAsLong (inifile, L"network", L"server port", 5000); |
132 | options.network.server_port = INIFile_ReadEntryAsLong (inifile, L"network", L"server port", 5000); |
132 | READ_WIDESTRING (options.network.login, inifile, L"network", L"login", L"guest"); |
133 | READ_WIDESTRING (options.network.login, inifile, L"network", L"login", L"guest"); |
133 | READ_WIDESTRING (options.network.password, inifile, L"network", L"password", L""); |
134 | READ_WIDESTRING (options.network.password, inifile, L"network", L"password", L""); |
134 | options.network.want_servermessages = (INIFile_ReadEntryAsBool (inifile, L"network", L"show server messages", true) > 0); |
135 | options.network.want_servermessages = (INIFile_ReadEntryAsBool (inifile, L"network", L"show server messages", true) > 0); |
135 | options.network.want_publicchat = (INIFile_ReadEntryAsBool (inifile, L"network", L"show public chat", true) > 0); |
136 | options.network.want_publicchat = (INIFile_ReadEntryAsBool (inifile, L"network", L"show public chat", true) > 0); |
136 | options.network.want_motdonconnect = (INIFile_ReadEntryAsBool (inifile, L"network", L"show MOTD on connect", true) > 0); |
137 | options.network.want_motdonconnect = (INIFile_ReadEntryAsBool (inifile, L"network", L"show MOTD on connect", true) > 0); |
- | 138 | ||
- | 139 | // [abbreviations] |
|
- | 140 | READ_WIDESTRING (options.part_letters.rook, inifile, L"abbreviations", L"rook", L"R"); options.part_letters.rook[0] = towupper (options.part_letters.rook[0]); options.part_letters.rook[1] = 0; // sanitize |
|
- | 141 | READ_WIDESTRING (options.part_letters.knight, inifile, L"abbreviations", L"knight", L"N"); options.part_letters.knight[0] = towupper (options.part_letters.knight[0]); options.part_letters.knight[1] = 0; // sanitize |
|
- | 142 | READ_WIDESTRING (options.part_letters.bishop, inifile, L"abbreviations", L"bishop", L"B"); options.part_letters.bishop[0] = towupper (options.part_letters.bishop[0]); options.part_letters.bishop[1] = 0; // sanitize |
|
- | 143 | READ_WIDESTRING (options.part_letters.queen, inifile, L"abbreviations", L"queen", L"Q"); options.part_letters.queen[0] = towupper (options.part_letters.queen[0]); options.part_letters.rook[1] = 0; // sanitize |
|
- | 144 | READ_WIDESTRING (options.part_letters.king, inifile, L"abbreviations", L"king", L"K"); options.part_letters.king[0] = towupper (options.part_letters.king[0]); options.part_letters.king[1] = 0; // sanitize |
|
137 | 145 | ||
138 | // [registration] |
146 | // [registration] |
139 | READ_WIDESTRING (options.registration.user_email, inifile, L"registration", L"user email", L""); |
147 | READ_WIDESTRING (options.registration.user_email, inifile, L"registration", L"user email", L""); |
140 | options.registration.activation_code = (unsigned __int32) INIFile_ReadEntryAsLong (inifile, L"registration", L"activation code", 0); |
148 | options.registration.activation_code = (unsigned __int32) INIFile_ReadEntryAsLong (inifile, L"registration", L"activation code", 0); |
141 | 149 | ||
Line 238... | Line 246... | ||
238 | if (smiley_index < smiley_count) |
246 | if (smiley_index < smiley_count) |
239 | { |
247 | { |
240 | // if so, just copy data and data length from the smiley we already know |
248 | // if so, just copy data and data length from the smiley we already know |
241 | smiley->rtf_data = smilies[smiley_index].rtf_data; |
249 | smiley->rtf_data = smilies[smiley_index].rtf_data; |
242 | smiley->rtf_len = smilies[smiley_index].rtf_len; |
250 | smiley->rtf_len = smilies[smiley_index].rtf_len; |
243 | } |
251 | } |
244 | 252 | ||
245 | // else we found no match, we have to read the file ourselves |
253 | // else we found no match, we have to read the file ourselves |
246 | else |
254 | else |
247 | { |
255 | { |
248 | // build the smiley picture's file pathname and read that smiley's data as a hex string |
256 | // build the smiley picture's file pathname and read that smiley's data as a hex string |
249 | swprintf_s (temp_string, WCHAR_SIZEOF (temp_string), L"%s/data/smilies/%s", app_path, smiley->filename); |
257 | swprintf_s (temp_string, WCHAR_SIZEOF (temp_string), L"%s/data/smilies/%s", app_path, smiley->filename); |
250 | _wfopen_s (&fp, temp_string, L"rb"); |
258 | _wfopen_s (&fp, temp_string, L"rb"); |
251 | if (fp == NULL) |
259 | if (fp == NULL) |
252 | continue; // if this smiley picture file can't be opened, ignore this smiley |
260 | continue; // if this smiley picture file can't be opened, ignore this smiley |
253 | 261 | ||
254 | // get the file length |
262 | // get the file length |
255 | fseek (fp, 0, SEEK_END); |
263 | fseek (fp, 0, SEEK_END); |
256 | file_length = ftell (fp); |
264 | file_length = ftell (fp); |
257 | fseek (fp, 0, SEEK_SET); |
265 | fseek (fp, 0, SEEK_SET); |
258 | 266 | ||
259 | // mallocate space for file contents and read it |
267 | // mallocate space for file contents and read it |
260 | file_buffer = (char *) SAFE_malloc (1 + file_length + 1 + 1, sizeof (char), false); // include null terminator |
268 | file_buffer = (char *) SAFE_malloc (1 + file_length + 1 + 1, sizeof (char), false); // include null terminator |
261 | file_buffer[0] = ' '; // first character is a whitespace |
269 | file_buffer[0] = ' '; // first character is a whitespace |
262 | fread (&file_buffer[1], file_length, sizeof (char), fp); |
270 | fread (&file_buffer[1], file_length, sizeof (char), fp); |
263 | file_buffer[1 + file_length] = ' '; // last character is a whitespace |
271 | file_buffer[1 + file_length] = ' '; // last character is a whitespace |
Line 275... | Line 283... | ||
275 | } |
283 | } |
276 | 284 | ||
277 | // close the INI file |
285 | // close the INI file |
278 | INIFile_FreeINIFile (inifile); |
286 | INIFile_FreeINIFile (inifile); |
279 | return; // finished loading config |
287 | return; // finished loading config |
280 | } |
288 | } |
281 | 289 | ||
282 | 290 | ||
283 | void Config_LoadEngines (void) |
291 | void Config_LoadEngines (void) |
284 | { |
292 | { |
285 | // this function loads the engine-specific parameters. The best place to call it is at the beginning |
293 | // this function loads the engine-specific parameters. The best place to call it is at the beginning |
286 | // of a game versus the computer, just before the engine executable process is started. |
294 | // of a game versus the computer, just before the engine executable process is started. |
287 | 295 | ||
288 | wchar_t temp_string[MAX_PATH]; |
296 | wchar_t temp_string[MAX_PATH]; |
289 | engineprogram_t *engineprogram; |
297 | engineprogram_t *engineprogram; |
290 | int version_numbers[4]; |
298 | int version_numbers[4] = { 0, 0, 0, 0 }; // initialize to make MSVC happy |
291 | void *engine_inifile; |
299 | void *engine_inifile; |
292 | WIN32_FIND_DATA wfd; |
300 | WIN32_FIND_DATA wfd; |
293 | HANDLE hFind; |
301 | HANDLE hFind; |
294 | wchar_t *ptr; |
302 | wchar_t *ptr; |
295 | 303 | ||
Line 347... | Line 355... | ||
347 | 355 | ||
348 | INIFile_FreeINIFile (engine_inifile); // close the engine config file |
356 | INIFile_FreeINIFile (engine_inifile); // close the engine config file |
349 | 357 | ||
350 | options.engine.program_count++; // we've identified one engine more |
358 | options.engine.program_count++; // we've identified one engine more |
351 | } while (FindNextFile (hFind, &wfd)); // ...and don't stop as long as there are directory entries to go |
359 | } while (FindNextFile (hFind, &wfd)); // ...and don't stop as long as there are directory entries to go |
352 | 360 | ||
353 | FindClose (hFind); // close the search handle |
361 | FindClose (hFind); // close the search handle |
354 | return; // engine parameters loaded successfully |
362 | return; // engine parameters loaded successfully |
355 | } |
363 | } |
356 | 364 | ||
357 | 365 | ||
Line 368... | Line 376... | ||
368 | HKEY hRegistryKey; |
376 | HKEY hRegistryKey; |
369 | 377 | ||
370 | // create a config file with the default values |
378 | // create a config file with the default values |
371 | inifile = INIFile_NewINIFile (); |
379 | inifile = INIFile_NewINIFile (); |
372 | 380 | ||
373 | // [gameplay] |
381 | // [options] -- FIXME: should be [gameplay] but would cause backwards compatibility problems |
374 | INIFile_WriteEntryAsBool (inifile, L"options", L"highlight last move", options.want_lastmove); |
382 | INIFile_WriteEntryAsBool (inifile, L"options", L"highlight last move", options.want_lastmove); |
375 | INIFile_WriteEntryAsBool (inifile, L"options", L"highlight possible moves", options.want_possiblemoves); |
383 | INIFile_WriteEntryAsBool (inifile, L"options", L"highlight possible moves", options.want_possiblemoves); |
376 | INIFile_WriteEntryAsBool (inifile, L"options", L"highlight king's threats", options.want_threats); |
384 | INIFile_WriteEntryAsBool (inifile, L"options", L"highlight king's threats", options.want_threats); |
377 | INIFile_WriteEntryAsBool (inifile, L"options", L"display part animations", options.want_animations); |
385 | INIFile_WriteEntryAsBool (inifile, L"options", L"display part animations", options.want_animations); |
378 | INIFile_WriteEntryAsBool (inifile, L"options", L"display part sliding animations", options.want_slidinganimations); |
386 | INIFile_WriteEntryAsBool (inifile, L"options", L"display part sliding animations", options.want_slidinganimations); |
Line 380... | Line 388... | ||
380 | INIFile_WriteEntryAsBool (inifile, L"options", L"show turn", options.want_turn); |
388 | INIFile_WriteEntryAsBool (inifile, L"options", L"show turn", options.want_turn); |
381 | INIFile_WriteEntryAsBool (inifile, L"options", L"show game clock", options.want_clock); |
389 | INIFile_WriteEntryAsBool (inifile, L"options", L"show game clock", options.want_clock); |
382 | INIFile_WriteEntryAsUnsignedLong (inifile, L"options", L"game clock color", options.clock_color); |
390 | INIFile_WriteEntryAsUnsignedLong (inifile, L"options", L"game clock color", options.clock_color); |
383 | INIFile_WriteEntryAsBool (inifile, L"options", L"show game history", options.want_history); |
391 | INIFile_WriteEntryAsBool (inifile, L"options", L"show game history", options.want_history); |
384 | INIFile_WriteEntryAsUnsignedLong (inifile, L"options", L"game history color", options.history_color); |
392 | INIFile_WriteEntryAsUnsignedLong (inifile, L"options", L"game history color", options.history_color); |
385 | INIFile_WriteEntryAsBool (inifile, L"options", L" |
393 | INIFile_WriteEntryAsBool (inifile, L"options", L"local player prefers black", options.want_playblackside); |
386 | INIFile_WriteEntryAsBool (inifile, L"options", L"auto-rotate board", options.want_autorotateon1vs1); |
394 | INIFile_WriteEntryAsBool (inifile, L"options", L"auto-rotate board", options.want_autorotateon1vs1); |
387 | INIFile_WriteEntryAsLong (inifile, L"options", L"rotation speed", options.rotate_speed); |
395 | INIFile_WriteEntryAsLong (inifile, L"options", L"rotation speed", options.rotate_speed); |
388 | 396 | ||
389 | // [display] |
397 | // [display] |
390 | WRITE_WIDESTRING (L"display", L"language", (is_language_auto ? L"auto" : languages[language_id].name)); |
398 | WRITE_WIDESTRING (L"display", L"language", (is_language_auto ? L"auto" : languages[language_id].name)); |
Line 394... | Line 402... | ||
394 | INIFile_WriteEntryAsLong (inifile, L"display", L"window height", options.window_height); |
402 | INIFile_WriteEntryAsLong (inifile, L"display", L"window height", options.window_height); |
395 | INIFile_WriteEntryAsBool (inifile, L"display", L"enable texture filtering", options.want_filtering); |
403 | INIFile_WriteEntryAsBool (inifile, L"display", L"enable texture filtering", options.want_filtering); |
396 | INIFile_WriteEntryAsBool (inifile, L"display", L"enable high quality filtering", options.want_hiquality); |
404 | INIFile_WriteEntryAsBool (inifile, L"display", L"enable high quality filtering", options.want_hiquality); |
397 | INIFile_WriteEntryAsBool (inifile, L"display", L"enable specular lighting", options.want_specularlighting); |
405 | INIFile_WriteEntryAsBool (inifile, L"display", L"enable specular lighting", options.want_specularlighting); |
398 | INIFile_WriteEntryAsBool (inifile, L"display", L"enable board reflections", options.want_reflections); |
406 | INIFile_WriteEntryAsBool (inifile, L"display", L"enable board reflections", options.want_reflections); |
- | 407 | INIFile_WriteEntryAsBool (inifile, L"display", L"use sepia filter for past moves", options.want_sepiafilter); |
|
- | 408 | INIFile_WriteEntryAsBool (inifile, L"display", L"always start with top view", options.want_startwithtopview); |
|
399 | 409 | ||
400 | // [sound] |
410 | // [sound] |
401 | INIFile_WriteEntryAsBool (inifile, L"sound", L"play sounds", options.want_sounds); |
411 | INIFile_WriteEntryAsBool (inifile, L"sound", L"play sounds", options.want_sounds); |
402 | 412 | ||
403 | // [theme] |
413 | // [theme] |
Line 421... | Line 431... | ||
421 | WRITE_WIDESTRING (L"network", L"login", options.network.login); |
431 | WRITE_WIDESTRING (L"network", L"login", options.network.login); |
422 | WRITE_WIDESTRING (L"network", L"password", options.network.password); |
432 | WRITE_WIDESTRING (L"network", L"password", options.network.password); |
423 | INIFile_WriteEntryAsBool (inifile, L"network", L"show server messages", options.network.want_servermessages); |
433 | INIFile_WriteEntryAsBool (inifile, L"network", L"show server messages", options.network.want_servermessages); |
424 | INIFile_WriteEntryAsBool (inifile, L"network", L"show public chat", options.network.want_publicchat); |
434 | INIFile_WriteEntryAsBool (inifile, L"network", L"show public chat", options.network.want_publicchat); |
425 | INIFile_WriteEntryAsBool (inifile, L"network", L"show MOTD on connect", options.network.want_motdonconnect); |
435 | INIFile_WriteEntryAsBool (inifile, L"network", L"show MOTD on connect", options.network.want_motdonconnect); |
- | 436 | ||
- | 437 | // [abbreviations] |
|
- | 438 | WRITE_WIDESTRING (L"abbreviations", L"rook", options.part_letters.rook); |
|
- | 439 | WRITE_WIDESTRING (L"abbreviations", L"knight", options.part_letters.knight); |
|
- | 440 | WRITE_WIDESTRING (L"abbreviations", L"bishop", options.part_letters.bishop); |
|
- | 441 | WRITE_WIDESTRING (L"abbreviations", L"queen", options.part_letters.queen); |
|
- | 442 | WRITE_WIDESTRING (L"abbreviations", L"king", options.part_letters.king); |
|
426 | 443 | ||
427 | // [registration] |
444 | // [registration] |
428 | WRITE_WIDESTRING (L"registration", L"user email", options.registration.user_email); |
445 | WRITE_WIDESTRING (L"registration", L"user email", options.registration.user_email); |
429 | INIFile_WriteEntryAsLong (inifile, L"registration", L"activation code", (long) options.registration.activation_code); |
446 | INIFile_WriteEntryAsLong (inifile, L"registration", L"activation code", (long) options.registration.activation_code); |
430 | 447 |