Add BPS patch utility functions and integrate into CLI handlers
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
#include "asar-dll-bindings/c/asar.h"
|
||||
|
||||
#include "util/bps.h"
|
||||
|
||||
namespace yaze {
|
||||
namespace cli {
|
||||
|
||||
@@ -17,7 +19,7 @@ absl::Status ApplyPatch::handle(const std::vector<std::string>& arg_vec) {
|
||||
|
||||
// Apply patch
|
||||
std::vector<uint8_t> patched;
|
||||
core::ApplyBpsPatch(source, patch, patched);
|
||||
util::ApplyBpsPatch(source, patch, patched);
|
||||
|
||||
// Save patched file
|
||||
std::ofstream patched_rom("patched.sfc", std::ios::binary);
|
||||
@@ -50,7 +52,7 @@ absl::Status CreatePatch::handle(const std::vector<std::string>& arg_vec) {
|
||||
std::vector<uint8_t> target;
|
||||
std::vector<uint8_t> patch;
|
||||
// Create patch
|
||||
core::CreateBpsPatch(source, target, patch);
|
||||
util::CreateBpsPatch(source, target, patch);
|
||||
|
||||
// Save patch to file
|
||||
// std::ofstream patchFile("patch.bps", ios::binary);
|
||||
|
||||
Reference in New Issue
Block a user