rename handle to Run for cli commands
This commit is contained in:
@@ -3,18 +3,16 @@
|
||||
namespace yaze {
|
||||
namespace cli {
|
||||
|
||||
absl::Status Compress::handle(const std::vector<std::string>& arg_vec) {
|
||||
absl::Status Compress::Run(const std::vector<std::string>& arg_vec) {
|
||||
std::cout << "Compress selected with argument: " << arg_vec[0] << std::endl;
|
||||
return absl::OkStatus();
|
||||
}
|
||||
|
||||
absl::Status Decompress::handle(const std::vector<std::string>& arg_vec) {
|
||||
ColorModifier underline(ColorCode::FG_UNDERLINE);
|
||||
ColorModifier reset(ColorCode::FG_RESET);
|
||||
absl::Status Decompress::Run(const std::vector<std::string>& arg_vec) {
|
||||
std::cout << "Please specify the tilesheets you want to export\n";
|
||||
std::cout << "You can input an individual sheet, a range X-Y, or comma "
|
||||
"separate values.\n\n";
|
||||
std::cout << underline << "Tilesheets\n" << reset;
|
||||
std::cout << "Tilesheets\n";
|
||||
std::cout << "0-112 -> compressed 3bpp bgr \n";
|
||||
std::cout << "113-114 -> compressed 2bpp\n";
|
||||
std::cout << "115-126 -> uncompressed 3bpp sprites\n";
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
#include "cli/z3ed.h"
|
||||
|
||||
#include "asar-dll-bindings/c/asar.h"
|
||||
|
||||
#include "cli/z3ed.h"
|
||||
#include "util/bps.h"
|
||||
|
||||
namespace yaze {
|
||||
namespace cli {
|
||||
|
||||
absl::Status ApplyPatch::handle(const std::vector<std::string>& arg_vec) {
|
||||
absl::Status ApplyPatch::Run(const std::vector<std::string>& arg_vec) {
|
||||
std::string rom_filename = arg_vec[1];
|
||||
std::string patch_filename = arg_vec[2];
|
||||
RETURN_IF_ERROR(rom_.LoadFromFile(rom_filename))
|
||||
@@ -28,7 +26,7 @@ absl::Status ApplyPatch::handle(const std::vector<std::string>& arg_vec) {
|
||||
return absl::OkStatus();
|
||||
}
|
||||
|
||||
absl::Status AsarPatch::handle(const std::vector<std::string>& arg_vec) {
|
||||
absl::Status AsarPatch::Run(const std::vector<std::string>& arg_vec) {
|
||||
std::string patch_filename = arg_vec[1];
|
||||
std::string rom_filename = arg_vec[2];
|
||||
RETURN_IF_ERROR(rom_.LoadFromFile(rom_filename))
|
||||
@@ -47,7 +45,7 @@ absl::Status AsarPatch::handle(const std::vector<std::string>& arg_vec) {
|
||||
return absl::OkStatus();
|
||||
}
|
||||
|
||||
absl::Status CreatePatch::handle(const std::vector<std::string>& arg_vec) {
|
||||
absl::Status CreatePatch::Run(const std::vector<std::string>& arg_vec) {
|
||||
std::vector<uint8_t> source;
|
||||
std::vector<uint8_t> target;
|
||||
std::vector<uint8_t> patch;
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
#include <vector>
|
||||
|
||||
#include "absl/status/status.h"
|
||||
#include "util/macro.h"
|
||||
#include "app/rom.h"
|
||||
#include "cli/z3ed.h"
|
||||
#include "util/macro.h"
|
||||
|
||||
namespace yaze {
|
||||
namespace cli {
|
||||
|
||||
absl::Status Tile16Transfer::handle(const std::vector<std::string>& arg_vec) {
|
||||
absl::Status Tile16Transfer::Run(const std::vector<std::string>& arg_vec) {
|
||||
// Load the source rom
|
||||
RETURN_IF_ERROR(rom_.LoadFromFile(arg_vec[0]))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user