51 :
FormWindow(s, 0, 0, s->Width(), s->Height()), manager(mgr),
52 selected_mode(0), selected_detail(0), orig_gamma(128),
53 selected_card(0), selected_tex_size(0), selected_render(0), selected_texture(0),
54 mode(0), tex_size(0), detail(0), texture(0), gamma(0), shadows(0), spec_maps(0),
55 bump_maps(0), lens_flare(0), corona(0), nebula(0), dust(0),
56 apply(0), cancel(0), vid_btn(0), aud_btn(0), ctl_btn(0), opt_btn(0), mod_btn(0),
138 bool fullscreen =
true;
146 for (
int i = 0; i < 7; i++) {
147 if (n <= pow(2.0f, i+6)) {
256 if (g >= 0 && g <= 255) {
300 if (strstr(mode_desc,
"800 x 600")) {
304 else if (strstr(mode_desc,
"1024 x 768")) {
308 else if (strstr(mode_desc,
"1152 x 864")) {
312 else if (strstr(mode_desc,
"1280 x 800")) {
316 else if (strstr(mode_desc,
"1280 x 960")) {
320 else if (strstr(mode_desc,
"1280 x 1024")) {
324 else if (strstr(mode_desc,
"1440 x 900")) {
328 else if (strstr(mode_desc,
"1600 x 900")) {
332 else if (strstr(mode_desc,
"1600 x 1200")) {
337 if (strstr(mode_desc,
"x 16"))
339 else if (strstr(mode_desc,
"x 32"))
345 bool video_change =
false;
355 if (video->
Width() != w)
361 if (video->
Depth() != d)
382 fopen_s(&f,
"video2.cfg",
"w");
384 fopen_s(&f,
"video.cfg",
"w");
391 fprintf(f,
"VIDEO\n\n");
392 fprintf(f,
"width: %4d\n", w);
393 fprintf(f,
"height: %4d\n", h);
394 fprintf(f,
"depth: %4d\n", d);
397 fprintf(f,
"primary3D: %s\n", (a>0)?
"true":
"false");
398 fprintf(f,
"gamma: %4d\n", g);
401 fprintf(f,
"terrain_texture_enable: %s\n",
selected_texture ?
"true" :
"false");
406 fprintf(f,
"bias: %f\n", bias);
481 if (stars && video) {
482 switch (video->
Width()) {
483 case 800: strcpy_s(mode_desc,
"800 x 600 x ");
break;
485 case 1024: strcpy_s(mode_desc,
"1024 x 768 x ");
break;
486 case 1152: strcpy_s(mode_desc,
"1152 x 864 x ");
break;
488 if (video->
Height() < 900)
489 strcpy_s(mode_desc,
"1280 x 800 x ");
490 if (video->
Height() < 1000)
491 strcpy_s(mode_desc,
"1280 x 960 x ");
493 strcpy_s(mode_desc,
"1280 x 1024 x ");
495 case 1440: strcpy_s(mode_desc,
"1440 x 900 x ");
break;
497 if (video->
Height() < 1000)
498 strcpy_s(mode_desc,
"1600 x 900 x ");
500 strcpy_s(mode_desc,
"1600 x 1200 x ");
504 switch (video->
Depth()) {
506 case 8: strcat_s(mode_desc,
"8");
break;
507 case 16: strcat_s(mode_desc,
"16");
break;
508 case 32: strcat_s(mode_desc,
"32");
break;