mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-10-23 06:46:00 +00:00
refactor: do not nest asset namespaces in game namespaces
* Duplicated namespace names are kind of annoying
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
#include <format>
|
||||
|
||||
using namespace T5;
|
||||
using namespace ::image;
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -37,7 +36,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())
|
||||
{
|
||||
@@ -57,9 +56,9 @@ namespace
|
||||
}
|
||||
} // namespace
|
||||
|
||||
namespace T5::image
|
||||
namespace image
|
||||
{
|
||||
Dumper::Dumper()
|
||||
DumperT5::DumperT5()
|
||||
{
|
||||
switch (ObjWriting::Configuration.ImageOutputFormat)
|
||||
{
|
||||
@@ -76,12 +75,12 @@ namespace T5::image
|
||||
}
|
||||
}
|
||||
|
||||
bool Dumper::ShouldDump(XAssetInfo<GfxImage>* asset)
|
||||
bool DumperT5::ShouldDump(XAssetInfo<GfxImage>* asset)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo<GfxImage>* asset)
|
||||
void DumperT5::DumpAsset(AssetDumpingContext& context, XAssetInfo<GfxImage>* asset)
|
||||
{
|
||||
const auto* image = asset->Asset();
|
||||
const auto texture = LoadImageData(context.m_obj_search_path, *image);
|
||||
@@ -96,4 +95,4 @@ namespace T5::image
|
||||
auto& stream = *assetFile;
|
||||
m_writer->DumpImage(stream, texture.get());
|
||||
}
|
||||
} // namespace T5::image
|
||||
} // namespace image
|
||||
|
Reference in New Issue
Block a user