# ScummVM on leetdom.com — where this came from

## What this is
ScummVM compiled to WebAssembly, self-hosted, running eight freeware adventure
games. Nothing here is emulated Flash and nothing runs on a third-party server:
leetdom serves the engine, the engine data and the game data.

## Licence

ScummVM is **GPL-3.0-or-later**. The full text is in `COPYING`, the credits in
`AUTHORS`. Both are shipped next to the binary, which is what the GPL asks for.

Corresponding source for the binary served here:
  - Engine source:  https://github.com/chkuendig/scummvm  (branch: emscripten)
  - Build scripts:  https://github.com/chkuendig/scummvm-demo  (build 194fa8f51e44)

The build-scripts repository ships no licence file of its own. It is a set of
scripts around the ScummVM tree, and ScummVM itself is GPL, so the GPL governs
the compiled artefact regardless. The source links above are the compliance
route; keep them working. If they ever go dead, mirror the source here.

`scummvm.js` and `scummvm.wasm` are upstream build artefacts, mirrored
unmodified. The only change is to the HTML shell: the upstream page loads a
Sentry bundle that reports errors to a third party's account, and that was
removed before publishing. Do not reintroduce it on a re-mirror.

## Game data

All eight games are freeware, downloaded from the ScummVM project's own
distribution at downloads.scummvm.org/frs/extras/. Several ship their own
licence file inside the game directory (Soltys, Sfinx, Lure) - those files are
left in place deliberately, because their licences require it. Do not prune
them as junk.

Soltys, for example: free redistribution is granted provided the licence and
copyright notices stay intact and the game itself is not sold. leetdom charges
nothing, so that is satisfied - but it stops being satisfied if the licence
file is deleted.

## How it is wired

  /play/scummvm/            the shell, engine, scummvm.ini
  /play/scummvm/data/       engine data, plugins, game data
  /data/                    THE SAME data directory, mounted again at site root

That duplicate mount is not an accident. The compiled backend resolves its
virtual filesystem against the ORIGIN ROOT - it requests /data/index.json, not
a path relative to the page - so the mount at / is what makes it work. Both
mounts are in leetdom/server/app.js. Removing the /data one breaks every game
with a silent 404 and a black screen.

Engines load as separate plugins (data/plugins/lib<engine>.so), so a visitor
downloads only the engine their game needs, not all 124.

## Launching a specific game

The shell reads the URL fragment and passes it to ScummVM as command-line
arguments, so `/play/scummvm/#drascula` boots straight into that target. The
target name must match a section in `scummvm.ini`.

## What was deliberately NOT mirrored

71 MB of engine data none of these eight games touch - fonts-cjk.dat (38 MB),
ultima.dat (16 MB), titanic.dat, the Roland SoundFont, and similar. If a future
game needs one, fetch it from the upstream deployment and add it to
data/index.json with its exact byte size. The size in that index is not
decorative: the filesystem uses it to set up HTTP range requests, so a wrong
number breaks the file.
