mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-26 10:49:17 +00:00
vcs: remove ctrl-click break, use CRT view from now on
This commit is contained in:
parent
3018ddf27a
commit
6e2b94fb68
@ -107,24 +107,8 @@ class VCSPlatform extends BasePlatform {
|
|||||||
self.probe.logNewScanline();
|
self.probe.logNewScanline();
|
||||||
return this.oldNextLine(pixels, vsync);
|
return this.oldNextLine(pixels, vsync);
|
||||||
}
|
}
|
||||||
// setup mouse events
|
|
||||||
var rasterPosBreakFn = (e) => {
|
|
||||||
if (e.ctrlKey) {
|
|
||||||
console.resetDebug();
|
|
||||||
var vcanvas = $(e.target);
|
|
||||||
var x = e.pageX - vcanvas.offset().left;
|
|
||||||
var y = e.pageY - vcanvas.offset().top;
|
|
||||||
var new_x = Math.floor(x * 152 / vcanvas.width());
|
|
||||||
var new_y = Math.floor((y-10) * (192+37+30) / vcanvas.height());
|
|
||||||
this.runEval( (c) => {
|
|
||||||
var pos = this.getRasterPosition();
|
|
||||||
return (pos.x >= new_x) && (pos.y >= new_y);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
var jacanvas = $("#javatari-screen").find("canvas");
|
|
||||||
jacanvas.mousedown(rasterPosBreakFn);
|
|
||||||
// resize after added to dom tree
|
// resize after added to dom tree
|
||||||
|
var jacanvas = $("#javatari-screen").find("canvas");
|
||||||
const resizeObserver = new ResizeObserver(entries => {
|
const resizeObserver = new ResizeObserver(entries => {
|
||||||
this.resize();
|
this.resize();
|
||||||
});
|
});
|
||||||
@ -149,8 +133,8 @@ class VCSPlatform extends BasePlatform {
|
|||||||
var clkfs = Javatari.room.console.getClocksFromFrameStart() - 1;
|
var clkfs = Javatari.room.console.getClocksFromFrameStart() - 1;
|
||||||
var row = Math.floor(clkfs/76);
|
var row = Math.floor(clkfs/76);
|
||||||
var col = clkfs - row*76;
|
var col = clkfs - row*76;
|
||||||
var xpos = col*3-68;
|
var xpos = col*3;
|
||||||
var ypos = row-39;
|
var ypos = row;
|
||||||
return {x:xpos, y:ypos, clk:clkfs%76};
|
return {x:xpos, y:ypos, clk:clkfs%76};
|
||||||
}
|
}
|
||||||
getRasterScanline() : number {
|
getRasterScanline() : number {
|
||||||
|
Loading…
Reference in New Issue
Block a user