Fix text screen rendering in graphics mode

This commit is contained in:
tudnai 2020-04-27 12:38:07 -07:00
parent d786f4a594
commit d1f0c8e1db

View File

@ -409,6 +409,18 @@ class ViewController: NSViewController {
txtArr = txtClear txtArr = txtClear
// render an empty space to eiminate displaying text portion of the screen covered by graphics
for y in 0 ..< fromLines {
if videoMode.col80 == 0 {
txtArr[ y * (textCols + lineEndChars) + textCols ] = "\n"
}
else {
txtArr[ y * (textCols * 2 + lineEndChars) + textCols * 2] = "\n"
}
}
// render the rest of the text screen
for y in fromLines ..< toLines { for y in fromLines ..< toLines {
for x in 0 ..< textCols { for x in 0 ..< textCols {
let byte = textBufferPointer[ textLineOfs[y] + x ] let byte = textBufferPointer[ textLineOfs[y] + x ]