Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Oct 1996 11:58:54 +1000
From:      Stephen Hocking <sysseh@devetir.qld.gov.au>
To:        multimedia@freebsd.org
Subject:   Maelstrom port for FreeBSD
Message-ID:  <199610090158.BAA05090@netfl15a.devetir.qld.gov.au>

next in thread | raw e-mail | index | archive | help
Some of you may know about Maelstrom, a really nifty version of an asteriods 
style game that originated on the Mac. It was subsequently ported to Linux and 
thence to some other Unix boxes. I've ported it to FreeBSD & SVR4.2, using 
VOXware or NAS and forwarded the patches back to the author (this morning, as a 
matter of fact). I guess it's time to learn the ports subsystem, although with 
only mail/news access, it's going to be difficult to test. The game itself is 
available for anonftp at....

ftp://ftp.devolution.com/pub/maelstrom/Maelstrom-1.4.3-L2.0.3.tar.gz

My patches follow

*** SetDefault.sh.orig	Tue Oct  8 22:08:59 1996
--- SetDefault.sh	Wed Oct  9 10:28:55 1996
***************
*** 43,48 ****
--- 43,76 ----
  				x11linkdir="-L/usr/X11R6/lib"
  			fi
  			;;
+ 		FreeBSD)	
+ features=" -DASYNCHRONOUS_IO -DUSE_POSIX_SIGNALS"
+ 			if [ \
+ "`$Ask 'Do you want X11 Direct Graphics Access (experimental)?' 'n'`" != "n" ]
+ 			then
+ 				features="$features -DUSE_DGA"
+ 				x11libs="-lXxf86dga -lXxf86vm $x11libs"
+ 			fi
+ 			if [ \
+ "`$Ask 'Do you want DMA audio support (experimental)?' 'y'`" != "n" ]
+ 			then
+ 				audio_ext="dma"
+ 			else
+ 				features="$features -DAUDIO_16BIT"
+ 			fi
+ 			if [ \
+ "`$Ask 'Do you want NAS audio support (experimental)?' 'y'`" != "n" ]
+ 			then
+ 				audio_ext="nas"
+ 				soundlibs="-L/usr/X11R6/lib -laudio -lX11"
+ 			else
+ 				features="$features -DAUDIO_16BIT"
+ 			fi
+ 			if [ -d "/usr/X11R6/lib" ]; then
+ 				x11linkdir="-L/usr/X11R6/lib"
+ 				x11include="-I/usr/X11R6/include"
+ 			fi
+ 			;;
  		SunOS)	
  features=" -DASYNCHRONOUS_IO -DUSE_POSIX_SIGNALS -DPLAY_DEV_AUDIO"
  x11include="-I/usr/openwin/include"
***************
*** 65,70 ****
--- 93,122 ----
  cxx="CC"
  optimize="-woff 3252,3106"
  soundlibs="-laudio"
+ 			;;
+ 		UNIX_SV)	
+ #
+ # includes hackery with -D_STYPES needed for stopping static copies of lstat
+ # clashing left right & centre
+ #
+ features=" -DASYNCHRONOUS_IO -DUSE_POSIX_SIGNALS -DAUDIO_16BIT"
+ extralibs="-lsocket -lnsl"
+ 			if [ \
+ "`$Ask 'Do you want NAS audio support (experimental)?' 'y'`" != "n" ]
+ 			then
+ 				audio_ext="nas"
+ 			else
+ 				features="$features -DAUDIO_16BIT"
+ 			fi
+ 			if [ -d "/usr/X11R6/lib" ]; then
+ 				x11linkdir="-L/usr/X11R6/lib"
+ 				x11include="-I/usr/X11R6/include -D_STYPES"
+ 				soundlibs="-L/usr/X11R6/lib -laudio -lX11 -lnsl -lsocket"
+ 			else
+ 				x11linkdir="-L/usr/X/lib"
+ 				x11include="-I/usr/X/include -D_STYPES"
+ 				soundlibs="-L/usr/X/lib -laudio -lX11 -lnsl -lsocket"
+ 			fi
  			;;
  		*)	echo "I don't know how to configure for $system, sorry."
  			exit 1
*** bitesex.h.orig	Tue Oct  8 22:33:44 1996
--- bitesex.h	Wed Oct  9 10:16:18 1996
***************
*** 21,27 ****
--- 21,35 ----
  #ifdef _AIX
  #include <sys/machine.h>
  #else
+ #ifdef __FreeBSD__
+ #include <machine/endian.h>
+ #else
+ #if defined(__svr4__)
+ #include <sys/byteorder.h>
+ #else
  #error	Compiling for an unknown architecture!
+ #endif /* SVR4 */
+ #endif /* FreeBSD */
  #endif /* AIX */
  #endif /* DEC */
  #endif /* HPUX */
*** mixer-dma.h.orig	Wed Oct  9 08:42:34 1996
--- mixer-dma.h	Wed Oct  9 10:47:16 1996
***************
*** 9,15 ****
--- 9,23 ----
  
  
  /* Include system specific audio header files */
+ #if defined(__FreeBSD__)
+ #include <machine/soundcard.h>
+ #else
+ #if defined(i386) && defined(__svr4__)
+ #include <sys/soundcard.h>
+ #else
  #include <linux/soundcard.h>
+ #endif
+ #endif
  
  #define _PATH_DEV_DSP	"/dev/dsp"
  
*** mixer-nas.cc.orig	Tue Oct  8 22:34:21 1996
--- mixer-nas.cc	Tue Oct  8 22:34:40 1996
***************
*** 75,81 ****
  	speed = 11025;
  
  	/* try and connect to the NCD audio server */
! 	if (!(auserver=AuOpenServer(_PATH_DEV_DSP, 0, NULL, 0, NULL, NULL))) {
  		if ( complain ) {
  			perror("Mixer: Cannot connect to NCD audio server");
  		}
--- 75,81 ----
  	speed = 11025;
  
  	/* try and connect to the NCD audio server */
! 	if (!(auserver=AuOpenServer(NULL, 0, NULL, 0, NULL, NULL))) {
  		if ( complain ) {
  			perror("Mixer: Cannot connect to NCD audio server");
  		}



	Stephen
-- 
The views expressed above are not those of the Worker's Compensation Board of
Queensland, Australia.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610090158.BAA05090>