yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::cli::GfxRoomExportCommandHandler Class Reference

Export a dungeon room's 8 background sheets as one 128x256 indexed PNG with one uniform palette, plus an optional JSON sidecar listing each slot's sheet and which rooms share the main blockset, room blockset and each sheet. –out-dir instead exports one PNG per slot using its resolved palette half, plus manifest.json. PNGs keep raw 3bpp indices for gfx-import. More...

#include <gfx_sheet_png_commands.h>

Inheritance diagram for yaze::cli::GfxRoomExportCommandHandler:
Collaboration diagram for yaze::cli::GfxRoomExportCommandHandler:

Public Member Functions

std::string GetName () const override
 Get the command name.
 
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.
 
bool RequiresRom () const override
 Check if the command requires a loaded ROM.
 
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 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.
 
virtual void SetAssemblySymbolTable (const std::map< std::string, core::AsarSymbol > *table)
 Optional Asar symbol table for assembly-aware tools.
 
virtual void SetSymbolProvider (emu::debug::SymbolProvider *provider)
 Set the SymbolProvider context.
 

Additional Inherited Members

- Protected Member Functions inherited from yaze::cli::resources::CommandHandler
virtual absl::Status ExecuteWithContext (Rom *rom, const ArgumentParser &parser, OutputFormatter &formatter, const CommandInvocationContext &invocation_context)
 Execute with immutable, invocation-scoped ROM path identity.
 
- Protected Attributes inherited from yaze::cli::resources::CommandHandler
Rom * rom_ = nullptr
 
emu::debug::SymbolProvider * symbol_provider_ = nullptr
 
project::YazeProject * project_ = nullptr
 
core::AsarWrapper * asar_wrapper_ = nullptr
 
const std::map< std::string, core::AsarSymbol > * assembly_symbol_table_
 

Detailed Description

Export a dungeon room's 8 background sheets as one 128x256 indexed PNG with one uniform palette, plus an optional JSON sidecar listing each slot's sheet and which rooms share the main blockset, room blockset and each sheet. –out-dir instead exports one PNG per slot using its resolved palette half, plus manifest.json. PNGs keep raw 3bpp indices for gfx-import.

Definition at line 79 of file gfx_sheet_png_commands.h.

Member Function Documentation

◆ GetName()

std::string yaze::cli::GfxRoomExportCommandHandler::GetName ( ) const
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 81 of file gfx_sheet_png_commands.h.

◆ GetUsage()

std::string yaze::cli::GfxRoomExportCommandHandler::GetUsage ( ) const
inlineoverridevirtual

Get the command usage string.

Implements yaze::cli::resources::CommandHandler.

Definition at line 82 of file gfx_sheet_png_commands.h.

◆ GetDefaultFormat()

std::string yaze::cli::GfxRoomExportCommandHandler::GetDefaultFormat ( ) const
inlineoverridevirtual

Get the default output format ("json" or "text")

Reimplemented from yaze::cli::resources::CommandHandler.

Definition at line 87 of file gfx_sheet_png_commands.h.

◆ GetOutputTitle()

std::string yaze::cli::GfxRoomExportCommandHandler::GetOutputTitle ( ) const
inlineoverridevirtual

Get the output title for formatting.

Reimplemented from yaze::cli::resources::CommandHandler.

Definition at line 88 of file gfx_sheet_png_commands.h.

◆ RequiresRom()

bool yaze::cli::GfxRoomExportCommandHandler::RequiresRom ( ) const
inlineoverridevirtual

Check if the command requires a loaded ROM.

Override to return false if ROM is not needed (e.g., filesystem tools).

Reimplemented from yaze::cli::resources::CommandHandler.

Definition at line 91 of file gfx_sheet_png_commands.h.

◆ Describe()

Descriptor yaze::cli::GfxRoomExportCommandHandler::Describe ( ) const
inlineoverridevirtual

◆ ValidateArgs()

absl::Status yaze::cli::GfxRoomExportCommandHandler::ValidateArgs ( const resources::ArgumentParser & parser)
overridevirtual

Validate command arguments.

Implements yaze::cli::resources::CommandHandler.

Definition at line 521 of file gfx_sheet_png_commands.cc.

References yaze::cli::resources::ArgumentParser::GetString(), yaze::cli::resources::ArgumentParser::RequireArgs(), and RETURN_IF_ERROR.

Here is the call graph for this function:

◆ Execute()

absl::Status yaze::cli::GfxRoomExportCommandHandler::Execute ( Rom * rom,
const resources::ArgumentParser & parser,
resources::OutputFormatter & formatter )
overridevirtual

The documentation for this class was generated from the following files: