Single Player Tileselection Test1

origin
stpohle 23 years ago
parent 83b1d7f012
commit 7969d489f9

@ -1,4 +1,4 @@
/* $Id: bomberclone.h,v 1.14 2003/05/07 00:26:08 stpohle Exp $ */
/* $Id: bomberclone.h,v 1.15 2003/05/07 14:32:02 stpohle Exp $ */
/* bomberclone.h */
#ifndef _BOMBERCLONE_H_
@ -210,6 +210,7 @@ extern void draw_menu (char *text, _menu menu[], int *x, int *y);
extern void menu_get_text (char *title, char *text, int len);
extern void menu_displaymessage (char *title, char *text);
extern void menu_displaytext (char *title, char *text, Uint8 r, Uint8 g, Uint8 b);
extern char *menu_dir_select (char *title, char *path, signed char dirflags);
// configuration
extern void configuration ();

@ -1,4 +1,4 @@
/* $Id: menu.c,v 1.10 2003/05/07 14:30:39 stpohle Exp $ */
/* $Id: menu.c,v 1.11 2003/05/07 14:33:24 stpohle Exp $ */
/* menu's for the game */
#include <SDL.h>

@ -1,4 +1,4 @@
/* $Id: single.c,v 1.7 2003/05/07 00:21:38 stpohle Exp $ */
/* $Id: single.c,v 1.8 2003/05/07 14:30:41 stpohle Exp $ */
/* single player */
#include "basic.h"
@ -9,7 +9,9 @@ single_game_new (int ai_players)
{
int p,
i;
char *tileset;
char pathname [LEN_PATHFILENAME];
// set players on field 1,1
for (p = 0; p < MAX_PLAYERS; p++) {
bman.players[p].pos.x = -1;
@ -38,12 +40,14 @@ single_game_new (int ai_players)
bman.last_ex_nr = 1;
field_new (bman.fieldpath);
tileset_random ();
sprintf (pathname , "%s/tileset", bman.datapath);
tileset = menu_dir_select ("Select Tileset", pathname, DF_dir);
if (tileset == NULL)
tileset_random ();
else
strncpy (gfx.tileset, tileset, LEN_TILESETNAME);
{
// char *tmp = menu_dir_select ("data/tileset", DF_dir);
// printf ("Selected: %s\n", tmp);
}
bman.players_nr_s = 1;
bman.players_nr = 1;
bman.gametype = GT_single;

Loading…
Cancel
Save