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

Function activate_chosen_soundlib

src/sounds.c:1778–1795  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1776};
1777
1778void
1779activate_chosen_soundlib(void)
1780{
1781 int idx = gc.chosen_soundlib;
1782
1783 if (!IndexOk(idx, soundlib_choices))
1784 panic("activate_chosen_soundlib: invalid soundlib (%d)", idx);
1785
1786 if (ga.active_soundlib != soundlib_nosound || idx != soundlib_nosound) {
1787 if (soundprocs.sound_exit_nhsound)
1788 (*soundprocs.sound_exit_nhsound)("assigning a new sound library");
1789 }
1790 soundprocs = *soundlib_choices[idx].sndprocs;
1791 if (soundprocs.sound_init_nhsound)
1792 (*soundprocs.sound_init_nhsound)();
1793 ga.active_soundlib = soundprocs.soundlib_id;
1794 gc.chosen_soundlib = ga.active_soundlib;
1795}
1796
1797void
1798assign_soundlib(int idx)

Callers 1

Calls 1

panicFunction · 0.50

Tested by

no test coverage detected