1#ifndef YAZE_CLI_HANDLERS_GRAPHICS_GFX_SHEET_PNG_COMMANDS_H_
2#define YAZE_CLI_HANDLERS_GRAPHICS_GFX_SHEET_PNG_COMMANDS_H_
22 std::string
GetName()
const override {
return "gfx-export"; }
24 return "gfx-export --sheet <id> --png <file> [--block <0-15>] "
25 "[--count <n>] [--palette gray|rgb:...|room-bg:<room>:<row>|"
26 "room-sprite:<room>:<row>|room-slot:<room>:<slot>:<row>] [--json "
36 "Export a graphics sheet (or 16x16 block range) to an "
37 "indexed PNG with a chosen palette.";
57 std::string
GetName()
const override {
return "gfx-import"; }
59 return "gfx-import --sheet <id> --png <file> [--block <0-15>] "
60 "[--palette ...] [--diff-png <file>] "
61 "[--project-context <path.yaze>] "
62 "(--dry-run | --write --out <rom file>)";
71 "Import an indexed PNG into a graphics sheet: preview the "
72 "exact changes, then write a new ROM file.";
89 std::string
GetName()
const override {
return "gfx-room-export"; }
91 return "gfx-room-export --room <id> (--png <file> | --out-dir <new-dir>) "
93 "[--palette ...] [--json <file>]";
97 return "Room Background Export";
104 "Export a dungeon room's background sheets to one PNG "
105 "with the room palette, and list the rooms that share "
121 std::string
GetName()
const override {
return "gfx-room-import"; }
123 return "gfx-room-import --room <id> --png <file> [--row <0-7>] "
124 "[--palette ...] [--project-context <path.yaze>] "
125 "(--dry-run | --write --out <rom file>)";
129 return "Room Background Import";
136 "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.