Skip to content

Commit

Permalink
Bocfel now works! And updated regtest-html for the async Dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
curiousdannii committed Oct 3, 2024
1 parent 167953d commit dcc7217
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 25 deletions.
6 changes: 3 additions & 3 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,18 @@ if (projects.includes('tools')) {
if (projects.includes('web')) {
projects_to_build.push({
entryPoints: {
//bocfel: 'node_modules/emglken/build/bocfel.*',
bocfel: 'node_modules/emglken/build/bocfel.*',
git: 'node_modules/emglken/build/git.*',
glulxe: 'node_modules/emglken/build/glulxe.*',
hugo: 'node_modules/emglken/build/hugo.*',
ie: 'src/common/ie.js',
'jquery.min': 'node_modules/jquery/dist/jquery.min.js',
quixe: 'src/common/quixe.js',
//quixe: 'src/common/quixe.js',
scare: 'node_modules/emglken/build/scare.*',
tads: 'node_modules/emglken/build/tads.*',
waiting: 'src/upstream/glkote/waiting.gif',
web: 'src/common/launcher.ts',
zvm: 'src/common/zvm.js',
//zvm: 'src/common/zvm.js',
},
outdir: 'dist/web',
sourcemap: true,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "parchment",
"version": "2024.7.0",
"version": "2024.10.0",
"description": "Parchment Interactive Fiction Player",
"repository": "curiousdannii/parchment",
"keywords": [
Expand Down Expand Up @@ -37,7 +37,7 @@
"eslint": "^8.3.0",
"eslint-plugin-compat": "^4.0.0",
"minimist": "^1.2.6",
"regtest-html": "^0.1.3",
"regtest-html": "^0.1.4",
"svelte": "^4.2.18",
"svelte-preprocess": "^6.0.2",
"typescript": "~5.2.0"
Expand Down
12 changes: 2 additions & 10 deletions src/common/formats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,6 @@ export const formats: Format[] = [
blorbable: true,
extensions: /\.(zblorb|zlb|z3|z4|z5|z8)/i,
engines: [
{
id: 'fake-zvm',
load: [],
start: () => {
throw new Error('Z-Code games are temporarily unsupported')
},
},

/*{
id: 'zvm',
load: ['./zvm.js'],
Expand All @@ -178,11 +170,11 @@ export const formats: Format[] = [
},
},*/

/*{
{
id: 'bocfel',
load: ['./bocfel.js', './bocfel.wasm'],
start: generic_emglken_vm,
},*/
},
],
},
]
Expand Down
6 changes: 3 additions & 3 deletions src/common/launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import '../web/web.css'
import Cookies from 'js-cookie'
import prettyBytes from 'pretty-bytes'

import {AsyncGlk, Blorb, FileView, type ProgressCallback} from '../upstream/asyncglk/src/index-browser.js'
import {/*AsyncGlk,*/ Blorb, FileView, type ProgressCallback} from '../upstream/asyncglk/src/index-browser.js'

import {fetch_vm_resource, /*read_uploaded_file*/} from './file.js'
import {find_format, identify_blorb_storyfile_format} from './formats.js'
Expand All @@ -40,9 +40,9 @@ class ParchmentLauncher
}
this.options = Object.assign({}, get_default_options(), parchment_options, get_query_options(query_options))
// Use AsyncGlk if requested
if (this.options.use_asyncglk) {
/*if (this.options.use_asyncglk) {
this.options.Glk = new AsyncGlk()
}
}*/
}

get_storyfile_path(): StoryOptions | null {
Expand Down
2 changes: 1 addition & 1 deletion src/tools/index-processing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export async function process_index_html(options: SingleFileOptions, files: Map<
else if (filename === 'jquery.min.js') {
inclusions.push(`<script>${data_as_string}</script>`)
}
else if (filename === 'main.js') {
else if (filename === 'web.js') {
inclusions.push(`<script type="module">${data_as_string}</script>`)
}
else if (filename.endsWith('.css')) {
Expand Down
10 changes: 6 additions & 4 deletions src/tools/single-file-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,17 @@ const base_options: Options = {
}
const presets: Record<string, Options> = {
dist: {
terps: ['hugo', 'quixe', 'scare', 'tads', 'zvm'],
//terps: ['hugo', 'quixe', 'scare', 'tads', 'zvm'],
terps: ['bocfel', 'glulxe', 'hugo', 'scare', 'tads'],
},
frankendrift: {
single_file: 0,
terps: [],
},
regtest: {
font: 0,
terps: ['quixe', 'zvm'],
//terps: ['quixe', 'zvm'],
terps: ['bocfel', 'glulxe'],
},
}

Expand Down Expand Up @@ -121,14 +123,14 @@ if (story_file_path) {
const common_files = [
'jquery.min.js',
'ie.js',
'web.js',
'waiting.gif',
'web.css',
'web.js',
'../fonts/iosevka/iosevka-extended.woff2',
'../../index.html',
]
const interpreter_files: Record<string, string[]> = {
bocfel: ['bocfel.wasm', 'boxfel.js'],
bocfel: ['bocfel.wasm', 'bocfel.js'],
git: ['git.wasm', 'git.js'],
glulxe: ['glulxe.wasm', 'glulxe.js'],
hugo: ['hugo.wasm', 'hugo.js'],
Expand Down
2 changes: 1 addition & 1 deletion src/upstream/asyncglk
2 changes: 1 addition & 1 deletion src/upstream/emglken

0 comments on commit dcc7217

Please sign in to comment.