Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # PRBoom+ launching script
- # Author: PhysixCat
- # Ask user for desired map
- printf '\e[1m%s\e[0m\n' "PRBoom+ launching script"
- printf '\n'
- read -r -p 'wad?'$'\n> ' map
- case $map in
- doomu|tnt|plutonia)
- iwad="$map"
- ;;
- sigil)
- iwad='doomu'
- postpatch='sigil_compat'
- ;;
- '')
- printf '%s\n' "DOOM 2"
- ;;
- esac
- [[ "$iwad" == "$map" ]] && unset map
- [[ "$iwad" == 'doomu' ]] && prepatch='d1_sprite_fix19' || prepatch='d2_sprite_fix19'
- [[ "$iwad" == 'plutonia' ]] && musicaddon='plutmidi'
- # Report on assigned map, add postpatches
- case $map in
- ayy|ayylmao|aaliens)
- map='aaliens'
- postpatch='d2_sprite_fix_aaliens'
- printf '%s\n' "Ancient Aliens by skillsaw (Paul DeBruyne)"
- ;;
- esac
- extra=( 'doomsfx' 'dssecret' )
- printf '\n'
- # Ask user for cvars
- read -r -p 'map# & cvars?'$'\n> ' -a cvars_raw
- [[ -n "${cvars_raw[*]}" ]] && cvars=( '-warp' "${cvars_raw[*]}" )
- # Start PRBoom+ with the selected variables
- if [[ -z "$iwad" ]]; then
- prb_arguments=( '-file' "$prepatch" "$map" "$postpatch" "${extra[@]}" "$musicaddon" "${cvars[@]}" )
- else
- prb_arguments=( '-iwad' "$iwad" '-file' "$prepatch" "$map" "$postpatch" "${extra[@]}" "$musicaddon" "${cvars[@]}" )
- fi
- #printf '\n%s' "iwad=[$iwad]" "prepatch=[$prepatch]" "map=[$map]" "postpatch=[$postpatch]" "extra=[${extra[*]}]" "musicaddon=[$musicaddon]" "cvars=[${cvars[*]}]"
- printf '\n'
- printf '\e[1m%s\e[0m' "here we go..."
- printf '\n%s\n\n' "prboom-plus ${prb_arguments[*]}" | tr -s ' '
- $(printf '%s' "prboom-plus ${prb_arguments[*]}" | tr -s ' ')
- # Copyright 2019 PhysixCat
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- # http://www.apache.org/licenses/LICENSE-2.0
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement