2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-10-26 08:15:54 +00:00

refactor: do not nest asset namespaces in game namespaces

* Duplicated namespace names are kind of annoying
This commit is contained in:
Jan Laupetin
2025-08-06 00:50:35 +02:00
parent 33c09dfe61
commit 46fb919a52
336 changed files with 1430 additions and 1480 deletions

View File

@@ -12,7 +12,6 @@
#include <format>
using namespace IW5;
using namespace ::image;
namespace
{
@@ -38,7 +37,7 @@ namespace
std::unique_ptr<Texture> LoadImageFromIwi(const GfxImage& image, ISearchPath& searchPath)
{
const auto imageFileName = std::format("images/{}.iwi", image.name);
const auto imageFileName = image::GetFileNameForAsset(image.name, ".iwi");
const auto filePathImage = searchPath.Open(imageFileName);
if (!filePathImage.IsOpen())
{
@@ -58,9 +57,9 @@ namespace
}
} // namespace
namespace IW5::image
namespace image
{
Dumper::Dumper()
DumperIW5::DumperIW5()
{
switch (ObjWriting::Configuration.ImageOutputFormat)
{
@@ -77,12 +76,12 @@ namespace IW5::image
}
}
bool Dumper::ShouldDump(XAssetInfo<GfxImage>* asset)
bool DumperIW5::ShouldDump(XAssetInfo<GfxImage>* asset)
{
return true;
}
void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo<GfxImage>* asset)
void DumperIW5::DumpAsset(AssetDumpingContext& context, XAssetInfo<GfxImage>* asset)
{
const auto* image = asset->Asset();
const auto texture = LoadImageData(context.m_obj_search_path, *image);
@@ -97,4 +96,4 @@ namespace IW5::image
auto& stream = *assetFile;
m_writer->DumpImage(stream, texture.get());
}
} // namespace IW5::image
} // namespace image