1#ifndef YAZE_SRC_CLI_HANDLERS_GAME_DUNGEON_EDIT_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_GAME_DUNGEON_EDIT_COMMANDS_H_
17 std::string
GetName()
const override {
return "dungeon-place-sprite"; }
19 return "Place a sprite in a dungeon room";
22 return "dungeon-place-sprite --room <hex> --id <hex> --x <int> --y <int> "
23 "[--subtype <int>] [--layer <0|1>] "
24 "[--write] [--format <json|text>]";
28 return parser.
RequireArgs({
"room",
"id",
"x",
"y"});
42 std::string
GetName()
const override {
return "dungeon-remove-sprite"; }
44 return "Remove a sprite from a dungeon room";
47 return "dungeon-remove-sprite --room <hex> "
48 "[--index <int> | --x <int> --y <int>] "
49 "[--write] [--format <json|text>]";
67 std::string
GetName()
const override {
return "dungeon-place-object"; }
69 return "Place a dungeon object in a room";
72 return "dungeon-place-object --room <hex> --id <hex> --x <int> --y <int> "
73 "[--size <int>] [--layer <0|1|2>] "
74 "[--manifest <path>] "
75 "[--write] [--format <json|text>]";
79 return parser.
RequireArgs({
"room",
"id",
"x",
"y"});
95 std::string
GetName()
const override {
return "dungeon-get-palette"; }
97 return "Inspect a room's resolved shared dungeon palette in a US/OOS ROM";
100 return "dungeon-get-palette --room <hex> [--index <0..89>] "
101 "[--format <json|text>]";
120 std::string
GetName()
const override {
return "dungeon-set-palette-color"; }
122 return "Change one US/OOS shared dungeon palette color with safety guards";
125 return "dungeon-set-palette-color --room <hex> --index <0..89> "
126 "--expect-palette-set <hex> --expect-palette-index <0..19> "
127 "--expect-color <hex> --color <hex> --manifest <path> "
128 "[--write] [--format <json|text>]";
132 return parser.
RequireArgs({
"room",
"index",
"expect-palette-set",
133 "expect-palette-index",
"expect-color",
"color",
149 std::string
GetName()
const override {
return "dungeon-set-door-type"; }
151 return "Change an existing dungeon door type";
154 return "dungeon-set-door-type --room <hex> --x <int> --y <int> "
155 "--type <hex> --expect-type <hex> --manifest <path> "
156 "[--write] [--format <json|text>]";
161 {
"room",
"x",
"y",
"type",
"expect-type",
"manifest"});
173 std::string
GetName()
const override {
return "dungeon-list-pot-items"; }
175 return "List existing dungeon pot-item entries";
178 return "dungeon-list-pot-items --room <hex> "
179 "[--format <json|text>]";
198 std::string
GetName()
const override {
return "dungeon-set-pot-item"; }
200 return "Change an existing dungeon pot item";
203 return "dungeon-set-pot-item --room <hex> --index <int> "
204 "--expect-position <hex> --expect-item <hex> --item <hex> "
205 "--manifest <path> [--write] [--format <json|text>]";
209 return parser.
RequireArgs({
"room",
"index",
"expect-position",
210 "expect-item",
"item",
"manifest"});
225 std::string
GetName()
const override {
return "dungeon-set-collision-tile"; }
227 return "Set custom collision tiles in a dungeon room";
230 return "dungeon-set-collision-tile --room <hex> "
231 "--tiles <x,y,tile>[;<x,y,tile>...] "
232 "[--write] [--format <json|text>]";
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Resolve and inspect the shared dungeon palette used by one room.
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 GetDescription() const
std::string GetName() const override
Get the command name.
List existing pot-item entries and their exact ROM addresses.
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.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetDescription() const
std::string GetName() const override
Get the command name.
Place a dungeon object (track segment, door, etc.) in a 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 GetUsage() const override
Get the command usage string.
std::string GetName() const override
Get the command name.
Place a sprite in a dungeon room and optionally write to ROM.
std::string GetDescription() const
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 Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
Remove a sprite from a dungeon room by index or position.
std::string GetName() const override
Get the command name.
std::string GetUsage() const override
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.
Set individual custom collision tiles in a dungeon room.
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.
std::string GetDescription() const
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
Change one existing dungeon door's fixed-width type byte.
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.
std::string GetDescription() const
Change one color in a room's resolved shared dungeon palette.
std::string GetName() const override
Get the command name.
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 override
Get the command usage string.
Change one existing pot item's fixed-width item byte.
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 Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
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.