1#ifndef YAZE_CLI_HANDLERS_GRAPHICS_GFX_SHEET_PNG_COMMANDS_H_
2#define YAZE_CLI_HANDLERS_GRAPHICS_GFX_SHEET_PNG_COMMANDS_H_
21 std::string
GetName()
const override {
return "gfx-export"; }
23 return "gfx-export --sheet <id> --png <file> [--block <0-15>] "
24 "[--count <n>] [--palette gray|rgb:...|room-bg:<room>:<row>|"
25 "room-sprite:<room>:<row>|room-slot:<room>:<slot>:<row>] [--json "
35 "Export a graphics sheet (or 16x16 block range) to an "
36 "indexed PNG with a chosen palette.";
51 std::string
GetName()
const override {
return "gfx-import"; }
53 return "gfx-import --sheet <id> --png <file> [--block <0-15>] "
54 "[--palette ...] (--dry-run | --write --out <rom file>)";
63 "Import an indexed PNG into a graphics sheet: preview the "
64 "exact changes, then write a new ROM file.";
81 std::string
GetName()
const override {
return "gfx-room-export"; }
83 return "gfx-room-export --room <id> (--png <file> | --out-dir <new-dir>) "
85 "[--palette ...] [--json <file>]";
89 return "Room Background Export";
96 "Export a dungeon room's background sheets to one PNG "
97 "with the room palette, and list the rooms that share "
112 std::string
GetName()
const override {
return "gfx-room-import"; }
114 return "gfx-room-import --room <id> --png <file> [--row <0-7>] "
115 "[--palette ...] (--dry-run | --write --out <rom file>)";
119 return "Room Background Import";
126 "Import an edited room background PNG into the sheets it "
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Export 16x16 blocks of a 3bpp graphics sheet to an indexed PNG.
std::string GetOutputTitle() const override
Get the output title for formatting.
std::string GetDefaultFormat() const override
Get the default output format ("json" or "text")
Descriptor Describe() const override
Provide metadata for TUI/help summaries.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetUsage() const override
Get the command usage string.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetName() const override
Get the command name.
Import an indexed PNG into a sheet at a 16x16 block. –dry-run reports the blocks, tiles and ROM bytes...
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
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 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.
std::string GetName() const override
Get the command name.
std::string GetDefaultFormat() const override
Get the default output format ("json" or "text")
Export a dungeon room's 8 background sheets as one 128x256 indexed PNG with one uniform palette,...
Descriptor Describe() const override
Provide metadata for TUI/help summaries.
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.
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.
std::string GetName() const override
Get the command name.
Import an edited room background PNG: only sheets whose pixels changed are written,...
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.
std::string GetName() const override
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetDefaultFormat() const override
Get the default output format ("json" or "text")
std::string GetOutputTitle() const override
Get the output title for formatting.
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.
Base class for CLI command handlers.