Maptype Option added to the mapmenu

origin
stpohle 22 years ago
parent f5438c603b
commit bb3ef44533

@ -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 */ /* basic types which we need everywhere */
#ifndef _BC_BASIC_H_ #ifndef _BC_BASIC_H_
@ -120,6 +120,7 @@ enum _gamestate {
enum _maptype { enum _maptype {
MAPT_random = -1, // random map
MAPT_normal = 0, // a normal map MAPT_normal = 0, // a normal map
MAPT_tunnel, // a map with tunnels MAPT_tunnel, // a map with tunnels

@ -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 */ /* map/tileset selection menu */
#include "bomberclone.h" #include "bomberclone.h"
@ -29,6 +29,7 @@ mapmenu ()
{12, "Special Trigger:"}, {12, "Special Trigger:"},
{13, "Special Push :"}, {13, "Special Push :"},
{14, "Special Row :"}, {14, "Special Row :"},
{15, "Maptype: Random"},
{0, ""}, {0, ""},
{15, "Return To Previous Menu"}, {15, "Return To Previous Menu"},
{-1, ""} {-1, ""}
@ -97,6 +98,18 @@ mapmenu ()
sprintf (menu[13].text, "Special Push :%d", map.sp_push); sprintf (menu[13].text, "Special Push :%d", map.sp_push);
sprintf (menu[14].text, "Special Row :%d", map.sp_row); 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); menuselect = menu_loop ("Map Options", menu, menuselect);
switch (menuselect) { switch (menuselect) {
@ -208,7 +221,12 @@ mapmenu ()
menu_get_text ("Row Specials", text, 2); menu_get_text ("Row Specials", text, 2);
map.sp_row = atoi (text); map.sp_row = atoi (text);
break; 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; menuselect = -1;
break; break;
} }

Loading…
Cancel
Save