2024-04-15 20:33:58 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2024-04-16 02:07:35 -04:00
|
|
|
# Set the current path to the Doom path required by some OS.
|
|
|
|
pushd "${doomPath}"
|
|
|
|
|
2024-05-02 16:24:20 -04:00
|
|
|
# Set up the pk3 and wad files
|
2024-04-15 20:33:58 -04:00
|
|
|
gameOption=(
|
|
|
|
"${doomPath}/TobyAccMod_V${tobyVersion}.pk3"
|
2024-05-02 16:24:20 -04:00
|
|
|
"${doomPath}/PB-Toby-Compatibility-Addon.pk3"
|
|
|
|
"${doomPath}/Toby-Universal-Pickup-Beacon-Prototype.pk3"
|
2024-04-15 20:33:58 -04:00
|
|
|
"${doomPath}/Toby-Demo-Level.wad"
|
2024-05-02 16:24:20 -04:00
|
|
|
"$(find /usr/share/games/ -name 'Project_Brutality-master.pk3')"
|
2024-04-15 20:33:58 -04:00
|
|
|
)
|
2024-05-02 16:24:20 -04:00
|
|
|
|
2024-04-15 20:33:58 -04:00
|
|
|
# Check for and include if present a wad. Some people may not have it.
|
2024-04-18 16:26:42 -04:00
|
|
|
if [[ -e "${doomPath}/DoomMetalVol7.wad" ]]; then
|
2024-05-02 16:24:20 -04:00
|
|
|
gameOption+=("${doomPath}/DoomMetalVol7.wad")
|
2024-04-18 16:26:42 -04:00
|
|
|
elif [[ -e "${doomPath}/DoomMetalVol6.wad" ]]; then
|
2024-05-02 16:24:20 -04:00
|
|
|
gameOption+=("${doomPath}/DoomMetalVol6.wad")
|
2024-04-15 20:33:58 -04:00
|
|
|
fi
|
|
|
|
|
2024-05-02 17:08:41 -04:00
|
|
|
# Source common variable extensions.
|
|
|
|
pbrc="$(find "${0%/*}/" -type f -name '.projectbrutalityrc')"
|
|
|
|
source "${pbrc}"
|
2024-04-15 20:33:58 -04:00
|
|
|
|
|
|
|
# Launch the game and pipe things to be spoken through speech-dispatcher.
|
|
|
|
# This also leaves the console output intact for people who may want to read it.
|
|
|
|
exec stdbuf -oL ${gzdoom} ${gameOption[@]} | while IFS= read -r l ; do echo "$l" | { grep "${grepStrings[@]}" | grep "${antiGrepStrings[@]}" | sed "${sedStrings[@]}" | spd-say -e ${spd_module} ${spd_pitch} ${spd_rate} ${spd_voice} ${spd_volume} -- > /dev/null 2>&1; }; echo "$l";done
|