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

Function optfn_tile_file

src/options.c:4320–4351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4318}
4319
4320staticfn int
4321optfn_tile_file(
4322 int optidx UNUSED, int req, boolean negated UNUSED,
4323 char *opts, char *op)
4324{
4325 if (req == do_init) {
4326 return optn_ok;
4327 }
4328 if (req == do_set) {
4329 /* WINCAP tile_file:name */
4330 if (op != empty_optstr) {
4331 if (iflags.wc_tile_file)
4332 free(iflags.wc_tile_file);
4333 iflags.wc_tile_file = dupstr(op);
4334 } else
4335 return optn_err;
4336 return optn_ok;
4337 }
4338 if (req == get_val) {
4339 Sprintf(opts, "%s",
4340 iflags.wc_tile_file ? iflags.wc_tile_file : defopt);
4341 return optn_ok;
4342 }
4343 if (req == get_cnf_val) {
4344 if (iflags.wc_tile_file)
4345 Sprintf(opts, "%s", iflags.wc_tile_file);
4346 else
4347 opts[0] = '\0';
4348 return optn_ok;
4349 }
4350 return optn_ok;
4351}
4352
4353staticfn int
4354optfn_tile_height(

Callers

nothing calls this directly

Calls 1

dupstrFunction · 0.85

Tested by

no test coverage detected