prboom-plus_freedoom-git_vanilla.sh 1.1 KB

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. param_game_dir="$HOME/games/doom"
  3. iwad=$(find /home/lea/games/doom/wads/iwads/{freedoom1-git.wad,freedoom2-git.wad} | shuf -n 1 | sed 's/.*\///' | sed 's/.wad//')
  4. echo "INFO: iwad file: $iwad"
  5. map_file=$(find $HOME/games/doom/wads/$iwad/{vanilla,nolimit,boom}/*/*.wad -type f 2>/dev/null | shuf -n 1)
  6. echo "INFO: Map file: $map_file"
  7. mod_files="$param_game_dir/mods/vanilla/dimm_pal/doom-pal.wad"
  8. installed_bin=$(which prboom-plus 2>/dev/null || echo false)
  9. compiled_bin="$HOME/src/prboom-plus/prboom2/build/prboom-plus"
  10. set -x
  11. $(if [ ! $installed_bin = "false" ]; then echo "prboom-plus"; else if [ -f "$compiled_bin" ]; then echo "$compiled_bin"; fi; fi) \
  12. -config "$param_game_dir"/config/prboom-plus/prboom-plus_vanilla.cfg \
  13. -vidmode gl \
  14. -complevel 17 \
  15. -width 1920 -height 1080 \
  16. -fullscreen \
  17. -geom 640x360f -aspect 16:9 \
  18. -iwad $param_game_dir/wads/iwads/$iwad.wad \
  19. -file $map_file $mod_files \
  20. -save ~/games/doom/savegames/$iwad/ \
  21. -skill 3 \
  22. -warp $(if [ $iwad == *"doom1"* ]; then echo "$(shuf -i 1-4 -n 1) $(shuf -i 1-8 -n 1)"; else echo "$(shuf -i 1-30 -n 1)"; fi)
  23. set +x