yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
gfx_tilemap_render_command.h
Go to the documentation of this file.
1#ifndef YAZE_CLI_HANDLERS_GRAPHICS_GFX_TILEMAP_RENDER_COMMAND_H_
2#define YAZE_CLI_HANDLERS_GRAPHICS_GFX_TILEMAP_RENDER_COMMAND_H_
3
5
6namespace yaze {
7namespace cli {
8
23 public:
24 std::string GetName() const override { return "gfx-tilemap-render"; }
25 std::string GetUsage() const override {
26 return "gfx-tilemap-render --tilemap <file> --out <png> [--rom <rom>] "
27 "[--symbols <sym file>] "
28 "[--palette-source symbol|asm|hud|file] "
29 "[--palette-label <label>] [--palette-asm <menu_palette.asm>] "
30 "[--palette-file <path>] "
31 "[--palette-file-offset <n>] "
32 "[--chr-source rom|file] [--chr-file <path>]";
33 }
34 std::string GetDefaultFormat() const override { return "json"; }
35 std::string GetOutputTitle() const override { return "Tilemap Render"; }
36 bool RequiresRom() const override { return false; }
37 Descriptor Describe() const override {
38 Descriptor desc;
39 desc.display_name = "gfx-tilemap-render";
40 desc.summary =
41 "Render a 2bpp menu tilemap file to an indexed PNG using real CHR "
42 "and palette sources, for headless pixel comparisons.";
43 return desc;
44 }
45 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override;
46 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
47 resources::OutputFormatter& formatter) override;
48};
49
50} // namespace cli
51} // namespace yaze
52
53#endif // YAZE_CLI_HANDLERS_GRAPHICS_GFX_TILEMAP_RENDER_COMMAND_H_
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Definition rom.h:49
Renders a 2bpp SNES BG tilemap file (e.g. an Oracle of Secrets Menu/tilemaps/*.tilemap file) to a tru...
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.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetName() const override
Get the command name.
std::string GetUsage() const override
Get the command usage string.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetOutputTitle() const override
Get the output title for formatting.
std::string GetDefaultFormat() const override
Get the default output format ("json" or "text")
Utility for parsing common CLI argument patterns.
Base class for CLI command handlers.
Utility for consistent output formatting across commands.