# We Have Demands: evidence

The files behind the screenshots, sounds and code checks in the six-part series on
SPACE INVADERS: WE HAVE DEMANDS (<https://github.com/shaia/space-invader>). Every part quotes
the game at commit `25bd61d` (5 July 2026), the state it was in when the series was written.

Captured on 2026-10-31: Windows 11, MSVC 19.44.35229 (Visual Studio 2022), raylib 5.5,
window 1200x1425.

## Files

- `capture/shot.h`, `capture/shot.cpp`: the capture harness (below).
- `capture/CMakeLists-append.cmake`: the lines that add it to the game's build.
- `capture/tour.txt`: the script behind every screenshot of the game as it ships.
- `capture/fixed.txt`: the title and wave-1 frames again, for the build with `bloom-fix.diff`.
- `bloom-fix.diff`: the one-line change to the bloom's bright pass that Part 2 describes.
- `check_excerpts.py`: compares every line of every code block in a post with the source
  tree, after collapsing whitespace. It reports a line whose only difference is a comment
  added for the post as COMMENT, and anything else as MISSING.
- `prep_images.py`: turns the captured PNGs into the WebP files the posts show.
- `wav/`: all seventeen buffers the game bakes at startup, sixteen effects and the music loop,
  exported by the harness exactly as `Bake` built them (44.1 kHz, 16-bit, mono).
- `audio_prep.py`: turns those into Part 3's MP3s, its march clip and its spectrograms.

## What the harness changes

Nothing in the game's source. `shot.h` is force-included into every translation unit (`/FI`
on MSVC; `-include` on GCC and Clang) and routes four calls through `shot.cpp`:

- `EndDrawing`: flush the batch, read the finished frame back if the script asks for a
  screenshot, swap, then inject the next frame's scripted keys with raylib's own
  `PlayAutomationEvent`. The script never presses a key on the desktop.
- `WindowShouldClose`: returns true at the script's `quit` frame.
- `LoadSoundFromWave`: with `SHOT_WAV=1`, exports each synthesised `Wave` as a `.wav` first,
  in the order the game bakes them.
- `DrawComposite` (in `main.cpp` only): for a `layers` line, exports the frame's canvas,
  bright-pass and blurred-bloom textures before the composite runs.

It also mutes the master volume and sets the window to 1200x1425. The screenshot is read with
`rlReadScreenPixels` at the render size rather than `TakeScreenshot`, which multiplies by the
display's DPI scale and, on a 150% display, reads a frame 1.5 times too large.

## Reproduce

    git clone https://github.com/shaia/space-invader && cd space-invader && git checkout 25bd61d
    # copy capture/ into the checkout, then append capture/CMakeLists-append.cmake to CMakeLists.txt
    cmake -S . -B build -G "Visual Studio 17 2022" -A x64
    cmake --build build --config Release
    mkdir out && cd out
    SHOT_SCRIPT=../capture/tour.txt SHOT_WAV=1 ../build/Release/space_invader_plus.exe

The run writes its PNGs and WAVs into the current directory and quits by itself. The game
seeds its random generator from the clock, so a rerun shows the same scenes in different
frames.
