1#ifndef YAZE_SRC_CLI_HANDLERS_GAME_ORACLE_MENU_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_GAME_ORACLE_MENU_COMMANDS_H_
10 std::string
GetName()
const override {
return "oracle-menu-index"; }
12 return "oracle-menu-index [--project <path>] [--table <label>] "
13 "[--draw-filter <text>] [--missing-bins] [--format <json|text>]";
21 "Scan Oracle menu ASM for incbin assets, draw routines, and "
22 "menu_offset component tables.";
35 std::string
GetName()
const override {
return "oracle-menu-set-offset"; }
37 return "oracle-menu-set-offset --asm <path> --table <label> --index <n> "
38 "--row <n> --col <n> [--project <path>] [--write] "
39 "[--format <json|text>]";
47 "Update a single menu_offset(row,col) entry in a component table. "
48 "Dry-run by default; use --write to apply.";
54 return parser.
RequireArgs({
"asm",
"table",
"index",
"row",
"col"});
63 std::string
GetName()
const override {
return "oracle-menu-validate"; }
65 return "oracle-menu-validate [--project <path>] [--max-row <n>] "
66 "[--max-col <n>] [--strict] [--format <json|text>]";
74 "Validate Oracle menu bins and component tables; exits non-zero on "
95 std::string
GetName()
const override {
return "dungeon-oracle-preflight"; }
97 return "dungeon-oracle-preflight [--required-collision-rooms <hex,hex,...>] "
98 "[--require-write-support] [--skip-collision-maps] "
99 "[--report <path>] [--format <json|text>]";
106 "Run all Oracle ROM safety checks (water-fill region/table, custom "
107 "collision maps, required-room collision) and emit one JSON report. "
108 "Returns non-zero on any error.";
111 {
"--required-collision-rooms",
112 "Comma-separated hex room IDs that must have authored custom "
113 "collision data (e.g. 0x25,0x27 for D4 water gates)",
115 {
"--require-write-support",
116 "Also require expanded custom collision write region (needed for "
117 "dungeon-import-custom-collision-json)",
119 {
"--skip-collision-maps",
120 "Skip per-room collision pointer validation (faster, for ROM doctor)",
123 "Write the JSON report to this path in addition to stdout",
""},
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
std::string GetName() const override
Get the command name.
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.
Descriptor Describe() const override
Provide metadata for TUI/help summaries.
std::string GetName() const override
Get the command name.
Descriptor Describe() const override
Provide metadata for TUI/help summaries.
std::string GetUsage() const override
Get the command usage string.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
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.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
Descriptor Describe() const override
Provide metadata for TUI/help summaries.
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.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetName() const override
Get the command name.
Descriptor Describe() const override
Provide metadata for TUI/help summaries.
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.
std::vector< DescriptorEntry > entries
std::string todo_reference