diff --git a/shell/shell.ts b/shell/shell.ts index 8fd3087..6328283 100644 --- a/shell/shell.ts +++ b/shell/shell.ts @@ -86,9 +86,9 @@ namespace xsystem35 { $('.navbar-brand').textContent = title.slice(colon + 1); }; Module.canvas = document.getElementById('canvas'); - Module.noInitialRun = true; Module.setStatus = this.setStatus.bind(this); Module.preRun = [ + () => { Module.addRunDependency('gameFiles'); }, fsReady, function loadFont() { FS.createPreloadedFile('/', Font.fname, Font.url, true, false); @@ -124,8 +124,9 @@ namespace xsystem35 { $('#zoom').hidden = false; $('#volume-control').hidden = false; setTimeout(() => { - Module.callMain(Module.arguments); - this.antialiasChanged(); + if (this.antialiasCheckbox.checked) + Module.arguments.push('-antialias'); + Module.removeRunDependency('gameFiles'); }, 0); } diff --git a/shell/util.ts b/shell/util.ts index fe8a300..59e2d43 100644 --- a/shell/util.ts +++ b/shell/util.ts @@ -49,13 +49,9 @@ declare function _ald_freedata(data: number): void; declare function _sjis2unicode(byte1: number, byte2: number): void; declare namespace Module { - let noInitialRun: boolean; - // Undocumented methods / attributes let canvas: HTMLElement; - function callMain(args: string[]): void; function getMemory(size: number): number; - function monitorRunDependencies(left: number): void; function setStatus(status: string): void; function setWindowTitle(title: string): void; }