diff --git a/src/ide/project.ts b/src/ide/project.ts index 19692c74..fb7b1aa1 100644 --- a/src/ide/project.ts +++ b/src/ide/project.ts @@ -92,9 +92,9 @@ export class CodeProject { this.pushAllFiles(files, m[1]); } } else { - // for .asm -- [.]include "file" + // for .asm -- [.%]include "file" // for .c -- #include "file" - let re2 = /^\s*[.#]?(include|incbin)\s+"(.+?)"/gmi; + let re2 = /^\s*[.#%]?(include|incbin)\s+"(.+?)"/gmi; while (m = re2.exec(text)) { this.pushAllFiles(files, m[2]); } diff --git a/src/platform/x86.ts b/src/platform/x86.ts index a7213b3f..f2b09304 100644 --- a/src/platform/x86.ts +++ b/src/platform/x86.ts @@ -52,8 +52,9 @@ class FATFSArrayBufferDriver { class X86PCPlatform implements Platform { - mainElement; - video; + mainElement : HTMLElement; + video : RasterVideo; + console_div : HTMLElement; emulator; v86; @@ -99,10 +100,13 @@ class X86PCPlatform implements Platform { this.video = new RasterVideo(this.mainElement,640,480,{overscan:false}); this.video.create(); + var div = document.createElement('div'); div.classList.add('pc-console'); div.classList.add('emuvideo'); this.mainElement.appendChild(div); + this.console_div = div; + this.resize(); // set font size this.emulator = new V86Starter({ memory_size: 2 * 1024 * 1024, @@ -133,6 +137,12 @@ class X86PCPlatform implements Platform { }); } + resize() { + // set font size proportional to window width + var charwidth = $(this.console_div).width() * 1.7 / 80; + $(this.console_div).css('font-size', charwidth+'px'); + } + getDebugTree() { return this.v86; } diff --git a/src/platform/zmachine.ts b/src/platform/zmachine.ts index 2602f68c..86eee7ba 100644 --- a/src/platform/zmachine.ts +++ b/src/platform/zmachine.ts @@ -46,7 +46,7 @@ interface IFZVM { class GlkWindow { page: HTMLElement; stream: number; - + curline: HTMLElement; curstyle: number; reverse: boolean; @@ -102,8 +102,8 @@ class GlkWindow { move_cursor(col, row) { // TODO if (row == this.row && col > this.col) { - for (var i=this.col; i