MCPcopy Create free account
hub / github.com/NetHack/NetHack / optfn_videoshades

Function optfn_videoshades

src/options.c:4572–4599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4570}
4571
4572staticfn int
4573optfn_videoshades(
4574 int optidx, int req, boolean negated UNUSED,
4575 char *opts, char *op UNUSED)
4576{
4577 if (req == do_init) {
4578 return optn_ok;
4579 }
4580 if (req == do_set) {
4581 /* videoshades:string */
4582
4583 if ((opts = string_for_env_opt(allopt[optidx].name, opts, FALSE))
4584 == empty_optstr) {
4585 return optn_err;
4586 }
4587 if (!assign_videoshades(opts)) {
4588 config_error_add("Unknown error handling '%s'",
4589 allopt[optidx].name);
4590 return optn_err;
4591 }
4592 return optn_ok;
4593 }
4594 if (req == get_val || req == get_cnf_val) {
4595 Sprintf(opts, "%s-%s-%s", shade[0], shade[1], shade[2]);
4596 return optn_ok;
4597 }
4598 return optn_ok;
4599}
4600#endif /* VIDEOSHADES */
4601
4602#ifdef MSDOS

Callers

nothing calls this directly

Calls 3

string_for_env_optFunction · 0.85
assign_videoshadesFunction · 0.85
config_error_addFunction · 0.85

Tested by

no test coverage detected