MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / getSound

Method getSound

src/Resource/ResourcePack.cpp:217–228  ·  view source on GitHub ↗

* Returns a specific sound from the resource set. * @param set Name of the sound set. * @param sound ID of the sound. * @return Pointer to the sound. */

Source from the content-addressed store, hash-verified

215 * @return Pointer to the sound.
216 */
217Sound *ResourcePack::getSound(const std::string &set, unsigned int sound) const
218{
219 if (Options::mute)
220 {
221 return _muteSound;
222 }
223 else
224 {
225 std::map<std::string, SoundSet*>::const_iterator i = _sounds.find(set);
226 if (_sounds.end() != i) return i->second->getSound(sound); else return 0;
227 }
228}
229
230/**
231 * Returns a specific palette from the resource set.

Callers 1

XcomResourcePackMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected