1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-23 04:27:45 +00:00
novus/common/include/filecache.h
Joshua Goins 47d612eb8f Add file cache and concurrent item loading to speed up mdlviewer
Instead of extracting item sheets one at a time, it's now done on
multiple threads. Loading gear is now faster since reused files are
cached, switching between races is still wasteful, but it's a good
enough improvement for now.
2023-07-09 10:54:27 -04:00

18 lines
No EOL
289 B
C++

#pragma once
#include <physis.hpp>
#include <QString>
#include <QMap>
struct GameData;
class FileCache {
public:
explicit FileCache(GameData& data);
physis_Buffer& lookupFile(const QString& path);
private:
QMap<QString, physis_Buffer> cachedBuffers;
GameData& data;
};