Documentation

July 7, 2026 · View on GitHub

Index of documentation in this repository.

New to the fork? Start with the root README (First clone + prerequisites), then GAME_DATA.md for retail files and discovery (you are not required to use a fixed layout — see overrides there).

Engine reference

DocDescription
GLOSSARY.mdDomain terms (Cube, Zone, T_OBJET, scripts, hero, collision, enums) with code locations.
LIFECYCLES.mdMain loop order, scene load, object/hero/animation lifecycles and where they live in code.
INIT_RESEARCH.mdInitialisation path from main to a running scene: boot phases, new-game vs load-save, timing/speed model, cleanup candidates, verbatim TODO inventory.
SCENES.mdAll 223 cubes by island with location names; interior/exterior; object and zone counts.
IMPACT_SCRIPTS.mdEffects subsystem: IMPACT bytecode + FLOW particle emitters + POF wireframe shapes — runtimes (DoImpact, CreateParticleFlow, PofDisplay3DExt), the on-disk formats, the shipped data, and decoder/compiler tools (scripts/dev/impact_disasm.py, flow_dump.py, pof_dump.py).
MENU.mdGame menu flow, layout, localization, submenus, and entry points.
CONFIG.mdlba2.cfg lifecycle, keys, and what each does (original vs community).
SAVEGAME.md.lba save format: lifecycle, binary layout, version compatibility, save editors, LBALab tools.
CAMERA.mdCamera system: interior (iso) vs exterior (perspective), CameraCenter, Auto camera (FollowCamera, community addition).
TIMING.mdEngine timing: TimerSystemHR vs TimerRefHR, LockTimer vs SaveTimer semantics, ManageTime call sites, fixed-dt overlay, and the 1997 ManageTime bug history.
MOVEMENT_FRAMERATE.mdWhy movement speed is frame-rate dependent (#358): animation-baked locomotion, the two couplings in ObjectSetInterDep, evidence, and the fixed-simulation-timestep fix.
SPRITES.mdSprite system: UI / world-extra / 3D-anim lanes, ScaleSprite vs ScaleSpriteTransp, perspective scale (CalculeScaleFactorSprite), sort-tree integration. Magic-ball case study.
LBA_EDITOR.mdWhat LBA_EDITOR/PERSO paths still do: editor capabilities, runtime hooks, and likely missing pieces.

Architecture

The engine mapped as a whole: layers, the engine/game membrane, and the on-disk data contract. Start with ARCHITECTURE.md.

DocDescription
ARCHITECTURE.mdOverview + roadmap: the three axes (structure / layer / time), the engine/game membrane, the north-star (one engine, two games).
ARCHITECTURE_GLOBALS.mdStructure axis: which of the ~200 globals each domain owns; the shared-state bus.
ENGINE_GAME_SEAM.mdLayer axis: engine vs game vs platform, with every module pinned (live/dormant) and the dual-path format seams.
ENGINE_GAME_INTERFACE.mdThe engine↔game membrane: the Life/Track per-object script VM.
ENGINE_FILE_FORMATS.mdData contract: the Adeline on-disk formats (HQR, LZ, body, anim, sprite, samples, XMIDI, XCF), each with its cross-title version timeline.
LBA1_PORTING_SURFACE.mdPer-subsystem cost of hosting LBA1 on this engine; verified against LBA1 retail data.
LBA1_PORT_PLAN.mdPlan (awaiting go/no-go): how to bring LBA1 to this groundwork. Costs three paths (native port / host on lba2cc / hybrid repo), recommends hosting LBA1 content on the lba2cc engine in-repo behind a game-id, with an agnostic-menu/shell design, twin-e as oracle, and a feasibility-spike ladder.

Build & debug

DocDescription
WINDOWS.mdBuilding on Windows with MSYS2; game files, toolchain.
ANDROID.mdBuilding, packaging, and running on Android (arm64-v8a / armeabi-v7a): NDK + SDL3 cross-build, APK bundler, 16 KB pages, game-data placement, touch overlay.
GAME_DATA.mdRetail game files: LBA2_GAME_DIR, --game-dir, discovery order, dev layouts.
DISC_IMAGE_SOURCE.mdReading retail assets straight from a raw ISO/BIN disc image (GOG LBA2.GOG): ISO9660 reader, mount + OpenRead fallback, in-image music.
DEBUG.mdOriginal Adeline debug tools (DEBUG_TOOLS=ON): overlay, F9 screenshot, bug save/load, cheats, scene selection.
CONSOLE.mdQuake-style debug console (always available): backtick/F12, commands and cvars.
CONTROL.mdCLI control harness: drive the engine non-interactively (--load/--exec/--tick/--dump-state/--screenshot/--exit) for automation and regression.
RELEASING.mdMaintainer recipe for cutting a release: versioning, the 1.0 bar, git-cliff, engine version vs NUM_VERSION.
CI.mdGitHub Actions workflows: validation vs release tiers, triggers, path filtering, the docs-only gate, branch protection.

Testing

DocDescription
TESTING.mdTest suite architecture, Docker ASM equivalence, host discovery tests, and CI workflow summary.
POLYREC.mdPolygon record/replay harness: .lba2polyrec format, capture and replay pipelines, what the byte-for-byte comparison checks, scope, and extension points.
PERFTRACE.mdPer-frame timing capture: console-driven ring buffer for diagnosing high-res / platform-specific frame-pacing without rebuilding.

Preservation & culture

DocDescription
FRENCH_COMMENTS.mdCurated French comments from the codebase with English translations.
ASCII_ART.mdCatalog of ASCII art banners in the original source files.

Porting & technical

DocDescription
CONTROLLER.mdManual camera (orbit, elevation, zoom) and the input sources that drive it: keyboard, mouse, gamepad.
FEATURE_WORKFLOW.mdReasoning and docs for big features: console commands, headless mode, menu changes, camera.
AUDIO.mdAudio system: AIL contract, SDL backend, sound scripting patterns, known issues.
MUSIC.mdMusic state machine: track routing, the PlayMusic decision + NextMusic deferred-switch queue, the two-layer pause/park model + STREAM_PARK.H seam, WAV vs OGG decode/cache, and the host test coverage.
ASM_TO_CPP_REFERENCE.mdWhich modules are ported from ASM to C++ in this fork.
ASM_VALIDATION_PROGRESS.mdPer-pair equivalence-test status across LIB386 ASM/CPP pairs.
ASM_TEST_COVERAGE_AUDIT.mdRubric and progress for strengthening existing equivalence-test coverage (branches, side effects, edge inputs).
COMPILER_NOTES.mdCalling conventions and compiler-related notes.
GFX_OPTIONS.mdVariables and locations for graphical quality options.
WIDESCREEN.mdWidescreen / higher-resolution plan: render-vs-UI coordinate spaces, phased roadmap, current status.
WIDESCREEN_PROJECTION_AUDIT.mdProjection 4:3 audit: where projection hardcodes the screen centre and 640, culling/preclip sites, and what PR #134 did and did not route.
ABI.mdRule for reading 32-bit DOS-era data on 64-bit hosts; catalogue of fat types; compile-time guards.
PLATFORM.mdHigh-level map of host assumptions (pointer ABI, endianness, FP precision, ASM, OS boundary) with status badges and next-step pointers.
PLATFORM_PAL_PLAN.mdPlan (awaiting go/no-go): in-place Platform Abstraction Layer decoupling the engine from direct SDL3. SDL-surface audit, RFC #120 contract reconciliation, and a PR-sequenced, behavior-preserving extraction plan with a headless backend.

External resources

ResourceDescription
LBA Classic DocRead the Docs: engine documentation.
README LinksOfficial site, Discord, GOG/Steam.