##############################################################
#Tremor launcher script by QuDos at http://qudos.quakedev.com#
##############################################################

#!/bin/sh

BIN="tremor.glx"
#BIN="tremor.sdl"

DIR="."

script=$0
count=0

while [ -L "$script" ]  
do
    script=`perl -e "print readlink(\"$script\"), \"\n\""`
    count=`expr $count + 1`

	if [ $count -gt 100 ]  
	then
	    echo "Too many symbolic links"
	    exit 1
	fi
done

GAME_DIR=`dirname $script`
export LD_PRELOAD=libpthread.so.0

cd $GAME_DIR
cd $DIR

#you NEED fmod installed in your system in order to play Tremor, just drop the fmod library in your main quake folder 
LD_PRELOAD=./fmod.so

#disable the screen standby
xset s off
xset -dpms 

#Set to 128 mem because crashes with nehahra, now default is up to 128  
exec ./$BIN #-mem 128 -fullscreen -width 1024 -height 768 -conwidth 800 -conheight 600 -bpp 32 -sndspeed 44100

#-game rogue 
#-game hypnotic
#-game -nehahra

#enable the screen standby
xset s on
xset +dpms 
