* 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. */
| 215 | * @return Pointer to the sound. |
| 216 | */ |
| 217 | Sound *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. |