Build: the BT412 compile gate -- one tree builds the pod game and the Steam game

option(BT412 ... ON) gates the steamification layer for the merge-back into
BT411, so the unified repo serves both fronts:

- Default (BT412=ON): pod/dev game + PadRIO / plasma / front end / lobby --
  all runtime-gated, so a -egg/-net launch still behaves as 4.11.
- Pod-minimal (-DBT412=OFF, build-pod/): compiles OUT L4PADRIO, L4PADBINDINGS,
  L4KEYLIGHT, L4PLASMASCREEN, L4STEAMTRANSPORT, btl4fe, btl4console, btl4lobby.
  Seam sites carry #ifdef BT412: L4CTRL.cpp PAD token (log + ignore), L4GREND.cpp
  L4PLASMA=SCREEN (log + ignore), L4VB16.cpp (inert PadRIO stub -- call sites
  identical in both flavors), btl4main.cpp (front-end/marshal/lobby blocks out;
  zero-arg launch = 4.11 behavior).
- The NetTransport seam ALWAYS compiles -- it is the wire for both flavors
  (WinsockNetTransport, verified byte-identical to the pre-seam arcade path).
- BT412_STEAM now requires BT412 (configure-time FATAL_ERROR; negative-tested).

Verified: OFF -- clean v143 link, solo DEV.EGG mission runs (31 subsystems
tick, gait, targeting). ON -- zero-arg launch engages the front-end menu.
STEAM -- links clean, ships steam_api.dll.

