Porytiles
Loading...
Searching...
No Matches
default_provider.cpp
Go to the documentation of this file.
2
3/*
4 * NOTE: DO NOT EDIT THIS FILE DIRECTLY. It is AUTO-GENERATED from config_schema.yaml.
5 * To add new config values or make other changes, edit config_schema.yaml and regenerate via:
6 *
7 * uv run scripts/generate_config.py
8 */
9
10namespace {
11
12const std::string source_info = "default value";
13
14}
15
16namespace porytiles {
17
18std::string DefaultProvider::name() const
19{
20 return "DefaultProvider";
21}
22
23LayerValue<std::size_t> DefaultProvider::num_tiles_in_primary([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
24{
25 return LayerValue<std::size_t>::valid(512, "Number Of Tiles In Primary", source_info);
26}
27
28LayerValue<std::size_t> DefaultProvider::num_tiles_total([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
29{
30 return LayerValue<std::size_t>::valid(1024, "Number Of Tiles Total", source_info);
31}
32
33LayerValue<std::size_t> DefaultProvider::num_metatiles_in_primary([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
34{
35 return LayerValue<std::size_t>::valid(512, "Number Of Metatiles In Primary", source_info);
36}
37
38LayerValue<std::size_t> DefaultProvider::num_metatiles_total([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
39{
40 return LayerValue<std::size_t>::valid(1024, "Number Of Metatiles Total", source_info);
41}
42
43LayerValue<std::size_t> DefaultProvider::num_pals_in_primary([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
44{
45 return LayerValue<std::size_t>::valid(6, "Number Of Palettes In Primary", source_info);
46}
47
48LayerValue<std::size_t> DefaultProvider::num_pals_total([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
49{
50 return LayerValue<std::size_t>::valid(13, "Number Of Palettes Total", source_info);
51}
52
53LayerValue<std::size_t> DefaultProvider::max_map_data_size([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
54{
55 return LayerValue<std::size_t>::valid(10240, "Max Map Data Size", source_info);
56}
57
58LayerValue<std::size_t> DefaultProvider::num_tiles_per_metatile([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
59{
60 return LayerValue<std::size_t>::valid(8, "Number Of Tiles Per Metatile", source_info);
61}
62
63LayerValue<Rgba32> DefaultProvider::extrinsic_transparency([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
64{
65 return LayerValue<Rgba32>::valid(rgba_magenta, "Extrinsic Transparency", source_info);
66}
67
68LayerValue<ArtifactEditMode> DefaultProvider::tiles_edit_mode([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
69{
70 return LayerValue<ArtifactEditMode>::valid(ArtifactEditMode::optimize, "Tiles Edit Mode", source_info);
71}
72
73LayerValue<ArtifactEditMode> DefaultProvider::pals_edit_mode([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
74{
75 return LayerValue<ArtifactEditMode>::valid(ArtifactEditMode::optimize, "Palettes Edit Mode", source_info);
76}
77
78LayerValue<bool> DefaultProvider::pal_hints_enabled([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
79{
80 return LayerValue<bool>::valid(true, "Palette Hints Enabled", source_info);
81}
82
83LayerValue<std::vector<PaletteHint>> DefaultProvider::pal_hints([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
84{
85 return LayerValue<std::vector<PaletteHint>>::valid(std::vector<PaletteHint>{}, "Palette Hints", source_info);
86}
87
88LayerValue<PackingStrategyType> DefaultProvider::packing_strategy([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
89{
91}
92
93LayerValue<PackingStrategyParams> DefaultProvider::packing_strategy_params([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
94{
95 return LayerValue<PackingStrategyParams>::valid(PackingStrategyParams{}, "Packing Strategy Params", source_info);
96}
97
98LayerValue<TileSharingPacking> DefaultProvider::tile_sharing_packing([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
99{
100 return LayerValue<TileSharingPacking>::valid(TileSharingPacking::off, "Tile Sharing Packing", source_info);
101}
102
103LayerValue<TileSharingAlignment> DefaultProvider::tile_sharing_alignment([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
104{
105 return LayerValue<TileSharingAlignment>::valid(TileSharingAlignment::off, "Tile Sharing Alignment", source_info);
106}
107
108LayerValue<TilesPalMode> DefaultProvider::tiles_pal_mode([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
109{
110 return LayerValue<TilesPalMode>::valid(TilesPalMode::true_color, "Tiles Palette Mode", source_info);
111}
112
113LayerValue<AnimPalResolutionStrategy> DefaultProvider::global_anim_pal_resolution_strategy([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
114{
115 return LayerValue<AnimPalResolutionStrategy>::valid(AnimPalResolutionStrategy::scan_local_metatiles, "Global Animation Palette Resolution Strategy", source_info);
116}
117
119{
120 return LayerValue<AnimKeyFrameResolutionStrategy>::valid(AnimKeyFrameResolutionStrategy::error, "Global Animation Key Frame Resolution Strategy", source_info);
121}
122
124{
125 return LayerValue<AnimMultiPalSubtileResolutionStrategy>::valid(AnimMultiPalSubtileResolutionStrategy::error, "Global Animation Multi-Pal Subtile Resolution Strategy", source_info);
126}
127
128LayerValue<FrameLinking> DefaultProvider::global_frame_linking([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
129{
130 return LayerValue<FrameLinking>::valid(FrameLinking::automatic, "Global Frame Linking", source_info);
131}
132
133LayerValue<PerAnimOverrides> DefaultProvider::per_anim_overrides([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
134{
135 return LayerValue<PerAnimOverrides>::valid(PerAnimOverrides{}, "Per-Animation Overrides", source_info);
136}
137
138LayerValue<bool> DefaultProvider::cross_tileset_anim_linking([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
139{
140 return LayerValue<bool>::valid(true, "Cross-Tileset Animation Linking", source_info);
141}
142
143LayerValue<bool> DefaultProvider::verify_checksums([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
144{
145 return LayerValue<bool>::valid(true, "Verify Checksums", source_info);
146}
147
148LayerValue<PrimaryPairingMode> DefaultProvider::primary_pairing_mode([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
149{
150 return LayerValue<PrimaryPairingMode>::valid(PrimaryPairingMode::automatic, "Primary Pairing Mode", source_info);
151}
152
153LayerValue<std::vector<std::string>> DefaultProvider::primary_pairing_partners([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
154{
155 return LayerValue<std::vector<std::string>>::valid(std::vector<std::string>{}, "Primary Pairing Partners", source_info);
156}
157
158LayerValue<std::vector<std::string>> DefaultProvider::diagnostic_warnings_exclude([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
159{
160 return LayerValue<std::vector<std::string>>::valid(std::vector<std::string>{}, "Diagnostic Warnings Exclude", source_info);
161}
162
163LayerValue<std::vector<std::string>> DefaultProvider::diagnostic_warnings_include([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
164{
165 return LayerValue<std::vector<std::string>>::valid(std::vector<std::string>{}, "Diagnostic Warnings Include", source_info);
166}
167
168LayerValue<std::vector<std::string>> DefaultProvider::diagnostic_remarks_exclude([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
169{
170 return LayerValue<std::vector<std::string>>::valid(std::vector<std::string>{}, "Diagnostic Remarks Exclude", source_info);
171}
172
173LayerValue<std::vector<std::string>> DefaultProvider::diagnostic_remarks_include([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
174{
175 return LayerValue<std::vector<std::string>>::valid(std::vector<std::string>{}, "Diagnostic Remarks Include", source_info);
176}
177
178LayerValue<std::string> DefaultProvider::tileset_paths_primary_src([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
179{
180 return LayerValue<std::string>::valid("data/tilesets/primary", "Tileset Paths Primary Source", source_info);
181}
182
183LayerValue<std::string> DefaultProvider::tileset_paths_primary_bin([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
184{
185 return LayerValue<std::string>::valid("data/tilesets/primary", "Tileset Paths Primary Bin", source_info);
186}
187
188LayerValue<std::string> DefaultProvider::tileset_paths_secondary_src([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
189{
190 return LayerValue<std::string>::valid("data/tilesets/secondary", "Tileset Paths Secondary Source", source_info);
191}
192
193LayerValue<std::string> DefaultProvider::tileset_paths_secondary_bin([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
194{
195 return LayerValue<std::string>::valid("data/tilesets/secondary", "Tileset Paths Secondary Bin", source_info);
196}
197
198LayerValue<std::size_t> DefaultProvider::metatile_attr_size([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
199{
200 return LayerValue<std::size_t>::valid(2, "Metatile Attribute Size", source_info);
201}
202
203LayerValue<bool> DefaultProvider::tileset_animations_wire_anim_code([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
204{
205 return LayerValue<bool>::valid(true, "Tileset Animations Wire Anim Code", source_info);
206}
207
208} // namespace porytiles
LayerValue< AnimPalResolutionStrategy > global_anim_pal_resolution_strategy(ConfigScopeType type, const std::string &scope) const override
LayerValue< bool > pal_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< AnimMultiPalSubtileResolutionStrategy > global_anim_multi_pal_subtile_resolution_strategy(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< std::size_t > num_metatiles_total(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::vector< std::string > > diagnostic_remarks_exclude(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_metatiles_in_primary(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::string > tileset_paths_secondary_src(ConfigScopeType type, const std::string &scope) const override
LayerValue< PrimaryPairingMode > primary_pairing_mode(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::string > tileset_paths_primary_bin(ConfigScopeType type, const std::string &scope) const override
LayerValue< ArtifactEditMode > pals_edit_mode(ConfigScopeType type, const std::string &scope) const override
LayerValue< FrameLinking > global_frame_linking(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< std::size_t > num_pals_total(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< TileSharingPacking > tile_sharing_packing(ConfigScopeType type, const std::string &scope) const override
LayerValue< Rgba32 > extrinsic_transparency(ConfigScopeType type, const std::string &scope) const override
LayerValue< PerAnimOverrides > per_anim_overrides(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< PackingStrategyType > packing_strategy(ConfigScopeType type, const std::string &scope) const override
LayerValue< TileSharingAlignment > tile_sharing_alignment(ConfigScopeType type, const std::string &scope) const override
LayerValue< ArtifactEditMode > tiles_edit_mode(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 > 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< AnimKeyFrameResolutionStrategy > global_anim_key_frame_resolution_strategy(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::string > tileset_paths_primary_src(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > metatile_attr_size(ConfigScopeType type, const std::string &scope) const override
LayerValue< PackingStrategyParams > packing_strategy_params(ConfigScopeType type, const std::string &scope) const override
LayerValue< bool > cross_tileset_anim_linking(ConfigScopeType type, const std::string &scope) const override
std::string name() const override
Gets the name of this config layer.
LayerValue< bool > verify_checksums(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::string > tileset_paths_secondary_bin(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::vector< PaletteHint > > pal_hints(ConfigScopeType type, const std::string &scope) const override
@ automatic
Scan layout metadata to find the partner primary automatically.
@ true_color
Render tiles with true colors from the palette.
constexpr Rgba32 rgba_magenta
Definition rgba32.hpp:138
@ scan_local_metatiles
Scan local tileset metatile entries to find palette references for the animation tiles.
@ off
Pure sequential fill with no sharing alignment (default).
@ error
Emit a formatted error and fail decompilation.
@ optimize
The Porytiles1 behavior; artifact is cleared and packed optimally.
std::unordered_map< std::string, PerAnimOverride > PerAnimOverrides
Per-animation configuration map.
@ off
Packing ignores shape group membership (default).
@ error
Emit a formatted error and fail decompilation.
@ automatic
Use key.png for frame linking.
ConfigScopeType
Specifies the scope type for configuration value lookups.
@ backtracking
DFS/BFS backtracking search (default).
A small container that holds an optional-wrapped value, validation state, and metadata about the valu...
static LayerValue valid(T val, std::string source_key, std::string source_info)
Creates a LayerValue representing a valid configuration value.
Container for per-strategy packing parameters.