Validate overworld map32 pointers and decompression. More...
#include <overworld_validate_commands.h>


Public Member Functions | |
| std::string | GetName () const override |
| Get the command name. | |
| std::string | GetDescription () const |
| std::string | GetUsage () const override |
| Get the command usage string. | |
| std::string | GetDefaultFormat () const override |
| Get the default output format ("json" or "text") | |
| std::string | GetOutputTitle () const override |
| Get the output title for formatting. | |
| Descriptor | Describe () const override |
| Provide metadata for TUI/help summaries. | |
| 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. | |
Public Member Functions inherited from yaze::cli::resources::CommandHandler | |
| virtual | ~CommandHandler ()=default |
| absl::Status | Run (const std::vector< std::string > &args, Rom *rom_context, std::string *captured_output=nullptr) |
| Execute the command. | |
| virtual bool | RequiresRom () const |
| Check if the command requires a loaded ROM. | |
| virtual bool | RequiresLabels () const |
| Check if the command requires ROM labels. | |
| virtual void | SetProjectContext (project::YazeProject *project) |
| Set the YazeProject context. Default implementation does nothing, override if tool needs project info. | |
| virtual void | SetAsarWrapper (core::AsarWrapper *asar_wrapper) |
| Set the AsarWrapper context. Default implementation does nothing, override if tool needs Asar access. | |
| virtual void | SetRomContext (Rom *rom) |
| Set the ROM context for tools that need ROM access. Default implementation stores the ROM pointer for subclass use. | |
Additional Inherited Members | |
Protected Attributes inherited from yaze::cli::resources::CommandHandler | |
| Rom * | rom_ = nullptr |
| project::YazeProject * | project_ = nullptr |
| core::AsarWrapper * | asar_wrapper_ = nullptr |
Validate overworld map32 pointers and decompression.
Checks each map's pointer table entries and attempts to decompress the referenced data to verify integrity. Useful for detecting ROM corruption or invalid pointer modifications.
Supports structured JSON output for agent consumption.
Definition at line 17 of file overworld_validate_commands.h.
|
inlineoverridevirtual |
Get the command name.
Override this to provide a unique identifier for the command. This is used for command registration and lookup.
Implements yaze::cli::resources::CommandHandler.
Definition at line 19 of file overworld_validate_commands.h.
|
inline |
Definition at line 21 of file overworld_validate_commands.h.
|
inlineoverridevirtual |
Get the command usage string.
Implements yaze::cli::resources::CommandHandler.
Definition at line 25 of file overworld_validate_commands.h.
|
inlineoverridevirtual |
Get the default output format ("json" or "text")
Reimplemented from yaze::cli::resources::CommandHandler.
Definition at line 30 of file overworld_validate_commands.h.
|
inlineoverridevirtual |
Get the output title for formatting.
Reimplemented from yaze::cli::resources::CommandHandler.
Definition at line 32 of file overworld_validate_commands.h.
|
inlineoverridevirtual |
Provide metadata for TUI/help summaries.
Reimplemented from yaze::cli::resources::CommandHandler.
Definition at line 34 of file overworld_validate_commands.h.
References yaze::cli::resources::CommandHandler::Descriptor::display_name, yaze::cli::resources::CommandHandler::Descriptor::summary, and yaze::cli::resources::CommandHandler::Descriptor::todo_reference.
|
inlineoverridevirtual |
Validate command arguments.
Override this to check required arguments and perform custom validation. Called before Execute().
Implements yaze::cli::resources::CommandHandler.
Definition at line 43 of file overworld_validate_commands.h.
|
overridevirtual |
Execute the command business logic.
Override this to implement command-specific functionality. The ROM is guaranteed to be loaded and labels initialized.
Implements yaze::cli::resources::CommandHandler.
Definition at line 213 of file overworld_validate_commands.cc.
References yaze::cli::resources::OutputFormatter::AddArrayItem(), yaze::cli::resources::OutputFormatter::AddField(), ASSIGN_OR_RETURN, yaze::cli::resources::OutputFormatter::BeginArray(), yaze::cli::resources::OutputFormatter::EndArray(), yaze::cli::resources::ArgumentParser::HasFlag(), yaze::cli::resources::OutputFormatter::IsJson(), yaze::cli::kMap16TilesExpanded, yaze::zelda3::kNumOverworldMaps, yaze::zelda3::Overworld::Load(), and RETURN_IF_ERROR.