2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-01-10 18:51:49 +00:00

chore: update image namespacing

This commit is contained in:
Jan Laupetin
2026-01-03 13:58:46 +01:00
parent 793d7ad5dc
commit da2a76f6da
47 changed files with 1940 additions and 1832 deletions

View File

@@ -9,7 +9,9 @@
#include <iostream>
#include <memory>
namespace dds
using namespace image;
namespace
{
class DdsLoaderInternal
{
@@ -193,7 +195,7 @@ namespace dds
return ReadPixelFormatUnsigned(pf);
}
_NODISCARD bool ReadHeader()
[[nodiscard]] bool ReadHeader()
{
DDS_HEADER header{};
m_stream.read(reinterpret_cast<char*>(&header), sizeof(header));
@@ -277,10 +279,13 @@ namespace dds
unsigned m_depth;
const ImageFormat* m_format;
};
} // namespace
namespace image
{
std::unique_ptr<Texture> LoadDds(std::istream& stream)
{
DdsLoaderInternal internal(stream);
return internal.LoadDds();
}
} // namespace dds
} // namespace image