14 std::filesystem::path project_root,
15 gsl::not_null<const InfraConfig *> config,
16 gsl::not_null<const TextFormatter *> format,
17 gsl::not_null<const UserDiagnostics *> diag)
18 : project_root_{std::move(project_root)}, config_{config}, format_{format}, diag_{diag}
48 const auto scan = scanner.scan_project();
55 if (!inference.unrecognized_defines.empty()) {
58 "Ignoring {} in '{}'. Porytiles reads attribute masks from the METATILE_ATTR_*_MASK and "
59 "METATILE_ATTR_*_MASK_FRLG spellings, and their bit offsets from METATILE_ATTR_*_SHIFT and "
60 "METATILE_ATTR_*_SHIFT_FRLG. Declare the layout with metatile_attribute_fields in your Porytiles config "
61 "if these defines describe one.",
67 inputs.
fields = fields_cv.value();
#define PT_TRY_ASSIGN_PASS_ERR(var, expr, return_type)
Unwraps a ChainableResult, passing through the error chain with an empty FormattableError when types ...
A result type that maintains a chainable sequence of errors for debugging and error reporting.
ChainableResult< ConfigValue< MetatileAttributeFieldOverrides > > metatile_attribute_field_overrides(ConfigScopeType type, const std::string &scope) const
ChainableResult< ConfigValue< std::optional< std::size_t > > > metatile_attribute_size(ConfigScopeType type, const std::string &scope) const
ChainableResult< ConfigValue< std::optional< std::size_t > > > metatile_attribute_declaration_size(ConfigScopeType type, const std::string &scope) const
ChainableResult< ConfigValue< MetatileAttributeFieldDefinitions > > metatile_attribute_fields(ConfigScopeType type, const std::string &scope) const
static const Style bold
Bold text formatting.
virtual void warning(const std::string &tag, const std::vector< std::string > &lines) const =0
Display a tagged warning message.
MetatileAttributeInferenceResult infer_metatile_attribute_candidates(const MetatileAttributeScan &scan, gsl::not_null< const TextFormatter * > format)
Infers the metatile attribute mask candidate sets from a project's raw fieldmap facts.
constexpr auto metatile_attr_inference_tag
The diagnostic tag the infra-layer scanner emits its warnings under.
ChainableResult< LoadedMetatileAttributeSchema > reconcile_metatile_attribute_schema(const MetatileAttributeInferenceResult &inference, const MetatileAttributeConfigInputs &inputs, gsl::not_null< const TextFormatter * > format, gsl::not_null< const UserDiagnostics * > diag)
Reconciles the inferred metatile attribute facts with the user's config, returning a LoadedMetatileAt...
@ tileset
Configuration scoped to a specific tileset.
std::string join_quoted(const std::vector< std::string > &values, const std::string &delimiter=", ")
Joins strings into a delimited list, wrapping each element in single quotes.
Utility functions for string manipulation and formatting.