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

Function initoptions_finish

src/options.c:7323–7384  ·  view source on GitHub ↗

* Process user's run-time configuration file: * get value of NETHACKOPTIONS; * if command line specified -nethackrc=filename, use that; * if NETHACKOPTIONS is present, * honor it if it has a list of options to set * or ignore it if it specifies a file name; * else if not specified on command line and NETHACKOPTIONS names a file, * use that as the config fil

Source from the content-addressed store, hash-verified

7321 * then process the value of NETHACKOPTIONS as extra options.
7322 */
7323void
7324initoptions_finish(void)
7325{ nhsym sym = 0;
7326
7327 rcfile();
7328
7329 (void) fruitadd(svp.pl_fruit, (struct fruit *) 0);
7330 /*
7331 * Remove "slime mold" from list of object names. This will
7332 * prevent it from being wished unless it's actually present
7333 * as a named (or default) fruit. Wishing for "fruit" will
7334 * result in the player's preferred fruit. [Once upon a time
7335 * the override value used was "\033" which prevented wishing
7336 * for the slime mold object at all except by asking for a
7337 * specific named fruit.] Note that there are multiple fruit
7338 * object types (apple, melon, &c) but the "fruit" object is
7339 * slime mold or whatever custom name player assigns to that.
7340 */
7341 obj_descr[SLIME_MOLD].oc_name = "fruit";
7342
7343 sym = get_othersym(SYM_BOULDER,
7344 Is_rogue_level(&u.uz) ? ROGUESET : PRIMARYSET);
7345 if (sym)
7346 gs.showsyms[SYM_BOULDER + SYM_OFF_X] = sym;
7347 reglyph_darkroom();
7348 reset_glyphmap(gm_optionchange);
7349#ifdef STATUS_HILITES
7350 /*
7351 * A multi-interface binary might only support status highlighting
7352 * for some of the interfaces; check whether we asked for it but are
7353 * using one which doesn't.
7354 *
7355 * Option processing can take place before a user-decided WindowPort
7356 * is even initialized, so check for that too.
7357 */
7358 if (iflags.hilite_delta && !wc2_supported("statushilites")) {
7359 raw_printf("Status highlighting not supported for %s interface.",
7360 windowprocs.name);
7361 iflags.hilite_delta = 0;
7362 }
7363#endif
7364 update_rest_on_space();
7365
7366 /* these can't rely on compile-time initialization for their defaults
7367 because a multi-interface binary might need different values for
7368 different interfaces; if neither tiled_map nor ascii_map pass the
7369 wc_supported() test, assume ascii_map */
7370 if (iflags.wc_tiled_map && !wc_supported("tiled_map"))
7371 iflags.wc_tiled_map = FALSE, iflags.wc_ascii_map = TRUE;
7372 else if (iflags.wc_ascii_map && !wc_supported("ascii_map")
7373 && wc_supported("tiled_map"))
7374 iflags.wc_ascii_map = FALSE, iflags.wc_tiled_map = TRUE;
7375
7376#ifdef ENHANCED_SYMBOLS
7377 if (glyphid_cache_status())
7378 free_glyphid_cache();
7379 apply_customizations(gc.currentgraphics,
7380 do_custom_symbols | do_custom_colors);

Callers 1

initoptionsFunction · 0.85

Calls 12

rcfileFunction · 0.85
fruitaddFunction · 0.85
get_othersymFunction · 0.85
reglyph_darkroomFunction · 0.85
reset_glyphmapFunction · 0.85
wc2_supportedFunction · 0.85
update_rest_on_spaceFunction · 0.85
wc_supportedFunction · 0.85
glyphid_cache_statusFunction · 0.85
free_glyphid_cacheFunction · 0.85
apply_customizationsFunction · 0.85
raw_printfFunction · 0.70

Tested by

no test coverage detected