diff --git a/rwlib/source/gl/TextureData.hpp b/rwlib/source/gl/TextureData.hpp index 83f9381b..7347eb27 100644 --- a/rwlib/source/gl/TextureData.hpp +++ b/rwlib/source/gl/TextureData.hpp @@ -1,6 +1,7 @@ #pragma once #include #include +#include #include @@ -37,3 +38,4 @@ private: glm::ivec2 size; bool hasAlpha; }; +using TextureArchive = std::map; diff --git a/rwlib/source/loaders/LoaderTXD.cpp b/rwlib/source/loaders/LoaderTXD.cpp index 587acded..99476ab2 100644 --- a/rwlib/source/loaders/LoaderTXD.cpp +++ b/rwlib/source/loaders/LoaderTXD.cpp @@ -182,11 +182,7 @@ bool TextureLoader::loadFromMemory(FileHandle file, auto texture = createTexture(texNative, rootSection); - inTextures[{name, alpha}] = texture; - - if (!alpha.empty()) { - inTextures[{name, ""}] = texture; - } + inTextures[name] = texture; } return true; diff --git a/rwlib/source/loaders/LoaderTXD.hpp b/rwlib/source/loaders/LoaderTXD.hpp index d4299dbc..7c2ed4b4 100644 --- a/rwlib/source/loaders/LoaderTXD.hpp +++ b/rwlib/source/loaders/LoaderTXD.hpp @@ -11,8 +11,6 @@ // This might suffice #include -typedef std::map, TextureData::Handle> - TextureArchive; class FileIndex;