From 98d3d0617ca826054b7ad0edc662d728950dccfb Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sun, 25 Sep 2022 03:21:33 -0400 Subject: [PATCH] Road to Rage and Road to Rage Offline added. Road to rage requires a script that is in the speech directory to speak. --- audiogame-manager.sh | 15 ++++++++++++--- speech/speak_window_title.sh | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100755 speech/speak_window_title.sh diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 2c2a570..59341b4 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -1021,7 +1021,8 @@ gameList=( "Revelation" "Rhythm Rage" #"River Raiders" - #"Road to Rage" + "Road to Rage" + "Road to Rage Offline" "RS Games" "Run For Your Life" #"Sammy Center" @@ -2300,10 +2301,18 @@ EOF export WINEARCH=win64 export winVer="win7" install_wine_bottle - download "https://iamtalon.me/games/rtr_ultimate.zip" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" + download "https://iamtalon.me/games/rtr_ultimate.zip" unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/rtr_ultimate.zip" - find "${WINEPREFIX}" -type f -name 'nvdaControllerClient.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; add_launcher "c:\Program Files\rtr_Ultimate\trtr.exe" + echo "To get speech in this game please run speak_window_title.sh in the speech directory." + ;; + "Road to Rage Offline") + export winVer="win7" + install_wine_bottle speechsdk + download "https://agarchive.net/games/talon/the%20road%20to%20rage%20offline.7z" + 7z x -o"$WINEPREFIX/drive_c/Program Files" "${cache}/the road to rage offline.7z" + find "${WINEPREFIX}" -type f -name "nvdaControllerClient.dll" -exec rm -fv "{}" \; + add_launcher "c:\Program Files\RTR Offline\rtr.exe" ;; "RS Games") export winVer="win7" diff --git a/speech/speak_window_title.sh b/speech/speak_window_title.sh new file mode 100755 index 0000000..87d1101 --- /dev/null +++ b/speech/speak_window_title.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Adapted from the bash snippet found at: +# https://bbs.archlinux.org/viewtopic.php?id=117031 + +while : ; do + wnd_focus=$(xdotool getwindowfocus) + wnd_title=$(xprop -id $wnd_focus WM_NAME) + lookfor='"(.*)"' + + if [[ "$wnd_title" =~ $lookfor ]]; then + wnd_title=${BASH_REMATCH[1]} + if [[ "$old_title" != "$wnd_title" ]]; then + spd-say "$wnd_title" + old_title="$wnd_title" + fi + fi + sleep 0.01 +done