yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dungeon_collision_commands.h
Go to the documentation of this file.
1#ifndef YAZE_SRC_CLI_HANDLERS_GAME_DUNGEON_COLLISION_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_GAME_DUNGEON_COLLISION_COMMANDS_H_
3
5
6namespace yaze {
7namespace cli {
8namespace handlers {
9
12 public:
13 std::string GetName() const override {
14 return "dungeon-list-custom-collision";
15 }
16 std::string GetDescription() const {
17 return "List ZScream-style custom collision tiles for a dungeon room";
18 }
19 std::string GetUsage() const override {
20 return "dungeon-list-custom-collision --room <room_id> "
21 "[--tiles <hex,hex,...>] [--nonzero] [--all] [--format <json|text>]";
22 }
23
24 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
25 return parser.RequireArgs({"room"});
26 }
27
28 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
29 resources::OutputFormatter& formatter) override;
30};
31
34 public:
35 std::string GetName() const override {
36 return "dungeon-export-custom-collision-json";
37 }
38 std::string GetDescription() const {
39 return "Export dungeon custom collision maps to JSON";
40 }
41 std::string GetUsage() const override {
42 return "dungeon-export-custom-collision-json --out <path> "
43 "[--room <room_id> | --rooms <hex,hex,...> | --all] "
44 "[--report <path>] [--sandbox] "
45 "[--format <json|text>]";
46 }
47
48 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override;
49
50 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
51 resources::OutputFormatter& formatter) override;
52
53 absl::Status ExecuteWithContext(
54 Rom* rom, const resources::ArgumentParser& parser,
56 const resources::CommandInvocationContext& invocation_context) override;
57};
58
61 public:
62 std::string GetName() const override {
63 return "dungeon-import-custom-collision-json";
64 }
65 std::string GetDescription() const {
66 return "Validate custom collision JSON with --dry-run; otherwise import "
67 "and immediately save the active ROM (--sandbox saves only its "
68 "copy)";
69 }
70 std::string GetUsage() const override {
71 return "dungeon-import-custom-collision-json --in <path> [--replace-all] "
72 "[--force] [--dry-run [--report <path>]] "
73 "[--sandbox | --mock-rom] "
74 "[--format <json|text>]";
75 }
76
77 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override;
78
79 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
80 resources::OutputFormatter& formatter) override;
81};
82
85 public:
86 std::string GetName() const override {
87 return "dungeon-export-water-fill-json";
88 }
89 std::string GetDescription() const {
90 return "Export dungeon water fill zones to JSON";
91 }
92 std::string GetUsage() const override {
93 return "dungeon-export-water-fill-json --out <path> "
94 "[--room <room_id> | --rooms <hex,hex,...> | --all] "
95 "[--report <path>] [--sandbox] "
96 "[--format <json|text>]";
97 }
98
99 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override;
100
101 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
102 resources::OutputFormatter& formatter) override;
103
104 absl::Status ExecuteWithContext(
105 Rom* rom, const resources::ArgumentParser& parser,
107 const resources::CommandInvocationContext& invocation_context) override;
108};
109
112 public:
113 std::string GetName() const override {
114 return "dungeon-import-water-fill-json";
115 }
116 std::string GetDescription() const {
117 return "Validate water-fill JSON with --dry-run; otherwise import and "
118 "immediately save the active ROM (--sandbox saves only its copy)";
119 }
120 std::string GetUsage() const override {
121 return "dungeon-import-water-fill-json --in <path> "
122 "[--dry-run [--report <path>]] [--strict-masks] "
123 "[--sandbox | --mock-rom] "
124 "[--format <json|text>]";
125 }
126
127 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override;
128
129 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
130 resources::OutputFormatter& formatter) override;
131};
132
133} // namespace handlers
134} // namespace cli
135} // namespace yaze
136
137#endif // YAZE_SRC_CLI_HANDLERS_GAME_DUNGEON_COLLISION_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
std::string GetUsage() const override
Get the command usage string.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
absl::Status ExecuteWithContext(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter, const resources::CommandInvocationContext &invocation_context) override
Execute with immutable, invocation-scoped ROM path identity.
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.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
absl::Status ExecuteWithContext(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter, const resources::CommandInvocationContext &invocation_context) override
Execute with immutable, invocation-scoped ROM path identity.
std::string GetName() const override
Get the command name.
std::string GetUsage() const override
Get the command usage string.
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.
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.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetName() const override
Get the command name.
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.
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.