|
|
@ -48,6 +48,7 @@ game_init ()
|
|
|
|
debug = 0;
|
|
|
|
debug = 0;
|
|
|
|
gfx.res.x = 640;
|
|
|
|
gfx.res.x = 640;
|
|
|
|
gfx.res.y = 480;
|
|
|
|
gfx.res.y = 480;
|
|
|
|
|
|
|
|
gfx.bpp = 16;
|
|
|
|
bman.fieldsize.x = 25;
|
|
|
|
bman.fieldsize.x = 25;
|
|
|
|
bman.fieldsize.y = 17;
|
|
|
|
bman.fieldsize.y = 17;
|
|
|
|
sprintf (bman.datapath, "data/bomberclone.gfx");
|
|
|
|
sprintf (bman.datapath, "data/bomberclone.gfx");
|
|
|
@ -144,6 +145,9 @@ ReadConfig ()
|
|
|
|
if (!strcmp (keyword, "fullscreen")) {
|
|
|
|
if (!strcmp (keyword, "fullscreen")) {
|
|
|
|
gfx.fullscreen = atoi (value);
|
|
|
|
gfx.fullscreen = atoi (value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!strcmp (keyword, "bitsperpixel")) {
|
|
|
|
|
|
|
|
gfx.bpp = atoi (value);
|
|
|
|
|
|
|
|
}
|
|
|
|
if (!strcmp (keyword, "ai_family")) {
|
|
|
|
if (!strcmp (keyword, "ai_family")) {
|
|
|
|
bman.net_ai_family = atoi (value);
|
|
|
|
bman.net_ai_family = atoi (value);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -198,6 +202,8 @@ WriteConfig ()
|
|
|
|
fprintf (config, "debug=%d\n", debug);
|
|
|
|
fprintf (config, "debug=%d\n", debug);
|
|
|
|
fprintf (config, "selectplayer=%d\n", bman.selectplayer);
|
|
|
|
fprintf (config, "selectplayer=%d\n", bman.selectplayer);
|
|
|
|
fprintf (config, "playername=%s\n", bman.playername);
|
|
|
|
fprintf (config, "playername=%s\n", bman.playername);
|
|
|
|
|
|
|
|
fprintf (config, "bitsperpixel=%d\n", gfx.bpp);
|
|
|
|
|
|
|
|
|
|
|
|
fclose (config);
|
|
|
|
fclose (config);
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -214,7 +220,8 @@ change_res ()
|
|
|
|
{2, "800x600"},
|
|
|
|
{2, "800x600"},
|
|
|
|
{3, "1024x768"},
|
|
|
|
{3, "1024x768"},
|
|
|
|
{4, "1280x1024"},
|
|
|
|
{4, "1280x1024"},
|
|
|
|
{5, "Return To Configuration Menu"},
|
|
|
|
{5, "BPP"},
|
|
|
|
|
|
|
|
{6, "Return To Configuration Menu"},
|
|
|
|
{-1, ""}
|
|
|
|
{-1, ""}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
while (1) {
|
|
|
|
while (1) {
|
|
|
@ -223,6 +230,10 @@ change_res ()
|
|
|
|
else
|
|
|
|
else
|
|
|
|
sprintf (menu[0].text, "Enable Full Screen");
|
|
|
|
sprintf (menu[0].text, "Enable Full Screen");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (gfx.bpp == 16)
|
|
|
|
|
|
|
|
sprintf (menu[5].text, "16 Bit Per Pixel");
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
sprintf (menu[5].text, "32 Bit Per Pixel");
|
|
|
|
|
|
|
|
|
|
|
|
menuselect = menu_loop ("Video Options", menu, menuselect);
|
|
|
|
menuselect = menu_loop ("Video Options", menu, menuselect);
|
|
|
|
|
|
|
|
|
|
|
@ -250,7 +261,13 @@ change_res ()
|
|
|
|
gfx.res.x = 1280;
|
|
|
|
gfx.res.x = 1280;
|
|
|
|
gfx.res.y = 1024;
|
|
|
|
gfx.res.y = 1024;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case (5): // Return
|
|
|
|
case (5):
|
|
|
|
|
|
|
|
if (gfx.bpp == 16)
|
|
|
|
|
|
|
|
gfx.bpp = 32;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
gfx.bpp = 16;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case (6): // Return
|
|
|
|
menuselect = -1;
|
|
|
|
menuselect = -1;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|