Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix rendering issue with concealed attributes in hold mosaics mode #78

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions teletext-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2615,8 +2615,7 @@ var place_code = function(x,y,code,andrender) {

if ( sc[y][x] == 1 ) {
// If we're concealing, this got cancelled by this
// colour code. Note that conceal is set-at.
sc[y][x] = 0;
// colour code. Remains concealed for this character
sc_affected = 0;
}

Expand Down Expand Up @@ -2842,7 +2841,7 @@ var place_code = function(x,y,code,andrender) {
|| ( cc[y][c] > 16 && cc[y][c] < 24 )
|| ( blackfg != 0 && cc[y][c] == 0 )
|| ( blackfg != 0 && cc[y][c] == 16 ) ) {
limit = c; break;
limit = c + 1; break;
}
// If another conceal character is encountered, then
// it has 'taken over' and we can stop. Conceal is
Expand Down Expand Up @@ -3154,7 +3153,7 @@ var check_for_remove_code = function(x, y, andrender) {
|| ( blackfg != 0 && cc[y][c] == 0 )
|| ( blackfg != 0 && cc[y][c] == 16 ) ) {
// text or graphics character has been found.
limit = c; break;
limit = c + 1; break;
}
if ( cc[y][c] == 24 ) {
// Another conceal character has taken over. It's
Expand Down Expand Up @@ -3399,12 +3398,6 @@ var render = function(x, y, w, h) {
// We're not showing control characters, so this
// appears as the space.

// Concealed text with reveal off appears as text
// spaces.
if ( esc == 1 && reveal == 0 ) {
ecc = spacecc; etg = 0;
}

// These unsupported character codes appear as spaces
// too, but only if in text mode. In graphics mode, these
// might be substituted by the held graphics character.
Expand Down Expand Up @@ -3491,6 +3484,12 @@ var render = function(x, y, w, h) {
}

}

// Concealed text with reveal off appears as text
// spaces.
if ( esc == 1 && reveal == 0 ) {
ecc = spacecc; etg = 0;
}
}
else {
// This is a character code. It'll be rendered in colours
Expand Down