mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 02:56:38 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			48 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include "resourcesystem.hpp"
 | |
| 
 | |
| #include "scenemanager.hpp"
 | |
| #include "texturemanager.hpp"
 | |
| #include "niffilemanager.hpp"
 | |
| 
 | |
| namespace Resource
 | |
| {
 | |
| 
 | |
|     ResourceSystem::ResourceSystem(const VFS::Manager *vfs)
 | |
|         : mVFS(vfs)
 | |
|     {
 | |
|         mNifFileManager.reset(new NifFileManager(vfs));
 | |
|         mTextureManager.reset(new TextureManager(vfs));
 | |
|         mSceneManager.reset(new SceneManager(vfs, mTextureManager.get(), mNifFileManager.get()));
 | |
|     }
 | |
| 
 | |
|     ResourceSystem::~ResourceSystem()
 | |
|     {
 | |
|         // this has to be defined in the .cpp file as we can't delete incomplete types
 | |
|     }
 | |
| 
 | |
|     SceneManager* ResourceSystem::getSceneManager()
 | |
|     {
 | |
|         return mSceneManager.get();
 | |
|     }
 | |
| 
 | |
|     TextureManager* ResourceSystem::getTextureManager()
 | |
|     {
 | |
|         return mTextureManager.get();
 | |
|     }
 | |
| 
 | |
|     NifFileManager *ResourceSystem::getNifFileManager()
 | |
|     {
 | |
|         return mNifFileManager.get();
 | |
|     }
 | |
| 
 | |
|     void ResourceSystem::clearCache()
 | |
|     {
 | |
|         mNifFileManager->clearCache();
 | |
|     }
 | |
| 
 | |
|     const VFS::Manager* ResourceSystem::getVFS() const
 | |
|     {
 | |
|         return mVFS;
 | |
|     }
 | |
| 
 | |
| }
 |