Fix: SE020 Problem: Some of the wizard mode commands are not available under UNIX. This is because they have special meaning to the terminal and Slash'EM is running in "cbreak" mode. The real solution is to run in "raw" mode, but that would be a lot of work. By providing a wizard mode menu available with the ESC key we can get provide the functionality we need and be in keeping with the existing user interface. Compatible with: Slash'EM 0.0.5E4 through 0.0.5E6F1 Author: J. Ali Harlow, ali@avrc.city.ac.uk Date: 25 Sep 1999 *** src/cmd.c.orig Wed Aug 18 16:06:59 1999 --- src/cmd.c Thu Sep 23 11:40:24 1999 *************** *** 1282,1287 **** --- 1282,1313 ---- {0,0,0,0} }; + #ifdef WIZARD + static const struct menu_tab wizard_menu[] = { + {'c', TRUE, wiz_gain_ac, "Increase AC"}, + {'e', TRUE, wiz_detect, "Detect secret doors and traps"}, + {'f', TRUE, wiz_map, "Do magic mapping"}, + {'g', TRUE, wiz_genesis, "Create monster"}, + {'i', TRUE, wiz_identify, "Identify items in pack"}, + {'j', TRUE, wiz_gain_level, "Go up an experience level"}, + {'n', TRUE, wiz_toggle_invulnerability, "Toggle invulnerability"}, + {'o', TRUE, wiz_where, "Tell locations of special levels"}, + {'v', TRUE, wiz_level_tele, "Do trans-level teleport"}, + {'w', TRUE, wiz_wish, "Make wish"}, + {'x', TRUE, wiz_attributes, "Show intrinsic attributes"}, + {'L', TRUE, wiz_light_sources, "show mobile light sources"}, + {'M', TRUE, wiz_show_stats, "show memory statistics"}, + {'S', TRUE, wiz_show_seenv, "show seen vectors"}, + {'T', TRUE, wiz_timeout_queue, "look at timeout queue"}, + {'V', TRUE, wiz_show_vision, "show vision array"}, + {'W', TRUE, wiz_show_wmodes, "show wall modes"}, + #ifdef DEBUG + {'&', TRUE, wiz_debug_cmd, "wizard debug command"}, + #endif + {0,0,0,0,0}, + }; + #endif + static const struct menu_tab help_menu[] = { {'?', TRUE, dohelp, "Help Contents"}, {'v', TRUE, doextversion, "Version"}, *************** *** 1296,1301 **** --- 1322,1330 ---- {'a', TRUE, (void *)0, "Action"}, {'p', TRUE, (void *)0, "Player"}, {'d', TRUE, (void *)0, "Discoveries"}, + #ifdef WIZARD + {'w', TRUE, (void *)0, "Wizard"}, + #endif {'?', TRUE, (void *)0, "Help"}, {0,0,0,0}, }; *************** *** 1313,1318 **** --- 1342,1350 ---- {"Action", "Main Menu", action_menu}, {"Player", "Main Menu", player_menu}, {"Discoveries", "Main Menu", discover_menu}, + #ifdef WIZARD + {"Wizard", "Main Menu", wizard_menu}, + #endif {"Help", "Main Menu", help_menu}, {"Main Menu",(char *)0, main_menu}, {0,0,0}, *************** *** 1334,1343 **** start_menu(win); for (i = 0; menu_struct[i].m_header; i++) { ! if (menu_struct[i].m_header != menuname) continue; current_menu = menu_struct[i].m_menu; for (n = 0; current_menu[n].m_item; n++) { if (u.uburied && !current_menu[n].can_if_buried) continue; if (current_menu[n].m_char == (char)0) { any.a_int = 0; add_menu(win, NO_GLYPH, &any, 0, 0, ATR_BOLD, --- 1366,1378 ---- start_menu(win); for (i = 0; menu_struct[i].m_header; i++) { ! if (strcmp(menu_struct[i].m_header,menuname)) continue; current_menu = menu_struct[i].m_menu; for (n = 0; current_menu[n].m_item; n++) { if (u.uburied && !current_menu[n].can_if_buried) continue; + #ifdef WIZARD + if (!wizard && !current_menu[n].m_funct && !strcmp(current_menu[n].m_item,"Wizard")) continue; + #endif if (current_menu[n].m_char == (char)0) { any.a_int = 0; add_menu(win, NO_GLYPH, &any, 0, 0, ATR_BOLD,