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// NOTE: DO NOT EDIT THIS FILE DIRECTLY. It is AUTO-GENERATED from config_schema.yaml.
13// To add new config values or make other changes, edit config_schema.yaml and regenerate via:
14//
15// uv run scripts/generate_config.py
16
24class CliOptionProvider final : public ConfigProvider {
25 public:
26 explicit CliOptionProvider(const CliOptionStorage &storage);
27
28 [[nodiscard]] std::string name() const override;
29
30 // Domain Config
31 [[nodiscard]] LayerValue<std::size_t>
32 num_tiles_in_primary(ConfigScopeType type, const std::string &scope) const override;
33 [[nodiscard]] LayerValue<std::size_t>
34 num_tiles_total(ConfigScopeType type, const std::string &scope) const override;
35 [[nodiscard]] LayerValue<std::size_t>
36 num_metatiles_in_primary(ConfigScopeType type, const std::string &scope) const override;
37 [[nodiscard]] LayerValue<std::size_t>
38 num_metatiles_total(ConfigScopeType type, const std::string &scope) const override;
39 [[nodiscard]] LayerValue<std::size_t>
40 num_palettes_in_primary(ConfigScopeType type, const std::string &scope) const override;
41 [[nodiscard]] LayerValue<std::size_t>
42 num_palettes_total(ConfigScopeType type, const std::string &scope) const override;
43 [[nodiscard]] LayerValue<std::size_t>
44 max_map_data_size(ConfigScopeType type, const std::string &scope) const override;
45 [[nodiscard]] LayerValue<std::size_t>
46 num_tiles_per_metatile(ConfigScopeType type, const std::string &scope) const override;
47 [[nodiscard]] LayerValue<Rgba32>
48 extrinsic_transparency(ConfigScopeType type, const std::string &scope) const override;
49 [[nodiscard]] LayerValue<bool>
50 ignore_triple_layer_content(ConfigScopeType type, const std::string &scope) const override;
52 tiles_edit_mode(ConfigScopeType type, const std::string &scope) const override;
54 palettes_edit_mode(ConfigScopeType type, const std::string &scope) const override;
55 [[nodiscard]] LayerValue<bool> palette_hints_enabled(ConfigScopeType type, const std::string &scope) const override;
57 packing_strategy(ConfigScopeType type, const std::string &scope) const override;
59 tile_sharing_packing(ConfigScopeType type, const std::string &scope) const override;
61 tile_sharing_alignment(ConfigScopeType type, const std::string &scope) const override;
63 tiles_palette_mode(ConfigScopeType type, const std::string &scope) const override;
65 global_anim_palette_resolution_strategy(ConfigScopeType type, const std::string &scope) const override;
67 global_anim_key_frame_resolution_strategy(ConfigScopeType type, const std::string &scope) const override;
70 ConfigScopeType type, const std::string &scope) const override;
71 [[nodiscard]] LayerValue<FrameLinking>
72 global_frame_linking(ConfigScopeType type, const std::string &scope) const override;
73 [[nodiscard]] LayerValue<bool>
74 cross_tileset_anim_linking(ConfigScopeType type, const std::string &scope) const override;
75
76 // App Config
77 [[nodiscard]] LayerValue<bool> verify_checksums(ConfigScopeType type, const std::string &scope) const override;
79 primary_pairing_mode(ConfigScopeType type, const std::string &scope) const override;
81 primary_pairing_partners(ConfigScopeType type, const std::string &scope) const override;
83 diagnostic_warnings_exclude(ConfigScopeType type, const std::string &scope) const override;
85 diagnostic_warnings_include(ConfigScopeType type, const std::string &scope) const override;
87 diagnostic_remarks_exclude(ConfigScopeType type, const std::string &scope) const override;
89 diagnostic_remarks_include(ConfigScopeType type, const std::string &scope) const override;
90
91 // Infra Config
92 [[nodiscard]] LayerValue<std::string>
93 tileset_paths_primary_src(ConfigScopeType type, const std::string &scope) const override;
94 [[nodiscard]] LayerValue<std::string>
95 tileset_paths_primary_bin(ConfigScopeType type, const std::string &scope) const override;
96 [[nodiscard]] LayerValue<std::string>
97 tileset_paths_secondary_src(ConfigScopeType type, const std::string &scope) const override;
98 [[nodiscard]] LayerValue<std::string>
99 tileset_paths_secondary_bin(ConfigScopeType type, const std::string &scope) const override;
101 metatile_attribute_size(ConfigScopeType type, const std::string &scope) const override;
103 metatile_attribute_declaration_size(ConfigScopeType type, const std::string &scope) const override;
104 [[nodiscard]] LayerValue<bool>
105 tileset_animations_wire_anim_code(ConfigScopeType type, const std::string &scope) const override;
106
107 private:
108 const CliOptionStorage &storage_;
109};
110
111} // namespace porytiles
ConfigProvider implementation that reads values from CLI options.
LayerValue< std::optional< std::size_t > > metatile_attribute_declaration_size(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::string > tileset_paths_secondary_bin(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::optional< std::size_t > > metatile_attribute_size(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< AnimMultiPaletteSubtileResolutionStrategy > global_anim_multi_palette_subtile_resolution_strategy(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< AnimPaletteResolutionStrategy > global_anim_palette_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< bool > verify_checksums(ConfigScopeType type, const std::string &scope) const override
LayerValue< bool > ignore_triple_layer_content(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< std::size_t > num_palettes_total(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_palettes_in_primary(ConfigScopeType type, const std::string &scope) const override
LayerValue< Rgba32 > extrinsic_transparency(ConfigScopeType type, const std::string &scope) const override
LayerValue< ArtifactEditMode > palettes_edit_mode(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::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< std::size_t > max_map_data_size(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 > palette_hints_enabled(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< TilesPaletteMode > tiles_palette_mode(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...