Skip to content

C++ reference

The C++ reference is generated by Doxygen from the headers this fork added: those whose first comment starts with AMFP-2026:. Stock engine files that only carry a marked change are left out, so the reference stays about the new code, not the whole engine.

Open the C++ reference  ·  All functions and constants  ·  Classes and structs

Most of these headers are pure: plain values in, plain values out, no engine types, each with a test file in tests/cpp. See Architecture.

Comfort

Header What it holds
LuxComfort.h The comfort values, the built-in profiles (Original, Reduced, Comfort), clamping and detection.
LuxComfortCam.h Camera side: field of view, zoom pulse clamp, roll, hit jolt cap, forced-turn speed cap.
LuxComfortBody.h Body and view model: lantern swing, arm lag.
LuxComfortFx.h Screen effects: shake, image trail, radial blur, and the edge-darkening cue.
LuxScriptedMotion.h The earlier "scripted camera effects" setting (Full, Reduced, Off), still read when older profiles move to a comfort profile.

Presets and options

Header What it holds
LuxPresets.h The Original and Modern presets, HUD text size, and detecting Custom.
LuxVideoModeList.h De-duplicating the resolution list.
LuxVersionText.h The version line on the title menu.

Guidance, hints and HUD

Header What it holds
LuxGuidance.h Guidance levels: the objective line and the stuck nudge.
LuxKeywords.h Clue words: matching in Latin and CJK text.
LuxKeywordText.h Drawing a row of text with its clue words coloured.
LuxJournalToast.h The brief new hint / new note rows.
LuxContextControls.h Which control prompt to show for the player's state and focus.

Gamepad and input

Header What it holds
LuxPadLayout.h Classic and Modern gamepad layouts.
LuxPadLook.h Stick dead zone, look curve and acceleration.
LuxPadGlyphs.h A gamepad glyph on a menu button, shown only while the pad is in use.
LuxInputMode.h Which device the player used last.
LuxProfilePad.h Gamepad control of the profile window.
LuxMouseLook.h Mouse look independent of the resolution.
LuxStorySkip.h The press-twice story skip.

Saves and loading

Header What it holds
LuxAutoSave.h Autosave levels, safe moments, save kinds, how many autosaves to keep.
LuxLoadProgress.h The loading percentage.
LuxPreload.h Which maps and folders to read ahead.
LuxPreloader.h The background reader thread.

Display and paths

Header What it holds
LuxGuiAspect.h The GUI canvas width on widescreen.
LuxInitConfigPath.h Choosing amfp_enhanced/main_init.cfg.
LuxGameRoot.h The game folder the Windows exe works from.
LuxFsPath.h File paths for C++ streams on every platform.

Engine (HPL2)

Header What it holds
WordWrap.h Word wrap with pluggable width and break rules (CJK aware).
LangTextDecode.h Decoding .lang text: full UTF-8 or the original two-byte path.
ShadowMapSizes.h Shadow map size per setting and light, with the sharper tier.
MeshLoaderUfbx.h The ufbx .FBX loader.
FbxDecompose.h Bone transform decomposition as the original loader did it.
FbxAnimTimes.h Animation key timing as the original loader did it.

Development

Header What it holds
LuxDevBridge.h The dev bridge (off unless enabled). See Dev runner.
LuxDevBridgeParse.h Parsing bridge commands.

C interface of the Rust library

Header What it holds
hpl_cjk_text.h Generated by cbindgen; see the Rust reference.

Build it locally with pixi run -e docs docs-api; the pages land in build/docs-api/cpp.