2020-11-17 12:03:52 +00:00
|
|
|
#!/bin/sh
|
2020-11-24 16:21:34 +00:00
|
|
|
SCRPATH="$( cd "$( dirname $(readlink -nf $0) )" && pwd )"
|
2020-11-17 12:03:52 +00:00
|
|
|
PATH="$SCRPATH"/bin:"$PATH"
|
|
|
|
|
|
|
|
if [ ! -f "$SCRPATH"/bin/vmap ]; then
|
|
|
|
printf "Map compiler is not present, please run build_editor.sh\n"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2021-05-17 16:23:21 +00:00
|
|
|
# Check how many cores/processors we should use for building
|
|
|
|
if ! [ -x "$(command -v nproc)" ]; then
|
|
|
|
# check if we're on OpenBSD then
|
|
|
|
if ! [ -x "$(command -v sysctl)" ]; then
|
|
|
|
BUILD_PROC=1
|
|
|
|
else
|
|
|
|
BUILD_PROC=$(sysctl -n hw.ncpu)
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
BUILD_PROC=$(nproc)
|
|
|
|
fi
|
|
|
|
|
2020-11-24 22:38:36 +00:00
|
|
|
set -e
|
2021-03-09 13:25:59 +00:00
|
|
|
|
|
|
|
if [ "$VMAP_NOBSP" != "1" ]; then
|
2021-05-17 16:23:21 +00:00
|
|
|
"$SCRPATH"/bin/vmap -v -custinfoparms -fs_basepath "$SCRPATH" -fs_game platform -threads $BUILD_PROC -samplesize 8 $*
|
2021-03-09 13:25:59 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$VMAP_NOVIS" != "1" ]; then
|
|
|
|
"$SCRPATH"/bin/vmap -vis -v -fs_basepath "$SCRPATH" -fs_game platform $*
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$VMAP_NOLIGHT" != "1" ]; then
|
2021-05-17 16:23:21 +00:00
|
|
|
"$SCRPATH"/bin/vmap -light -custinfoparms -fs_basepath "$SCRPATH" -v -fs_game platform -bounce 8 -fastbounce -samplesize 8 -threads $BUILD_PROC -shade -shadeangle 60 -patchshadows $*
|
2021-03-09 13:25:59 +00:00
|
|
|
fi
|