menu_displaymessages and displaytext changed, it can take now formates like printf does

origin
stpohle 22 years ago
parent 6f76e429d7
commit ea628cb000

@ -1,4 +1,4 @@
/* $Id: menu.h,v 1.6 2004/02/05 22:59:02 stpohle Exp $
/* $Id: menu.h,v 1.7 2004/02/07 11:47:09 stpohle Exp $
* GUI for menuhandling
*/
@ -83,7 +83,8 @@ extern _menuitem *menu_get_lastid ();
extern _menuitem *menu_get_firstid ();
extern int menu_create_dirlist (char *path, signed char dirflags, _charlist *cl, int maxentry);
extern char *menu_dir_select (char *title, char *path, signed char dirflags);
extern void menu_displaymessage (char *title, char *line1, char *line2, char *line3, char *line4);
extern void menu_displaytext (char *title, char *line1, char *line2, char *line3, char *line4);
extern void menu_displaymessage (char *title, char *fmt,...);
extern void menu_displaytext (char *title, char *fmt,...);
extern void menu_formattext (char *input, char *out, char **start, int *lines, int *maxlinelen);
#endif

@ -1,4 +1,4 @@
/* $Id: game.c,v 1.77 2004/02/05 22:59:03 stpohle Exp $
/* $Id: game.c,v 1.78 2004/02/07 11:47:10 stpohle Exp $
game.c - procedures for the game. */
#include <string.h>
@ -313,7 +313,7 @@ game_start ()
{
int p, i;
menu_displaytext ("Loading..", NULL, NULL, "Please Wait", NULL);
menu_displaytext ("Loading..", "Please Wait");
bman.players_nr_s = 0;
@ -386,7 +386,7 @@ void game_showresult () {
Uint8 *keys;
int done = 0, keypressed = 0, x, y, i, p;
menu_displaytext ("Loading..", NULL, NULL, "Please Wait", NULL);
menu_displaytext ("Loading..", "Please Wait");
dest.x = dest.y = 0;
dest.w = gfx.res.x;
dest.h = gfx.res.y;

@ -1,4 +1,4 @@
/* $Id: main.c,v 1.21 2004/01/07 23:04:32 patty21 Exp $ */
/* $Id: main.c,v 1.22 2004/02/07 11:47:10 stpohle Exp $ */
#include "basic.h"
#include "bomberclone.h"
@ -35,6 +35,7 @@ main (int argc, char **argv)
SDL_EnableUNICODE(1);
config_init (argc, argv);
while (menuselect != -1 && bman.state != GS_quit) {
menu_new (text, 400, 200);
@ -60,9 +61,6 @@ main (int argc, char **argv)
}
}
// network_init ();
// network_shutdown ();
gfx_shutdown ();
return 0;

File diff suppressed because it is too large Load Diff

@ -29,7 +29,7 @@ mw_init ()
draw_logo ();
menu_displaytext ("Please Wait", NULL, NULL, "Loading GFX Data", NULL);
menu_displaytext ("Please Wait", "Loading GFX Data");
gfx_load_players (32, 32);
network_loop ();
@ -65,7 +65,7 @@ mw_shutdown ()
void
mw_wait_for_connect ()
{
menu_displaytext ("Please Wait", NULL, NULL, "Wait For connection", NULL);
menu_displaytext ("Please Wait", "Wait For connection");
};

@ -129,7 +129,7 @@ multiplayer_firstrun ()
*/
void host_multiplayer_game () {
if (bman.firewall) {
menu_displaymessage("Error", NULL, "You can not start a network game", "with the firewall option on.", NULL);
menu_displaymessage("Error", "You can not start a network game\nwith the firewall option on.");
return;
}
multiplayer_firstrun ();

@ -61,12 +61,9 @@ send_error (_net_addr * addr, char *text)
int
do_error (struct pkg_error *data, _net_addr * addr)
{
char text[255];
d_printf ("Network Error from %s:%s : '%s'\n", addr->host, addr->port, data->text);
sprintf (text, "Got Error from: %s:%s",addr->host, addr->port);
menu_displaymessage ("Network Error", NULL, text, data->text, NULL);
menu_displaymessage ("Network Error", "Got Error from: %s:%s\nMessage:%s", addr->host, addr->port, data->text);
if (data->nr == 1)
return -1;
else
@ -347,7 +344,7 @@ do_servermode (struct pkg_servermode *s_mod, _net_addr * addr)
/* the server changed */
if (bman.p_servnr != s_mod->p_servnr) {
menu_displaymessage ("Server Quit", NULL, NULL, "The Server Quit the game.", NULL);
menu_displaymessage ("Server Quit", "The Server Quit the game.");
}
/* do the normal update */

@ -1,4 +1,4 @@
/* $Id: single.c,v 1.58 2004/02/05 22:59:06 stpohle Exp $ */
/* $Id: single.c,v 1.59 2004/02/07 11:47:11 stpohle Exp $ */
/* single player */
#include "basic.h"
@ -792,7 +792,7 @@ single_select_player ()
Uint8 *keys;
Uint32 timeloop1;
menu_displaytext ("Loading..", NULL, NULL, "Please Wait", NULL);
menu_displaytext ("Loading..", "Please Wait");
dest.x = dest.y = 0;
dest.w = gfx.res.x;

Loading…
Cancel
Save