mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 20:26:43 +00:00 
			
		
		
		
	Remove some unused sound manager fields and constructor parameters
This commit is contained in:
		
							parent
							
								
									1ccddefe28
								
							
						
					
					
						commit
						fa70a72b75
					
				
					 3 changed files with 7 additions and 22 deletions
				
			
		|  | @ -333,10 +333,7 @@ void OMW::Engine::go() | |||
|         mExtensions, mFpsLevel, mNewGame, mOgre, mCfgMgr.getLogPath().string() + std::string("/")); | ||||
| 
 | ||||
|     // Create sound system
 | ||||
|     mEnvironment.mSoundManager = new MWSound::SoundManager(mOgre->getRoot(), | ||||
|                                                            mOgre->getCamera(), | ||||
|                                                            mDataDirs, | ||||
|                                                            mUseSound, mFSStrict, mEnvironment); | ||||
|     mEnvironment.mSoundManager = new MWSound::SoundManager(mUseSound, mEnvironment); | ||||
| 
 | ||||
|     // Create script system
 | ||||
|     mScriptContext = new MWScript::CompilerContext (MWScript::CompilerContext::Type_Full, | ||||
|  |  | |||
|  | @ -38,10 +38,8 @@ | |||
| 
 | ||||
| namespace MWSound | ||||
| { | ||||
|     SoundManager::SoundManager(Ogre::Root *root, Ogre::Camera *camera, | ||||
|         const Files::PathContainer& dataDirs, | ||||
|         bool useSound, bool fsstrict, MWWorld::Environment& environment) | ||||
|         : mFSStrict(fsstrict) | ||||
|     SoundManager::SoundManager(bool useSound, MWWorld::Environment& environment) | ||||
|         : mResourceMgr(Ogre::ResourceGroupManager::getSingleton()) | ||||
|         , mEnvironment(environment) | ||||
|     { | ||||
|         if(!useSound) | ||||
|  | @ -67,8 +65,6 @@ namespace MWSound | |||
|             mOutput.reset(); | ||||
|             return; | ||||
|         } | ||||
| 
 | ||||
|         mResourceMgr = Ogre::ResourceGroupManager::getSingletonPtr(); | ||||
|     } | ||||
| 
 | ||||
|     SoundManager::~SoundManager() | ||||
|  | @ -161,8 +157,8 @@ namespace MWSound | |||
|     void SoundManager::startRandomTitle() | ||||
|     { | ||||
|         Ogre::StringVectorPtr filelist; | ||||
|         filelist = mResourceMgr->findResourceNames(Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, | ||||
|                                                    "Music/"+mCurrentPlaylist+"/*"); | ||||
|         filelist = mResourceMgr.findResourceNames(Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, | ||||
|                                                   "Music/"+mCurrentPlaylist+"/*"); | ||||
|         if(!filelist->size()) | ||||
|             return; | ||||
| 
 | ||||
|  |  | |||
|  | @ -31,13 +31,7 @@ namespace MWSound | |||
| 
 | ||||
|     class SoundManager | ||||
|     { | ||||
|         Ogre::ResourceGroupManager *mResourceMgr; | ||||
| 
 | ||||
|         // This is used for case insensitive and slash-type agnostic file
 | ||||
|         // finding. It takes DOS paths (any case, \\ slashes or / slashes)
 | ||||
|         // relative to the sound dir, and translates them into full paths
 | ||||
|         // of existing files in the filesystem, if they exist.
 | ||||
|         bool mFSStrict; | ||||
|         Ogre::ResourceGroupManager& mResourceMgr; | ||||
| 
 | ||||
|         MWWorld::Environment& mEnvironment; | ||||
| 
 | ||||
|  | @ -64,9 +58,7 @@ namespace MWSound | |||
|         friend class OpenAL_Output; | ||||
| 
 | ||||
|     public: | ||||
|         SoundManager(Ogre::Root*, Ogre::Camera*, | ||||
|                    const Files::PathContainer& dataDir, bool useSound, bool fsstrict, | ||||
|                    MWWorld::Environment& environment); | ||||
|         SoundManager(bool useSound, MWWorld::Environment& environment); | ||||
|         ~SoundManager(); | ||||
| 
 | ||||
|         void stopMusic(); | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue