about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-05-10 17:18:56 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-05-10 17:18:56 +0000
commit0d3b988c1aed8f6b91879a801253db81a251a532 (patch)
tree00f9d5128bff6ee4ec44e5f669b8eecedd55a4a1 /src
parentac18c6a3bd9b1e497cd97c52fd77f256961b48e6 (diff)
downloadzcatch-0d3b988c1aed8f6b91879a801253db81a251a532.tar.gz
zcatch-0d3b988c1aed8f6b91879a801253db81a251a532.zip
major changes to the build script, requires new bam
Diffstat (limited to 'src')
-rw-r--r--src/engine/client/ec_gfx.c2
-rw-r--r--src/engine/client/ec_inp.c2
-rw-r--r--src/engine/client/ec_snd.c2
-rw-r--r--src/engine/e_datafile.c2
-rw-r--r--src/engine/e_system.c10
-rw-r--r--src/engine/external/portaudio/src/hostapi/oss/recplay.c114
6 files changed, 8 insertions, 124 deletions
diff --git a/src/engine/client/ec_gfx.c b/src/engine/client/ec_gfx.c
index 3a9f11d1..f3488196 100644
--- a/src/engine/client/ec_gfx.c
+++ b/src/engine/client/ec_gfx.c
@@ -1,5 +1,5 @@
 /* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
-#include <engine/external/glfw/include/GL/glfw.h>
+#include <GL/glfw.h>
 #include <engine/external/pnglite/pnglite.h>
 
 #include <engine/e_system.h>
diff --git a/src/engine/client/ec_inp.c b/src/engine/client/ec_inp.c
index 88942959..56b5fd1f 100644
--- a/src/engine/client/ec_inp.c
+++ b/src/engine/client/ec_inp.c
@@ -1,6 +1,6 @@
 /* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
 #include <string.h>
-#include <engine/external/glfw/include/GL/glfw.h>
+#include <GL/glfw.h>
 
 #include <engine/e_system.h>
 #include <engine/e_client_interface.h>
diff --git a/src/engine/client/ec_snd.c b/src/engine/client/ec_snd.c
index 269019d8..a3b687a7 100644
--- a/src/engine/client/ec_snd.c
+++ b/src/engine/client/ec_snd.c
@@ -3,8 +3,8 @@
 #include <engine/e_client_interface.h>
 #include <engine/e_config.h>
 
-#include <engine/external/portaudio/include/portaudio.h>
 #include <engine/external/wavpack/wavpack.h>
+#include <portaudio.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <math.h>
diff --git a/src/engine/e_datafile.c b/src/engine/e_datafile.c
index 6a74de95..59858eda 100644
--- a/src/engine/e_datafile.c
+++ b/src/engine/e_datafile.c
@@ -1,7 +1,7 @@
 /* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
 #include "e_system.h"
 #include "e_datafile.h"
-#include "external/zlib/zlib.h"
+#include <zlib.h>
 
 static const int DEBUG=0;
 
diff --git a/src/engine/e_system.c b/src/engine/e_system.c
index f87fd6f3..c0d3595c 100644
--- a/src/engine/e_system.c
+++ b/src/engine/e_system.c
@@ -29,11 +29,10 @@
 	#include <unistd.h>
 #elif defined(CONF_FAMILY_WINDOWS)
 	#define WIN32_LEAN_AND_MEAN 
-	#define _WIN32_WINNT 0x0400
+	#define _WIN32_WINNT 0x0501 /* required for mingw to get getaddrinfo to work */
 	#include <windows.h>
 	#include <winsock2.h>
 	#include <ws2tcpip.h>
-	#include <shlobj.h> /* for SHGetFolderPathAndSubDir */
 	#include <fcntl.h>
 	#include <direct.h>
 	#include <errno.h>
@@ -761,10 +760,9 @@ int fs_storage_path(const char *appname, char *path, int max)
 {
 #if defined(CONF_FAMILY_WINDOWS)
 	HRESULT r;
-	char home[MAX_PATH];
-	r = SHGetFolderPath (NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, home);
-	if(r != 0)
-			return 1;
+	char *home = getenv("APPDATA");
+	if(!home)
+		return 1;
 	_snprintf(path, max, "%s/%s", home, appname);
 	return 0;
 #else
diff --git a/src/engine/external/portaudio/src/hostapi/oss/recplay.c b/src/engine/external/portaudio/src/hostapi/oss/recplay.c
deleted file mode 100644
index 9d4c78cf..00000000
--- a/src/engine/external/portaudio/src/hostapi/oss/recplay.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * recplay.c
- * Phil Burk
- * Minimal record and playback test.
- * 
- */
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#ifndef __STDC__
-/* #include <getopt.h> */
-#endif /* __STDC__ */
-#include <fcntl.h>
-#ifdef __STDC__
-#include <string.h>
-#else /* __STDC__ */
-#include <strings.h>
-#endif /* __STDC__ */
-#include <sys/soundcard.h>
-
-#define NUM_BYTES   (64*1024)
-#define BLOCK_SIZE   (4*1024)
-
-#define AUDIO "/dev/dsp"
-
-char buffer[NUM_BYTES];
-
-int audioDev = 0;
-
-main (int argc, char *argv[])
-{
-    int   numLeft;
-    char *ptr;
-    int   num;
-    int   samplesize;
-
-    /********** RECORD ********************/
-    /* Open audio device. */
-    audioDev = open (AUDIO, O_RDONLY, 0);
-    if (audioDev == -1)
-    {
-        perror (AUDIO);
-        exit (-1);
-    }
-
-    /* Set to 16 bit samples. */
-    samplesize = 16;
-    ioctl(audioDev, SNDCTL_DSP_SAMPLESIZE, &samplesize);
-    if (samplesize != 16)
-    {
-        perror("Unable to set the sample size.");
-        exit(-1);
-    }
-
-    /* Record in blocks */
-    printf("Begin recording.\n");
-    numLeft = NUM_BYTES;
-    ptr = buffer;
-    while( numLeft >= BLOCK_SIZE )
-    {
-        if ( (num = read (audioDev, ptr, BLOCK_SIZE)) < 0 )
-        {
-            perror (AUDIO);
-            exit (-1);
-        }
-        else
-        {
-            printf("Read %d bytes\n", num);
-            ptr += num;
-            numLeft -= num;
-        }
-    }
-
-    close( audioDev );
-
-    /********** PLAYBACK ********************/
-    /* Open audio device for writing. */
-    audioDev = open (AUDIO, O_WRONLY, 0);
-    if (audioDev == -1)
-    {
-        perror (AUDIO);
-        exit (-1);
-    }
-
-    /* Set to 16 bit samples. */
-    samplesize = 16;
-    ioctl(audioDev, SNDCTL_DSP_SAMPLESIZE, &samplesize);
-    if (samplesize != 16)
-    {
-        perror("Unable to set the sample size.");
-        exit(-1);
-    }
-
-    /* Play in blocks */
-    printf("Begin playing.\n");
-    numLeft = NUM_BYTES;
-    ptr = buffer;
-    while( numLeft >= BLOCK_SIZE )
-    {
-        if ( (num = write (audioDev, ptr, BLOCK_SIZE)) < 0 )
-        {
-            perror (AUDIO);
-            exit (-1);
-        }
-        else
-        {
-            printf("Wrote %d bytes\n", num);
-            ptr += num;
-            numLeft -= num;
-        }
-    }
-
-    close( audioDev );
-}