Rename project to sacredK
sacred_re.dll/.exe/.ini/.log/_crash files are now sacredK.*; inventory saves with the old "sacred_re.inventory" format id still load. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
462ebf8c0b
commit
70673dc301
34 files changed
+95
-93
No files matched your search
@@ -31,9 +31,9 @@ function Focus-Sacred($Game) {
|
||||
[SacredRe.Input]::SetForegroundWindow($Game.MainWindowHandle)
|
||||
}
|
||||
|
||||
$script:LogPath = Join-Path $script:Root "build\x86-debug\sacred_re.log"
|
||||
$script:LogPath = Join-Path $script:Root "build\x86-debug\sacredK.log"
|
||||
|
||||
# Waits until sacred_re.log (written anew at every start) has at least $Count
|
||||
# Waits until sacredK.log (written anew at every start) has at least $Count
|
||||
# lines containing $Pattern, focusing the game meanwhile; then waits $AfterMs.
|
||||
function Wait-Log([string]$Pattern, [int]$Count = 1, [int]$TimeoutSeconds = 60, [int]$AfterMs = 500, $Game = $null) {
|
||||
$deadline = (Get-Date).AddSeconds($TimeoutSeconds)
|
||||
@@ -46,7 +46,7 @@ function Wait-Log([string]$Pattern, [int]$Count = 1, [int]$TimeoutSeconds = 60,
|
||||
if ($found -ge $Count) { Start-Sleep -Milliseconds $AfterMs; return }
|
||||
Start-Sleep -Milliseconds 200
|
||||
}
|
||||
throw "timeout waiting for '$Pattern' in sacred_re.log"
|
||||
throw "timeout waiting for '$Pattern' in sacredK.log"
|
||||
}
|
||||
|
||||
# Starts the game and returns once its main menu is up (the UI manager
|
||||
@@ -54,7 +54,7 @@ function Wait-Log([string]$Pattern, [int]$Count = 1, [int]$TimeoutSeconds = 60,
|
||||
function Start-Sacred([string]$Arguments = "log") {
|
||||
if (Get-Process sacred -ErrorAction SilentlyContinue) { throw "sacred.exe is already running" }
|
||||
if (Test-Path $script:LogPath) { Remove-Item $script:LogPath -ErrorAction SilentlyContinue }
|
||||
$null = Start-Process (Join-Path $script:Root "build\x86-debug\sacred_re.exe") -ArgumentList $Arguments
|
||||
$null = Start-Process (Join-Path $script:Root "build\x86-debug\sacredK.exe") -ArgumentList $Arguments
|
||||
$game = $null
|
||||
for ($i = 0; $i -lt 80 -and -not $game; $i++) {
|
||||
Start-Sleep -Milliseconds 250
|
||||
|
||||
Reference in new issue
Block a user