- mods/widescreen: redirect the world view's reads of the 1024.0/768.0
constants and the 3D ortho extents to our variables; render size =
monitor; relocate the world view's tile draw list (1750 entries, no
bounds check) into an enlarged object (16384 entries).
- mods/dxwrapper: route DirectDraw through dxwrapper (Dd7to9, D3D9) since
Windows' D3D7 cannot render to targets larger than 2048; fix the game's
device info GUID pointer that dxwrapper's enumeration leaves invalid.
Pinned release fetched by CMake (hash-checked), installed next to the DLL.
- Main menu (UI thread) and loading screen render in a 1024x768 viewport
and are presented scaled ("classic" layout); in-game uses the full size.
- re/patch: verified code patches (operand redirect, push immediates,
displacements) and startup hooks; build.ps1/CMake download fixes.
In-game view untested yet; HUD still at the top-left.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
22 lines
1.3 KiB
PowerShell
22 lines
1.3 KiB
PowerShell
# Configure + build from any shell: enters the x86 MSVC environment first.
|
|
# .\build.ps1 # x86-debug
|
|
# .\build.ps1 x86-release
|
|
param([string]$Preset = "x86-debug")
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
|
|
$vs = & $vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
|
|
if (-not $vs) { throw "MSVC x86 tools not found (install VS Build Tools with 'Desktop development with C++')." }
|
|
$vcvars = Join-Path $vs "VC\Auxiliary\Build\vcvarsall.bat"
|
|
# vcvarsall itself calls vswhere and expects it on PATH.
|
|
$env:PATH = "$(Split-Path $vswhere);$env:PATH"
|
|
|
|
# Configure only once: the build re-runs CMake itself when needed, and
|
|
# re-configuring here would clash with VS Code's CMake Tools, which caches
|
|
# the full path of cl.exe instead of the preset's plain "cl".
|
|
$configure = if (Test-Path "build\$Preset\CMakeCache.txt") { "" } else { "cmake --preset $Preset && " }
|
|
# 2>&1 inside cmd: Windows PowerShell turns any native stderr line (e.g. CMake's
|
|
# download progress) into a terminating error under ErrorActionPreference=Stop.
|
|
cmd /c "`"$vcvars`" x86 >nul && $configure cmake --build --preset $Preset 2>&1"
|
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|