mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-09-05 16:27:27 +00:00
refactor: restructure image dumper
This commit is contained in:
15
src/ObjCommon/Image/ImageCommon.cpp
Normal file
15
src/ObjCommon/Image/ImageCommon.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include "ImageCommon.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <format>
|
||||
|
||||
namespace image
|
||||
{
|
||||
std::string GetFileNameForAsset(std::string assetName, const std::string& extension)
|
||||
{
|
||||
std::string cleanAssetName(std::move(assetName));
|
||||
std::ranges::replace(cleanAssetName, '*', '_');
|
||||
|
||||
return std::format("images/{}{}", cleanAssetName, extension);
|
||||
}
|
||||
} // namespace image
|
8
src/ObjCommon/Image/ImageCommon.h
Normal file
8
src/ObjCommon/Image/ImageCommon.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace image
|
||||
{
|
||||
std::string GetFileNameForAsset(std::string assetName, const std::string& extension);
|
||||
}
|
Reference in New Issue
Block a user