diff -uNr xsw1.28/client/Makefile xsw1.28-kees1/client/Makefile
--- xsw1.28/client/Makefile	Mon Dec 27 22:58:01 1999
+++ xsw1.28-kees1/client/Makefile	Wed Dec 29 11:06:14 1999
@@ -15,9 +15,9 @@
 # ########################################################################
 # Libraries:
 #
-INC     = -I/usr/include
-LIB     = -lm -lX11 -lXpm -lXext -lY2
-LIB_DIR = -L/usr/X11R6/lib
+INC     = -I/usr/local/include
+LIB     = -lm -lX11 -lXpm -lXext -lesd -laudiofile
+LIB_DIR = -L/usr/X11R6/lib -L/usr/local/lib 
 
 
 # ########################################################################
@@ -45,7 +45,10 @@
 #				at the same place you obtained this
 #				source.
 #
-CFLAGS  = -D__USE_BSD -O2 -DUSE_XSHM -DJS_SUPPORT -DHAVE_YIFF
+#       HAVE_ESD		Enables ESD client support, requires
+#                               libesd, libaudiofile.
+#
+CFLAGS  = -D__USE_BSD -O2 -DUSE_XSHM -DHAVE_ESD
 
 
 # ########################################################################
@@ -77,8 +80,8 @@
 INSTCFGFLAGS = -m 0644
 INSTDATFLAGS = -m 0444
 
-DIR_XBIN     = /usr/X11R6/bin
-DIR_XSW      = /usr/games/xshipwars
+DIR_XBIN     = /usr/local/bin
+DIR_XSW      = /usr/local/lib/xshipwars
 RCFILELOCAL  = .xshipwarsrc
 RCFILEGLOBAL = xshipwarsrc
 
diff -uNr xsw1.28/client/Makefile.Linux xsw1.28-kees1/client/Makefile.Linux
--- xsw1.28/client/Makefile.Linux	Mon Dec 27 22:58:01 1999
+++ xsw1.28-kees1/client/Makefile.Linux	Wed Dec 29 11:06:14 1999
@@ -15,9 +15,9 @@
 # ########################################################################
 # Libraries:
 #
-INC     = -I/usr/include
-LIB     = -lm -lX11 -lXpm -lXext -lY2
-LIB_DIR = -L/usr/X11R6/lib
+INC     = -I/usr/local/include
+LIB     = -lm -lX11 -lXpm -lXext -lesd -laudiofile
+LIB_DIR = -L/usr/X11R6/lib -L/usr/local/lib 
 
 
 # ########################################################################
@@ -45,7 +45,10 @@
 #				at the same place you obtained this
 #				source.
 #
-CFLAGS  = -D__USE_BSD -O2 -DUSE_XSHM -DJS_SUPPORT -DHAVE_YIFF
+#       HAVE_ESD		Enables ESD client support, requires
+#                               libesd, libaudiofile.
+#
+CFLAGS  = -D__USE_BSD -O2 -DUSE_XSHM -DHAVE_ESD
 
 
 # ########################################################################
@@ -77,8 +80,8 @@
 INSTCFGFLAGS = -m 0644
 INSTDATFLAGS = -m 0444
 
-DIR_XBIN     = /usr/X11R6/bin
-DIR_XSW      = /usr/games/xshipwars
+DIR_XBIN     = /usr/local/bin
+DIR_XSW      = /usr/local/lib/xshipwars
 RCFILELOCAL  = .xshipwarsrc
 RCFILEGLOBAL = xshipwarsrc
 
diff -uNr xsw1.28/client/main.c xsw1.28-kees1/client/main.c
--- xsw1.28/client/main.c	Mon Dec 27 22:31:49 1999
+++ xsw1.28-kees1/client/main.c	Wed Dec 29 11:16:55 1999
@@ -1926,11 +1926,15 @@
 	option.auto_map_univ_list_win = 1;
 	option.save_on_exit = 1;
 
-#ifdef HAVE_YIFF
-        sound.server_type = SNDSERV_TYPE_YIFF;
+#ifdef HAVE_ESD
+	sound.server_type = SNDSERV_TYPE_ESOUND;
 #else
+# ifdef HAVE_YIFF
+        sound.server_type = SNDSERV_TYPE_YIFF;
+# else
 	sound.server_type = SNDSERV_TYPE_NONE;
