2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-01-11 03:01: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

@@ -16,6 +16,7 @@
#include <format>
using namespace IW3;
using namespace image;
namespace
{
@@ -26,15 +27,15 @@ namespace
const auto& loadDef = *image.texture.loadDef;
textureLoader.Width(loadDef.dimensions[0]).Height(loadDef.dimensions[1]).Depth(loadDef.dimensions[2]);
if (loadDef.flags & iwi6::IMG_FLAG_VOLMAP)
if (loadDef.flags & image::iwi6::IMG_FLAG_VOLMAP)
textureLoader.Type(TextureType::T_3D);
else if (loadDef.flags & iwi6::IMG_FLAG_CUBEMAP)
else if (loadDef.flags & image::iwi6::IMG_FLAG_CUBEMAP)
textureLoader.Type(TextureType::T_CUBE);
else
textureLoader.Type(TextureType::T_2D);
textureLoader.Format(static_cast<oat::D3DFORMAT>(loadDef.format));
textureLoader.HasMipMaps(!(loadDef.flags & iwi6::IMG_FLAG_NOMIPMAPS));
textureLoader.HasMipMaps(!(loadDef.flags & image::iwi6::IMG_FLAG_NOMIPMAPS));
return textureLoader.LoadTexture(loadDef.data);
}
@@ -48,7 +49,7 @@ namespace
return nullptr;
}
return iwi::LoadIwi(*filePathImage.m_stream);
return image::LoadIwi(*filePathImage.m_stream);
}
std::unique_ptr<Texture> LoadImageData(ISearchPath& searchPath, const GfxImage& image)

View File

@@ -2,7 +2,7 @@
#include "Dumping/AbstractAssetDumper.h"
#include "Game/IW3/IW3.h"
#include "Image/IImageWriter.h"
#include "Image/ImageWriter.h"
#include <memory>
@@ -17,6 +17,6 @@ namespace image
void DumpAsset(AssetDumpingContext& context, const XAssetInfo<IW3::AssetImage::Type>& asset) override;
private:
std::unique_ptr<IImageWriter> m_writer;
std::unique_ptr<ImageWriter> m_writer;
};
} // namespace image