Skip to content

Commit

Permalink
wolf4sdl: (qol) fix check for game data
Browse files Browse the repository at this point in the history
Check for '.sd1' wad file in addition to '.sod' before downloading shareware version.

Choose correct launch command opts by wad file name.
  • Loading branch information
s1eve-mcdichae1 committed Feb 25, 2023
1 parent 1cf5cb6 commit 53e00f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scriptmodules/ports/wolf4sdl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function add_games_wolf4sdl() {
declare -A -g games_wolf4sdl=(
['vswap.wl1']="Wolfenstein 3D demo"
['vswap.wl6']="Wolfenstein 3D"
['vswap.sod']="Wolfenstein 3D - Spear of Destiny"
['vswap.sd1']="Wolfenstein 3D - Spear of Destiny Ep 1"
['vswap.sd2']="Wolfenstein 3D - Spear of Destiny Ep 2"
['vswap.sd3']="Wolfenstein 3D - Spear of Destiny Ep 3"
Expand Down Expand Up @@ -87,7 +88,7 @@ function game_data_wolf4sdl() {
# Get shareware game data
downloadAndExtract "http://maniacsvault.net/ecwolf/files/shareware/wolf3d14.zip" "$romdir/ports/wolf3d" -j -LL
fi
if [[ ! -f "$romdir/ports/wolf3d/vswap.sdm" && ! -f "$romdir/ports/wolf3d/vswap.sod" ]]; then
if [[ ! -f "$romdir/ports/wolf3d/vswap.sdm" && ! -f "$romdir/ports/wolf3d/vswap.sod" && ! -f "$romdir/ports/wolf3d/vswap.sd1" ]]; then
cd "$__tmpdir"
# Get shareware game data
downloadAndExtract "http://maniacsvault.net/ecwolf/files/shareware/soddemo.zip" "$romdir/ports/wolf3d" -j -LL
Expand Down Expand Up @@ -129,6 +130,7 @@ function launch_wolf4sdl() {
['e3e87518f51414872c454b7d72a45af6']="wolf4sdl-spear --mission 3"
['35afda760bea840b547d686a930322dc']="wolf4sdl-spear-sw"
)
[[ "\${wad_file##*/}" == "vswap.sod" ]] && game_checksums['b1dac0a8786c7cdbb09331a4eba00652']="wolf4sdl-spear"
if [[ "\${game_checksums[\$(get_md5sum \$wad_file)]}" ]] 2>/dev/null; then
pushd "$romdir/ports/wolf3d"
$md_inst/bin/\${game_checksums[\$(get_md5sum \$wad_file)]}
Expand Down

0 comments on commit 53e00f7

Please sign in to comment.