yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
overworld_commands.h
Go to the documentation of this file.
1#ifndef YAZE_SRC_CLI_HANDLERS_OVERWORLD_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_OVERWORLD_COMMANDS_H_
3
5
6namespace yaze {
7namespace cli {
8namespace handlers {
9
14 public:
15 std::string GetName() const { return "overworld-find-tile"; }
16 std::string GetDescription() const {
17 return "Find tiles by ID in overworld maps";
18 }
19 std::string GetUsage() const {
20 return "overworld-find-tile --tile <tile_id> [--format <json|text>]";
21 }
22
23 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
24 return parser.RequireArgs({"tile"});
25 }
26
27 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
28 resources::OutputFormatter& formatter) override;
29};
30
35 public:
36 std::string GetName() const { return "overworld-describe-map"; }
37 std::string GetDescription() const {
38 return "Get detailed description of an overworld map";
39 }
40 std::string GetUsage() const {
41 return "overworld-describe-map --screen <screen_id> [--format <json|text>]";
42 }
43
44 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
45 return parser.RequireArgs({"screen"});
46 }
47
48 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
49 resources::OutputFormatter& formatter) override;
50};
51
56 public:
57 std::string GetName() const { return "overworld-list-warps"; }
58 std::string GetDescription() const {
59 return "List all warps in overworld maps";
60 }
61 std::string GetUsage() const {
62 return "overworld-list-warps [--screen <screen_id>] [--format <json|text>]";
63 }
64
65 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
66 return absl::OkStatus(); // No required args
67 }
68
69 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
70 resources::OutputFormatter& formatter) override;
71};
72
77 public:
78 std::string GetName() const { return "overworld-list-sprites"; }
79 std::string GetDescription() const {
80 return "List all sprites in overworld maps";
81 }
82 std::string GetUsage() const {
83 return "overworld-list-sprites [--screen <screen_id>] [--format "
84 "<json|text>]";
85 }
86
87 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
88 return absl::OkStatus(); // No required args
89 }
90
91 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
92 resources::OutputFormatter& formatter) override;
93};
94
99 public:
100 std::string GetName() const { return "overworld-get-entrance"; }
101 std::string GetDescription() const {
102 return "Get entrance information from overworld";
103 }
104 std::string GetUsage() const {
105 return "overworld-get-entrance --entrance <entrance_id> [--format "
106 "<json|text>]";
107 }
108
109 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
110 return parser.RequireArgs({"entrance"});
111 }
112
113 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
114 resources::OutputFormatter& formatter) override;
115};
116
121 public:
122 std::string GetName() const { return "overworld-tile-stats"; }
123 std::string GetDescription() const {
124 return "Get tile usage statistics for overworld";
125 }
126 std::string GetUsage() const {
127 return "overworld-tile-stats [--screen <screen_id>] [--format <json|text>]";
128 }
129
130 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
131 return absl::OkStatus(); // No required args
132 }
133
134 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
135 resources::OutputFormatter& formatter) override;
136};
137
138} // namespace handlers
139} // namespace cli
140} // namespace yaze
141
142#endif // YAZE_SRC_CLI_HANDLERS_OVERWORLD_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 describing overworld maps.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetName() const
Get the command name.
std::string GetUsage() const
Get the command usage string.
Command handler for finding tiles in overworld.
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.
Command handler for getting entrance information.
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.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetName() const
Get the command name.
Command handler for listing sprites in overworld.
std::string GetName() const
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
Get the command usage string.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
Command handler for listing warps in overworld.
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 tile statistics.
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.
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.