[nostalgia/tools/pack] Replace cout and cerr with oxOut and oxErr

This commit is contained in:
2021-04-16 21:19:10 -05:00
parent 86a38c7197
commit be09c60f5d
2 changed files with 6 additions and 8 deletions
+3 -4
View File
@@ -7,7 +7,6 @@
*/
#include <fstream>
#include <iostream>
#include <vector>
#include <ox/clargs/clargs.hpp>
#include <ox/fs/fs.hpp>
@@ -29,11 +28,11 @@ static ox::Error run(const ox::ClArgs &args) {
auto argSrc = args.getString("src", "");
auto argDst = args.getString("dst", "");
if (argSrc == "") {
std::cerr << "error: must specify a source directory\n";
oxErr("\033[31;1;1merror:\033[0m must specify a source directory\n");
return OxError(1, "must specify a source directory");
}
if (argDst == "") {
std::cerr << "error: must specify a destination ROM file\n";
oxErr("\033[31;1;1merror:\033[0m must specify a destination ROM file\n");
return OxError(1, "must specify a destination ROM file");
}
ox::Vector<char> buff(32 * ox::units::MB);
@@ -44,7 +43,7 @@ static ox::Error run(const ox::ClArgs &args) {
oxReturnError(dst.resize());
oxRequire(dstSize, dst.size());
std::cout << "new size: " << dstSize << '\n';
oxOutf("new size: {}\n", dstSize);
buff.resize(dstSize);
oxReturnError(writeFileBuff(argDst.c_str(), buff));