Skip to content

Commit

Permalink
Update Frotz to prevent error messages, switch sound games back to se…
Browse files Browse the repository at this point in the history
…parate blorbs
  • Loading branch information
curiousdannii committed Sep 1, 2024
1 parent 8654c40 commit c3d72e8
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 29 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Infocom Frotz: play Infocom's Z6 games online
=============================================
Infocom Frotz: play Infocom's multimedia games online
=====================================================

Infocom Frotz builds [Frotz](https://gitlab.com/DavidGriffith/frotz) with [Emscripten](https://emscripten.org/) so that Infocom's Z6 games can be played online.
Infocom Frotz builds [Frotz](https://gitlab.com/DavidGriffith/frotz) with [Emscripten](https://emscripten.org/) so that Infocom's multimedia games can be played online.

Infocom Frotz is GPL-2.0 licensed.

The game files were obtained from [The Obsessively Complete Infocom Catalog](https://eblong.com/infocom/), the media files from the [IF Archive](https://ifarchive.org/indexes/if-archive/infocom/media/blorb/), and the manuals from the [Infocom Documentation Project](https://infodoc.plover.net/manuals/index.html). They are proprietary documents whose copyright belongs to Activision.

Infocom's non-Z6 games should be played with [Parchment](https://iplayif.com/) instead.
Infocom's non-multimedia games should be played with [Parchment](https://iplayif.com/) instead.

Building
--------
Expand Down
2 changes: 1 addition & 1 deletion frotz
Submodule frotz updated 2 files
+2 −0 .gitignore
+0 −5 src/common/screen.c
38 changes: 22 additions & 16 deletions src/makehtml.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ const storyfiles = [
storyfile: 'journey-r83-s890706-graphics.zblorb',
title: 'Journey: The Quest Begins',
},
{
blorb: 'Lurking.blb',
id: 'lurkinghorror',
manual: 'lurking.pdf',
short_title: 'The Lurking Horror',
storyfile: 'lurkinghorror-r221-s870918.z3',
title: 'The Lurking Horror',
},
{
blorb: 'Sherlock.blb',
id: 'sherlock',
manual: 'sherlock.pdf',
short_title: 'Sherlock',
storyfile: 'sherlock-r26-s880127.z5',
title: 'Sherlock: The Riddle of the Crown Jewels',
},
{
id: 'shogun',
short_title: 'Shōgun',
Expand All @@ -31,20 +47,6 @@ const storyfiles = [
storyfile: 'zork0-r393-s890714-graphics.zblorb',
title: 'Zork Zero: The Revenge of Megaboz',
},
{
id: 'sherlock',
manual: 'sherlock.pdf',
short_title: 'Sherlock',
storyfile: 'sherlock-r26-s880127-sound.zblorb',
title: 'Sherlock: The Riddle of the Crown Jewels',
},
{
id: 'lurkinghorror',
manual: 'lurking.pdf',
short_title: 'The Lurking Horror',
storyfile: 'lurkinghorror-r221-s870918-sound.zblorb',
title: 'The Lurking Horror',
},
]

const template = `<!DOCTYPE html>
Expand All @@ -69,7 +71,7 @@ const template = `<!DOCTYPE html>
</div>
</div>
</div>
<script>window.files = ["STORYFILE"]</script>
<script>window.files = [FILES]</script>
<script type="text/javascript" src="interface.js"></script>
<script async type="text/javascript" src="sfrotz.js"></script>
</body>
Expand All @@ -86,11 +88,15 @@ const arthurmodes = `
</div>`

for (const story of storyfiles) {
const files = [story.storyfile]
if (story.blorb) {
files.push(story.blorb)
}
const html = template
.replace('ARTHURMODES', story.id === 'arthur' ? arthurmodes : '')
.replace('FILES', files.map(story => `"${story}"`).join(', '))
.replace('MANUAL', story.manual ? `<p><a href="${story.manual}" target="_blank">Manual</a></p>` : '')
.replace('SHORTTITLE', story.short_title)
.replace('STORYFILE', story.storyfile)
.replace('TITLE', story.title)
fs.writeFileSync(`dist/${story.id}.html`, html)
}
8 changes: 5 additions & 3 deletions src/preamble.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
// Infocom Frotz Emscripten preamble

const files = window.files
Module.arguments = ['/' + files[0]]
Module.arguments = files.map(file => '/' + file)
Module.canvas = document.getElementById('canvas')

Module.preRun = () => {
// Load storyfile and blorb
FS.createPreloadedFile('/', files[0], files[0], true, false)
// Load files
for (const file of files) {
FS.createPreloadedFile('/', file, file, true, false)
}

// Set up the saves folder with IDBFS
FS.mkdir('/saves')
Expand Down
10 changes: 5 additions & 5 deletions src/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
</head>
<body>
<h1>Infocom Frotz</h1>
<h2>Online player for Infocom's Z6 games</h2>
<h2>Online player for Infocom's multimedia games</h2>
<div id="games">
<h2><a href="arthur.html"><img src="arthur.jpg">Arthur: The Quest for Excalibur</a></h2>
<h2><a href="journey.html"><img src="journey.jpg">Journey: The Quest Begins</a></h2>
<h2><a href="shogun.html"><img src="shogun.jpg">James Clavell's Shōgun</a></h2>
<h2><a href="zorkzero.html"><img src="zorkzero.jpg">Zork Zero: The Revenge of Megaboz</a></h2>
<h2><a href="lurkinghorror.html"><img src="lurkinghorror.jpg">The Lurking Horror</a></h2>
<h2><a href="sherlock.html"><img src="sherlock.jpg">Sherlock: The Riddle of the Crown Jewels</a></h2>
<h2><a href="shogun.html"><img src="shogun.jpg">James Clavell's Shōgun</a></h2>
<h2><a href="zorkzero.html"><img src="zorkzero.jpg">Zork Zero: The Revenge of Megaboz</a></h2>
</div>
<p>Infocom Frotz builds <a href="https://gitlab.com/DavidGriffith/frotz">Frotz</a> with <a href="https://emscripten.org/">Emscripten</a> so that Infocom's Z6 games can be played online.</p>
<p>Infocom Frotz builds <a href="https://gitlab.com/DavidGriffith/frotz">Frotz</a> with <a href="https://emscripten.org/">Emscripten</a> so that Infocom's multimedia games can be played online.</p>
<p>The game files were obtained from <a href="https://eblong.com/infocom/">The Obsessively Complete Infocom Catalog</a>, the media files from the <a href="https://ifarchive.org/indexes/if-archive/infocom/media/blorb/">IF Archive</a>, and the manuals from the <a href="https://infodoc.plover.net/manuals/index.html">Infocom Documentation Project</a>. They are proprietary documents whose copyright belongs to Activision.</p>
<p>Infocom's non-Z6 games should be played with <a href="https://iplayif.com/">Parchment</a> instead.</p>
<p>Infocom's non-multimedia games should be played with <a href="https://iplayif.com/">Parchment</a> instead.</p>
<p>See the <a href="https://github.com/curiousdannii/infocom-frotz">Infocom Frotz Github page</a> for the interpreter's source code. Infocom Frotz is GPL-2.0 licensed.</p>
</body>
</html>
Binary file modified src/static/lurkinghorror.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/static/sherlock.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c3d72e8

Please sign in to comment.