|
|
@ -4,6 +4,7 @@ const { mk, qs } = require('../utils') |
|
|
|
const notify = require('../notif') |
|
|
|
const notify = require('../notif') |
|
|
|
const ScreenParser = require('./screen_parser') |
|
|
|
const ScreenParser = require('./screen_parser') |
|
|
|
const ScreenRenderer = require('./screen_renderer') |
|
|
|
const ScreenRenderer = require('./screen_renderer') |
|
|
|
|
|
|
|
const { ATTR_BLINK } = require('./screen_attr_bits') |
|
|
|
|
|
|
|
|
|
|
|
module.exports = class TermScreen extends EventEmitter { |
|
|
|
module.exports = class TermScreen extends EventEmitter { |
|
|
|
constructor () { |
|
|
|
constructor () { |
|
|
@ -714,12 +715,19 @@ module.exports = class TermScreen extends EventEmitter { |
|
|
|
let cellYInFrame = Math.floor(cell / frameWidth) |
|
|
|
let cellYInFrame = Math.floor(cell / frameWidth) |
|
|
|
let index = (frameY + cellYInFrame) * this.window.width + frameX + cellXInFrame |
|
|
|
let index = (frameY + cellYInFrame) * this.window.width + frameX + cellXInFrame |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.screenAttrs[index] & ATTR_BLINK !== data[3] & ATTR_BLINK) { |
|
|
|
|
|
|
|
if (data[3] & ATTR_BLINK) this.blinkingCellCount++ |
|
|
|
|
|
|
|
else this.blinkingCellCount-- |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.screen[index] = data[0] |
|
|
|
this.screen[index] = data[0] |
|
|
|
this.screenFG[index] = data[1] |
|
|
|
this.screenFG[index] = data[1] |
|
|
|
this.screenBG[index] = data[2] |
|
|
|
this.screenBG[index] = data[2] |
|
|
|
this.screenAttrs[index] = data[3] |
|
|
|
this.screenAttrs[index] = data[3] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.window.debug) console.log(`Blinking cells: ${this.blinkingCellCount}`) |
|
|
|
|
|
|
|
|
|
|
|
this.renderer.scheduleDraw('load', 16) |
|
|
|
this.renderer.scheduleDraw('load', 16) |
|
|
|
this.conn.emit('load') |
|
|
|
this.conn.emit('load') |
|
|
|
this.emit('load') |
|
|
|
this.emit('load') |
|
|
|