Skip to content

little steps near the end

Pre-release
Pre-release

Choose a tag to compare

@remileonard remileonard released this 31 May 17:29

libRealSpace v0.4 — config_build_040

Release date: 2026-05-31
Previous release: fixes_031_build (v0.3.1)

New: Graphical Configuration Tool (config)

A brand-new standalone executable has been added — config — a lightweight ImGui-based configuration editor that lets users tweak all game settings without editing files by hand.

  • General tab: resolution picker (auto-populated from SDL display modes), fullscreen toggle, object/world detail sliders, video effects checkboxes (CPC palette, scanlines, pixel scale, Super Eagle 2×).
  • Controls tab: full input binding UI (see below).
  • Settings are saved back to config.ini with a single click.
  • Replaces the old [Controler] section in config.ini with a proper [Input] section pointing to a bindings file.

New: Control Mapping UI (DebugControlMapping)

A dedicated control-remapping system is now available, shared between the config tool and the debugger.

  • Lists all mappable sim actions (flight, combat, views, MFD, radio, etc.).
  • Supports keyboard, joystick axis, joystick button, gamepad axis, and gamepad button bindings.
  • Live capture mode: press a button or move an axis to bind it to an action (5-second timeout).
  • Displays currently connected joysticks with their GUID.
  • Bindings are saved/loaded from default_bindings.cfg.
  • Keyboard bindings file path is now configurable via config.ini ([Input] bindings_file).

New: Post-Processing Shader Pipeline (RSScreen)

A new GLSL post-processing pipeline has been introduced, driven by config.ini [Video] settings:

Option Effect
fx_cpc_palette Quantises colours to the Amstrad CPC 6128 palette using ordered (Bayer 4×4) dithering
fx_scanlines Adds CRT scanline darkening every other logical pixel row
fx_pixel_scale Pixel-art upscaling — snaps UV sampling to a grid of N×N pixels
  • OpenGL extension loading is handled by the new GLExtensions.h/.cpp, with a no-op fallback on macOS/Linux where extensions are available natively.
  • Logical vs. drawable window sizes are now tracked separately (logical_width / logical_height) to support HiDPI/Retina displays correctly.

macOS Build Support

The project can now be built on Apple Silicon (arm64) and macOS in general:

  • A new macos CMake preset targets clang with vcpkg.
  • All OpenGL includes now branch on __APPLE__ to use <OpenGL/gl.h> / <OpenGL/glu.h> instead of <GL/gl.h>.
  • GL_SILENCE_DEPRECATION is set where needed.
  • vrstrike is excluded from the macOS build (not supported).
  • -Wl,-no_fixup_chains linker option added for Apple Silicon targets (neosc, debugger, config).

Gameplay features

  • update the Indiana jones map
  • end mission screen now show air and ground kills
  • new weapon GBU_15 is working
  • new weapon Rocket POD (LAU3) is working
  • new weapon physics, better gun aiming and bomb droping, better missile (they can now miss the targets, beware)

HUD & Cockpit Overhaul (SCCockpit)

The cockpit and HUD system has been significantly reworked:

  • HUD data-driven rendering: HUD element positions (altitude band, speed band, heading compass, pitch ladder, all text tags) are now read from the binary HUD data (TTAG, HINF, ALTI, ASPD, HEAD, LADD), making the HUD faithful to the original game assets.
  • Pitch ladder (RenderPitchLadder): proper roll-rotated bars, dashed lines below the horizon, tick marks, and degree labels.
  • Altitude & speed bands (RenderAltiBandRoll, RenderSpeedBandRoll): scrolling tape instruments reading from asset-defined step sizes.
  • Heading compass (RenderHeadingCompas): scrolling compass tape with waypoint marker.
  • Text tags (RenderTextTags / printTTAG): all HUD text fields (closure speed, range, weapon name/count, HUD mode, G-force, Mach, waypoint, radar altitude, gear/flaps/airbrake/throttle) are now drawn using the position data embedded in the game's HUD file.
  • CP_BIG (large HUD) support: the zoomed cockpit view now uses the large HUD asset and a 30° FOV camera, while the standard view keeps 45°.
  • Weapon mode rendering: a proper weapon_mode enum dispatches to RenderTargetingReticle (LCOS), RenderBombSight (CCIP), RenderMissileHud (SRM/LRM), RenderIrTargetHud (IRST), and RenderStraffingReticle (STRAF).
  • Lead-angle & target prediction: the gun reticle now iteratively predicts target position at time-of-flight with target velocity compensation, and draws both a lead diamond (predicted position) and a target box (current position).
  • RAWS improvements: the radar-warning receiver now uses per-contact icon indices for both the normal and zoomed views, based on the aircraft type name.
  • current_target filtering: the cockpit now only sets a valid target for the current radar mode (AARD for air targets, AGRD for ground targets).
  • Camera: cockpit camera is now a proper Camera instance (cockpit_camera) separate from the renderer's camera, correctly positioned and oriented each frame from the player plane's attitude.
  • project_to_screen now delegates to the plane-to-world matrix for 3D cockpit mode.

