From a28e56797b556d081b424d7aa3ed150d30b6df0d Mon Sep 17 00:00:00 2001 From: "G.K.MacGregor" Date: Tue, 5 Sep 2023 20:25:08 +0100 Subject: [PATCH] Fix missing bottom half of double size text in passive objects --- decode.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/decode.cpp b/decode.cpp index 0fa3b36..303c2cd 100644 --- a/decode.cpp +++ b/decode.cpp @@ -848,8 +848,17 @@ void TeletextPageDecode::decodeRow(int r) painter->bottomHalfCell[c].fragment = DoubleSizeBottomLeftQuarter; painter->rightHalfCell = painter->result; painter->rightHalfCell.fragment = DoubleSizeTopRightQuarter; - painter->bottomHalfCell[c+1] = painter->result; - painter->bottomHalfCell[c+1].fragment = DoubleSizeBottomRightQuarter; + // The right half of this "if" statement (without the t != 2) is meant + // to a fix a bug where the bottom half of double-size characters in + // Passive Objects didn't appear. + // But the fix also caused the bottom right quarter of double-size + // characters in Active Objects to go missing when they overlapped + // the bottom half of a Level 1 double-height row. + // Hence the t != 2 + if (t != 2 || painter->bottomHalfCell[c+1].character.code == 0x00) { + painter->bottomHalfCell[c+1] = painter->result; + painter->bottomHalfCell[c+1].fragment = DoubleSizeBottomRightQuarter; + } } else { // Double height painter->result.fragment = DoubleHeightTopHalf;