Fix high bit miscalculation, mouse offset calcuation.

This commit is contained in:
Will Scullin 2019-07-27 15:57:40 -07:00
parent 73aa3d647f
commit 8e5a60b284
No known key found for this signature in database
GPG Key ID: 9092A5C0A673416B
3 changed files with 5 additions and 3 deletions

View File

@ -780,7 +780,9 @@ export function HiresPage(page, context)
_refreshing = false;
}
} else {
val = _buffer[0][base] & 0x7f;
val = _buffer[0][base];
hbs = val & 0x80;
val &= 0x7f;
dx = col * 14 - 2;
b0 = col > 0 ? _buffer[0][base - 1] : 0;
b2 = col < 39 ? _buffer[0][base + 1] : 0;

View File

@ -838,7 +838,7 @@ function _mousemove(evt) {
}
var s = document.querySelector('#screen');
var offset = { top: s.clientTop, left: s.clientLeft };
var offset = s.getBoundingClientRect();
var x = (evt.pageX - offset.left) / s.clientWidth,
y = (evt.pageY - offset.top) / s.clientHeight,
z = x;

View File

@ -822,7 +822,7 @@ function _mousemove(evt) {
}
var s = document.querySelector('#screen');
var offset = { top: s.clientTop, left: s.clientLeft };
var offset = s.getBoundingClientRect();
var x = (evt.pageX - offset.left) / s.clientWidth,
y = (evt.pageY - offset.top) / s.clientHeight,
z = x;