Also: README/context docs for the flavors + the merge-back; corrected the stale
Phase 3b DEFERRED note (the single-window cockpit landed 07-16) and the README's
leftover 0xBD3 valve-gate claim (it is a damage/explosion hub).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-17 15:45:45 -05:00
co-authored by Claude Fable 5
parent 0434585566
commit 335396912e
10 changed files with 177 additions and 48 deletions
+1
View File
@@ -1,5 +1,6 @@
# build output
/build/
/build-pod/
/build-steam/
# packaged distribution (pack-dist.ps1 output) + its zip
+7 -2
View File
@@ -12,8 +12,13 @@ top of the working WinTesla engine. This repo carries that forward to a consumer
virtual cockpit controls (no pod hardware), single-window cockpit, in-game session front end
replacing the operator console, Steam internet multiplayer, distributable packaging.
**Repo of record:** the top-level `CMakeLists.txt` + `README.md` build `btl4.exe`. Layout:
`engine/ game/ content/ docs/ reference/ tools/ context/`. Remote: `origin` =
`VWE/BT412.git` ONLY — this repo must never touch the BT411 remote (no cross-pull remote).
`engine/ game/ content/ docs/ reference/ tools/ context/`. **One tree, both lines
(2026-07-17):** the steamification was merged BACK into BT411 — the same tree builds the
pod game and the Steam game behind the **`BT412` CMake gate** (default ON; `-DBT412=OFF` =
pod-minimal; see `context/steamification.md` §merge-back + `context/build-and-run.md`
§Build flavors). Remote rule: each checkout talks ONLY to its own gitea remote
(`C:\VWE\BT412``VWE/BT412.git`, `C:\VWE\BT411``VWE/BT411.git`); cross-repo sync is
local-path fetch only — never add a cross remote.
**Current front:** the steamification — plan and phase order in `docs/BT412-ROADMAP.md`, running
status in `context/steamification.md`. Subsystem-fidelity reconstruction continues alongside.
Details + what's-next: `context/project-overview.md`, `context/open-questions.md`, recent git log.
+49 -18
View File
@@ -11,11 +11,23 @@ set(CMAKE_CXX_STANDARD 14)
# --- external dependency: legacy DirectX SDK (June 2010); override with -DDXSDK=... ---
set(DXSDK "C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)" CACHE PATH "Legacy DirectX SDK root")
# --- BT412 steamification layer (compile gate): PadRIO virtual cockpit input,
# desktop PlasmaScreen, KeyLight, the in-game front end + LocalConsole
# marshal + Steam lobby. ON by default -- every piece is runtime-inert on
# a pod (env/arg gated: L4CONTROLS=PAD, L4PLASMA=SCREEN, zero-arg launch).
# -DBT412=OFF builds the minimal pod image: the BT411 baseline plus the
# NetTransport seam, which is the wire for BOTH flavors (WinsockNetTransport
# default, verified byte-identical to the pre-seam arcade behavior). ---
option(BT412 "Steamification layer: PadRIO, plasma screen, front end, lobby" ON)
# --- Steam networking (internet multiplayer): OFF by default so the LAN/dev
# TCP path builds with no Steamworks dependency. ON vendors the SDK at
# extern/steamworks_sdk_164 and ships steam_api.dll. ---
option(BT412_STEAM "Build the Steam Networking Sockets transport (ISteamNetworkingSockets)" OFF)
set(STEAMWORKS "${CMAKE_SOURCE_DIR}/extern/steamworks_sdk_164/sdk" CACHE PATH "Vendored Steamworks SDK root")
if(BT412_STEAM AND NOT BT412)
message(FATAL_ERROR "BT412_STEAM requires the BT412 layer (configure with -DBT412=ON)")
endif()
set(BT_DEFS WIN32 _WINDOWS UNICODE _UNICODE NOMINMAX
_CRT_SECURE_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS
@@ -211,14 +223,9 @@ add_library(munga_engine STATIC
"engine/MUNGA_L4/L4MPPR.cpp"
"engine/MUNGA_L4/L4NET.CPP"
"engine/MUNGA_L4/L4NETTRANSPORT.cpp"
"engine/MUNGA_L4/L4STEAMTRANSPORT.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/L4PLASMASCREEN.cpp"
"engine/MUNGA_L4/L4RIO.cpp"
"engine/MUNGA_L4/L4SERIAL.cpp"
"engine/MUNGA_L4/L4SPLR.cpp"
@@ -243,9 +250,30 @@ target_include_directories(munga_engine BEFORE PRIVATE
target_compile_definitions(munga_engine PRIVATE ${BT_DEFS})
target_compile_options(munga_engine PRIVATE ${BT_OPTS})
# --- Steam transport (opt-in): the seam (L4NETTRANSPORT) always compiles;
# L4STEAMTRANSPORT.cpp is a no-op TU unless BT412_STEAM is defined, then it
# needs the Steamworks headers. The engine builds /Zp1; Steam headers are
# --- BT412 layer TUs (compile gate): PadRIO + bindings + KeyLight + the
# desktop PlasmaScreen + the Steam transport TU. The seam (L4NETTRANSPORT)
# always compiles -- it is the wire for both flavors. L4STEAMTRANSPORT.cpp
# is a no-op TU unless BT412_STEAM is also defined. ---
if(BT412)
target_sources(munga_engine PRIVATE
"engine/MUNGA_L4/L4PADBINDINGS.cpp"
"engine/MUNGA_L4/L4PADRIO.cpp"
"engine/MUNGA_L4/L4KEYLIGHT.cpp"
"engine/MUNGA_L4/L4PLASMASCREEN.cpp"
"engine/MUNGA_L4/L4STEAMTRANSPORT.cpp")
target_compile_definitions(munga_engine PRIVATE BT412)
# 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-")
message(STATUS "BT412: steamification layer ENABLED (PadRIO/plasma/front end/lobby)")
else()
message(STATUS "BT412: steamification layer OFF -- pod-minimal build (BT411 baseline + NetTransport seam)")
endif()
# --- Steam transport (opt-in): the engine builds /Zp1; Steam headers are
# wrapped in #pragma pack(push,8) inside the TU, so no per-file packing
# override is needed here (unlike RP412, whose /Zp1 was project-wide). ---
if(BT412_STEAM)
@@ -254,13 +282,6 @@ if(BT412_STEAM)
message(STATUS "BT412: Steam Networking Sockets transport ENABLED")
endif()
# 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
@@ -270,9 +291,6 @@ add_library(bt410_l4 STATIC
"game/reconstructed/ammobin.cpp"
"game/reconstructed/btdirect.cpp"
"game/reconstructed/btl4app.cpp"
"game/reconstructed/btl4fe.cpp"
"game/reconstructed/btl4console.cpp"
"game/reconstructed/btl4lobby.cpp"
"game/reconstructed/btl4galm.cpp"
"game/reconstructed/btl4gau2.cpp"
"game/reconstructed/btl4gau3.cpp"
@@ -337,6 +355,15 @@ target_include_directories(bt410_l4 BEFORE PRIVATE
"${DXSDK}/Include")
target_compile_definitions(bt410_l4 PRIVATE ${BT_DEFS})
target_compile_options(bt410_l4 PRIVATE ${BT_OPTS})
# --- BT412 layer TUs (compile gate): the front end (menu + egg builder), the
# in-process LocalConsole marshal, and the Steam lobby. ---
if(BT412)
target_sources(bt410_l4 PRIVATE
"game/reconstructed/btl4fe.cpp"
"game/reconstructed/btl4console.cpp"
"game/reconstructed/btl4lobby.cpp")
target_compile_definitions(bt410_l4 PRIVATE BT412)
endif()
# --- Steam lobby (btl4lobby.cpp) lives in this lib; under BT412_STEAM it needs
# the gate define + the Steamworks headers (wrapped #pragma pack(push,8)). ---
if(BT412_STEAM)
@@ -357,6 +384,10 @@ target_include_directories(btl4 BEFORE PRIVATE
"${DXSDK}/Include")
target_compile_definitions(btl4 PRIVATE ${BT_DEFS})
target_compile_options(btl4 PRIVATE ${BT_OPTS})
# --- BT412 layer (compile gate): WinMain's front-end/marshal/lobby blocks. ---
if(BT412)
target_compile_definitions(btl4 PRIVATE BT412)
endif()
target_link_libraries(btl4 PRIVATE
bt410_l4
munga_engine
+19 -5
View File
@@ -8,7 +8,14 @@ that reconstruction:
|------------|-------------|
| **BattleTech 4.10** | The original pod game — DOS-era MUNGA engine, serial RIO cockpit I/O, 7-monitor cockpit, operator console |
| **BattleTech 4.11** | The **Win32 port** — the BT game logic reconstructed from `BTL4OPT.EXE` on the shared RP411 Windows engine; DirectX 9, full single-player combat loop, two-instance LAN multiplayer |
| **BattleTech 4.12** | **This repo: the Steamification of 4.11** — the same engine, missions, and wire protocol, made distributable on Steam and playable over the internet with no pod hardware |
| **BattleTech 4.12** | **The Steamification of 4.11** — the same engine, missions, and wire protocol, made distributable on Steam and playable over the internet with no pod hardware |
**One tree, both lines (2026-07-17):** the 4.12 steamification was merged back into BT411, so the
same repo builds the **pod game** and the **consumer/Steam game**. The steamification layer
(PadRIO virtual cockpit, desktop plasma, in-game front end, Steam lobby/transport) sits behind the
**`BT412` compile gate** (CMake option, default ON) — see *Build flavors* below. Everything under
the gate is also runtime-inert without its env/arg triggers, so a default build still behaves as a
pod/dev 4.11 binary when launched the pod way (`-egg` / `-net`).
The plan and workstreams live in [docs/BT412-ROADMAP.md](docs/BT412-ROADMAP.md). The sister
project **RP412** (Red Planet's steamification, shipped end-to-end: lobby → Steam-sockets mesh →
@@ -71,6 +78,14 @@ cmake -S . -B build -G "Visual Studio 17 2022" -A Win32 ^
cmake --build build --config Debug
```
### Build flavors (the `BT412` compile gate)
| Flavor | Configure | What you get |
|--------|-----------|--------------|
| **Default** (`BT412=ON`) | as above | Pod/dev game **plus** the steamification layer: PadRIO (`L4CONTROLS=PAD`), desktop plasma (`L4PLASMA=SCREEN`), single-window cockpit (`L4MFDSPLIT=1`), zero-arg front end + LocalConsole marshal. All runtime-gated — a `-egg`/`-net` launch behaves as 4.11. |
| **Pod-minimal** (`-DBT412=OFF`, dir `build-pod`) | `... -B build-pod -DBT412=OFF` | The 4.11 pod image: PadRIO/plasma/KeyLight/front end/lobby/Steam transport are **compiled out**. The NetTransport seam stays (it is the wire for both flavors; `WinsockNetTransport` is byte-identical to the pre-seam arcade behavior). Gated env/args are ignored with a log line. |
| **Steam** (`-DBT412_STEAM=ON`, dir `build-steam`) | `... -B build-steam -DBT412_STEAM=ON` | Default flavor + the `ISteamNetworkingSockets` transport and lobby (vendored SDK at `extern/steamworks_sdk_164`); ships `steam_api.dll`. Requires `BT412=ON` (enforced at configure). Packaged by `pack-dist.ps1`. |
Must be **Win32** — the DirectX SDK link libs are `Lib/x86`. The link uses `/FORCE:MULTIPLE`: the
1995 headers define free functions/globals without `inline`/`extern`, so identical symbols appear
in many translation units (~124 `LNK2005`); `MULTIPLE` keeps the first. `UNRESOLVED` is gone as of
@@ -115,10 +130,9 @@ command. Entity + movement replication works; cross-pod combat is in progress.
The engine, renderer, audio, HAL, build, locomotion, collision, damage, render fidelity, the full
cockpit **gauge / MFD system** (every config binding resolves + every widget builds), and the
projectile / missile weapon families are done. Active fronts: per-subsystem polish (the gyroscope
integrator; the `0xBD3` message manager that gates the valve / status-message control routes) and
cross-pod MP combat. `reference/decomp/` holds the raw pseudocode every reconstruction is verified
against.
projectile / missile weapon families are done. Active fronts: the steamification (roadmap phases —
live multi-machine Steam test + packaging/release remain), per-subsystem polish, and cross-pod MP
combat. `reference/decomp/` holds the raw pseudocode every reconstruction is verified against.
**Start with `CLAUDE.md`** — it is the router into the progressive knowledge base: a quick-lookup
table pointing to the `context/*.md` topic files (loaded on demand), the evidence-tier and
+16
View File
@@ -21,6 +21,22 @@ cmake -S . -B build -G "Visual Studio 17 2022" -A Win32 \
# build:
cmake --build build --config Debug
```
### Build flavors — the `BT412` compile gate (2026-07-17, merge-back into BT411)
One tree builds both lines; `option(BT412 ... ON)` gates the steamification layer. [T2]
- **Default (`BT412=ON`)** — pod/dev game + PadRIO/plasma/front end/lobby (all runtime-gated;
a `-egg`/`-net` launch behaves as 4.11). Compile definition `BT412` set on all 3 targets.
- **Pod-minimal (`-DBT412=OFF`, dir `build-pod/`)** — compiles OUT `L4PADRIO`, `L4PADBINDINGS`,
`L4KEYLIGHT`, `L4PLASMASCREEN`, `L4STEAMTRANSPORT`, `btl4fe`, `btl4console`, `btl4lobby`.
Seam sites carry `#ifdef BT412`: `L4CTRL.cpp` PAD token (log + ignore), `L4GREND.cpp`
`L4PLASMA=SCREEN` (log + ignore), `L4VB16.cpp` (inert `PadRIO` stub struct — call sites
identical in both flavors), `btl4main.cpp` (front-end/marshal/lobby blocks compile out;
zero-arg launch = 4.11 behavior). The **NetTransport seam always compiles** — it is the wire
for both flavors (`WinsockNetTransport` verified byte-identical to pre-seam arcade behavior).
Verified: clean v143 link (no unresolved), solo `-egg DEV.EGG` runs (31 subsystems tick, gait,
targeting).
- **Steam (`-DBT412_STEAM=ON`, dir `build-steam/`)** — requires `BT412=ON` (configure-time
`FATAL_ERROR` otherwise; negative-tested).
- Links DXSDK d3d9/d3dx9/dinput8 + OpenAL/libsndfile (`engine/lib/`). DXSDK June 2010 at
`C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\` (overridable `-DDXSDK`). [T2]
- Linker uses **`/FORCE:MULTIPLE`** — tolerates the ~124 header-defined-global LNK2005s.
+45 -23
View File
@@ -19,11 +19,35 @@ implementation — its git history from commit `467934c` onward is the steamific
grouped roughly: toolchain → PadRIO input → MFD-split cockpit → front end/LocalConsole
→ NetTransport/Steam sockets → lobby → bindings/KeyLight → packaging.
**Repo rule [T0]:** `origin` = `VWE/BT412.git` only. This repo must never touch the
BT411 **remote** (the gitea URL) — no remote, no fetch/push to it. Forked at BT411
`4e72f0c` (2026-07-14). *Bringing BT411 work forward is allowed via a **local-path**
merge (`git fetch C:/vwe/BT411 master`) — that never contacts the gitea BT411 remote;
see the merge note below.*
**Repo rule [T0]:** each checkout talks ONLY to its own gitea remote — `C:\VWE\BT412`
`origin` = `VWE/BT412.git`, `C:\VWE\BT411` `origin` = `VWE/BT411.git`. Cross-repo sync
is **local-path only** (`git fetch C:/VWE/BT412 master` from BT411 and vice versa) —
never a cross remote. Forked at BT411 `4e72f0c` (2026-07-14); **merged back 2026-07-17**
(see the merge-back section below) — BT411 is now the unified repo carrying both lines
behind the `BT412` compile gate.
## Merge-back into BT411 + the `BT412` compile gate (2026-07-17)
The whole steamification line was merged **back into BT411** so one repo serves both
fronts (pod work + internet MP). Mechanics [T2]:
- BT411's head was exactly `abed41e` — the catch-up point BT412 had already merged —
so the merge was a clean **fast-forward** of BT411 onto BT412's line via a
local-path fetch (no gitea remote touched from either side). BT411's dirty
`run/run.cmd` bench edit (pod `-net 1501` restart loop) was stashed and restored.
- **Compile gate:** CMake `option(BT412 ... ON)` + compile definition `BT412` on all
three targets. Gated OUT under `-DBT412=OFF` (the pod-minimal flavor, `build-pod/`):
`L4PADRIO`, `L4PADBINDINGS`, `L4KEYLIGHT`, `L4PLASMASCREEN`, `L4STEAMTRANSPORT`,
`btl4fe`, `btl4console`, `btl4lobby`, plus `#ifdef BT412` seams in `L4CTRL.cpp`
(PAD token), `L4GREND.cpp` (`L4PLASMA=SCREEN`), `L4VB16.cpp` (inert `PadRIO` stub),
`btl4main.cpp` (front-end/marshal/lobby blocks; zero-arg = 4.11 behavior). The
**NetTransport seam always compiles** (the wire for both flavors). `BT412_STEAM`
requires `BT412` (configure-time `FATAL_ERROR`, negative-tested). All three flavors
verified: OFF solo mission un-regressed (31 subsystems, gait, targeting); ON zero-arg
front end engages; STEAM links + ships `steam_api.dll`. Details:
[[build-and-run]] §Build flavors.
- `handoff/padrio/` (the interim BT411 transfer copy, commit `2e475f4`) was retired —
superseded by the merge itself (the real modules now live in BT411; a drifting
duplicate in the same tree would be a hazard).
## BT411 catch-up merge (2026-07-14)
@@ -93,23 +117,16 @@ Verified after merge: clean build; solo front-end mode; loopback MP through the
Verified: a window titled "Plasma Display" opens and the game ticks normally beside it
(`L4GAUGE=640x480x16 L4PLASMA=SCREEN`). Note: the `L4GAUGE` gauge path binds a listen
socket at startup → a first-run Windows Firewall prompt (expected; unrelated to plasma).
- **Phase 3b (single-window MFD-split cockpit, `L4MFDSPLIT=1`) — DEFERRED 2026-07-14.**
Two blockers make this the wrong thing to land now:
1. **No BT cockpit-layout geometry.** RP412's `L4MFDVIEW` button-bank anchors/addresses
come from vRIO's `CockpitLayout` for the Red Planet pod; vRIO has **zero** BattleTech
data. The BT pod's panel geometry has no reference (needs pod photos / `l4gauge.cfg`
mining / Nick) — the clickable lamp-lit banks can't be authentically placed.
2. **BT's MFD compositing is an unfinished upstream beachhead.** Per `docs/GAUGE_COMPOSITE.md`,
only the radar/secondary surface composites on a dev box; the five mono MFDs don't
render yet (port-name mismatch, Step 2). RP412's split panes would be empty until that
upstream work lands.
3. **Merge is HIGH-risk** (quantified above): BT's 521-line L4VB16 divergence (dev-gauge
docking + a 476-line block) overlaps RP412's 402-line split rewrite in the ctor and
`Update` regions — a true hand-merge, not a drop-in. The 3-way diffs are staged in the
scratchpad (`rp412-L4VB16.diff`, `bt-L4VB16.diff`).
Prerequisite order when resumed: finish BT's MFD dev-composite (GAUGE_COMPOSITE.md Steps
23) → obtain BT cockpit geometry → then hand-merge `MFDSplitView`. Until then the game
ships single-window with the dev-gauge dock (`BT_DEV_GAUGES`) as its cockpit composite.
- **Phase 3b (single-window MFD-split cockpit, `L4MFDSPLIT=1`) — DONE 2026-07-16**
(initially deferred 2026-07-14; the blockers fell). Landed across commits `0c964c0`
`59c454b` + `2b238a8`: the 1920×1080 single-window cockpit arrangement (RP412 layout)
via the `L4VB16.cpp` hand-merge, on-screen clickable lamp-lit RIO button banks framing
the MFDs (4-above/4-below strips — BT-derived placement, not vRIO geometry, which has
no BT data), green MFD phosphor tint, button-lamp bitfield decode (subdued idle
baseline), `L4CONTROLS=PAD` as the cockpit default (before the DEV keyboard default),
the gauge NULL-source guard extended to the split path, and the backtick (`) toggle
for the secondary displays. Mouse presses inject into PadRIO as screen buttons
(`BTPadRIOScreenButton`, WndProc → `L4VB16.cpp`). [T2]
- **Phase 4 (NetTransport seam + Steam transport) — DONE 2026-07-14.** `L4NET.CPP`
taken from RP412 post-seam (all ~24 Winsock call sites now route through
`NetTransport_Get()`); BT's 3 `BT_NET_TRACE` blocks re-sited onto their code anchors
@@ -203,7 +220,12 @@ Verified after merge: clean build; solo front-end mode; loopback MP through the
machines) — untestable here (needs Steam + ≥2 accounts/machines). Procedure:
`docs/STEAM-3-MACHINE-TEST.md`. The lobby object does NOT survive the per-mission relaunch
(single-binary limitation — everyone returns to a fresh menu, not the room).
- Phase 7: packaging (`pack-dist.ps1`), KeyLight, release — remain.
- **Phase 7 (packaging) — IN PROGRESS.** `pack-dist.ps1` landed (assembles a runnable
Steam test dist; wraps the zip in a single `BT412/` folder). KeyLight landed with
Phase 2 (`L4KEYLIGHT`, gate `BT412KEYLIGHT`). Remaining: release proper (real Steam
AppID, store assets, depot config) + the Phase 6 live 3-machine test.
- **Merge-back into BT411 — DONE 2026-07-17** (see the merge-back section above): one
repo, both lines, behind the `BT412` compile gate.
## The seams (what plugs in where) [T0 unless noted]
+9
View File
@@ -1,7 +1,9 @@
#include "mungal4.h"
#pragma hdrstop
#ifdef BT412
#include "l4padrio.h"
#endif
#include "l4ctrl.h"
#include "l4keybd.h"
@@ -834,6 +836,7 @@ LBE4ControlsManager::LBE4ControlsManager():
}
else if (strcmpi(temp, "PAD") == 0)
{
#ifdef BT412
//------------------------------------------------------
// Cockpit-less play: PadRIO speaks the RIO control
// surface from an XInput pad + the PC keyboard, so the
@@ -844,6 +847,12 @@ LBE4ControlsManager::LBE4ControlsManager():
Register_Object(rioPointer);
flags.RIOExists = 1;
primaryControlType = LBE4ControlsManager::PrimaryRIO;
#else
// BT412=OFF (pod-minimal build): PadRIO is compiled out;
// the token is ignored and a later token (KEYBOARD) or the
// no-device default carries the controls, as on BT411.
Tell("L4CONTROLS=PAD ignored: PadRIO not in this build (BT412=OFF)\n");
#endif
}
}
while (temp[0] != '\0');
+9
View File
@@ -7,7 +7,9 @@
#include "l4gauge.h"
#include "..\munga\mission.h"
#include "l4plasma.h"
#ifdef BT412
#include "l4plasmascreen.h"
#endif
#include "..\munga\notation.h"
// #define LOCAL_TEST
@@ -103,8 +105,15 @@ L4GaugeRenderer::L4GaugeRenderer(bool windowed, int *secondaryIndex, int *aux1In
//}
if (_stricmp(plasma_string, "SCREEN") == 0)
{
#ifdef BT412
Tell("Plasma display created as an on-screen window\n");
externalDisplay = new PlasmaScreen();
#else
// BT412=OFF (pod-minimal build): the desktop PlasmaScreen is
// compiled out; no external display (Register below is
// NULL-guarded), as on BT411.
Tell("L4PLASMA=SCREEN ignored: PlasmaScreen not in this build (BT412=OFF)\n");
#endif
}
else
{
+12
View File
@@ -1,5 +1,17 @@
#include "mungal4.h"
#ifdef BT412
#include "l4padrio.h" // PadRIO::GetLampState / SetScreenButton (cockpit buttons)
#else
// BT412=OFF (pod-minimal build): PadRIO is compiled out. This inert stub
// keeps every call site below identical in both flavors -- the on-screen
// cockpit buttons draw unlit and screen-button presses are ignored.
struct PadRIO
{
static int IsActive() { return 0; }
static int GetLampState(int) { return 0; }
static void SetScreenButton(int, int) {}
};
#endif
#pragma hdrstop
#include "l4vb16.h"
+10
View File
@@ -272,8 +272,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
// platform-profile block, so the DEV keyboard default (below) does not win
// (that left the RIO controls inert). An explicit L4CONTROLS still
// overrides (e.g. L4CONTROLS=RIO for a real serial board).
#ifdef BT412
if (getenv("L4MFDSPLIT") != NULL && getenv("L4CONTROLS") == NULL)
putenv("L4CONTROLS=PAD");
#endif
int gBTPlatformPod = 0;
{
@@ -552,7 +554,12 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
// per mission, and it sidesteps BT's in-process re-init fragility (the
// reconstructed gBT* globals hold per-mission entity pointers that a
// second in-process mission would trip over). `-egg`/`-net` = single pass.
//
// BT412=OFF (pod-minimal build): the front end / marshal / lobby are
// compiled out -- a zero-arg launch behaves as on BT411 (no menu), and
// `-egg`/`-net` runs are identical in both flavors.
//=======================================================================//
#ifdef BT412
extern int BTFrontEnd_Run();
extern int BTFrontEnd_LastMissionSeconds();
extern int BTFrontEnd_LastLaunchMode();
@@ -630,6 +637,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
<< secs << "s)" << std::endl << std::flush;
}
}
#endif // BT412
{
std::cout << "[boot] opening btl4.res..." << std::endl << std::flush;
@@ -677,6 +685,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
Stop_Registering();
#ifdef BT412
//-------------------------------------------------------------------//
// LAUNCHER ROLE: if the marshal ended this front-end mission (the
// selected time expired), relaunch a fresh instance -- it front-end-modes
@@ -714,6 +723,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
<< std::endl << std::flush;
}
}
#endif // BT412
return Exit_Code;
}