Fixed resource loader
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "../resources/ResourceManager.h"
|
||||
|
||||
class TextureLoader {
|
||||
public:
|
||||
@ -16,6 +17,8 @@ public:
|
||||
std::vector<std::string>& assetLoadErrors,
|
||||
std::mutex& assetLoadErrorsMutex);
|
||||
|
||||
void setResourceManager(resources::ResourceManager* mgr) { resourceManager_ = mgr; }
|
||||
|
||||
SDL_Texture* loadFromImage(SDL_Renderer* renderer, const std::string& path, int* outW = nullptr, int* outH = nullptr);
|
||||
|
||||
private:
|
||||
@ -28,4 +31,6 @@ private:
|
||||
void setCurrentLoadingFile(const std::string& filename);
|
||||
void clearCurrentLoadingFile();
|
||||
void recordAssetLoadError(const std::string& message);
|
||||
|
||||
resources::ResourceManager* resourceManager_ = nullptr;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user