Porytiles
Loading...
Searching...
No Matches
default_provider.cpp
Go to the documentation of this file.
2
3// NOTE: DO NOT EDIT THIS FILE DIRECTLY. It is AUTO-GENERATED from config_schema.yaml.
4// To add new config values or make other changes, edit config_schema.yaml and regenerate via:
5//
6// uv run scripts/generate_config.py
7
8namespace {
9
10const std::string source_info = "default value";
11
12}
13
14namespace porytiles {
15
16std::string DefaultProvider::name() const
17{
18 return "DefaultProvider";
19}
20
22 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
23{
24 return LayerValue<std::size_t>::valid(512, "Number Of Tiles In Primary", source_info);
25}
26
28DefaultProvider::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
34 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
35{
36 return LayerValue<std::size_t>::valid(512, "Number Of Metatiles In Primary", source_info);
37}
38
40 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
41{
42 return LayerValue<std::size_t>::valid(1024, "Number Of Metatiles Total", source_info);
43}
44
46 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
47{
48 return LayerValue<std::size_t>::valid(6, "Number Of Palettes In Primary", source_info);
49}
50
52 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
53{
54 return LayerValue<std::size_t>::valid(13, "Number Of Palettes Total", source_info);
55}
56
58 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
59{
60 return LayerValue<std::size_t>::valid(10240, "Max Map Data Size", source_info);
61}
62
64 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
65{
66 return LayerValue<std::size_t>::valid(8, "Number Of Tiles Per Metatile", source_info);
67}
68
70 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
71{
72 return LayerValue<Rgba32>::valid(rgba_magenta, "Extrinsic Transparency", source_info);
73}
74
76 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
77{
78 return LayerValue<bool>::valid(false, "Ignore Triple Layer Content", source_info);
79}
80
82DefaultProvider::tiles_edit_mode([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
83{
84 return LayerValue<ArtifactEditMode>::valid(ArtifactEditMode::optimize, "Tiles Edit Mode", source_info);
85}
86
88 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
89{
90 return LayerValue<ArtifactEditMode>::valid(ArtifactEditMode::optimize, "Palettes Edit Mode", source_info);
91}
92
94 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
95{
96 return LayerValue<bool>::valid(true, "Palette Hints Enabled", source_info);
97}
98
100DefaultProvider::palette_hints([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
101{
102 return LayerValue<std::vector<PaletteHint>>::valid(std::vector<PaletteHint>{}, "Palette Hints", source_info);
103}
104
106 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
107{
108 return LayerValue<PackingStrategyType>::valid(PackingStrategyType::backtracking, "Packing Strategy", source_info);
109}
110
112 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
113{
114 return LayerValue<PackingStrategyParams>::valid(PackingStrategyParams{}, "Packing Strategy Params", source_info);
115}
116
118 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
119{
120 return LayerValue<TileSharingPacking>::valid(TileSharingPacking::off, "Tile Sharing Packing", source_info);
121}
122
124 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
125{
126 return LayerValue<TileSharingAlignment>::valid(TileSharingAlignment::off, "Tile Sharing Alignment", source_info);
127}
128
130 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
131{
132 return LayerValue<TilesPaletteMode>::valid(TilesPaletteMode::true_color, "Tiles Palette Mode", source_info);
133}
134
136 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
137{
140 "Global Animation Palette Resolution Strategy",
141 source_info);
142}
143
145 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
146{
148 AnimKeyFrameResolutionStrategy::error, "Global Animation Key Frame Resolution Strategy", source_info);
149}
150
153 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
154{
157 "Global Animation Multi-Palette Subtile Resolution Strategy",
158 source_info);
159}
160
162 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
163{
164 return LayerValue<FrameLinking>::valid(FrameLinking::automatic, "Global Frame Linking", source_info);
165}
166
168 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
169{
170 return LayerValue<PerAnimOverrides>::valid(PerAnimOverrides{}, "Per-Animation Overrides", source_info);
171}
172
174 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
175{
176 return LayerValue<bool>::valid(true, "Cross-Tileset Animation Linking", source_info);
177}
178
180 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
181{
182 return LayerValue<bool>::valid(true, "Verify Checksums", source_info);
183}
184
186 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
187{
188 return LayerValue<PrimaryPairingMode>::valid(PrimaryPairingMode::automatic, "Primary Pairing Mode", source_info);
189}
190
192 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
193{
195 std::vector<std::string>{}, "Primary Pairing Partners", source_info);
196}
197
199 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
200{
202 std::vector<std::string>{}, "Diagnostic Warnings Exclude", source_info);
203}
204
206 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
207{
209 std::vector<std::string>{}, "Diagnostic Warnings Include", source_info);
210}
211
213 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
214{
216 std::vector<std::string>{}, "Diagnostic Remarks Exclude", source_info);
217}
218
220 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
221{
223 std::vector<std::string>{}, "Diagnostic Remarks Include", source_info);
224}
225
227 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
228{
229 return LayerValue<std::string>::valid("data/tilesets/primary", "Tileset Paths Primary Source", source_info);
230}
231
233 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
234{
235 return LayerValue<std::string>::valid("data/tilesets/primary", "Tileset Paths Primary Bin", source_info);
236}
237
239 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
240{
241 return LayerValue<std::string>::valid("data/tilesets/secondary", "Tileset Paths Secondary Source", source_info);
242}
243
245 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
246{
247 return LayerValue<std::string>::valid("data/tilesets/secondary", "Tileset Paths Secondary Bin", source_info);
248}
249
251 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
252{
253 return LayerValue<std::optional<std::size_t>>::valid(std::nullopt, "Metatile Attribute Size", source_info);
254}
255
257 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
258{
260 std::nullopt, "Metatile Attribute Declaration Size", source_info);
261}
262
264 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
265{
267 MetatileAttributeFieldDefinitions{}, "Metatile Attribute Fields", source_info);
268}
269
271 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
272{
274 MetatileAttributeFieldOverrides{}, "Metatile Attribute Field Overrides", source_info);
275}
276
278DefaultProvider::role_pins([[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
279{
280 return LayerValue<RolePinDefinitions>::valid(RolePinDefinitions{}, "Role Pins", source_info);
281}
282
284 [[maybe_unused]] ConfigScopeType type, [[maybe_unused]] const std::string &scope) const
285{
286 return LayerValue<bool>::valid(true, "Tileset Animations Wire Anim Code", source_info);
287}
288
289} // namespace porytiles
LayerValue< MetatileAttributeFieldOverrides > metatile_attribute_field_overrides(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::size_t > num_palettes_total(ConfigScopeType type, const std::string &scope) const override
LayerValue< bool > tileset_animations_wire_anim_code(ConfigScopeType type, const std::string &scope) const override
LayerValue< MetatileAttributeFieldDefinitions > metatile_attribute_fields(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< AnimPaletteResolutionStrategy > global_anim_palette_resolution_strategy(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< 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 > max_map_data_size(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::vector< PaletteHint > > palette_hints(ConfigScopeType type, const std::string &scope) const override
LayerValue< TileSharingPacking > tile_sharing_packing(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< 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< bool > ignore_triple_layer_content(ConfigScopeType type, const std::string &scope) const override
LayerValue< PackingStrategyType > packing_strategy(ConfigScopeType type, const std::string &scope) const override
LayerValue< RolePinDefinitions > role_pins(ConfigScopeType type, const std::string &scope) const override
LayerValue< TileSharingAlignment > tile_sharing_alignment(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< ArtifactEditMode > tiles_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< 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< bool > palette_hints_enabled(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::string > tileset_paths_primary_src(ConfigScopeType type, const std::string &scope) const override
LayerValue< PackingStrategyParams > packing_strategy_params(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::optional< std::size_t > > metatile_attribute_declaration_size(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< ArtifactEditMode > palettes_edit_mode(ConfigScopeType type, const std::string &scope) const override
LayerValue< TilesPaletteMode > tiles_palette_mode(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
@ automatic
Scan layout metadata to find the partner primary automatically.
std::map< std::string, MetatileAttributeFieldOverride > MetatileAttributeFieldOverrides
A map from field name to its override; applied at schema load time.
std::vector< RolePinDefinition > RolePinDefinitions
An ordered list of role pin definitions; order is display/declaration order (also CSV column order).
constexpr Rgba32 rgba_magenta
Definition rgba32.hpp:128
@ off
Pure sequential fill with no sharing alignment (default).
std::vector< MetatileAttributeFieldDefinition > MetatileAttributeFieldDefinitions
An ordered list of metatile attribute field definitions; order is display/declaration order.
@ true_color
Render tiles with true colors from the palette.
@ optimize
The Porytiles1 behavior; artifact is cleared and packed optimally.
@ scan_local_metatiles
Scan local tileset metatile entries to find palette references for the animation tiles.
std::unordered_map< std::string, PerAnimOverride > PerAnimOverrides
Per-animation configuration map.
@ off
Packing ignores shape group membership (default).
@ valid
one or more usable candidate sets were inferred
@ error
Emit a formatted error and fail decompilation.
@ automatic
Use key.png for frame linking.
ConfigScopeType
Specifies the scope type for configuration value lookups.
@ error
Emit a formatted error and fail decompilation.
@ 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.