mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-12 10:41:15 +00:00
33 lines
732 B
C++
33 lines
732 B
C++
#pragma once
|
|
|
|
#include "extensions/extensions.h"
|
|
#include "legotextureinfo.h"
|
|
|
|
#include <array>
|
|
#include <map>
|
|
|
|
namespace Extensions
|
|
{
|
|
class TextureLoader {
|
|
public:
|
|
static void Initialize();
|
|
static bool PatchTexture(LegoTextureInfo* p_textureInfo);
|
|
|
|
static std::map<std::string, std::string> options;
|
|
static bool enabled;
|
|
|
|
static constexpr std::array<std::pair<std::string_view, std::string_view>, 1> defaults = {
|
|
{{"texture loader:texture path", "/textures/"}}
|
|
};
|
|
|
|
private:
|
|
static SDL_Surface* FindTexture(const char* p_name);
|
|
};
|
|
|
|
#ifdef EXTENSIONS
|
|
constexpr auto PatchTexture = &TextureLoader::PatchTexture;
|
|
#else
|
|
constexpr decltype(&TextureLoader::PatchTexture) PatchTexture = nullptr;
|
|
#endif
|
|
}; // namespace Extensions
|