yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
sprite_commands.h
Go to the documentation of this file.
1#ifndef YAZE_SRC_CLI_HANDLERS_SPRITE_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_SPRITE_COMMANDS_H_
3
5
6namespace yaze {
7namespace cli {
8namespace handlers {
9
14 public:
15 std::string GetName() const { return "sprite-list"; }
16 std::string GetDescription() const { return "List available sprites"; }
17 std::string GetUsage() const {
18 return "sprite-list [--type <type>] [--limit <limit>] [--format "
19 "<json|text>]";
20 }
21
22 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
23 return absl::OkStatus(); // No required args
24 }
25
26 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
27 resources::OutputFormatter& formatter) override;
28};
29
34 public:
35 std::string GetName() const { return "sprite-properties"; }
36 std::string GetDescription() const {
37 return "Get properties of a specific sprite";
38 }
39 std::string GetUsage() const {
40 return "sprite-properties --id <sprite_id> [--format <json|text>]";
41 }
42
43 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
44 return parser.RequireArgs({"id"});
45 }
46
47 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
48 resources::OutputFormatter& formatter) override;
49};
50
55 public:
56 std::string GetName() const { return "sprite-palette"; }
57 std::string GetDescription() const {
58 return "Get palette information for a sprite";
59 }
60 std::string GetUsage() const {
61 return "sprite-palette --id <sprite_id> [--format <json|text>]";
62 }
63
64 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
65 return parser.RequireArgs({"id"});
66 }
67
68 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
69 resources::OutputFormatter& formatter) override;
70};
71
72} // namespace handlers
73} // namespace cli
74} // namespace yaze
75
76#endif // YAZE_SRC_CLI_HANDLERS_SPRITE_COMMANDS_H_
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Definition rom.h:24
Command handler for listing sprites.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetName() const
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetUsage() const
Get the command usage string.
Command handler for getting sprite palette information.
std::string GetUsage() const
Get the command usage string.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetName() const
Get the command name.
Command handler for getting sprite properties.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetUsage() const
Get the command usage string.
std::string GetName() const
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
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.
Utility for consistent output formatting across commands.