1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-04-11 11:31:52 +02:00

Updated according to Ivan's review.

This commit is contained in:
krs 2023-01-20 02:07:54 +02:00 committed by Ivan Savenko
parent 05971d5bb5
commit 8d407be67f
2 changed files with 14 additions and 14 deletions

View File

@ -39,7 +39,7 @@ void ResourceConverter::doConvertPcxToPng(const bfs::path & sourceFolder, bool d
{
logGlobal->info("Converting .pcx to .png from folder: %s ...\n", sourceFolder);
for(bfs::directory_entry & directoryEntry : bfs::directory_iterator(sourceFolder))
for(const auto & directoryEntry : bfs::directory_iterator(sourceFolder))
{
const auto filename = directoryEntry.path().filename();
try
@ -47,7 +47,6 @@ void ResourceConverter::doConvertPcxToPng(const bfs::path & sourceFolder, bool d
if(!bfs::is_regular_file(directoryEntry))
continue;
std::string filePath = directoryEntry.path().string();
std::string fileStem = directoryEntry.path().stem().string();
std::string filenameLowerCase = boost::algorithm::to_lower_copy(filename.string());

View File

@ -27,13 +27,13 @@ struct ExtractionOptions
bool moveExtractedArchivesToSoDMod = false;
};
/**
* Class functionality to be used after extracting original H3 resources and before moving those resources to SoD Mod
* Splits def files containing individual images, so that faction resources are independent. (TwCrPort, CPRSMALL, FlagPort, ITPA, ITPt, Un32 and Un44)
* (town creature portraits, hero army creature portraits, adventure map dwellings, small town icons, big town icons,
* hero speciality small icons, hero speciality large icons)
* Converts all PCX images to PNG
*/
/// <summary>
/// Class functionality to be used after extracting original H3 resources and before moving those resources to SoD Mod
/// Splits def files containing individual images, so that faction resources are independent. (TwCrPort, CPRSMALL, FlagPort, ITPA, ITPt, Un32 and Un44)
/// (town creature portraits, hero army creature portraits, adventure map dwellings, small town icons, big town icons,
/// hero speciality small icons, hero speciality large icons)
/// Converts all PCX images to PNG
/// </summary>
class ResourceConverter
{
@ -44,14 +44,15 @@ public:
private:
/** Converts all .pcx from extractedFolder/Images into .png */
// Converts all .pcx from extractedFolder/Images into .png
static void doConvertPcxToPng(const bfs::path & sourceFolder, bool deleteOriginals);
/** splits a .def file into individual images and converts the output to PNG format */
// splits a .def file into individual images and converts the output to PNG format
static void splitDefFile(const std::string & fileName, const bfs::path & sourceFolder, bool deleteOriginals);
/** Splits the given .def files into individual images.
* For each .def file, the resulting images will be output in the same folder, in a subfolder (named just like the .def file)
*/
/// <summary>
/// Splits the given .def files into individual images.
/// For each .def file, the resulting images will be output in the same folder, in a subfolder (named just like the .def file)
/// </summary>
static void splitDefFiles(const std::vector<std::string> & defFileNames, const bfs::path & sourceFolder, bool deleteOriginals);
};