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

Method getMusic

src/Resource/ResourcePack.cpp:141–152  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

139 * @return Pointer to the music.
140 */
141Music *ResourcePack::getMusic(const std::string &name) const
142{
143 if (Options::mute)
144 {
145 return _muteMusic;
146 }
147 else
148 {
149 std::map<std::string, Music*>::const_iterator i = _musics.find(name);
150 if (_musics.end() != i) return i->second; else return 0;
151 }
152}
153
154/**
155 * Returns a random music from the resource set.

Callers 1

operator ()Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected