From 72e1e59d8e0626894b853eb029bbf0de9cb10629 Mon Sep 17 00:00:00 2001 From: RT Date: Sun, 19 Jul 2026 19:55:46 -0500 Subject: [PATCH] CLAUDE.md: document eaa5fd3 through 5.1.0b-in-progress work MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - MFD mode 4 right-device stagger fix (eaa5fd3): cycle diagram, files touched - Linuxβ†’Windows rsync workflow: sync-to-windows.sh (55b9bfc5) - ddraw.dll removed from repo; build-resources.ps1 moves it aside (0ceba9c7, 24825ff3) - ConLobby V5.1.0b1 / Super6 6-mech rotation from Highlight (c768f7c4) - CRIOMAIN.CPP Korean translation + RIO poll timeout scaling; CRLF hazard note; min/max undeclared in VC6 in this TU (16fca6c4, a712002f) - 16 pilots + 1 cameraship: NetworkMaxPlayers formula, fall-through break warning (f76dc05f) --- CLAUDE.md | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index ed40b9a7..2acdb231 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -795,6 +795,75 @@ keeping old-RIO (type 0) protocol behavior byte-identical: alongside `mw4print.exe`. - Version bumped to **2.0**, copyright year updated to **2026**. +## πŸ“‹ MFD mode 4: right device stagger fix (2026-07-18, eaa5fd3) +Root cause: `CMFD_Device::BeginScene()` cleared BOTH MFD device back-buffers at `sh_step==0`. +But in mode 4 the right MFD flip also fires at `sh_step==1` (= old `sh_step==0` after the +stagger increment), so it presented a just-cleared buffer β€” only the grid, no channel data. + +Fix: `BeginScene()` now only clears/grids the LEFT device at `sh_step==0`. New `BeginSceneRight()` +(added to `render.cpp` / `render.hpp`, called from `WinMain.cpp`) clears/grids the RIGHT device at +`sh_step==1` β€” one frame AFTER the right flip β€” so channels 3–4 render into a fresh buffer before +the next flip. Mode 1 is unchanged. + +Mode 4 cycle (with stagger): +- `sh_step 0`: radar + left `BeginScene` (clear + grid); no flip +- `sh_step 1`: flip right MFD (shows channels 3–4 from previous cycle) + right `BeginScene` (clear + grid) +- `sh_step 2–4`: channels 0–2 β†’ left device +- `sh_step 5–6`: channels 3–4 β†’ right device +- `sh_step 0` (next): flip radar + left MFD (shows channels 0–2 from previous cycle) + +Files: `CoreTech/Libraries/GameOS/WinMain.cpp`, `render.cpp`, `render.hpp`. + +## πŸ“‹ Linuxβ†’Windows development workflow (2026-07-19, 55b9bfc5) +`build-env/sync-to-windows.sh` β€” rsync script that pushes all source, content, toolchain, and +assets to the Windows build machine at `/vwe/firestorm`. Excludes generated build outputs +(`rel.bin/`, `dbg.bin/`, `*.mw4`, `*.dep`), `.git`/LFS objects, `_UNUSED/`, and the game deploy +dir (`MW4/`). Run from Linux before triggering a Windows build. + +## πŸ“‹ ddraw.dll removed from repo; build script moves it aside (2026-07-19, 0ceba9c7, 24825ff3) +`Gameleap/mw4/ddraw.dll` (DDrawCompat) removed from git (was LFS-tracked); now lives as +`ddraw.dll.old` in the same dir for reference. `deploy-editor.ps1` installs DDrawCompat as +`ddraw.dll` at deploy time (the editor needs it for its windowed D3D7 viewport). +`build-resources.ps1` moves `ddraw.dll` aside (`.buildaside`) before running `MW4pro.exe` +because **DDrawCompat is fatal to MW4pro.exe in BOTH windowed and fullscreen modes**, then +restores it in `finally`. The same block also defensively covers dgVoodoo2 interceptors +(`D3D8/D3D9/D3DImm.dll`) in case they reappear. + +## πŸ“‹ Branch `5.1.0b-in-progress`: multiplayer + RIO + source cleanup (2026-07-19) + +### ConLobby V5.1.0b1 β€” Super6 mech rotation (c768f7c4) +Changes from Buddy 'Highlight' Taylor (MCHL), merged manually: +- Console version string bumped to **V5.1.0b1**. +- `ROOKIEMECH` defines expanded from 4 β†’ **6 mechs**: added Archer (ID=1) and Warhammer (ID=62). +- 16-slot default assignments cycle through all 6 Super6 mechs. +- Right-click randomizer expanded from `random(0,3)` β†’ `random(0,5)`. + +### CRIOMAIN.CPP β€” Korean translation + RIO poll timeout scaling (16fca6c4, a712002f) +- Translated all EUC-KR/CP949 Korean developer comments (~35 lines) to English. File re-saved + as clean UTF-8. CRLF line endings preserved (`* -text` in `.gitattributes`). + ⚠️ **Encoding hazard:** always read/write CRIOMAIN.CPP as binary (or with an explicit encoding + codec). Python text-mode `readlines()` silently strips `\r`, causing a 3000+-line git diff when + every line's `\r\n` becomes `\n`. If that happens, restore CRLF with `re.sub(b'(?m_maxPlayers + (CTCL_GetTeslaCountAll() - CTCL_GetTeslaCount())`. + The delta = camera-only seats (Tesla seats not assigned to pilots), reserving one extra + DirectPlay slot per cameraship so the 17th connection isn't rejected. +- `SetNetworkMissionParamater / PLAYER_LIMIT_PARAMETER`: same formula applied at runtime when + host changes the player limit. `gos_NetServerCommands(gos_Commend_UpdateMaxPlayers)` still called; + `break` must be present in this case (was accidentally dropped once β€” fall-through to + `JOIN_IN_PROGRESS_PARAMETER` corrupts `m_joinInProgress`). +- COOP branch unchanged (capped at 9+bots; no camera seat needed there). + +`ConLobby.script`: launch guard `nTempPlayerCount > 16` raised to `> 17` so the cameraship +connection doesn't trigger "Too many player/bots". + ## Next steps (proposed) - [x] ~~Windowed 3D viewport on Win11~~ β€” DONE via DDrawCompat (see STEP 8 viewport section). - [ ] (Optional) Curate remaining WIP content as features are exercised (editor loads dev `Content\`).