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 `vswap.sd1` file, as per docs, instead of `.sod` before downloading shareware.

Automatically rename `.sod` files if exist.
  • Loading branch information
s1eve-mcdichae1 committed May 24, 2022
1 parent 5cd6dd2 commit 235d535
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scriptmodules/ports/wolf4sdl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,12 @@ 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

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
cd "$__tmpdir"
# Get shareware game data
downloadAndExtract "http://maniacsvault.net/ecwolf/files/shareware/soddemo.zip" "$romdir/ports/wolf3d" -j -LL
Expand Down

0 comments on commit 235d535

Please sign in to comment.