Drop support for --fs-strict

This commit is contained in:
Evil Eye 2023-05-31 23:11:03 +02:00
parent 75c371de66
commit eeda48ec50
46 changed files with 148 additions and 256 deletions

View file

@ -1,12 +1,12 @@
#include "resources.hpp"
#include <components/vfs/manager.hpp>
#include <components/vfs/pathutil.hpp>
namespace LuaUi
{
std::shared_ptr<TextureResource> ResourceManager::registerTexture(TextureData data)
{
data.mPath = mVfs->normalizeFilename(data.mPath);
VFS::Path::normalizeFilenameInPlace(data.mPath);
TextureResources& list = mTextures[data.mPath];
list.push_back(std::make_shared<TextureResource>(data));

View file

@ -28,16 +28,10 @@ namespace LuaUi
class ResourceManager
{
public:
ResourceManager(const VFS::Manager* vfs)
: mVfs(vfs)
{
}
std::shared_ptr<TextureResource> registerTexture(TextureData data);
void clear();
private:
const VFS::Manager* mVfs;
using TextureResources = std::vector<std::shared_ptr<TextureResource>>;
std::unordered_map<std::string, TextureResources> mTextures;
};