-
Notifications
You must be signed in to change notification settings - Fork 0
Developer Guide
| Area | Responsibility |
|---|---|
src/data |
Containers, compression, hashes and asset decoding |
src/engine |
Game state, map generation, combat, inventory and UI logic |
src/render |
Software framebuffer, viewport, HUD and enhanced renderer |
src/audio |
MIDI parsing/synthesis, music ownership, effects and mixer |
tests |
Decoder, VFS, hash, ISO, map, game-state, save and Liberation checks |
tools |
Narrow inspection tools; never a game-data redistribution mechanism |
cmake -S . -B build -G Ninja
cmake --build build -j4
ctest --test-dir build --output-on-failureRun the same suite with -DCMAKE_BUILD_TYPE=Release. Test targets compile with
assertions explicitly enabled, because test expressions use assert() for both
execution and verification.
-
DataVFSowns archive indexing, not returned match buffers. -
vfs_find_sha256()returns caller-owned bytes. -
MusicSystemowns the current MIDI bytes until track replacement or stop. -
LiberationDataowns the raw disc buffer and closes it as one unit. -
GameState,CreatureListandPuzzleListare saved together for Captive so a loaded session cannot respawn defeated actors or reset solved panels.
The Captive save header has magic, version, campaign identity, party state, objective counters, gold and dynamic-list counts. The loader constructs a temporary replacement game, regenerates the deterministic base, overlays saved cells, validates every dynamic record and assigns it only after complete success. Corrupt input therefore leaves the active session intact.
Do not extend a save record without incrementing its version and adding tests for an old-version rejection and a new-version round trip.
Never use original media filenames as identity. Introduce a resource with:
- a SHA-256 digest in source,
- a content-hash lookup,
- checked lengths/offsets before decode,
- a deterministic test or verifier, and
- no copied game payload in the repository.
- Preserve unrelated dirty work in the checkout.
- Add a focused test that fails before the change.
- Build Debug and Release.
- Run the complete CTest suite.
- Test a direct hash-verified startup when changing loading or runtime code.
- Document implementation status honestly; do not label a placeholder as original-game parity.