yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
minecart_commands.h
Go to the documentation of this file.
1#ifndef YAZE_SRC_CLI_HANDLERS_GAME_MINECART_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_GAME_MINECART_COMMANDS_H_
3
5
6namespace yaze {
7namespace cli {
8namespace handlers {
9
11 public:
12 std::string GetName() const override { return "dungeon-minecart-audit"; }
13 std::string GetDescription() const {
14 return "Audit minecart-related objects/sprites/collision in dungeon rooms";
15 }
16 std::string GetUsage() const override {
17 return "dungeon-minecart-audit [--room <room_id> | --rooms <hex,hex,...> | "
18 "--all] [--only-issues] [--only-matches] [--include-track-objects] "
19 "[--track-object-id <hex>] [--minecart-sprite-id <hex>] "
20 "[--format <json|text>]";
21 }
22
23 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override;
24
25 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
26 resources::OutputFormatter& formatter) override;
27};
28
29// Enumerate all track tile positions and types from a room's custom collision
30// data. Outputs a tile list with (x, y, value, type, category) for every
31// non-zero track tile, plus a bounded ASCII grid for spatial reasoning.
33 public:
34 std::string GetName() const override { return "dungeon-minecart-map"; }
35 std::string GetDescription() const {
36 return "Enumerate track tile positions and types from custom collision "
37 "data";
38 }
39 std::string GetUsage() const override {
40 return "dungeon-minecart-map --room <hex> [--format <json|text>]";
41 }
42
43 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
44 return parser.RequireArgs({"room"});
45 }
46
47 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
48 resources::OutputFormatter& formatter) override;
49};
50
51} // namespace handlers
52} // namespace cli
53} // namespace yaze
54
55#endif // YAZE_SRC_CLI_HANDLERS_GAME_MINECART_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:28
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 GetUsage() const override
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 GetUsage() const override
Get the command usage string.
std::string GetName() const override
Get the command name.
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.