62 if (str ==
"automatic") {
65 if (str ==
"manual") {
68 if (str ==
"hybrid") {
73 std::string lower_str = str;
74 std::ranges::transform(
75 lower_str, lower_str.begin(), [](
unsigned char c) { return static_cast<char>(std::tolower(c)); });
78 if (lower_str ==
"automatic") {
81 if (lower_str ==
"auto") {
85 if (lower_str ==
"manual") {
89 if (lower_str ==
"hybrid") {
116 panic(
"unhandled FrameLinking value");
135 constexpr auto parse(std::format_parse_context &ctx)
@ automatic
Scan layout metadata to find the partner primary automatically.
@ manual
Use the partner primary specified via primary_pairing_partners config.
void panic(const StringViewSourceLoc &s)
Unconditionally terminates the program with a panic message.
std::optional< FrameLinking > frame_linking_from_str(const std::string &str)
Parses a string into a FrameLinking with fuzzy matching.
std::ostream & operator<<(std::ostream &os, const PrimaryPairingMode m)
Stream insertion operator for PrimaryPairingMode.
FrameLinking
Controls how animation frames are linked to metatile entries.
@ automatic
Use key.png for frame linking.
@ manual
Use manual overrides in anim.json.
@ hybrid
Automatic key.png linking plus manual override pass (not yet implemented).
std::string to_string(const PrimaryPairingMode m)
Converts a PrimaryPairingMode to its canonical string representation.