-#endif	/* HAVE_YIFF */
+# endif	/* HAVE_YIFF */
+#endif /* HAVE_ESD */
 
 	strncpy(
 	    sound.start_cmd,
diff -uNr xsw1.28/client/optwingui.c xsw1.28-kees1/client/optwingui.c
--- xsw1.28/client/optwingui.c	Tue Dec 28 03:17:09 1999
+++ xsw1.28-kees1/client/optwingui.c	Wed Dec 29 11:18:54 1999
@@ -108,9 +108,14 @@
 char *sound_server_names[] = {
         "None",
         "YIFF",
+#ifdef HAVE_ESD
+	"Esound",
+#else
         "DirectX",
+#endif /* HAVE_ESD */
         "MikMod"
 };
+#define SOUND_SERVER_NAMES_MAX 4
 
 
 
@@ -917,10 +922,10 @@
                 &options_win.server_type_tba,
                 options_win.toplevel,   
                 80, 120,	/* x, y. */
-                4,		/* Number of buttons. */   
+                SOUND_SERVER_NAMES_MAX,		/* Number of buttons. */   
                 0,		/* Default armed button. */
                 sound_server_names,	/* Array of names. */
-                4,		/* Number of names. */
+                SOUND_SERVER_NAMES_MAX,		/* Number of names. */
                 TGBTN_ARRAY_ALIGN_HORIZONTAL
 	    )
         )
@@ -930,7 +935,9 @@
 #ifndef HAVE_YIFF
 	options_win.server_type_tba.tb[1]->disabled = True;
 #endif	/* HAVE_YIFF */
+#ifndef HAVE_ESD
         options_win.server_type_tba.tb[2]->disabled = True;
+#endif  /* HAVE_ESD */
         options_win.server_type_tba.tb[3]->disabled = True;
 
 
diff -uNr xsw1.28/client/optwinop.c xsw1.28-kees1/client/optwinop.c
--- xsw1.28/client/optwinop.c	Mon Dec 27 22:36:24 1999
+++ xsw1.28-kees1/client/optwinop.c	Wed Dec 29 11:17:41 1999
@@ -180,7 +180,7 @@
 	else
 	    options_win.server_type_tba.armed_tb = 0;
 /* Disable these sound server option. */
-options_win.server_type_tba.tb[SNDSERV_TYPE_ESOUND]->disabled = True;
+/*options_win.server_type_tba.tb[SNDSERV_TYPE_ESOUND]->disabled = True;*/
 options_win.server_type_tba.tb[SNDSERV_TYPE_MIKMOD]->disabled = True;
 
 
diff -uNr xsw1.28/client/sound.c xsw1.28-kees1/client/sound.c
--- xsw1.28/client/sound.c	Mon Dec 27 22:41:17 1999
+++ xsw1.28-kees1/client/sound.c	Wed Dec 29 13:43:26 1999
@@ -30,6 +30,10 @@
 # include <Y2/Ylib.h>
 #endif	/* HAVE_YIFF */
 
+#ifdef HAVE_ESD
+# include <esd.h>
+#endif /* HAVE_ESD */
+
 #include "xsw.h"
 
 
@@ -59,6 +63,14 @@
 	    break;
 
 	  case SNDSERV_TYPE_ESOUND:
+#ifdef ESD_H
+	    /* Connect to sound server. */
+	    sound.con_data=(void*)esd_open_sound(NULL);
+	    if((int)sound.con_data<0) {
+		sound.con_data=NULL;
+		return(-1);
+	    }
+#endif /* ESD_H */
 	    break;
 
 	  case SNDSERV_TYPE_MIKMOD:
@@ -162,6 +174,10 @@
 #ifdef Y_H
 	YID yid;
 #endif	/* Y_H */
+#ifdef ESD_H
+	int id;
+	char buff[1024];
+#endif /* ESD_H */
 
 
 	if(sound.con_data == NULL)
@@ -189,6 +205,45 @@
             break;
   
           case SNDSERV_TYPE_ESOUND:
+#ifdef ESD_H
+	    fprintf(stderr,"Playing '%s'...",strptr);
+	    /* we should be able to map ss_items to sample id numbers... */
+	    snprintf(buff,1024,"xsw:%s",strptr);
+	    if ((id=esd_sample_getid((int)sound.con_data, buff))<0) {
+		fprintf(stderr,"(CACHING NOW)\n");
+	    	if ((id=esd_file_cache( (int)sound.con_data, "xsw", strptr )) < 0) {
+			fprintf(stderr,"esd_file_cache failed\n");
+	    	}
+	    }
+	    else {
+		fprintf(stderr,"(cached)\n");
+	    }
+
+	    if (id<0) {
+		fprintf(stderr,"sample caching failure!\n");
+	    }
+	    else {
+		esd_sample_stop( (int)sound.con_data, id );
+		/* reset the volume */
+	    	if (esd_set_default_sample_pan((int)sound.con_data, id,
+		    left_volume * ESD_VOLUME_BASE,
+		    right_volume * ESD_VOLUME_BASE)<0)
+			fprintf(stderr,"esd_set_default_sample_pan failed\n");
+	    	/* play our sample */
+	    	if (esd_sample_play((int)sound.con_data, id)<0) {
+			fprintf(stderr,"esd_sample_play failed\n");
+	    	}
+	    	else {
+/*
+	Since we use the cached copies now.... don't free...
+
+			if (esd_sample_free((int)sound.con_data,id)<0) {
+				fprintf(stderr,"esd_sample_free failed\n");
+	    		}
+*/
+	    	}	
+	    }
+#endif /* ESD_H */
             break;
    
           case SNDSERV_TYPE_MIKMOD:
