Changed Option Menu, if no Playername is set. Focus the Playername Entry. Redraw the Background Screen after a Single Player Game

origin
stpohle 22 years ago
parent 9caf9cd20a
commit 3196ca7110

@ -4,7 +4,11 @@ Maintainer:
Coding:
Steffen Pohle (steffen@bomberclone.de)
Patty
Patrick Wilczek
Graphics:
TekkRat (playergfx, bombs, some tilesets)
Testing and Other Help:
Martijn de Boer (martijn@duncan.xs4all.nl)
The people from the #gametome channel on irc.Freenode.net

@ -1,4 +1,10 @@
$Id: ChangeLog,v 1.49 2004/01/06 04:27:21 stpohle Exp $
$Id: ChangeLog,v 1.50 2004/01/06 20:49:57 stpohle Exp $
Version 0.11.0
==============
2004-01-06
- Added Programm flags to the game. For more information
run BomberClone with -help.
- Compiler Flag added for disabling debuging. Compiler
Flags -ggdb and -O0 won'T be set no more.

@ -1,4 +1,6 @@
$Id: TODO,v 1.34 2004/01/03 03:01:30 stpohle Exp $
$Id: TODO,v 1.35 2004/01/06 20:49:57 stpohle Exp $
- support for more player on one keyboard
- better configuration for home made map files

@ -384,32 +384,41 @@ void
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);
menu_create_button ("Video Setup", -1, 120, 200, 2);
menu_create_label ("Sound", 25 , 154, 0);
menu_create_bool ("ON", 100, 150, 50, &snd.playsound, 3);
menu_create_label ("Music", 250 , 154, 0);
menu_create_bool ("ON", 325, 150, 50, &snd.playmusic, 4);
menu_create_label ("Extended Option", -1, 200, 1);
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);
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);
menu_create_button ("Video Setup", -1, 120, 200, 2);
menu_create_label ("Sound", 25 , 154, 0);
menu_create_bool ("ON", 100, 150, 50, &snd.playsound, 3);
menu_create_label ("Music", 250 , 154, 0);
menu_create_bool ("ON", 325, 150, 50, &snd.playmusic, 4);
menu_create_label ("Extended Option", -1, 200, 1);
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
menu_focus_id (0);
menu_reload ();
menuselect = menu_loop ();
menu_delete ();
switch (menuselect) {
case (0): // Back to the Main Menu
menuselect = -1;
if (bman.playername[0] == '\0')
menuselect = 0;
else
menuselect = -1;
break;
case (2): // Screen Options
config_video ();
break;
}
}
menu_delete ();
config_write ();
};

@ -1,4 +1,4 @@
/* $Id: single.c,v 1.53 2004/01/03 02:12:34 stpohle Exp $ */
/* $Id: single.c,v 1.54 2004/01/06 20:49:59 stpohle Exp $ */
/* single player */
#include "basic.h"
@ -745,6 +745,8 @@ single_menu ()
done = 1;
break;
}
draw_logo ();
SDL_Flip (gfx.screen);
}
};

Loading…
Cancel
Save