diff --git a/src/basic.h b/src/basic.h index 61f4b51..8e35c89 100644 --- a/src/basic.h +++ b/src/basic.h @@ -1,4 +1,4 @@ -/* $Id: basic.h,v 1.47 2003/08/10 15:10:19 stpohle Exp $ */ +/* $Id: basic.h,v 1.48 2003/08/24 19:01:30 stpohle Exp $ */ /* basic types which we need everywhere */ #ifndef _BC_BASIC_H_ @@ -120,6 +120,7 @@ enum _gamestate { enum _maptype { + MAPT_random = -1, // random map MAPT_normal = 0, // a normal map MAPT_tunnel, // a map with tunnels diff --git a/src/mapmenu.c b/src/mapmenu.c index 0d5f8ea..c080807 100644 --- a/src/mapmenu.c +++ b/src/mapmenu.c @@ -1,4 +1,4 @@ -/* $Id: mapmenu.c,v 1.8 2003/07/27 20:16:58 stpohle Exp $ */ +/* $Id: mapmenu.c,v 1.9 2003/08/24 19:01:30 stpohle Exp $ */ /* map/tileset selection menu */ #include "bomberclone.h" @@ -29,6 +29,7 @@ mapmenu () {12, "Special Trigger:"}, {13, "Special Push :"}, {14, "Special Row :"}, + {15, "Maptype: Random"}, {0, ""}, {15, "Return To Previous Menu"}, {-1, ""} @@ -97,6 +98,18 @@ mapmenu () sprintf (menu[13].text, "Special Push :%d", map.sp_push); sprintf (menu[14].text, "Special Row :%d", map.sp_row); + switch (map.type) { + case (MAPT_normal): + sprintf (menu[15].text, "Maptype: NORMAL"); + break; + case (MAPT_tunnel): + sprintf (menu[15].text, "Maptype: TUNNEL"); + break; + default: + sprintf (menu[15].text, "Maptype: RANDOM"); + break; + } + menuselect = menu_loop ("Map Options", menu, menuselect); switch (menuselect) { @@ -208,7 +221,12 @@ mapmenu () menu_get_text ("Row Specials", text, 2); map.sp_row = atoi (text); break; - case (16): // Return to previous menu + case (15): + map.type++; + if (map.type >= MAPT_max) + map.type = MAPT_random; + break; + case (17): // Return to previous menu menuselect = -1; break; }