Changeset 6197 for code/branches
- Timestamp:
- Dec 2, 2009, 2:58:20 PM (15 years ago)
- Location:
- code/branches/presentation2/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/libraries/core/ConfigFileManager.cc
r5929 r6197 56 56 } 57 57 return false; 58 } 59 60 std::string getConfig(const std::string& classname, const std::string& varname) 61 { 62 return ConfigFileManager::getInstance().getValue(ConfigFileType::Settings, classname, varname, "", true); 58 63 } 59 64 -
code/branches/presentation2/src/libraries/core/ConfigFileManager.h
r6194 r6197 57 57 58 58 _CoreExport bool config(const std::string& classname, const std::string& varname, const std::string& value); // tolua_export 59 _CoreExport std::string getConfig(const std::string& classname, const std::string& varname); // tolua_export 59 60 _CoreExport bool tconfig(const std::string& classname, const std::string& varname, const std::string& value); 60 61 _CoreExport void reloadConfig(); -
code/branches/presentation2/src/orxonox/sound/SoundManager.cc
r6190 r6197 163 163 void SoundManager::checkSoundVolumeValidity() 164 164 { 165 if(this->soundVolume_ < 0.0 || this->soundVolume_ > 1.0) 166 { 167 COUT(2) << "Sound warning: Sound volume out of range, ignoring change." << std::endl; 165 if(!checkVolumeValidity(SoundType::none)) 166 { 168 167 ResetConfigValue(soundVolume_); 169 168 } 170 171 this->updateVolume(SoundType::none);172 COUT(3) << "SoundManager: volume set to " << this->soundVolume_ << std::endl;173 174 169 } 175 170 176 171 void SoundManager::checkAmbientVolumeValidity() 177 172 { 178 if(this->ambientVolume_ < 0.0 || this->ambientVolume_ > 1.0) 179 { 180 COUT(2) << "Sound warning: Sound volume out of range, ignoring change." << std::endl; 173 if(!checkVolumeValidity(SoundType::ambient)) 174 { 181 175 ResetConfigValue(ambientVolume_); 182 176 } 183 184 this->updateVolume(SoundType::ambient);185 COUT(3) << "SoundManager: volume set to " << this->ambientVolume_ << std::endl;186 177 } 187 178 188 179 void SoundManager::checkEffectsVolumeValidity() 189 180 { 190 if(this->effectsVolume_ < 0.0 || this->effectsVolume_ > 1.0) 191 { 192 COUT(2) << "Sound warning: Sound volume out of range, ignoring change." << std::endl; 181 if(!checkVolumeValidity(SoundType::effects)) 182 { 193 183 ResetConfigValue(effectsVolume_); 194 184 } 195 196 this->updateVolume(SoundType::effects); 197 COUT(3) << "SoundManager: volume set to " << this->effectsVolume_ << std::endl; 198 } 199 200 // void SoundManager::checkSoundVolumeValidity() 201 // { 202 // if(!checkVolumeValidity(SoundType::none)) 203 // ResetConfigValue(soundVolume_) 204 // } 205 // 206 // void SoundManager::checkAmbientVolumeValidity() 207 // { 208 // if(!checkVolumeValidity(SoundType::ambient)) 209 // ResetConfigValue(ambientVolume_); 210 // } 211 // 212 // void SoundManager::checkEffectsVolumeValidity() 213 // { 214 // if(!checkVolumeValidity(SoundType::effects)) 215 // ResetConfigValue(effectsVolume_); 216 // } 185 } 217 186 218 187 void SoundManager::setListenerPosition(const Vector3& position)
Note: See TracChangeset
for help on using the changeset viewer.