diff --git a/src/bomberclone.h b/src/bomberclone.h index 6816c95..9a7f70d 100644 --- a/src/bomberclone.h +++ b/src/bomberclone.h @@ -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 (); diff --git a/src/menu.c b/src/menu.c index 8890868..58ccbdd 100644 --- a/src/menu.c +++ b/src/menu.c @@ -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 diff --git a/src/single.c b/src/single.c index 2bf77a5..3c406ec 100644 --- a/src/single.c +++ b/src/single.c @@ -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;