1#ifndef YAZE_SRC_CLI_HANDLERS_PALETTE_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_PALETTE_COMMANDS_H_
26 std::string
GetName()
const override {
return "palette-get-colors"; }
28 return "Get colors from a ROM palette group";
31 return "palette-get-colors --group <group_name> [--index <palette_index>] "
32 "[--format <json|text>]";
57 std::string
GetName()
const override {
return "palette-set-color"; }
59 return "Set a color in a ROM palette entry";
62 return "palette-set-color --group <group_name> --palette <palette_index> "
63 "--index <color_index> --color <RRGGBB> [--write] "
64 "[--format <json|text>]";
68 return parser.
RequireArgs({
"group",
"palette",
"index",
"color"});
87 std::string
GetName()
const override {
return "palette-analyze"; }
89 return "Analyze palette usage statistics and color properties";
92 return "palette-analyze [--group <group_name>] [--format <json|text>]";
96 return absl::OkStatus();
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Command handler for analyzing palette usage statistics.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetDescription() const
std::string GetName() const override
Get the command name.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetUsage() const override
Get the command usage string.
Command handler for getting palette colors from a ROM.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetUsage() const override
Get the command usage string.
std::string GetName() const override
Get the command name.
std::string GetDescription() const
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
Command handler for setting a palette color in the ROM.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetName() const override
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetDescription() const
std::string GetUsage() const override
Get the command usage string.
Utility for parsing common CLI argument patterns.
absl::Status RequireArgs(const std::vector< std::string > &required) const
Validate that required arguments are present.
Base class for CLI command handlers.