Porytiles
|
Classes | |
class | AnyMap |
class | ArtifactMetadata |
ArtifactMetadata provides a POD-like class for Operation to declare input and output artifact info. More... | |
class | Bgr15 |
class | BgrInternalTile |
class | BgrPal |
class | Bin |
class | CImgPng |
Implementation of Png using the CImg image processing library. More... | |
class | DiagConsumer |
A customizable consumer for diagnostic messages. More... | |
class | DiagEngine |
Coordinates the generation and consumption of diagnostic messages. More... | |
class | DiagTempl |
Defines a reusable template for standardized diagnostic reporting. More... | |
class | FieldmapConfig2 |
class | FreeMetadata |
class | IgnoreConsumer |
A DiagConsumer implementation that simply ignores the provided diagnostic. More... | |
class | InFlightDiag |
Represents an in-flight diagnostic. More... | |
class | LayeredMetadata |
class | Operation |
class | Pipeline |
class | Png |
An image in PNG format. More... | |
class | PorymapLayout |
class | PorymapTileset |
class | PorytilesLayout |
class | PorytilesTileset |
class | Rgba32 |
class | RgbaAnim |
class | RgbaMetatile |
class | RgbaTile |
class | StderrConsumer |
A DiagConsumer implementation that pushes diagnostic messages to stderr . More... | |
struct | StringViewSourceLoc |
A wrapper for std::string_view with a taggable std::source_location. More... | |
class | Tile |
A single 8x8 pixel tile with an arbitrary pixel data type. More... | |
class | VectorConsumer |
A DiagConsumer implementation that pushes diagnostic messages to an internal vector . More... | |
class | view_ptr |
A smart pointer that represents a non-owning view of a resource. More... | |
class | VramAnim |
class | VramMetatile |
class | VramTile |
Typedefs | |
using | DynamicMsgBuilder = std::function< std::vector< std::string >(const DiagEngine &eng, DiagLevel in_flight_level, const std::vector< std::any > &args)> |
An alias for a dynamic diagnostic message builder function. | |
using | TileMetadata = std::variant< std::monostate, FreeMetadata, LayeredMetadata > |
Enumerations | |
enum class | TilesPalMode { kTrueColor , kGreyscale } |
enum class | DiagLevel { kIgnored , kNote , kRemark , kWarning , kError , kFatal } |
enum class | TileType { kVram , kFree , kLayered , kAnim , kPrimer , kOverride } |
Functions | |
auto | format_as (const Bgr15 &bgr) |
auto | format_as (const Rgba32 &rgba) |
std::optional< TilesPalMode > | TilesPalModeFromStr (const std::string &str) |
std::string | TilesPalModeToStr (const TilesPalMode m) |
std::ostream & | operator<< (std::ostream &os, const TilesPalMode m) |
std::string | LevelToStr (DiagLevel level) |
fmt::terminal_color | ColorForLevel (DiagLevel level) |
int | LevelPriority (DiagLevel level) |
DiagTempl | DiagFor (std::string_view name) |
Retrieves the DiagTempl corresponding to a given diagnostic name. | |
std::vector< const char * > | AllDiagNames () |
Gets an iterable view of all DiagTempl names in the internal table. | |
std::vector< const char * > | AllDiagNames (DiagLevel level) |
Get an iterable view of all DiagTempl names for a given DiagLevel. | |
void | PanicImpl (const char *s) noexcept |
void | Panic (const StringViewSourceLoc &s) noexcept |
void | AssertOrPanic (const bool condition, const StringViewSourceLoc &s) |
template<typename T > | |
std::expected< T, std::string > | ParseInt (std::string_view int_string, const int base) |
template<typename T > | |
std::expected< T, std::string > | ParseInt (std::string_view int_string) |
template<typename T1 , typename T2 > | |
bool | operator== (const view_ptr< T1 > &lhs, const view_ptr< T2 > &rhs) |
template<typename T1 , typename T2 > | |
bool | operator!= (const view_ptr< T1 > &lhs, const view_ptr< T2 > &rhs) |
template<typename T > | |
bool | operator== (const view_ptr< T > &lhs, std::nullptr_t) noexcept |
template<typename T > | |
bool | operator== (std::nullptr_t, const view_ptr< T > &rhs) noexcept |
template<typename T > | |
bool | operator!= (const view_ptr< T > &lhs, std::nullptr_t) noexcept |
template<typename T > | |
bool | operator!= (std::nullptr_t, const view_ptr< T > &rhs) noexcept |
template<typename T > | |
view_ptr (T *) -> view_ptr< T > | |
template<typename T > | |
T | parseInteger (const char *integerString, const int base) |
template<typename T > | |
T | parseInteger (const char *integerString) |
std::vector< std::string > | split (std::string input, const std::string &delimiter) |
bool | checkFullStringMatch (const std::string &str, const std::string &pattern) |
void | trim (std::string &string) |
std::filesystem::path | getTmpfilePath (const std::filesystem::path &parentDir, const std::string &fileName) |
std::filesystem::path | createTmpdir () |
std::string | palIndexToFileName (std::size_t index) |
Variables | |
constexpr Rgba32 | kRgbaBlack {0, 0, 0, Rgba32::kAlphaOpaque} |
constexpr Rgba32 | kRgbaWhite {255, 255, 255, Rgba32::kAlphaOpaque} |
constexpr Rgba32 | kRgbaGrey {128, 128, 128, Rgba32::kAlphaOpaque} |
constexpr Rgba32 | kRgbaRed {255, 0, 0, Rgba32::kAlphaOpaque} |
constexpr Rgba32 | kRgbaGreen {0, 255, 0, Rgba32::kAlphaOpaque} |
constexpr Rgba32 | kRgbaBlue {0, 0, 255, Rgba32::kAlphaOpaque} |
constexpr Rgba32 | kRgbaYellow {255, 255, 0, Rgba32::kAlphaOpaque} |
constexpr Rgba32 | kRgbaMagenta {255, 0, 255, Rgba32::kAlphaOpaque} |
constexpr Rgba32 | kRgbaCyan {0, 255, 255, Rgba32::kAlphaOpaque} |
constexpr Rgba32 | kRgbaPurple {128, 0, 255, Rgba32::kAlphaOpaque} |
constexpr Rgba32 | kRgbaLime {128, 255, 128, Rgba32::kAlphaOpaque} |
constexpr auto | NoteGeneric = "note-generic" |
constexpr auto | WarnColorPrecisionLoss = "color-precision-loss" |
constexpr auto | WarnKeyFrameNoMatchingTile = "key-frame-no-matching-tile" |
constexpr auto | WarnKeyFrameMissingColors = "key-frame-missing-colors" |
constexpr auto | WarnAttributeFormatMismatch = "attribute-format-mismatch" |
constexpr auto | WarnMissingAttributesCsv = "missing-attributes-csv" |
constexpr auto | WarnUnusedAttribute = "unused-attribute" |
constexpr auto | WarnTransparencyCollapse = "transparency-collapse" |
constexpr auto | WarnUnusedManualPalColor = "unused-manual-pal-color" |
constexpr auto | WarnTileIndexOutOfRange = "tile-index-out-of-range" |
constexpr auto | WarnPaletteIndexOutOfRange = "palette-index-out-of-range" |
constexpr auto | ErrGeneric = "error-generic" |
constexpr auto | FatalGeneric = "error-fatal-generic" |
constexpr std::size_t | kTileSideLength = 8 |
constexpr std::size_t | kTileSize = kTileSideLength * kTileSideLength |
using porytiles::DynamicMsgBuilder = typedef std::function<std::vector<std::string>(const DiagEngine &eng, DiagLevel in_flight_level, const std::vector<std::any> &args)> |
An alias for a dynamic diagnostic message builder function.
DynamicMsgBuilder defines a function signature for building diagnostic messages dynamically. The function signature accepts:
vector
of additional parameters (type std::any
) that are used to customize the diagnostic message. It returns a vector
of formatted strings representing the final diagnostic message. Each element in the vector
represents a single line of output for a DiagConsumer to consume. Definition at line 51 of file diagnostics.hpp.
using porytiles::TileMetadata = typedef std::variant<std::monostate, FreeMetadata, LayeredMetadata> |
Definition at line 39 of file tile_metadata.hpp.
|
strong |
Enumerator | |
---|---|
kIgnored | Foo. |
kNote | Bar. |
kRemark | |
kWarning | |
kError | |
kFatal |
Definition at line 19 of file diagnostics.hpp.
|
strong |
Enumerator | |
---|---|
kTrueColor | |
kGreyscale |
Definition at line 10 of file tiles_pal_mode.hpp.
|
strong |
Enumerator | |
---|---|
kVram | |
kFree | |
kLayered | |
kAnim | |
kPrimer | |
kOverride |
Definition at line 7 of file tile_metadata.hpp.
std::vector< const char * > porytiles::AllDiagNames | ( | ) |
Gets an iterable view of all DiagTempl names in the internal table.
The names returned from this function can then be used for lookup via DiagFor. This may be useful for range-based for-loops, or other use cases where the user wants to perform an action for some or all diagnostics.
Definition at line 466 of file diagnostics.cpp.
std::vector< const char * > porytiles::AllDiagNames | ( | DiagLevel | level | ) |
Get an iterable view of all DiagTempl names for a given DiagLevel.
Definition at line 475 of file diagnostics.cpp.
|
inline |
bool porytiles::checkFullStringMatch | ( | const std::string & | str, |
const std::string & | pattern | ||
) |
Definition at line 30 of file utilities.cpp.
fmt::terminal_color porytiles::ColorForLevel | ( | DiagLevel | level | ) |
Definition at line 153 of file diagnostics.cpp.
std::filesystem::path porytiles::createTmpdir | ( | ) |
Definition at line 51 of file utilities.cpp.
DiagTempl porytiles::DiagFor | ( | std::string_view | name | ) |
Retrieves the DiagTempl corresponding to a given diagnostic name.
This function searches an internal table for the provided diagnostic name. If a DiagTempl with this name is found, the corresponding DiagTempl is returned. If not, the function triggers a panic with an error message indicating an unknown diagnostic name.
name | A std::string_view of the diagnostic name. |
Definition at line 461 of file diagnostics.cpp.
|
inline |
Provide a simple way for fmtlib to format Bgr15: https://fmt.dev/11.1/api/#formatting-user-defined-types
|
inline |
Provide a simple way for fmtlib to format Rgba32: https://fmt.dev/11.1/api/#formatting-user-defined-types
Definition at line 52 of file rgba32.hpp.
std::filesystem::path porytiles::getTmpfilePath | ( | const std::filesystem::path & | parentDir, |
const std::string & | fileName | ||
) |
Definition at line 47 of file utilities.cpp.
int porytiles::LevelPriority | ( | DiagLevel | level | ) |
Definition at line 171 of file diagnostics.cpp.
std::string porytiles::LevelToStr | ( | DiagLevel | level | ) |
Definition at line 134 of file diagnostics.cpp.
|
noexcept |
Definition at line 94 of file view_ptr.hpp.
bool porytiles::operator!= | ( | const view_ptr< T1 > & | lhs, |
const view_ptr< T2 > & | rhs | ||
) |
Definition at line 79 of file view_ptr.hpp.
|
noexcept |
Definition at line 99 of file view_ptr.hpp.
|
inline |
Definition at line 32 of file tiles_pal_mode.hpp.
|
noexcept |
Definition at line 84 of file view_ptr.hpp.
bool porytiles::operator== | ( | const view_ptr< T1 > & | lhs, |
const view_ptr< T2 > & | rhs | ||
) |
Definition at line 74 of file view_ptr.hpp.
|
noexcept |
Definition at line 89 of file view_ptr.hpp.
std::string porytiles::palIndexToFileName | ( | std::size_t | index | ) |
Definition at line 74 of file utilities.cpp.
|
inlinenoexcept |
std::expected< T, std::string > porytiles::ParseInt | ( | std::string_view | int_string | ) |
Definition at line 28 of file parsing.hpp.
std::expected< T, std::string > porytiles::ParseInt | ( | std::string_view | int_string, |
const int | base | ||
) |
Definition at line 10 of file parsing.hpp.
T porytiles::parseInteger | ( | const char * | integerString | ) |
Definition at line 28 of file utilities.hpp.
T porytiles::parseInteger | ( | const char * | integerString, |
const int | base | ||
) |
Definition at line 11 of file utilities.hpp.
std::vector< std::string > porytiles::split | ( | std::string | input, |
const std::string & | delimiter | ||
) |
Definition at line 17 of file utilities.cpp.
|
inline |
Definition at line 12 of file tiles_pal_mode.hpp.
|
inline |
Definition at line 22 of file tiles_pal_mode.hpp.
void porytiles::trim | ( | std::string & | string | ) |
Definition at line 39 of file utilities.cpp.
porytiles::view_ptr | ( | T * | ) | -> view_ptr< T > |
|
constexpr |
ERRORS & FATALS
Definition at line 277 of file diagnostics.hpp.
|
constexpr |
Definition at line 278 of file diagnostics.hpp.
|
constexpr |
Definition at line 56 of file rgba32.hpp.
|
constexpr |
Definition at line 61 of file rgba32.hpp.
|
constexpr |
Definition at line 64 of file rgba32.hpp.
|
constexpr |
Definition at line 60 of file rgba32.hpp.
|
constexpr |
Definition at line 58 of file rgba32.hpp.
|
constexpr |
Definition at line 66 of file rgba32.hpp.
|
constexpr |
Definition at line 63 of file rgba32.hpp.
|
constexpr |
Definition at line 65 of file rgba32.hpp.
|
constexpr |
Definition at line 59 of file rgba32.hpp.
|
constexpr |
Definition at line 57 of file rgba32.hpp.
|
constexpr |
Definition at line 62 of file rgba32.hpp.
|
constexpr |
|
constexpr |
|
constexpr |
STANDALONE NOTES
Definition at line 253 of file diagnostics.hpp.
|
constexpr |
Definition at line 263 of file diagnostics.hpp.
|
constexpr |
WARNINGS
Definition at line 260 of file diagnostics.hpp.
|
constexpr |
Definition at line 262 of file diagnostics.hpp.
|
constexpr |
Definition at line 261 of file diagnostics.hpp.
|
constexpr |
Definition at line 264 of file diagnostics.hpp.
|
constexpr |
Definition at line 269 of file diagnostics.hpp.
|
constexpr |
Definition at line 268 of file diagnostics.hpp.
|
constexpr |
Definition at line 266 of file diagnostics.hpp.
|
constexpr |
Definition at line 265 of file diagnostics.hpp.
|
constexpr |
Definition at line 267 of file diagnostics.hpp.