1#ifndef YAZE_SRC_CLI_HANDLERS_DUNGEON_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_DUNGEON_COMMANDS_H_
15 resources::OutputFormatter& formatter,
16 std::string_view object_title);
23 std::string
GetName()
const {
return "dungeon-list-sprites"; }
25 return "List all sprites in a dungeon room";
28 return "dungeon-list-sprites --room <room_id> [--sprite-registry <path>] "
29 "[--format <json|text>]";
45 std::string
GetName()
const {
return "dungeon-describe-room"; }
47 return "Get detailed description of a dungeon room";
50 return "dungeon-describe-room --room <room_id> [--sprite-registry <path>] "
51 "[--include-objects] [--format <json|text>]";
67 std::string
GetName()
const {
return "dungeon-list-chests"; }
69 return "List chest contents for dungeon rooms";
72 return "dungeon-list-chests [--room <room_id>] [--format <json|text>]";
77 return absl::OkStatus();
89 std::string
GetName()
const {
return "dungeon-get-entrance"; }
91 return "Get entrance metadata for a dungeon room";
94 return "dungeon-get-entrance --entrance <entrance_id> [--spawn] "
95 "[--format <json|text>]";
111 std::string
GetName()
const {
return "dungeon-export-room"; }
113 return "Export room data to JSON format";
116 return "dungeon-export-room --room <room_id> [--format <json|text>]";
132 std::string
GetName()
const {
return "dungeon-list-objects"; }
134 return "List all objects in a dungeon room";
137 return "dungeon-list-objects --room <room_id> [--format <json|text>]";
153 std::string
GetName()
const {
return "dungeon-get-room-tiles"; }
155 return "Get tile data for a dungeon room";
158 return "dungeon-get-room-tiles --room <room_id> [--format <json|text>]";
174 std::string
GetName()
const {
return "dungeon-set-room-property"; }
176 return "Set a property on a dungeon room";
179 return "dungeon-set-room-property --room <room_id> --property <property> "
180 "--value <value> [--manifest <path>] [--format <json|text>]";
184 return parser.
RequireArgs({
"room",
"property",
"value"});
196 std::string
GetName()
const {
return "dungeon-room-header"; }
198 return "Read raw room header bytes for debugging ROM address issues";
201 return "dungeon-room-header --room <room_id> [--format <json|text>]";
222 std::string
GetName()
const {
return "dungeon-generate-track-collision"; }
224 return "Generate collision overlay from rail objects for minecart rooms";
227 return "dungeon-generate-track-collision --room <room_id> | "
228 "--rooms <hex,hex,...> "
229 "[--write] [--preserve-stops] [--visualize] [--promote-switch X,Y] "
230 "[--project-context <path.yaze|path.yazeproj>] "
231 "[--format <json|text>]";
236 if (parser.
GetString(
"room").has_value() ||
238 return absl::OkStatus();
240 return absl::InvalidArgumentError(
"Either --room or --rooms is required");
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Command handler for describing a dungeon room.
std::string GetDescription() const
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.
std::string GetUsage() const
Get the command usage string.
Command handler for exporting room data.
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 GetDescription() const
std::string GetName() const
Get the command name.
Generate track collision data from rail objects in a room.
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.
std::string GetDescription() const
Command handler for inspecting a dungeon entrance.
std::string GetDescription() const
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetUsage() const
Get the command usage string.
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 room tiles.
std::string GetUsage() const
Get the command usage string.
std::string GetDescription() const
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.
Command handler for listing chest items in dungeon rooms.
std::string GetName() const
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &) override
Validate command arguments.
std::string GetUsage() const
Get the command usage string.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetDescription() const
Command handler for listing objects in a room.
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.
std::string GetDescription() const
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
Command handler for listing sprites in a dungeon room.
std::string GetDescription() const
std::string GetName() const
Get the command name.
std::string GetUsage() const
Get the command usage string.
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.
Command handler for reading raw room header bytes (diagnostic)
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
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.
std::string GetDescription() const
Command handler for setting room properties.
std::string GetUsage() const
Get the command usage string.
std::string GetDescription() const
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.
Utility for parsing common CLI argument patterns.
std::optional< std::string > GetString(const std::string &name) const
Parse a named argument (e.g., –format=json or –format json)
absl::Status RequireArgs(const std::vector< std::string > &required) const
Validate that required arguments are present.
Base class for CLI command handlers.
absl::Status WriteDungeonSpawnPointReport(Rom *rom, int spawn_id, resources::OutputFormatter &formatter, std::string_view object_title)