Skip to content

Commit

Permalink
Added -onlyHighestMip parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
dedmen committed Mar 14, 2020
1 parent d44de34 commit 9b25785
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions MipMapTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ int main(int argc, char* argv[]) {
allArguments.erase(namestyleArg);
}

auto highestMIPArg = std::find_if(allArguments.begin(), allArguments.end(), [](const std::string& arg) {
return arg.starts_with("-onlyHighestMip");
});


if (firstArg == "unpack") {
std::cout << "Unpacking files:\n";
allArguments.erase(allArguments.begin());
Expand All @@ -175,6 +180,7 @@ int main(int argc, char* argv[]) {
std::filesystem::path outputPath = makeOutputPath(inputFile, mipmap, namestyle);

newFile->writeToFile(outputPath);
if (highestMIPArg != allArguments.end()) return 0;
}
}
return 0;
Expand Down

0 comments on commit 9b25785

Please sign in to comment.