Skip to content

fixes_031_build

Pre-release
Pre-release

Choose a tag to compare

@remileonard remileonard released this 28 Feb 15:59
· 411 commits to master since this release

libRealSpace 0.3.1 — Release notes (from lcos_030_build → fixes_031_build)

Compare: lcos_030_build...fixes_031_build
Date: 2026-02-28

Highlights

  • Bumped version to 0.3.1.
  • New INI-based configuration support (SimpleIni) + shipped default assets/config.ini.
  • Input system improvements: joystick (raw SDL joystick) axis/button bindings + persistent default bindings file.
  • Cockpit/HUD & MFD improvements: new radar single-target view, damage MFD page, better targeting indicators, gunsight HUD offset adjustable in debugger.
  • Parser robustness & format coverage: IFF lexer bounds fix; additional REAL/MISN chunk handlers.

Added

  • Config system (SimpleIni)
    • Added src/engine/Config.cpp and src/engine/Config.hpp (singleton wrapper around SimpleIni).
    • vcpkg.json now depends on simpleini.
    • Engine CMake now locates and exposes SimpleIni include dir.
  • Default config file
    • Added resources/config.ini, copied into assets at build/install time.
  • Joystick support (raw SDL joystick)
    • New input types: JOYSTICK_BUTTON, JOYSTICK_AXIS.
    • Keyboard bindings expanded with bindJoystickButtonToAction / bindJoystickAxisToAction.
    • Debugger controller UI now enumerates joystick axes/buttons dynamically when not using SDL game controller mapping.
  • Persistent default bindings
    • GameEngine::initKeyboard() loads default_bindings.cfg if present, otherwise generates bindings and saves them.

Changed / Improved

  • Window sizing now configurable
    • GameEngine::init() reads Window.width / Window.height from config (with defaults).
    • src/executables/sc/main.cpp loads ./assets/config.ini and applies Window.width/height/fullscreen.
    • Debugger main also loads config (note: it reads Display.Width/Height keys—see “Notes / Potential follow-ups”).
  • SDL initialization
    • RSScreen and DebugScreen now initialize SDL with SDL_INIT_JOYSTICK in addition to game controller support.
    • Fullscreen window flags now include SDL_WINDOW_ALLOW_HIGHDPI.
  • Rendering
    • SCRenderer::renderWorldToTexture() now renders additional neighboring blocks around block_id (9 renders total).
  • Cockpit / HUD / MFD
    • Target projection code refactored into SCCockpit::project_to_screen.
    • HUD target indicator now uses shape assets (TARG->SHAPSET) and displays “in range” marker (MISD->SHAP) when applicable.
    • Added tracking of targetImpactPointWorld and optional debug drawing hooks.
    • Radar mode ASST now uses a dedicated single-target radar rendering implementation that shows only the current target and prints altitude/heading/speed next to it.
    • Added Damage MFD page (RenderMFDSDamage) and integrated it into both 2D and virtual cockpit rendering paths.
    • Camera MFD width calculation fixed (was incorrectly using height).
    • Gunsight HUD angular offset is now adjustable via a new debugger menu panel (“GunSight HUD angular offset”) and used in virtual cockpit.
  • Mission / audio behavior
    • SCMission tracks an in_combat flag set when an AI actor targets the player.
    • SCStrike::runFrame() switches music to track 5 during combat, otherwise uses mission tune.
  • Target selection
    • SCStrike::findTarget() now:
      • filters enemies within 30,000 units,
      • sorts candidates by distance,
      • cycles to the next target (instead of always snapping to nearest).
  • Camera look-at
    • setCameraLookat() now:
      • if target is very far (> 20000), uses plane forward direction instead of target framing,
      • passes an explicit up vector into camera->lookAt(...).
  • Palette LUT
    • BuildPaletteLUT() now searches only the green ramp [128..159] (instead of all 0..255) and uses 128 as the starting best index.

Fixed

  • IFFSaxLexer bounds/size handling
    • If the computed chunk_size + 8 exceeds available buffer at the start of parsing, the code now allocates a larger buffer, copies data, and reinitializes the stream to avoid overrun.
  • ByteStream destructor
    • Clears cursor pointer in destructor.
  • HUD shape parsing
    • RSHud::parseREAL_CHUD_LARG_TARG_SHAP() now builds an RSImageSet via PakArchive (and assigns SHAPSET) instead of manually LZW-decoding into an RLEShape.
  • Removed noisy debug prints
    • RSMapTextureSet texture dump spam removed; palette transparency print removed; some mission parsing prints removed.

Format / content parsing coverage

  • RSEntity now registers/accepts additional REAL chunk handlers (stubs added):
    • REAL:INFO
    • OBJT/TRCR:INFO
    • MISS/DYNM:{ATMO,GRAV,AGRV}
    • APPR/POLY/TRIS:LNTH
    • OBJT/ORNT:SIGN handler wiring added
  • RSMission now registers MISN:CACH (parser stub) and LOAD parsing was cleared out (now empty).

Packaging / build system

  • Top-level CMakeLists.txt
    • project version 0.3.0 → 0.3.1
    • assets now also copy MID_36.IFF and config.ini.
  • vcpkg.json
    • added dependency: simpleini