yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dungeon_edit_commands.h
Go to the documentation of this file.
1#ifndef YAZE_SRC_CLI_HANDLERS_GAME_DUNGEON_EDIT_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_GAME_DUNGEON_EDIT_COMMANDS_H_
3
5
6namespace yaze {
7namespace cli {
8namespace handlers {
9
16 public:
17 std::string GetName() const override { return "dungeon-place-sprite"; }
18 std::string GetDescription() const {
19 return "Place a sprite in a dungeon room";
20 }
21 std::string GetUsage() const override {
22 return "dungeon-place-sprite --room <hex> --id <hex> --x <int> --y <int> "
23 "[--subtype <int>] [--layer <0|1>] "
24 "[--write] [--format <json|text>]";
25 }
26
27 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
28 return parser.RequireArgs({"room", "id", "x", "y"});
29 }
30
31 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
32 resources::OutputFormatter& formatter) override;
33};
34
41 public:
42 std::string GetName() const override { return "dungeon-remove-sprite"; }
43 std::string GetDescription() const {
44 return "Remove a sprite from a dungeon room";
45 }
46 std::string GetUsage() const override {
47 return "dungeon-remove-sprite --room <hex> "
48 "[--index <int> | --x <int> --y <int>] "
49 "[--write] [--format <json|text>]";
50 }
51
52 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
53 return parser.RequireArgs({"room"});
54 }
55
56 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
57 resources::OutputFormatter& formatter) override;
58};
59
66 public:
67 std::string GetName() const override { return "dungeon-place-object"; }
68 std::string GetDescription() const {
69 return "Place a dungeon object in a room";
70 }
71 std::string GetUsage() const override {
72 return "dungeon-place-object --room <hex> --id <hex> --x <int> --y <int> "
73 "[--size <int>] [--layer <0|1|2>] "
74 "[--write] [--format <json|text>]";
75 }
76
77 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
78 return parser.RequireArgs({"room", "id", "x", "y"});
79 }
80
81 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
82 resources::OutputFormatter& formatter) override;
83};
84
93 public:
94 std::string GetName() const override {
95 return "dungeon-set-collision-tile";
96 }
97 std::string GetDescription() const {
98 return "Set custom collision tiles in a dungeon room";
99 }
100 std::string GetUsage() const override {
101 return "dungeon-set-collision-tile --room <hex> "
102 "--tiles <x,y,tile>[;<x,y,tile>...] "
103 "[--write] [--format <json|text>]";
104 }
105
106 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
107 return parser.RequireArgs({"room", "tiles"});
108 }
109
110 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
111 resources::OutputFormatter& formatter) override;
112};
113
114} // namespace handlers
115} // namespace cli
116} // namespace yaze
117
118#endif // YAZE_SRC_CLI_HANDLERS_GAME_DUNGEON_EDIT_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
Place a dungeon object (track segment, door, etc.) in a room.
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.
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.
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.
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.