1#ifndef YAZE_SRC_CLI_HANDLERS_OVERWORLD_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_OVERWORLD_COMMANDS_H_
12 std::string
GetName()
const {
return "overworld-get-tile"; }
14 return "Read the tile16 id at an overworld area position. --map is a hex "
15 "screen id; x/y are decimal (or 0x-hex) tile16 coordinates "
16 "relative to the top-left of the screen's parent area: 0-31 for a "
17 "small area, 0-63 on each doubled axis of a large/wide/tall area";
20 return "overworld-get-tile --map <hex> --x <area_tile_x> --y <area_tile_y> "
21 "[--format <json|text>]";
35 std::string
GetName()
const {
return "overworld-inspect-special-entrances"; }
37 return "Inspect verified four-row special-area tile triggers in the loaded "
41 return "overworld-inspect-special-entrances --map <hex> [--format "
53 std::string
GetName()
const {
return "overworld-set-tile"; }
55 return "Write one tile16 id at an overworld area position (dry-run by "
56 "default). Coordinates match overworld-get-tile. --write rebuilds "
57 "tile32/map data, verifies a fresh reload, saves with a required "
58 "backup, and refuses ROMs inside an Oracle checkout unless "
59 "--allow-project-rom";
62 return "overworld-set-tile --map <hex> --x <area_tile_x> --y <area_tile_y> "
63 "--tile <hex> [--write] [--allow-project-rom] [--format "
68 return parser.
RequireArgs({
"map",
"x",
"y",
"tile"});
84 std::string
GetName()
const {
return "overworld-find-tile"; }
86 return "Find tiles by ID in overworld maps";
89 return "overworld-find-tile --tile <hex> [--map <hex>] "
90 "[--world <light|dark|special>] [--format <json|text>]";
106 std::string
GetName()
const {
return "overworld-describe-map"; }
108 return "Get detailed description of an overworld map";
111 return "overworld-describe-map --screen <hex> [--format <json|text>]";
127 std::string
GetName()
const {
return "overworld-list-warps"; }
129 return "List all warps in overworld maps";
132 return "overworld-list-warps [--screen <screen_id>] [--format <json|text>]";
136 return absl::OkStatus();
148 std::string
GetName()
const {
return "overworld-list-sprites"; }
150 return "List all sprites in overworld maps";
153 return "overworld-list-sprites [--screen <screen_id>] [--phase <0|1|2>] "
154 "[--format <json|text>]";
158 return absl::OkStatus();
170 std::string
GetName()
const {
return "overworld-list-items"; }
172 return "List all hidden item placements in overworld maps";
175 return "overworld-list-items [--screen <screen_id>] [--format "
180 return absl::OkStatus();
192 std::string
GetName()
const {
return "overworld-get-entrance"; }
194 return "Get entrance information from overworld";
197 return "overworld-get-entrance --entrance <entrance_id> [--format "
214 std::string
GetName()
const {
return "overworld-tile-stats"; }
216 return "Count tile16 usage per screen, per world and per tile16 id";
219 return "overworld-tile-stats [--screen <hex>|--map <hex>] "
220 "[--world <light|dark|special>] [--tile <hex>] [--top <n>] "
221 "[--format <json|text>]";
225 return absl::OkStatus();
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 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.
std::string GetDescription() const
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 GetDescription() const
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 GetDescription() const
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.
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.
std::string GetDescription() const
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
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 GetUsage() const
Get the command usage string.
std::string GetName() const
Get the command name.
Command handler for listing items in overworld.
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 GetDescription() const
std::string GetUsage() const
Get the command usage string.
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.
std::string GetDescription() const
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.
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 GetDescription() const
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetName() const
Get the command name.
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 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.
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.
std::string GetDescription() const
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.