diff --git a/src/nostalgia/tools/pack.cpp b/src/nostalgia/tools/pack.cpp index 0b24f24d..f98a4a1d 100644 --- a/src/nostalgia/tools/pack.cpp +++ b/src/nostalgia/tools/pack.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include #include @@ -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 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)); diff --git a/src/nostalgia/tools/pack/pack.cpp b/src/nostalgia/tools/pack/pack.cpp index a8146334..d3b34542 100644 --- a/src/nostalgia/tools/pack/pack.cpp +++ b/src/nostalgia/tools/pack/pack.cpp @@ -6,7 +6,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include #include #include @@ -86,7 +85,7 @@ struct VerificationPair { }; ox::Error copy(ox::PassThroughFS *src, ox::FileSystem32 *dest, ox::String path) { - std::cout << "copying directory: " << path.c_str() << '\n'; + oxOutf("copying directory: {}\n", path); ox::Vector verificationPairs; // copy oxReturnError(src->ls(path.c_str(), [&verificationPairs, src, dest, path](ox::String name, ox::InodeId_t) { @@ -94,7 +93,7 @@ ox::Error copy(ox::PassThroughFS *src, ox::FileSystem32 *dest, ox::String path) if (currentFile == "/.nostalgia") { return OxError(0); } - std::cout << "reading " << name.c_str() << '\n'; + oxOutf("reading {}\n", name); auto [stat, err] = src->stat((currentFile).c_str()); oxReturnError(err); if (stat.fileType == ox::FileType_Directory) { @@ -106,7 +105,7 @@ ox::Error copy(ox::PassThroughFS *src, ox::FileSystem32 *dest, ox::String path) buff.resize(stat.size); oxReturnError(src->read(currentFile.c_str(), buff.data(), buff.size())); // write file to dest - std::cout << "writing " << currentFile.c_str() << '\n'; + oxOutf("writing {}\n", currentFile); oxReturnError(dest->write(currentFile.c_str(), buff.data(), buff.size())); oxReturnError(verifyFile(dest, currentFile, buff)); verificationPairs.push_back({currentFile, buff});