mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-02-14 19:33:02 +00:00
chore: update image namespacing
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include <format>
|
||||
|
||||
using namespace T6;
|
||||
using namespace image;
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -24,15 +25,15 @@ namespace
|
||||
const auto& loadDef = *image.texture.loadDef;
|
||||
textureLoader.Width(image.width).Height(image.height).Depth(image.depth);
|
||||
|
||||
if (loadDef.flags & iwi27::IMG_FLAG_VOLMAP)
|
||||
if (loadDef.flags & image::iwi27::IMG_FLAG_VOLMAP)
|
||||
textureLoader.Type(TextureType::T_3D);
|
||||
else if (loadDef.flags & iwi27::IMG_FLAG_CUBEMAP)
|
||||
else if (loadDef.flags & image::iwi27::IMG_FLAG_CUBEMAP)
|
||||
textureLoader.Type(TextureType::T_CUBE);
|
||||
else
|
||||
textureLoader.Type(TextureType::T_2D);
|
||||
|
||||
textureLoader.Format(static_cast<oat::DXGI_FORMAT>(loadDef.format));
|
||||
textureLoader.HasMipMaps(!(loadDef.flags & iwi27::IMG_FLAG_NOMIPMAPS));
|
||||
textureLoader.HasMipMaps(!(loadDef.flags & image::iwi27::IMG_FLAG_NOMIPMAPS));
|
||||
return textureLoader.LoadTexture(loadDef.data);
|
||||
}
|
||||
|
||||
@@ -46,7 +47,7 @@ namespace
|
||||
|
||||
if (ipakStream)
|
||||
{
|
||||
auto loadedTexture = iwi::LoadIwi(*ipakStream);
|
||||
auto loadedTexture = image::LoadIwi(*ipakStream);
|
||||
ipakStream->close();
|
||||
|
||||
if (loadedTexture != nullptr)
|
||||
@@ -63,7 +64,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)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "Dumping/AbstractAssetDumper.h"
|
||||
#include "Game/T6/T6.h"
|
||||
#include "Image/IImageWriter.h"
|
||||
#include "Image/ImageWriter.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
@@ -17,6 +17,6 @@ namespace image
|
||||
void DumpAsset(AssetDumpingContext& context, const XAssetInfo<T6::AssetImage::Type>& asset) override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<IImageWriter> m_writer;
|
||||
std::unique_ptr<ImageWriter> m_writer;
|
||||
};
|
||||
} // namespace image
|
||||
|
||||
Reference in New Issue
Block a user