Config System Enhancements

  • Config::setInt and Config::setBool write-back methods added.
  • Config::save saves the current config to a file.
  • Config.hpp include guard fixed (<SimpeIni.h><SimpleIni.h> for case-sensitive file systems).
  • config.ini is now installed to the root of the install directory (not just assets/), and copied to the build directory for Debug builds.
  • New config.ini sections: [Game], [Video], [Input] — the old [Controler] section has been removed.

Performance: FrameBuffer Blit Optimisation

All four blit variants (blit, blitWithMask, blitWithMaskAndOffset, blitLargeBuffer) have been rewritten to:

  • Pre-compute clipped row/column ranges outside the inner loop.
  • Use memcpy for contiguous opaque spans instead of per-pixel copies.
  • Eliminate redundant per-pixel bounds checks inside hot loops.

RLEShape: Pre-decoded Sprite Cache

  • RLEShape now decodes sprite data once at load time into an expand_buffer.
  • Subsequent Expand / ExpandWithBox calls blit directly from the pre-decoded buffer using memcpy for opaque spans.
  • Proper copy constructor and assignment operator added.
  • rightDist and botDist are now incremented by 1 at load time to match expected sprite extents.
  • Validity checks guard against out-of-range shape dimensions.

RSImageSet Refactor

  • InitFromPakEntry rewritten: correctly parses the palette offset (first DWORD) and image offset table (subsequent DWORDs until the first image).
  • InitFromTreEntry and InitFromRam removed (replaced by the unified InitFromPakEntry logic).
  • GetShape boundary check fixed (>>=).
  • removeFirstEmptyShape threshold changed from == 0 to <= 1 to handle 1-pixel placeholder shapes.

SCRenderer: LOD & Config Integration

  • LOD level is now read from config.ini ([Game] object_detail) instead of being hardcoded to LOD_LEVEL_MAX.
  • All drawModel call sites pass this->lodLevel correctly.
  • Palette loading is now guarded (if (entries)).
  • camera made public for external access.
  • fov and lodLevel exposed as public fields.

Math / Vector Additions

  • Vector3D::rotateByAxis(const Vector3D& w) — Rodrigues' rotation formula for angular velocity integration.
  • Vector3D::rotateByAxisInPlace convenience wrapper.
  • Vector3D::Length() now has a const overload.
  • Vector3D::Norm() removed; all callers updated to use Length().
  • Vector2D::operator- subtraction operator added.
  • Point2D::rotateAroundPoint now casts coordinates to float before trigonometry (fixes implicit-conversion warnings).

Timer: FPS Auto-Calibration

DesktopTimer now runs a 90-frame warm-up phase to measure the actual display refresh rate, then snaps to a standard FPS value (60, 30, 20, or 15) before engaging the spike-detection / smoothing logic. This prevents the first few seconds of play from having incorrect delta times.

Bug Fixes

  • RSArea: GetAreaBlockByID now also validates lod bounds (not just blockID).
  • RSCockpit: parseMONI_INST_RAWS_INFO now reads zoom_x/zoom_y correctly; ARTP/EJEC/GUNF always initialise from PAK archive.
  • RSHud: All TTAG sub-records (CLSR, TARG, NUMW, HUDM, IRNG, GFRC, MAXG, MACH, WAYP, RALT, LNDG, FLAP, SPDB, THRO, CALA) now read their z field before x/y. CIRC is now a typed MISD_CIRC struct instead of a raw byte vector. ASPD/ALTI/HEAD/LADD INFO blocks now parse their structured fields before the raw byte dump.
  • DebugGameFlow: null-pointer guard added before accessing shape dimensions in mission info rendering.
  • DebugStrike: Vector3D::Norm() replaced with Length(); AI pilot format string fixed (%d for integer speed).
  • DebugPacificStrikeMISN: setMission now correctly marked override.
  • DebugScreen: logical_width/logical_height initialised; local variable renamed to avoid shadowing width; Setup Mapping menu item added.
  • GameEngine::pumpEvents: mouse-to-legacy-space conversion uses logical_width/logical_height instead of physical pixel dimensions.
  • sc/main.cpp and debugger/main.cpp: GameEngine::init() and activity setup moved outside the loader thread to avoid race conditions.
  • vrstrike/main.cpp: config.ini is now loaded before initialising the VR screen.
  • ByteStream: const copy constructor and assignment operator added.
  • FrameBuffer::printText_SM: space character now advances cursor without attempting to look up a shape; newline line-height reduced by 1 pixel; inter-letter spacing reduced by 1 pixel; fixed-width advance corrected.
  • RSVGA: projection matrix setup moved from activate() into displayBuffer() so it is always set with the correct dimensions; vSync palette loop replaced with a pre-built LUT for performance; super_eagle_2x read from config.
  • RSMusic: initial SOUNDFX.ADL loading stub added.
  • RSEntity: PODR entity type parsed (parseREAL_OBJT_PODR / parseREAL_OBJT_PODR_DATA).

Build / Install Changes

  • Project version bumped to 0.4 in CMakeLists.txt.
  • config target added to the install set; vrstrike excluded on Apple platforms.
  • config.ini installed to the root install directory and copied to the build directory for all targets.
  • resources/config.rc (Windows app icon) added.
  • resources/default_bindings.cfg (637-entry default binding table) added.