dsda-doom_doom_improved.sh 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/sh
  2. param_game_dir="$HOME/games/doom"
  3. mod_files="$param_game_dir/mods/vanilla/pk_doom_sfx/pk_doom_sfx_20120224.wad $param_game_dir/mods/vanilla/dimm_pal/doom-pal.wad $param_game_dir/mods/vanilla/vbright/vbright.wad $param_game_dir/mods/vanilla/softfx/softfx.wad $param_game_dir/mods/vanilla/smoothed/smoothed.wad"
  4. get_random_map() {
  5. iwad=$(find /home/lea/games/doom/wads/iwads/{doom.wad,doom2.wad,tnt.wad,plutonia.wad} | shuf -n 1 | sed 's/.*\///' | sed 's/.wad//')
  6. map_file=$(find $HOME/games/doom/wads/$iwad/{vanilla,nolimit,boom,zdoom}/*/*.wad -type f 2>/dev/null | shuf -n 1)
  7. echo "INFO: Map file: $map_file"
  8. map_number=$("$(dirname "$0")"/doomGetRandomMapFromPwadWadtools.sh $iwad $map_file)
  9. }
  10. get_random_map
  11. while [ -z $map_number ]
  12. do
  13. unset map_number
  14. get_random_map
  15. done
  16. installed_bin=$(which dsda-doom 2>/dev/null || echo false)
  17. compiled_bin="$HOME/src/dsda-doom/prboom2/build/dsda-doom"
  18. set -x
  19. $(if [ ! $installed_bin = "false" ]; then echo "dsda-doom"; else if [ -f "$compiled_bin" ]; then echo "$compiled_bin"; fi; fi) \
  20. -config "$param_game_dir"/config/dsda-doom/dsda-doom_vanilla.cfg \
  21. -vidmode gl \
  22. -complevel 17 \
  23. -width 1920 -height 1080 \
  24. -fullscreen \
  25. -geom 640x360f -aspect 16:9 \
  26. -iwad $param_game_dir/wads/iwads/$iwad.wad \
  27. -file $map_file $mod_files \
  28. -save ~/games/doom/savegames/$iwad/ \
  29. -skill 3 \
  30. -warp ${map_number} \
  31. > /tmp/dsda-doom.log
  32. set +x