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

Function soundlib_id_from_opt

src/sounds.c:1882–1895  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1880}
1881
1882enum soundlib_ids
1883soundlib_id_from_opt(char *op)
1884{
1885 int idx;
1886 struct sound_procs *defproc = &nosound_procs,
1887 *sp = 0;
1888
1889 for (idx = 0; idx < SIZE(soundlib_choices); ++idx) {
1890 sp = soundlib_choices[idx].sndprocs;
1891 if (!strcmp(sp->soundname, op))
1892 return sp->soundlib_id;
1893 }
1894 return defproc->soundlib_id;
1895}
1896
1897/*
1898 * The default sound interface

Callers 1

optfn_soundlibFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected