MCPcopy Index your code
hub / github.com/NetHack/NetHack / doset_simple

Function doset_simple

src/options.c:8706–8735  ·  view source on GitHub ↗

#options - the user friendly version: get one option from a subset of the zillion choices, act upon it, and prompt for another */

Source from the content-addressed store, hash-verified

8704/* #options - the user friendly version: get one option from a subset of
8705 the zillion choices, act upon it, and prompt for another */
8706int
8707doset_simple(void)
8708{
8709 int pickedone = 0;
8710 boolean flush = FALSE;
8711
8712 if (iflags.menu_requested) {
8713 /* doset() checks for 'm' and calls doset_simple(); clear the
8714 menu-requested flag to avoid doing that recursively */
8715 iflags.menu_requested = FALSE;
8716 return doset();
8717 }
8718
8719 go.opt_phase = play_opt;
8720 /* select and change one option at a time, then reprocess the menu
8721 with updated settings to offer chance for further change */
8722 give_opt_msg = FALSE;
8723 do {
8724 pickedone = doset_simple_menu();
8725 flush = go.opt_need_redraw;
8726
8727 reset_needed_visuals();
8728 if (flush) {
8729 flush_screen(1);
8730 flush = FALSE;
8731 }
8732 } while (pickedone > 0);
8733 give_opt_msg = TRUE;
8734 return ECMD_OK;
8735}
8736
8737staticfn const char *
8738term_for_boolean(int idx, boolean *b)

Callers 1

dosetFunction · 0.85

Calls 4

dosetFunction · 0.85
doset_simple_menuFunction · 0.85
reset_needed_visualsFunction · 0.85
flush_screenFunction · 0.85

Tested by

no test coverage detected