2014-07-04 12:46:57 +02:00
|
|
|
#ifndef CSM_WOLRD_RESOURCESMANAGER_H
|
|
|
|
#define CSM_WOLRD_RESOURCESMANAGER_H
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
2022-10-19 19:02:00 +02:00
|
|
|
#include <apps/opencs/model/world/resources.hpp>
|
|
|
|
|
2014-07-04 12:46:57 +02:00
|
|
|
#include "universalid.hpp"
|
|
|
|
|
2015-03-19 17:49:41 +01:00
|
|
|
namespace VFS
|
|
|
|
{
|
|
|
|
class Manager;
|
|
|
|
}
|
|
|
|
|
2014-07-04 12:46:57 +02:00
|
|
|
namespace CSMWorld
|
|
|
|
{
|
|
|
|
class ResourcesManager
|
|
|
|
{
|
|
|
|
std::map<UniversalId::Type, Resources> mResources;
|
2017-08-20 19:07:23 -04:00
|
|
|
const VFS::Manager* mVFS;
|
2014-07-04 12:46:57 +02:00
|
|
|
|
2014-07-07 15:20:05 +02:00
|
|
|
private:
|
|
|
|
void addResources(const Resources& resources);
|
|
|
|
|
|
|
|
const char* const* getMeshExtensions();
|
|
|
|
|
2022-09-22 21:26:05 +03:00
|
|
|
public:
|
2017-08-20 19:07:23 -04:00
|
|
|
ResourcesManager();
|
2022-08-05 00:00:49 +02:00
|
|
|
~ResourcesManager();
|
2017-08-20 19:07:23 -04:00
|
|
|
|
|
|
|
const VFS::Manager* getVFS() const;
|
2014-07-04 12:46:57 +02:00
|
|
|
|
2022-08-05 00:00:49 +02:00
|
|
|
void setVFS(const VFS::Manager* vfs);
|
2015-03-25 23:35:10 +01:00
|
|
|
|
2017-08-20 19:07:23 -04:00
|
|
|
void recreateResources();
|
2015-03-25 23:35:10 +01:00
|
|
|
|
2014-07-04 12:46:57 +02:00
|
|
|
const Resources& get(UniversalId::Type type) const;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2015-03-19 17:49:41 +01:00
|
|
|
#endif
|