Input: PadRIO -- play without the pod (L4CONTROLS=PAD), Workstream A.1

Ported from RP412: RIOBase split out of the serial RIO (L4RIO.h),
rioPointer is RIOBase* (L4CTRL.h), PAD token -> new PadRIO() speaking
the RIO surface from an XInput pad + keyboard (L4PADRIO/L4PADBINDINGS,
vRIO bindings.txt grammar, hot-plug), KeyLight RGB mirror TU
(BT412KEYLIGHT, /std:c++17 per-file).

BT-side fixes PadRIO forced into the open:
- Both keyboard input bridges (mech4.cpp, mechmppr.cpp BT_KEY_BRIDGE)
  stand down when a RIO device exists -- they overwrote the engine
  controls push every frame. M/X conveniences stay live.
- Mapper attribute chain OFF BY ONE (latent real-pod bug): the DOS
  chain below MechControlsMapper carried two base attributes, WinTesla
  carries one, and AttributeIndexSet::Find is positional -- the .CTL
  stick mapping wrote throttlePosition. Pad slot + binary-locked enum;
  gotcha ledgered (reconstruction-gotchas #11).

Verified: PAD throttle lever ramps + sticks, stick turns with the
authentic speed-vs-turn clamp (61.5 -> 22.0 u/s), mech drives; keyboard
fallback intact (BT_FORCE_THROTTLE harness). New diags: BT_CTRLMAP_LOG,
BT_STICK_LOG. (Phase 2 of docs/BT412-ROADMAP.md)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-14 08:16:33 -05:00
co-authored by Claude Fable 5
parent 55e4295dc3
commit fe97746a51
17 changed files with 2050 additions and 60 deletions
+10
View File
@@ -200,6 +200,9 @@ add_library(munga_engine STATIC
"engine/MUNGA_L4/L4NET.CPP"
"engine/MUNGA_L4/L4PARTICLES.cpp"
"engine/MUNGA_L4/L4PCSPAK.cpp"
"engine/MUNGA_L4/L4PADBINDINGS.cpp"
"engine/MUNGA_L4/L4PADRIO.cpp"
"engine/MUNGA_L4/L4KEYLIGHT.cpp"
"engine/MUNGA_L4/L4PLASMA.cpp"
"engine/MUNGA_L4/L4RIO.cpp"
"engine/MUNGA_L4/L4SERIAL.cpp"
@@ -225,6 +228,13 @@ target_include_directories(munga_engine BEFORE PRIVATE
target_compile_definitions(munga_engine PRIVATE ${BT_DEFS})
target_compile_options(munga_engine PRIVATE ${BT_OPTS})
# L4KEYLIGHT (RGB keyboard lamp mirror) is C++/WinRT: it needs C++17 and
# conformance mode, and must not include engine headers (see its header
# comment). The engine's /std:c++14 is overridden per-file; MSVC takes the
# last /std on the command line.
set_source_files_properties("engine/MUNGA_L4/L4KEYLIGHT.cpp" PROPERTIES
COMPILE_OPTIONS "/std:c++17;/permissive-")
#===========================================================================#
# Game logic: reconstructed BT modules + surviving-original BT source.
# Headers come from game/original/BT{,_L4} and the game/fwd shims