68 if (str ==
"warning") {
76 std::string lower_str = str;
77 std::ranges::transform(
78 lower_str, lower_str.begin(), [](
unsigned char c) { return static_cast<char>(std::tolower(c)); });
81 if (lower_str ==
"error") {
84 if (lower_str ==
"err") {
88 if (lower_str ==
"warning") {
91 if (lower_str ==
"warn") {
95 if (lower_str ==
"split") {
122 panic(
"unhandled AnimMultiPalSubtileResolutionStrategy value");
140struct std::formatter<
porytiles::AnimMultiPalSubtileResolutionStrategy> {
141 constexpr auto parse(std::format_parse_context &ctx)
void panic(const StringViewSourceLoc &s)
Unconditionally terminates the program with a panic message.
AnimMultiPalSubtileResolutionStrategy
Strategy for handling animation subtiles referenced with multiple palettes.
@ warning
Emit a warning and continue decompilation using the lowest palette index.
@ error
Emit a formatted error and fail decompilation.
@ split
Split the animation into separate animations for each palette variant (not yet implemented).
std::ostream & operator<<(std::ostream &os, const PrimaryPairingMode m)
Stream insertion operator for PrimaryPairingMode.
@ warning
Emit a warning and continue decompilation.
@ error
Emit a formatted error and fail decompilation.
std::optional< AnimMultiPalSubtileResolutionStrategy > anim_multi_pal_subtile_resolution_strategy_from_str(const std::string &str)
Parses a string into a AnimMultiPalSubtileResolutionStrategy with fuzzy matching.
std::string to_string(const PrimaryPairingMode m)
Converts a PrimaryPairingMode to its canonical string representation.