Entry 255
The event scripts move into the build
Filescrates/piney-data/src/pack.rscrates/piney-data/src/iso.rscrates/piney-event/src/official/mod.rscrates/piney-build/src/lib.rscrates/piney-build/src/main.rscrates/piney-game/src/main.rsplans/build-data.md
The owner's call: everything the port takes from the discs is to leave
the repository and live in what piney-build makes from the player's own
discs. That covers the scripts, the text, the tables and the placement
data. The repository keeps code, generators, type definitions, docs and
facts about the binaries. plans/build-data.md has the plan in four
steps. This entry is step 1: the event scripts and messages. They were
2.6 MB of .evs text generated into piney-data/src/events and compiled
into the port.
Where the data lives now
-
The port's files,
PINEY/. Each volume's disc in a build gets the port's own files underPINEY/, beside the disc's. There are two so far:PINEY/VERSIONholdspack::DATA_VERSION(1);PINEY/EVENTS.EVSholds the scripts and messages in their text form (official::events_text).
They are ordinary manifest entries at LBA 0xffffffff (no place on the disc), chunked into
chunks.pakwith the rest, so what the volumes share is kept once.piney-build(now a library too,port_files) makes them from the disc's executable withofficial::load_iso, which finds the tables through the game's code on every volume. An earlier build'sPINEY/is dropped and made again. -
A disc image on its own. It has no
PINEY/:Isoserves those paths from the image's data folder in the port's home (pack::image_data_dir:data/<image name>-<size in hex>/).piney_build::image_datafills the folder. The game calls it for every disc it will play, beforedeny_executable, and it makes the files when they are missing or of another version, writing the version last. -
Reading them.
official::events(iso)readsPINEY/EVENTS.EVS. A disc without it (a tool's or a check's raw image, where the executable may still be read) falls back to the executable.events_of(volume)now only gives whateventsread earlier in the run. -
Refusing stale data. The game refuses a disc whose port data is missing or of another version, saying to run
piney-buildagain. Builds made before this change have noPINEY/.
Removed: piney-data/src/events (the four .evs and mod.rs) and
piney-event's gen_events example. export stays, for per-event copies
in work/.
Checked
the_builds_scripts_are_the_executables: on every volume the text form reads back as the executable's events, event for event, andofficial::eventson the raw image gives the same.- A raw image (
--iso infection.iso --mode desktop, a scratchPINEY_HOME): the first start makesEVENTS.EVS(692,480 bytes) andVERSION, the second reuses them, and the desktop runs its scripts. - A one-disc build of Infection: the port's data is 0.7 MiB, every file reads back, and the game plays the title and the desktop from it.
- The whole workspace's tests pass: they open raw images and read the scripts from the executable.
How long an image's first start takes on a slow drive (reading the executable is 0.1 s here).