Add hook debug tooling and refine RT3 atlas

This commit is contained in:
Jan Petykiewicz 2026-04-08 16:31:33 -07:00
commit 57bf0666e0
38 changed files with 14437 additions and 873 deletions

View file

@ -0,0 +1,31 @@
#!/usr/bin/env bash
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
game_dir="$repo_root/rt3_wineprefix/drive_c/rt3"
proxy_path="$game_dir/dinput8.dll"
save_stem="${1:-hh}"
. "$HOME/.local/share/cargo/env"
cargo build -p rrt-hook --target i686-pc-windows-gnu
cp "$repo_root/target/i686-pc-windows-gnu/debug/dinput8.dll" "$proxy_path"
cd "$game_dir"
export RRT_AUTO_LOAD_SAVE="$save_stem"
export WINEPREFIX="$repo_root/rt3_wineprefix"
export WINEDLLOVERRIDES="dinput8=n,b"
cmd=(/opt/wine-stable/bin/winedbg)
cmd_file="${RRT_WINEDBG_CMD_FILE:-$repo_root/tools/winedbg_auto_load_compare.cmd}"
if [[ -n "$cmd_file" ]]; then
cmd+=(--file "$cmd_file")
fi
cmd+=(RT3.exe)
log_file="${RRT_WINEDBG_LOG:-$repo_root/rt3_auto_load_winedbg.log}"
if [[ -n "$log_file" ]]; then
cmd_string="$(printf '%q ' "${cmd[@]}")"
exec script -qefc "${cmd_string% }" "$log_file"
fi
exec "${cmd[@]}"