- Default render size is 768 high and as wide as the monitor aspect
(1835x768 on 3440x1440), scaled up: everything keeps the size players
know and the view only grows sideways. Height=0 keeps native 1:1.
- Ground: 818/888 clip limits, screen centre floats and integer
immediates, ground quad list (capped at 1749) moved with the tile list.
- 3D: cGranny ortho (+-512 x +-384, incl. HUD items) scaled; inverse
projection 0x623a20 (1/1024, 1/768) follows the render size, which fixes
the camera following the player ("outside world") and the missing
player / ESC menu.
- tools: game-input.ps1 + autotest-load.ps1 drive the game (load the first
save game, screenshots in-game and with the ESC menu).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
37 lines
1.5 KiB
PowerShell
37 lines
1.5 KiB
PowerShell
# Automated smoke test: start the game, load the first save game, take
|
|
# screenshots in-game and with the ESC menu open, then stop the game.
|
|
#
|
|
# .\tools\autotest-load.ps1 -Name ws_on # current sacred_re.ini
|
|
# .\tools\autotest-load.ps1 -Name ws_off -Ini "[widescreen]`r`nEnabled=0"
|
|
#
|
|
# -Ini temporarily appends settings to build\x86-debug\sacred_re.ini.
|
|
# Click positions are for the classic (menu) layout scaled onto a 3440x1440
|
|
# monitor; adjust for other monitors. Don't touch mouse/keyboard while it runs.
|
|
param(
|
|
[string]$Name = "autotest",
|
|
[string]$Ini = "",
|
|
[int]$LoadSeconds = 30
|
|
)
|
|
$ErrorActionPreference = "Stop"
|
|
. (Join-Path $PSScriptRoot "game-input.ps1")
|
|
|
|
$root = Split-Path $PSScriptRoot
|
|
$iniPath = Join-Path $root "build\x86-debug\sacred_re.ini"
|
|
$iniBackup = if (Test-Path $iniPath) { Get-Content $iniPath -Raw } else { "" }
|
|
if ($Ini) { Set-Content $iniPath ($iniBackup + "`r`n" + $Ini + "`r`n") -Encoding ASCII }
|
|
|
|
$game = $null
|
|
try {
|
|
$game = Start-Sacred
|
|
Click-At 1720 779 -AfterMs 4000 # main menu: "Spiel laden"
|
|
Click-At 2382 568 -AfterMs 2000 # load screen: "Laden" (first save selected)
|
|
Click-At 1551 826 -AfterMs ($LoadSeconds * 1000) # confirm: "Ok"
|
|
Save-Screen "screenshots\${Name}_ingame.png" | Out-Null
|
|
Press-Key 0x1B -AfterMs 2500 # ESC menu
|
|
Save-Screen "screenshots\${Name}_esc.png" | Out-Null
|
|
"game alive at end: $(-not $game.HasExited)"
|
|
} finally {
|
|
Stop-Sacred $game
|
|
if ($Ini) { Set-Content $iniPath $iniBackup -Encoding ASCII -NoNewline }
|
|
}
|