yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
atlas_commands.h
Go to the documentation of this file.
1#ifndef YAZE_SRC_CLI_HANDLERS_GAME_ATLAS_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_GAME_ATLAS_COMMANDS_H_
3
4#include <string>
5
7
8namespace yaze::cli::handlers {
9
10// Atlas map views, headless. Atlas P1: the dungeon model as JSON
11// (--view dungeon --json). The overworld view (P2) and PNG output (--out, P3)
12// are not implemented yet and fail with a clear error.
13//
14// Usage:
15// atlas-render --rom <sfc> --view dungeon --json <path>
16// [--project <.yaze>] [--annotations <file>[,<file>...]]
17// [--defaults vanilla|none] [--symbols <sym>] [--vanilla <rom>]
18//
19// --project opens the project with YazeProject::Open: the dungeon registry
20// (Docs/Dev/Planning/dungeons.json, with the same fallbacks as the census),
21// the hack manifest's warp tags and the [atlas] annotation files. A project
22// with neither a registry nor [atlas] annotations is an error. Read-only: the
23// ROM is never written, and --json may not name the ROM.
25 public:
26 std::string GetName() const override { return "atlas-render"; }
27 std::string GetDescription() const {
28 return "Atlas map views: dungeon room model as JSON (overworld and PNG "
29 "follow)";
30 }
31 std::string GetUsage() const override {
32 return "atlas-render --rom <sfc> --view dungeon --json <path> "
33 "[--project <.yaze>] [--annotations <file>[,<file>...]] "
34 "[--defaults vanilla|none] [--symbols <sym>] [--vanilla <rom>]";
35 }
36
37 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override;
38 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
39 resources::OutputFormatter& formatter) override;
40 absl::Status ExecuteWithContext(
41 Rom* rom, const resources::ArgumentParser& parser,
43 const resources::CommandInvocationContext& invocation_context) override;
44
45 private:
46 std::string GetDefaultFormat() const override { return "json"; }
47 std::string GetOutputTitle() const override { return "Atlas Render"; }
48};
49
50} // namespace yaze::cli::handlers
51
52#endif // YAZE_SRC_CLI_HANDLERS_GAME_ATLAS_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 GetOutputTitle() const override
Get the output title for formatting.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetUsage() const override
Get the command usage string.
std::string GetName() const override
Get the command name.
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.
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.
Utility for parsing common CLI argument patterns.
Base class for CLI command handlers.
Utility for consistent output formatting across commands.