yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
overworld_render_commands.h
Go to the documentation of this file.
1#ifndef YAZE_SRC_CLI_HANDLERS_GAME_OVERWORLD_RENDER_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_GAME_OVERWORLD_RENDER_COMMANDS_H_
3
5
6namespace yaze {
7namespace cli {
8namespace handlers {
9
10// Render the overworld area containing a screen to a PNG file from current
11// ROM data. A child screen of a large/wide/tall area resolves to its parent
12// and the whole area is rendered.
13//
14// Usage:
15// overworld-render --screen=<hex> --out=<path.png>
16// [--overlays=sprites,entrances,exits,holes,items,grid,all]
17// [--phase=0|1|2] [--scale=<float>] [--area-overlay=on|off]
18//
19// The area's subscreen overlay (sky, fog, lava, canopy, rain, ...) is
20// composited by default the way the game layers it; --area-overlay=off
21// renders the bare area.
23 public:
24 std::string GetName() const override { return "overworld-render"; }
25 std::string GetDescription() const {
26 return "Render an overworld area (with overlays) to PNG";
27 }
28 std::string GetUsage() const override {
29 return "overworld-render --screen=<hex> --out=<path.png> "
30 "[--overlays=sprites,entrances,exits,holes,items,grid,all] "
31 "[--phase=0|1|2] [--scale=<float>] [--area-overlay=on|off]";
32 }
33
34 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override;
35 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
36 resources::OutputFormatter& formatter) override;
37 absl::Status ExecuteWithContext(
38 Rom* rom, const resources::ArgumentParser& parser,
40 const resources::CommandInvocationContext& invocation_context) override;
41
42 private:
43 std::string GetDefaultFormat() const override { return "json"; }
44 std::string GetOutputTitle() const override { return "Overworld Render"; }
45};
46
47} // namespace handlers
48} // namespace cli
49} // namespace yaze
50
51#endif // YAZE_SRC_CLI_HANDLERS_GAME_OVERWORLD_RENDER_COMMANDS_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
std::string GetName() const override
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetUsage() const override
Get the command usage string.
absl::Status ExecuteWithContext(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter, const resources::CommandInvocationContext &invocation_context) override
Execute with immutable, invocation-scoped ROM path identity.
std::string GetOutputTitle() const override
Get the output title for formatting.
std::string GetDefaultFormat() const override
Get the default output format ("json" or "text")
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.
Utility for consistent output formatting across commands.