Skip to content

Commit

Permalink
Merge pull request #215 from jpd236/ipuz-marks
Browse files Browse the repository at this point in the history
Read TL/TR/BL/BR marks from Ipuz files.
  • Loading branch information
mrichards42 authored May 7, 2024
2 parents fc897c0 + 24ad9e4 commit 085eca5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions puz/formats/ipuz/load_ipuz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 085eca5

Please sign in to comment.