From 24ad9e41bec11638f9825670509218f654d55621 Mon Sep 17 00:00:00 2001 From: Jeff Davidson Date: Sat, 24 Feb 2024 10:26:02 -0800 Subject: [PATCH] Read TL/TR/BL/BR marks from Ipuz files. --- puz/formats/ipuz/load_ipuz.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/puz/formats/ipuz/load_ipuz.cpp b/puz/formats/ipuz/load_ipuz.cpp index 86dcd52..160b827 100644 --- a/puz/formats/ipuz/load_ipuz.cpp +++ b/puz/formats/ipuz/load_ipuz.cpp @@ -152,6 +152,18 @@ void ipuzParser::SetStyle(Square & square, json::Value * style_value) if (barred.find(puzT("B")) != string_t::npos) square.m_bars[BAR_BOTTOM] = true; + if (style->Contains(puzT("mark"))) { + json::Map* mark = style->GetMap(puzT("mark")); + if (mark->Contains(puzT("TL"))) + square.m_mark[MARK_TL] = mark->GetString(puzT("TL"), puzT("")); + if (mark->Contains(puzT("TR"))) + square.m_mark[MARK_TR] = mark->GetString(puzT("TR"), puzT("")); + if (mark->Contains(puzT("BL"))) + square.m_mark[MARK_BL] = mark->GetString(puzT("BL"), puzT("")); + if (mark->Contains(puzT("BR"))) + square.m_mark[MARK_BR] = mark->GetString(puzT("BR"), puzT("")); + } + // Color string_t color = style->GetString(puzT("color"), puzT("")); if (!color.empty()) {