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:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <format>
|
||||
|
||||
using namespace IW4;
|
||||
using namespace image;
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -23,15 +24,15 @@ namespace
|
||||
const auto& loadDef = *image.texture.loadDef;
|
||||
textureLoader.Width(image.width).Height(image.height).Depth(image.depth);
|
||||
|
||||
if ((loadDef.flags & iwi8::IMG_FLAG_MAPTYPE_MASK) == iwi8::IMG_FLAG_MAPTYPE_3D)
|
||||
if ((loadDef.flags & image::iwi8::IMG_FLAG_MAPTYPE_MASK) == image::iwi8::IMG_FLAG_MAPTYPE_3D)
|
||||
textureLoader.Type(TextureType::T_3D);
|
||||
else if ((loadDef.flags & iwi8::IMG_FLAG_MAPTYPE_MASK) == iwi8::IMG_FLAG_MAPTYPE_CUBE)
|
||||
else if ((loadDef.flags & image::iwi8::IMG_FLAG_MAPTYPE_MASK) == image::iwi8::IMG_FLAG_MAPTYPE_CUBE)
|
||||
textureLoader.Type(TextureType::T_CUBE);
|
||||
else
|
||||
textureLoader.Type(TextureType::T_2D);
|
||||
|
||||
textureLoader.Format(static_cast<oat::D3DFORMAT>(loadDef.format));
|
||||
textureLoader.HasMipMaps(!(loadDef.flags & iwi8::IMG_FLAG_NOMIPMAPS));
|
||||
textureLoader.HasMipMaps(!(loadDef.flags & image::iwi8::IMG_FLAG_NOMIPMAPS));
|
||||
return textureLoader.LoadTexture(loadDef.data);
|
||||
}
|
||||
|
||||
@@ -45,7 +46,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/IW4/IW4.h"
|
||||
#include "Image/IImageWriter.h"
|
||||
#include "Image/ImageWriter.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
@@ -17,6 +17,6 @@ namespace image
|
||||
void DumpAsset(AssetDumpingContext& context, const XAssetInfo<IW4::AssetImage::Type>& asset) override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<IImageWriter> m_writer;
|
||||
std::unique_ptr<ImageWriter> m_writer;
|
||||
};
|
||||
} // namespace image
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <format>
|
||||
|
||||
using namespace IW5;
|
||||
using namespace image;
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -24,15 +25,15 @@ namespace
|
||||
|
||||
textureLoader.Width(image.width).Height(image.height).Depth(image.depth);
|
||||
|
||||
if ((loadDef.flags & iwi8::IMG_FLAG_MAPTYPE_MASK) == iwi8::IMG_FLAG_MAPTYPE_3D)
|
||||
if ((loadDef.flags & image::iwi8::IMG_FLAG_MAPTYPE_MASK) == image::iwi8::IMG_FLAG_MAPTYPE_3D)
|
||||
textureLoader.Type(TextureType::T_3D);
|
||||
else if ((loadDef.flags & iwi8::IMG_FLAG_MAPTYPE_MASK) == iwi8::IMG_FLAG_MAPTYPE_CUBE)
|
||||
else if ((loadDef.flags & image::iwi8::IMG_FLAG_MAPTYPE_MASK) == image::iwi8::IMG_FLAG_MAPTYPE_CUBE)
|
||||
textureLoader.Type(TextureType::T_CUBE);
|
||||
else
|
||||
textureLoader.Type(TextureType::T_2D);
|
||||
|
||||
textureLoader.Format(static_cast<oat::D3DFORMAT>(loadDef.format));
|
||||
textureLoader.HasMipMaps(!(loadDef.flags & iwi8::IMG_FLAG_NOMIPMAPS));
|
||||
textureLoader.HasMipMaps(!(loadDef.flags & image::iwi8::IMG_FLAG_NOMIPMAPS));
|
||||
return textureLoader.LoadTexture(loadDef.data);
|
||||
}
|
||||
|
||||
@@ -46,7 +47,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/IW5/IW5.h"
|
||||
#include "Image/IImageWriter.h"
|
||||
#include "Image/ImageWriter.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
@@ -17,6 +17,6 @@ namespace image
|
||||
void DumpAsset(AssetDumpingContext& context, const XAssetInfo<IW5::AssetImage::Type>& asset) override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<IImageWriter> m_writer;
|
||||
std::unique_ptr<ImageWriter> m_writer;
|
||||
};
|
||||
} // namespace image
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <format>
|
||||
|
||||
using namespace T5;
|
||||
using namespace image;
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -23,15 +24,15 @@ namespace
|
||||
const auto& loadDef = *image.texture.loadDef;
|
||||
textureLoader.Width(image.width).Height(image.height).Depth(image.depth);
|
||||
|
||||
if (loadDef.flags & iwi13::IMG_FLAG_VOLMAP)
|
||||
if (loadDef.flags & image::iwi13::IMG_FLAG_VOLMAP)
|
||||
textureLoader.Type(TextureType::T_3D);
|
||||
else if (loadDef.flags & iwi13::IMG_FLAG_CUBEMAP)
|
||||
else if (loadDef.flags & image::iwi13::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 & iwi13::IMG_FLAG_NOMIPMAPS));
|
||||
textureLoader.HasMipMaps(!(loadDef.flags & image::iwi13::IMG_FLAG_NOMIPMAPS));
|
||||
return textureLoader.LoadTexture(loadDef.data);
|
||||
}
|
||||
|
||||
@@ -45,7 +46,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/T5/T5.h"
|
||||
#include "Image/IImageWriter.h"
|
||||
#include "Image/ImageWriter.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
@@ -17,6 +17,6 @@ namespace image
|
||||
void DumpAsset(AssetDumpingContext& context, const XAssetInfo<T5::AssetImage::Type>& asset) override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<IImageWriter> m_writer;
|
||||
std::unique_ptr<ImageWriter> m_writer;
|
||||
};
|
||||
} // namespace image
|
||||
|
||||
@@ -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