From a9f59488fd8ea3b8e6981de014087b965fe9470c Mon Sep 17 00:00:00 2001 From: cpsdqs Date: Thu, 14 Sep 2017 09:37:15 +0200 Subject: [PATCH] Remove debug code --- js/term_screen.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/js/term_screen.js b/js/term_screen.js index b230128..fb391d1 100644 --- a/js/term_screen.js +++ b/js/term_screen.js @@ -1151,8 +1151,6 @@ window.TermScreen = class TermScreen { this.screenAttrs = new Array(screenLength).fill(' ') } - let bgcount = new Array(256).fill(0) - let strArray = !undef(Array.from) ? Array.from(str) : str.split('') const MASK_LINE_ATTR = 0xC8 @@ -1174,7 +1172,6 @@ window.TermScreen = class TermScreen { else this.blinkingCellCount-- } - bgcount[bg]++ this.screen[cell] = lastChar this.screenFG[cell] = fg this.screenBG[cell] = bg @@ -1231,19 +1228,6 @@ window.TermScreen = class TermScreen { if (this.window.debug) console.log(`Blinky cells = ${this.blinkingCellCount}`) - // work-around for the grid gaps bug - // will mask the glitch if most of the screen uses the same background - let mostCommonBg = 0 - let mcbIndex = 0 - for (let i = 255; i >= 0; i--) { - if (bgcount[i] > mostCommonBg) { - mostCommonBg = bgcount[i] - mcbIndex = i - } - } - // this.canvas.style.backgroundColor = this.getColor(mcbIndex) - this.canvas.style.backgroundColor = '#f00' - this.scheduleDraw('load', 16) this.emit('load') }