1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00
OpenMW/components/resource/resourcesystem.cpp

56 lines
1.2 KiB
C++
Raw Normal View History

2015-03-26 18:02:51 +01:00
#include "resourcesystem.hpp"
#include "scenemanager.hpp"
2016-02-05 23:03:53 +01:00
#include "imagemanager.hpp"
#include "niffilemanager.hpp"
#include "keyframemanager.hpp"
2015-03-26 18:02:51 +01:00
namespace Resource
{
ResourceSystem::ResourceSystem(const VFS::Manager *vfs)
: mVFS(vfs)
{
mNifFileManager.reset(new NifFileManager(vfs));
mKeyframeManager.reset(new KeyframeManager(vfs));
2016-02-05 23:03:53 +01:00
mTextureManager.reset(new ImageManager(vfs));
mSceneManager.reset(new SceneManager(vfs, mTextureManager.get(), mNifFileManager.get()));
2015-03-26 18:02:51 +01:00
}
2015-05-08 17:52:35 +02:00
ResourceSystem::~ResourceSystem()
{
// this has to be defined in the .cpp file as we can't delete incomplete types
}
2015-03-26 18:02:51 +01:00
SceneManager* ResourceSystem::getSceneManager()
{
return mSceneManager.get();
}
2016-02-05 23:03:53 +01:00
ImageManager* ResourceSystem::getTextureManager()
2015-04-17 01:23:37 +02:00
{
return mTextureManager.get();
}
NifFileManager* ResourceSystem::getNifFileManager()
{
return mNifFileManager.get();
}
KeyframeManager* ResourceSystem::getKeyframeManager()
{
return mKeyframeManager.get();
}
void ResourceSystem::clearCache()
{
mNifFileManager->clearCache();
}
2015-03-26 18:02:51 +01:00
const VFS::Manager* ResourceSystem::getVFS() const
{
return mVFS;
}
}