yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dungeon_census_commands.h
Go to the documentation of this file.
1#ifndef YAZE_SRC_CLI_HANDLERS_GAME_DUNGEON_CENSUS_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_GAME_DUNGEON_CENSUS_COMMANDS_H_
3
4#include <string>
5
6#include "absl/status/status.h"
8
9namespace yaze::core {
10class HackManifest;
11} // namespace yaze::core
12
13namespace yaze::cli::handlers {
14
15// Loads the hack manifest and dungeon registry named by --project (the code
16// folder with Docs/Dev/Planning/dungeons.json and Roms/hack_manifest.json, or
17// a .yaze project file). dungeon-room-census and the dungeon graph commands
18// share it, so they read the same warp tags.
19absl::Status LoadRoomCensusProject(const std::string& project_arg,
20 core::HackManifest* manifest);
21
28 public:
29 std::string GetName() const override { return "dungeon-room-census"; }
30 std::string GetDescription() const {
31 return "Classify every dungeon room as free, reclaimable or in use, with "
32 "owner and reasons";
33 }
34 std::string GetUsage() const override {
35 return "dungeon-room-census --rom <path> [--project <code folder|.yaze>] "
36 "[--vanilla <vanilla rom>] [--room <hex>] [--status "
37 "<free|reclaimable|in_use>] [--format <json|table>] "
38 "[--emit-vanilla-fingerprints <out.inc>]";
39 }
40
41 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override;
42
43 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
44 resources::OutputFormatter& formatter) override;
45};
46
47} // namespace yaze::cli::handlers
48
49#endif // YAZE_SRC_CLI_HANDLERS_GAME_DUNGEON_CENSUS_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
Room census: owner, FREE / RECLAIMABLE / IN USE status and reasons for rooms 0x000-0x127....
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetName() const override
Get the command name.
std::string GetUsage() const override
Get the command usage string.
Utility for parsing common CLI argument patterns.
Base class for CLI command handlers.
Utility for consistent output formatting across commands.
absl::Status LoadRoomCensusProject(const std::string &project_arg, core::HackManifest *manifest)