video menu and option menu got mixed up after the video menu was selected

origin r0-11-0
stpohle 22 years ago
parent 3196ca7110
commit 67f576a28b

@ -1,9 +1,9 @@
$Id: ChangeLog,v 1.50 2004/01/06 20:49:57 stpohle Exp $
$Id: ChangeLog,v 1.51 2004/01/06 23:07:21 stpohle Exp $
Version 0.11.0
==============
2004-01-06
- Added Programm flags to the game. For more information
- Added Programm options to the game. For more information
run BomberClone with -help.
- Compiler Flag added for disabling debuging. Compiler

@ -73,7 +73,6 @@ config_init (int argc, char **argv)
map.sp_trigger = GAME_SPECIAL_ITEMSTRIGGER;
map.sp_row = GAME_SPECIAL_ITEMSROW;
map.sp_push = GAME_SPECIAL_ITEMSPUSH;
d_printf ("\n\n ***** Bomberclone Version %s \n\n", VERSION);
if (config_read ()) { /* error on reading the config file */
ReadPrgArgs (argc, argv);
@ -82,7 +81,8 @@ config_init (int argc, char **argv)
bman.playername[LEN_PLAYERNAME - 1] = 0;
bman.playername[0] = 0;
config_menu ();
} else {
}
else {
ReadPrgArgs (argc, argv);
gfx_init ();
draw_logo ();
@ -98,7 +98,9 @@ config_init (int argc, char **argv)
/* read the configuration file
* return -1 if something went wrong and 0 if no problem */
int config_read () {
int
config_read ()
{
FILE *config;
char buf[1024];
char *findit,
@ -311,7 +313,10 @@ config_write ()
void
config_video ()
{
int done = 0, menuselect, x, y;
int done = 0,
menuselect,
x,
y;
_charlist screenres[] = {
{"640x480", NULL},
{"800x600", NULL},
@ -357,7 +362,8 @@ config_video ()
case (1): // new resolution
gfx_shutdown ();
sscanf (selres->text, "%dx%d", &x, &y);
gfx.res.x = x; gfx.res.y = y;
gfx.res.x = x;
gfx.res.y = y;
gfx_init ();
break;
case (2): // new color depth
@ -385,6 +391,7 @@ config_menu ()
{
int menuselect = 0;
while (menuselect != -1 && bman.state != GS_quit) {
menu_new ("Configuration", 400, 300);
menu_create_label ("General Option", -1, 50, 1);
menu_create_entry ("Name", -1, 85, 200, bman.playername, LEN_PLAYERNAME, MENU_entrytext, 1);
@ -397,7 +404,6 @@ config_menu ()
menu_create_bool ("Debug", 25, 230, 150, &debug, 5);
menu_create_bool ("Ask Playername", 250, 230, 150, &bman.askplayername, 6);
menu_create_button ("Ok", -1, 270, 150, 0);
while (menuselect != -1 && bman.state != GS_quit) {
if (bman.playername[0] == '\0')
menu_focus_id (1);
else
@ -406,6 +412,7 @@ config_menu ()
menu_reload ();
menuselect = menu_loop ();
menu_delete ();
switch (menuselect) {
case (0): // Back to the Main Menu
if (bman.playername[0] == '\0')
@ -418,7 +425,6 @@ config_menu ()
break;
}
}
menu_delete ();
config_write ();
};

Loading…
Cancel
Save