@@ -214,6 +269,9 @@
 )
 {
         char *strptr;
+#ifdef HAVE_ESD
+	int id;
+#endif /* HAVE_ESD */
 
 
         if(sound.con_data == NULL)
@@ -225,9 +283,6 @@
             return(-1);
         strptr = ss_item[code]->path;
 
-	/* Update background mood code. */
-	sound.bkg_mood_code = code;
-
 
         /* Play by which sound server type: */
         switch(sound.server_type)
@@ -258,12 +313,27 @@
             break;
 
           case SNDSERV_TYPE_ESOUND:
+#ifdef ESD_H
+	    fprintf(stderr,"Starting background music '%s'...\n",strptr);
+	    if ((id=esd_file_cache( (int)sound.con_data, "xsw", strptr ))<0) {
+		fprintf(stderr,"esd_file_cache failed\n");
+	    }
+	    else {
+		/* now that we have the new music cached, stop & restart */
+		SoundStopBackgroundMusic();
+		(int)sound.bkg_playid=id;
+	    	if (esd_sample_loop( (int)sound.con_data, (int)sound.bkg_playid )<0)
+			fprintf(stderr,"esd_sample_loop failed\n");
+	    }
+#endif  /* ESD_H */
             break;
   
           case SNDSERV_TYPE_MIKMOD:
             break;
         }
 
+	/* Update background mood code. */
+	sound.bkg_mood_code = code;
 
         return(0);
 } 
@@ -289,6 +359,14 @@
             break;
 
           case SNDSERV_TYPE_ESOUND:
+#ifdef ESD_H
+	    if(sound.bkg_playid != NULL) {
+		if (esd_sample_stop( (int)sound.con_data, (int)sound.bkg_playid )<0)
+			fprintf(stderr,"esd_sample_stop failed\n");
+		if (esd_sample_free( (int)sound.con_data, (int)sound.bkg_playid )<0)
+			fprintf(stderr,"esd_sample_stop failed\n");
+	    }
+#endif  /* ESD_H */
             break;
 
           case SNDSERV_TYPE_MIKMOD:
@@ -420,6 +498,13 @@
             break;
 
           case SNDSERV_TYPE_ESOUND:
+#ifdef ESD_H
+	    if(sound.con_data != NULL)
+	    {
+		SoundStopBackgroundMusic();
+		esd_close((int)sound.con_data);
+	    }
+#endif  /* ESD_H */
             break;
 
           case SNDSERV_TYPE_MIKMOD:
Binary files xsw1.28/client/xsw and xsw1.28-kees1/client/xsw differ
diff -uNr xsw1.28/client/xsw.h xsw1.28-kees1/client/xsw.h
--- xsw1.28/client/xsw.h	Tue Dec 28 03:23:05 1999
+++ xsw1.28-kees1/client/xsw.h	Tue Dec 28 23:39:42 1999
@@ -150,10 +150,10 @@
  *	exist.  These are only default values, they can be changed in the
  *	XSW_RCFILE or XSW_RCFILE_GLOBAL.
  */
-#define DEF_XSW_TOPLEVEL_DIR	"/usr/games/xshipwars"
-#define DEF_XSW_IMAGES_DIR	"/usr/games/xshipwars/images"
-#define DEF_XSW_SOUNDS_DIR	"/usr/games/xshipwars/sounds"
-#define DEF_XSW_ETC_DIR		"/usr/games/xshipwars/etc"
+#define DEF_XSW_TOPLEVEL_DIR	"/usr/local/lib/xshipwars"
+#define DEF_XSW_IMAGES_DIR	"/usr/local/lib/xshipwars/images"
+#define DEF_XSW_SOUNDS_DIR	"/usr/local/lib/xshipwars/sounds"
+#define DEF_XSW_ETC_DIR		"/usr/local/lib/xshipwars/etc"
 #define DEF_ETC_DIR		"/etc"
 #define DEF_SW_SERVER_DIR	"/home/swserv"
 
@@ -371,6 +371,7 @@
 #define IMG_CODE_UNIV_HASLOGIN_ICON	31
 #define IMG_CODE_UNIV_OLD_ICON		32
 #define IMG_CODE_UNIV_UNKNOWN_ICON	33
+#define IMG_CODE_UNIV_UNKNOWN	IMG_CODE_UNIV_UNKNOWN_ICON
 #define IMG_CODE_ERROR_ICON		34
 #define IMG_CODE_INFO_ICON		35
 
