Porytiles
Loading...
Searching...
No Matches
cli_option_provider.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
9
10namespace porytiles {
11
12/*
13 * NOTE: DO NOT EDIT THIS FILE DIRECTLY. It is AUTO-GENERATED from config_schema.yaml.
14 * To add new config values or make other changes, edit config_schema.yaml and regenerate via:
15 *
16 * uv run scripts/generate_config.py
17 */
18
28class CliOptionProvider final : public ConfigProvider {
29 public:
30 explicit CliOptionProvider(const CliOptionStorage &storage);
31
32 [[nodiscard]] std::string name() const override;
33
34 /*
35 * Domain Config
36 */
37 [[nodiscard]] LayerValue<std::size_t> num_tiles_in_primary(ConfigScopeType type, const std::string &scope) const override;
38 [[nodiscard]] LayerValue<std::size_t> num_tiles_total(ConfigScopeType type, const std::string &scope) const override;
39 [[nodiscard]] LayerValue<std::size_t> num_metatiles_in_primary(ConfigScopeType type, const std::string &scope) const override;
40 [[nodiscard]] LayerValue<std::size_t> num_metatiles_total(ConfigScopeType type, const std::string &scope) const override;
41 [[nodiscard]] LayerValue<std::size_t> num_pals_in_primary(ConfigScopeType type, const std::string &scope) const override;
42 [[nodiscard]] LayerValue<std::size_t> num_pals_total(ConfigScopeType type, const std::string &scope) const override;
43 [[nodiscard]] LayerValue<std::size_t> max_map_data_size(ConfigScopeType type, const std::string &scope) const override;
44 [[nodiscard]] LayerValue<std::size_t> num_tiles_per_metatile(ConfigScopeType type, const std::string &scope) const override;
45 [[nodiscard]] LayerValue<Rgba32> extrinsic_transparency(ConfigScopeType type, const std::string &scope) const override;
46 [[nodiscard]] LayerValue<ArtifactEditMode> tiles_edit_mode(ConfigScopeType type, const std::string &scope) const override;
47 [[nodiscard]] LayerValue<ArtifactEditMode> pals_edit_mode(ConfigScopeType type, const std::string &scope) const override;
48 [[nodiscard]] LayerValue<bool> pal_hints_enabled(ConfigScopeType type, const std::string &scope) const override;
49 [[nodiscard]] LayerValue<std::vector<PaletteHint>> pal_hints(ConfigScopeType type, const std::string &scope) const override;
50 [[nodiscard]] LayerValue<PackingStrategyType> packing_strategy(ConfigScopeType type, const std::string &scope) const override;
51 [[nodiscard]] LayerValue<PackingStrategyParams> packing_strategy_params(ConfigScopeType type, const std::string &scope) const override;
52 [[nodiscard]] LayerValue<TileSharingPacking> tile_sharing_packing(ConfigScopeType type, const std::string &scope) const override;
53 [[nodiscard]] LayerValue<TileSharingAlignment> tile_sharing_alignment(ConfigScopeType type, const std::string &scope) const override;
54 [[nodiscard]] LayerValue<TilesPalMode> tiles_pal_mode(ConfigScopeType type, const std::string &scope) const override;
55 [[nodiscard]] LayerValue<AnimPalResolutionStrategy> global_anim_pal_resolution_strategy(ConfigScopeType type, const std::string &scope) const override;
56 [[nodiscard]] LayerValue<AnimKeyFrameResolutionStrategy> global_anim_key_frame_resolution_strategy(ConfigScopeType type, const std::string &scope) const override;
58 [[nodiscard]] LayerValue<FrameLinking> global_frame_linking(ConfigScopeType type, const std::string &scope) const override;
59 [[nodiscard]] LayerValue<PerAnimOverrides> per_anim_overrides(ConfigScopeType type, const std::string &scope) const override;
60 [[nodiscard]] LayerValue<bool> cross_tileset_anim_linking(ConfigScopeType type, const std::string &scope) const override;
61
62 /*
63 * App Config
64 */
65 [[nodiscard]] LayerValue<bool> verify_checksums(ConfigScopeType type, const std::string &scope) const override;
66 [[nodiscard]] LayerValue<PrimaryPairingMode> primary_pairing_mode(ConfigScopeType type, const std::string &scope) const override;
67 [[nodiscard]] LayerValue<std::vector<std::string>> primary_pairing_partners(ConfigScopeType type, const std::string &scope) const override;
68 [[nodiscard]] LayerValue<std::vector<std::string>> diagnostic_warnings_exclude(ConfigScopeType type, const std::string &scope) const override;
69 [[nodiscard]] LayerValue<std::vector<std::string>> diagnostic_warnings_include(ConfigScopeType type, const std::string &scope) const override;
70 [[nodiscard]] LayerValue<std::vector<std::string>> diagnostic_remarks_exclude(ConfigScopeType type, const std::string &scope) const override;
71 [[nodiscard]] LayerValue<std::vector<std::string>> diagnostic_remarks_include(ConfigScopeType type, const std::string &scope) const override;
72
73 /*
74 * Infra Config
75 */
76 [[nodiscard]] LayerValue<std::string> tileset_paths_primary_src(ConfigScopeType type, const std::string &scope) const override;
77 [[nodiscard]] LayerValue<std::string> tileset_paths_primary_bin(ConfigScopeType type, const std::string &scope) const override;
78 [[nodiscard]] LayerValue<std::string> tileset_paths_secondary_src(ConfigScopeType type, const std::string &scope) const override;
79 [[nodiscard]] LayerValue<std::string> tileset_paths_secondary_bin(ConfigScopeType type, const std::string &scope) const override;
80 [[nodiscard]] LayerValue<std::size_t> metatile_attr_size(ConfigScopeType type, const std::string &scope) const override;
81 [[nodiscard]] LayerValue<bool> tileset_animations_wire_anim_code(ConfigScopeType type, const std::string &scope) const override;
82
83 private:
84 const CliOptionStorage &storage_;
85};
86
87} // namespace porytiles
ConfigProvider implementation that reads values from CLI options.
LayerValue< std::string > tileset_paths_secondary_bin(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::vector< std::string > > primary_pairing_partners(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::vector< std::string > > diagnostic_warnings_include(ConfigScopeType type, const std::string &scope) const override
LayerValue< PerAnimOverrides > per_anim_overrides(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > metatile_attr_size(ConfigScopeType type, const std::string &scope) const override
LayerValue< ArtifactEditMode > pals_edit_mode(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::vector< std::string > > diagnostic_remarks_exclude(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::vector< PaletteHint > > pal_hints(ConfigScopeType type, const std::string &scope) const override
LayerValue< bool > pal_hints_enabled(ConfigScopeType type, const std::string &scope) const override
LayerValue< AnimMultiPalSubtileResolutionStrategy > global_anim_multi_pal_subtile_resolution_strategy(ConfigScopeType type, const std::string &scope) const override
LayerValue< ArtifactEditMode > tiles_edit_mode(ConfigScopeType type, const std::string &scope) const override
LayerValue< TileSharingPacking > tile_sharing_packing(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_tiles_per_metatile(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_pals_total(ConfigScopeType type, const std::string &scope) const override
LayerValue< bool > verify_checksums(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_metatiles_in_primary(ConfigScopeType type, const std::string &scope) const override
std::string name() const override
Gets the name of this ConfigProvider, useful for diagnostic purposes.
LayerValue< std::string > tileset_paths_secondary_src(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::string > tileset_paths_primary_src(ConfigScopeType type, const std::string &scope) const override
LayerValue< Rgba32 > extrinsic_transparency(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_tiles_total(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_pals_in_primary(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::vector< std::string > > diagnostic_remarks_include(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::vector< std::string > > diagnostic_warnings_exclude(ConfigScopeType type, const std::string &scope) const override
LayerValue< PrimaryPairingMode > primary_pairing_mode(ConfigScopeType type, const std::string &scope) const override
LayerValue< AnimPalResolutionStrategy > global_anim_pal_resolution_strategy(ConfigScopeType type, const std::string &scope) const override
LayerValue< TilesPalMode > tiles_pal_mode(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > max_map_data_size(ConfigScopeType type, const std::string &scope) const override
LayerValue< PackingStrategyParams > packing_strategy_params(ConfigScopeType type, const std::string &scope) const override
LayerValue< PackingStrategyType > packing_strategy(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_tiles_in_primary(ConfigScopeType type, const std::string &scope) const override
LayerValue< FrameLinking > global_frame_linking(ConfigScopeType type, const std::string &scope) const override
LayerValue< bool > tileset_animations_wire_anim_code(ConfigScopeType type, const std::string &scope) const override
LayerValue< TileSharingAlignment > tile_sharing_alignment(ConfigScopeType type, const std::string &scope) const override
LayerValue< AnimKeyFrameResolutionStrategy > global_anim_key_frame_resolution_strategy(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::string > tileset_paths_primary_bin(ConfigScopeType type, const std::string &scope) const override
LayerValue< bool > cross_tileset_anim_linking(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_metatiles_total(ConfigScopeType type, const std::string &scope) const override
An interface which config implementations can use to load config values.
ConfigScopeType
Specifies the scope type for configuration value lookups.
Storage struct for CLI option values.
A small container that holds an optional-wrapped value, validation state, and metadata about the valu...