Porytiles
Loading...
Searching...
No Matches
metatile_attribute_inference.hpp File Reference
#include <cstddef>
#include <cstdint>
#include <optional>
#include <string>
#include <unordered_set>
#include <vector>
#include "gsl/pointers"
#include "porytiles/domain/config/metatile_attribute_field_definition.hpp"
Include dependency graph for metatile_attribute_inference.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  porytiles::InferenceEnumMember
 One enum member gathered from a base game's fieldmap header. More...
 
struct  porytiles::InferenceDefine
 One integer #define gathered from a base game's fieldmap header. More...
 
struct  porytiles::InferenceArrayEntry
 One designated entry of an attribute mask/shift table. More...
 
struct  porytiles::BehaviorsHeaderScan
 The behavior constants header, as the scan found it. More...
 
struct  porytiles::AttributeDeclarationScan
 struct Tileset's metatileAttributes declaration, as the project wrote it. More...
 
struct  porytiles::MetatileAttributeScan
 The raw facts a project exposes about its metatile attribute layout. More...
 
struct  porytiles::InferredFieldConflict
 One unsettled fact about one inferred field, carried out of inference for the reconciler to rule on. More...
 
struct  porytiles::MetatileAttributeCandidateSet
 One complete metatile attribute mask layout a project declares. More...
 
struct  porytiles::InferredAttributeDeclaration
 The declared element width of a project's metatile attribute arrays, and the declaration behind it. More...
 
struct  porytiles::MetatileAttributeInferenceResult
 The result of an inference run. More...
 

Namespaces

namespace  porytiles
 

Enumerations

enum class  porytiles::BehaviorsHeaderSource { porytiles::absent , porytiles::unreadable , porytiles::no_constants , porytiles::declared }
 What the scan found where the behavior constants header should be. More...
 
enum class  porytiles::AttributeDeclarationSource {
  porytiles::no_fieldmap_header , porytiles::header_unreadable , porytiles::no_tileset_struct , porytiles::no_attributes_member ,
  porytiles::declared
}
 What the scan found where struct Tileset's metatileAttributes member should be. More...
 
enum class  porytiles::FieldConflictKind {
  porytiles::provider_behaviors_absent , porytiles::provider_behaviors_unreadable , porytiles::provider_behaviors_no_constants , porytiles::provider_no_matching_enum ,
  porytiles::mask_define_vs_table , porytiles::shift_vs_mask
}
 Why one inferred field could not be settled from the project's sources alone. More...
 
enum class  porytiles::AttributeInferenceStatus { porytiles::valid , porytiles::invalid , porytiles::not_provided }
 The outcome kind of an inference run. More...
 

Functions

std::string porytiles::to_declaration_string (const AttributeDeclarationScan &scan)
 Renders a declared metatileAttributes member the way the project wrote it.
 
MetatileAttributeInferenceResult porytiles::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.
 

Variables

constexpr auto porytiles::metatile_attr_inference_tag = "metatile-attribute-inference"
 The diagnostic tag the infra-layer scanner emits its warnings under.