SoundLibrary::SoundLibrary(Options* options, AudioDevice& audio, const DirectoryPath& path) : audioDevice(audio) { #ifdef DISABLE_SFX on = false; #else on = options->getBoolValue(OptionId::SOUND); #endif options->addTrigger(OptionId::SOUND, [this](bool turnOn) { on = turnOn; }); for (SoundId id : ENUM_ALL(SoundId)) addSounds(id, path.subdirectory(toLower(EnumInfo<SoundId>::getString(id)))); }
GameConfig::GameConfig(DirectoryPath modsPath, string modName) : path(modsPath.subdirectory(modName)), modName(std::move(modName)) { }