Skip to content

Commit

Permalink
wolf4sdl - alternatively, make it work with both names
Browse files Browse the repository at this point in the history
  • Loading branch information
s1eve-mcdichae1 committed Aug 15, 2022
1 parent 235d535 commit 0896d22
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions 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,12 +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

for sodfile in gamemaps maphead vswap; do
[[ -f "$romdir/ports/wolf3d/$sodfile.sod" ]] && mv "$romdir/ports/wolf3d/$sodfile.sod" "$romdir/ports/wolf3d/$sodfile.sd1"
done

if [[ ! -f "$romdir/ports/wolf3d/vswap.sdm" && ! -f "$romdir/ports/wolf3d/vswap.sd1" ]]; then
if [[ ! -f "$romdir/ports/wolf3d/vswap.sdm" && ! -f "$romdir/ports/wolf3d/vswap.sd1" && ! -f "$romdir/ports/wolf3d/vswap.sod" ]]; 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 @@ -134,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 0896d22

Please sign in to comment.