diff options
author | alepulver <alepulver@FreeBSD.org> | 2006-07-25 08:36:22 +0800 |
---|---|---|
committer | alepulver <alepulver@FreeBSD.org> | 2006-07-25 08:36:22 +0800 |
commit | ecc7013ce780d5b5a53d00eb26157d843172ad8c (patch) | |
tree | 232daa3e331dc2d22b0cf8c99c6df7f41796575d /games/egl/files | |
parent | c50f9b9222735fdb560620d372a64f764867a05c (diff) | |
download | freebsd-ports-gnome-ecc7013ce780d5b5a53d00eb26157d843172ad8c.tar.gz freebsd-ports-gnome-ecc7013ce780d5b5a53d00eb26157d843172ad8c.tar.zst freebsd-ports-gnome-ecc7013ce780d5b5a53d00eb26157d843172ad8c.zip |
- Update to version 0.3.1.
- Add more OPTIONS (allow building without X11).
Diffstat (limited to 'games/egl/files')
23 files changed, 503 insertions, 595 deletions
diff --git a/games/egl/files/patch-client__gui_public.h b/games/egl/files/patch-client__gui_public.h new file mode 100644 index 000000000000..ad669b4177d2 --- /dev/null +++ b/games/egl/files/patch-client__gui_public.h @@ -0,0 +1,11 @@ +--- client/gui_public.h.orig Mon Jul 24 21:18:44 2006 ++++ client/gui_public.h Mon Jul 24 21:23:08 2006 +@@ -39,7 +39,7 @@ + // gui_events.c + // + void GUI_NamedGlobalEvent (char *name); +-void GUI_NamedGUIEvent (struct gui_s *gui, char *name); ++void GUI_NamedGUIEvent (); + + // + // gui_init.c diff --git a/games/egl/files/patch-client__snd_main.c b/games/egl/files/patch-client__snd_main.c index 8e2f91d5408c..58391f9fabb9 100644 --- a/games/egl/files/patch-client__snd_main.c +++ b/games/egl/files/patch-client__snd_main.c @@ -1,6 +1,6 @@ ---- ./client/snd_main.c.orig Tue May 23 20:05:59 2006 -+++ ./client/snd_main.c Tue May 23 20:06:00 2006 -@@ -25,7 +25,8 @@ +--- client/snd_main.c.orig Mon Jul 24 15:09:29 2006 ++++ client/snd_main.c Mon Jul 24 15:13:16 2006 +@@ -24,7 +24,8 @@ #include "snd_local.h" qBool snd_isActive = qTrue; @@ -11,7 +11,7 @@ qBool snd_isAL; @@ -870,7 +871,7 @@ - int initTime; + uint32 initTime; if (snd_isInitialized) - Snd_Shutdown (); @@ -34,7 +34,7 @@ - al_minDistance = Cvar_Register ("al_minDistance", "100", CVAR_ARCHIVE); - al_maxDistance = Cvar_Register ("al_maxDistance", "8192", CVAR_ARCHIVE); - al_rollOffFactor = Cvar_Register ("al_rollOffFactor", "0.8", CVAR_ARCHIVE); -+ if (s_initSound->integer == 2) { ++ if (s_initSound->intVal == 2) { + al_allowExtensions = Cvar_Register ("al_allowExtensions", "1", CVAR_ARCHIVE|CVAR_LATCH_AUDIO); + al_device = Cvar_Register ("al_device", "", CVAR_ARCHIVE); + al_dopplerFactor = Cvar_Register ("al_dopplerFactor", "1", CVAR_ARCHIVE); @@ -69,7 +69,7 @@ + */ + snd_isInitialized = qTrue; + - if (!s_initSound->value) { + if (!s_initSound->intVal) { Com_Printf (0, "...not initializing\n"); Com_Printf (0, "----------------------------------------\n"); + Snd_Shutdown(); @@ -95,7 +95,7 @@ Com_Printf (0, "----------------------------------------\n"); @@ -955,18 +973,19 @@ { - int size; + uint32 size; - Cmd_RemoveCommand ("snd_restart", cmd_snd_restart); + if (!snd_isInitialized) diff --git a/games/egl/files/patch-client__snd_openal.c b/games/egl/files/patch-client__snd_openal.c deleted file mode 100644 index 545c2128a00f..000000000000 --- a/games/egl/files/patch-client__snd_openal.c +++ /dev/null @@ -1,11 +0,0 @@ ---- ./client/snd_openal.c.orig Tue May 23 20:05:59 2006 -+++ ./client/snd_openal.c Tue May 23 20:06:00 2006 -@@ -40,7 +40,7 @@ - # define AL_FREELIB(a) FreeLibrary (a) - #endif - --#if defined(__linux__) || defined(__FreeBSD__) -+#ifdef __unix__ - # include <dlfcn.h> - # include <unistd.h> - # include <sys/types.h> diff --git a/games/egl/files/patch-common__files.c b/games/egl/files/patch-common__files.c index 4ecbb4cbf844..7078d41521b8 100644 --- a/games/egl/files/patch-common__files.c +++ b/games/egl/files/patch-common__files.c @@ -1,6 +1,6 @@ ---- ./common/files.c.orig Tue May 23 20:05:59 2006 -+++ ./common/files.c Tue May 23 20:06:00 2006 -@@ -1169,6 +1169,23 @@ +--- common/files.c.orig Mon Jul 24 13:37:31 2006 ++++ common/files.c Mon Jul 24 13:40:31 2006 +@@ -1258,6 +1258,23 @@ return BASE_MODDIRNAME; } @@ -24,7 +24,7 @@ /* ================ -@@ -1220,10 +1237,17 @@ +@@ -1314,10 +1331,17 @@ } else { Cvar_VariableSet (fs_gamedircvar, dir, qTrue); @@ -41,8 +41,8 @@ +#endif } - if (!firstTime) { -@@ -1573,16 +1597,30 @@ + // Store a copy of the search paths inverted for FS_FindFiles +@@ -1693,10 +1717,17 @@ fs_defaultPaks = Cvar_Register ("fs_defaultPaks", "1", CVAR_ARCHIVE); // Load pak files @@ -60,16 +60,16 @@ // Any set gamedirs will be freed up to here fs_baseSearchPath = fs_searchPaths; - - if (fs_game->string[0]) +@@ -1704,6 +1735,12 @@ + // Load the game directory + if (fs_game->string[0]) { FS_SetGamedir (fs_game->string, qTrue); -+ +#ifdef HOMEDIR -+ /* Create the writable directory if doesn't exist ("~/.egl"). */ -+ FS_CreatePath(fs_gameDir); -+ Sys_Mkdir(fs_gameDir); -+ Com_Printf(0, "Using '%s' for writing.\n", fs_gameDir); ++ /* Create the writable directory if doesn't exist ("~/.egl"). */ ++ FS_CreatePath(fs_gameDir); ++ Sys_Mkdir(fs_gameDir); ++ Com_Printf(0, "Using '%s' for writing.\n", fs_gameDir); +#endif - - // Check memory integrity - Mem_CheckPoolIntegrity (MEMPOOL_FILESYS); + } + else { + // Store a copy of the search paths inverted for FS_FindFiles diff --git a/games/egl/files/patch-common__net_msg.c b/games/egl/files/patch-common__net_msg.c new file mode 100644 index 000000000000..d67a9942d33f --- /dev/null +++ b/games/egl/files/patch-common__net_msg.c @@ -0,0 +1,11 @@ +--- common/net_msg.c.orig Mon Jul 24 15:18:19 2006 ++++ common/net_msg.c Mon Jul 24 16:38:29 2006 +@@ -134,7 +134,7 @@ + { + byte *buf; + +- assert (!(c < -128 || c > 127)); ++ //assert (!(c < -128 || c > 127)); + + buf = MSG_GetWriteSpace (dest, 1); + buf[0] = c; diff --git a/games/egl/files/patch-linux__glimp_linux.c b/games/egl/files/patch-linux__glimp_linux.c deleted file mode 100644 index 6b03efcd5a12..000000000000 --- a/games/egl/files/patch-linux__glimp_linux.c +++ /dev/null @@ -1,10 +0,0 @@ ---- ./linux/glimp_linux.c.orig Tue May 23 20:05:59 2006 -+++ ./linux/glimp_linux.c Tue May 23 20:06:00 2006 -@@ -282,6 +282,7 @@ - glStatic.cDepthBits = X11_GetGLAttribute(GLX_DEPTH_SIZE); - glStatic.cStencilBits = X11_GetGLAttribute(GLX_STENCIL_SIZE); - -+ X11_SetKMGrab(qFalse, qTrue); - return qTrue; - } - diff --git a/games/egl/files/patch-linux__glimp_linux.h b/games/egl/files/patch-linux__glimp_linux.h deleted file mode 100644 index 64af66498429..000000000000 --- a/games/egl/files/patch-linux__glimp_linux.h +++ /dev/null @@ -1,14 +0,0 @@ ---- ./linux/glimp_linux.h.orig Tue May 23 20:05:59 2006 -+++ ./linux/glimp_linux.h Tue May 23 20:06:00 2006 -@@ -21,9 +21,9 @@ - // glimp_linux.h - // - --#ifndef __linux__ -+#ifndef __unix__ - # error You should not be including this file on this platform --#endif // __linux__ -+#endif // __unix__ - - #ifndef __GLIMP_LINUX_H__ - #define __GLIMP_LINUX_H__ diff --git a/games/egl/files/patch-linux__snd_linux.c b/games/egl/files/patch-linux__snd_linux.c deleted file mode 100644 index 1e0f247d2e4a..000000000000 --- a/games/egl/files/patch-linux__snd_linux.c +++ /dev/null @@ -1,109 +0,0 @@ ---- ./linux/snd_linux.c.orig Tue May 23 20:05:59 2006 -+++ ./linux/snd_linux.c Tue May 23 20:06:00 2006 -@@ -25,7 +25,11 @@ - #include <sys/mman.h> - #include <sys/shm.h> - #include <sys/wait.h> -+#ifdef __linux__ - #include <linux/soundcard.h> -+#else -+#include <sys/soundcard.h> -+#endif - #include <stdio.h> - - #include "../client/snd_local.h" -@@ -56,7 +60,7 @@ - extern uid_t saved_euid; - - if (sndInitialized) -- return; -+ return 1; - - if (!snddevice) { - sndbits = Cvar_Register ("sndbits", "16", CVAR_ARCHIVE); -@@ -101,13 +105,6 @@ - return 0; - } - -- if (ioctl (audio_fd, SNDCTL_DSP_GETOSPACE, &info) == -1) { -- perror ("GETOSPACE"); -- Com_Printf (0, "Um, can't do GETOSPACE?\n"); -- close (audio_fd); -- return 0; -- } -- - // set sample bits & speed - snd_audioDMA.sampleBits = (int)sndbits->value; - if (snd_audioDMA.sampleBits != 16 && snd_audioDMA.sampleBits != 8) { -@@ -126,21 +123,6 @@ - snd_audioDMA.channels = (int)sndchannels->value; - if ((snd_audioDMA.channels < 1) || (snd_audioDMA.channels > 2)) - snd_audioDMA.channels = 2; -- -- snd_audioDMA.samples = info.fragstotal * info.fragsize / (snd_audioDMA.sampleBits/8); -- snd_audioDMA.submissionChunk = 1; -- -- // memory map the dma buffer -- if (!snd_audioDMA.buffer) -- snd_audioDMA.buffer = (unsigned char *) mmap(NULL, info.fragstotal -- * info.fragsize, PROT_WRITE, MAP_FILE|MAP_SHARED, audio_fd, 0); -- -- if (!snd_audioDMA.buffer) { -- perror (snddevice->string); -- Com_Printf (0, "Could not mmap %s\n", snddevice->string); -- close (audio_fd); -- return 0; -- } - - tmp = 0; - if (snd_audioDMA.channels == 2) -@@ -157,6 +139,14 @@ - else - snd_audioDMA.channels = 1; - -+ rc = ioctl (audio_fd, SNDCTL_DSP_SPEED, &snd_audioDMA.speed); -+ if (rc < 0) { -+ perror (snddevice->string); -+ Com_Printf (0, "Could not set %s speed to %d", snddevice->string, snd_audioDMA.speed); -+ close (audio_fd); -+ return 0; -+ } -+ - if (snd_audioDMA.sampleBits == 16) { - rc = AFMT_S16_LE; - rc = ioctl (audio_fd, SNDCTL_DSP_SETFMT, &rc); -@@ -182,13 +172,29 @@ - return 0; - } - -- rc = ioctl (audio_fd, SNDCTL_DSP_SPEED, &snd_audioDMA.speed); -- if (rc < 0) { -- perror (snddevice->string); -- Com_Printf (0, "Could not set %s speed to %d", snddevice->string, snd_audioDMA.speed); -+ if (ioctl (audio_fd, SNDCTL_DSP_GETOSPACE, &info) == -1) { -+ perror ("GETOSPACE"); -+ Com_Printf (0, "Um, can't do GETOSPACE?\n"); - close (audio_fd); -- return 0; -+ return 0; - } -+ -+ snd_audioDMA.samples = info.fragstotal * info.fragsize / (snd_audioDMA.sampleBits/8); -+ snd_audioDMA.submissionChunk = 1; -+ -+ // memory map the dma buffer -+ if (!snd_audioDMA.buffer) -+ snd_audioDMA.buffer = (unsigned char *) mmap(NULL, info.fragstotal -+ * info.fragsize, PROT_WRITE, MAP_FILE|MAP_SHARED, audio_fd, 0); -+ -+ if (!snd_audioDMA.buffer) { -+ perror (snddevice->string); -+ Com_Printf (0, "Could not mmap %s\n", snddevice->string); -+ close (audio_fd); -+ return 0; -+ } -+ -+ - - // toggle the trigger & start her up - tmp = 0; diff --git a/games/egl/files/patch-linux__sys_linux.c b/games/egl/files/patch-linux__sys_linux.c deleted file mode 100644 index fa2572fad7fb..000000000000 --- a/games/egl/files/patch-linux__sys_linux.c +++ /dev/null @@ -1,58 +0,0 @@ ---- ./linux/sys_linux.c.orig Tue May 23 20:05:59 2006 -+++ ./linux/sys_linux.c Tue May 23 20:06:00 2006 -@@ -43,10 +43,6 @@ - - #include "../common/common.h" - --#if defined(__FreeBSD__) --#include <machine/param.h> --#endif -- - uint32 sys_frameTime; - int sys_currTime; - -@@ -607,7 +603,6 @@ - void *Sys_LoadLibrary (libType_t libType, void *parms) - { - char name[MAX_OSPATH]; -- char cwd[MAX_OSPATH]; - char *path; - void *(*APIfunc) (void *); - void **lib; -@@ -657,13 +652,13 @@ - switch (libType) { - case LIB_CGAME: - lib = &cGameLib; -- libname = "eglcgame" ARCH ".so"; -+ libname = "eglcgame.so"; - apifuncname = "GetCGameAPI"; - break; - - case LIB_GAME: - lib = &gameLib; -- libname = "game" ARCH ".so"; -+ libname = "game.so"; - apifuncname = "GetGameAPI"; - break; - -@@ -673,8 +668,7 @@ - } - - // check the current debug directory first for development purposes -- getcwd (cwd, sizeof(cwd)); -- Q_snprintfz (name, sizeof(name), "%s/%s/%s", cwd, debugdir, libname); -+ Q_snprintfz (name, sizeof(name), "%s/%s", debugdir, libname); - *lib = dlopen (name, RTLD_NOW); - - if (*lib) { -@@ -697,8 +691,10 @@ - Com_DevPrintf (0, "dlopen (%s)\n", name); - break; - } -+#if 0 - if (!*lib && (error = dlerror())) - Com_Printf (PRNT_ERROR, "dlopen (%s): %s\n", name, error); -+#endif - } - } - diff --git a/games/egl/files/patch-linux__x11_linux.h b/games/egl/files/patch-linux__x11_linux.h deleted file mode 100644 index a00634674628..000000000000 --- a/games/egl/files/patch-linux__x11_linux.h +++ /dev/null @@ -1,11 +0,0 @@ ---- ./linux/x11_linux.h.orig Tue May 23 20:05:59 2006 -+++ ./linux/x11_linux.h Tue May 23 20:06:00 2006 -@@ -1,6 +1,6 @@ --#ifndef __linux__ -+#ifndef __unix__ - # error You should not be including this file on this platform --#endif // __linux__ -+#endif // __unix__ - - #ifndef __X11_LINUX_H__ - #define __X11_LINUX_H__ diff --git a/games/egl/files/patch-linux__x11_main.c b/games/egl/files/patch-linux__x11_main.c deleted file mode 100644 index 7a0c54c5f880..000000000000 --- a/games/egl/files/patch-linux__x11_main.c +++ /dev/null @@ -1,11 +0,0 @@ ---- ./linux/x11_main.c.orig Tue May 23 20:05:59 2006 -+++ ./linux/x11_main.c Tue May 23 20:06:00 2006 -@@ -147,7 +147,7 @@ - } - } - --static void X11_SetKMGrab (qBool kg, qBool mg) -+void X11_SetKMGrab (qBool kg, qBool mg) - { - keybd_grabbed = kg; - mouse_grabbed = mg; diff --git a/games/egl/files/patch-makefile b/games/egl/files/patch-makefile index 411d76cca0d1..50fdb2e85302 100644 --- a/games/egl/files/patch-makefile +++ b/games/egl/files/patch-makefile @@ -1,34 +1,22 @@ ---- ./makefile.orig Tue May 23 20:06:00 2006 -+++ ./makefile Tue May 23 20:11:46 2006 -@@ -1,37 +1,64 @@ --BUILD_CLIENT=YES # client executable --BUILD_DEDICATED=YES # server executable --BUILD_CGAME=YES # cgame dll --BUILD_GAME=YES # game dll +--- makefile.orig Mon Jul 24 15:18:20 2006 ++++ makefile Mon Jul 24 15:22:20 2006 +@@ -1,19 +1,30 @@ +# GNU Makefile for EGL. + +# Compilation components and options. -+BUILD_CLIENT?=YES # Client executable. -+BUILD_DEDICATED?=YES # Server executable. -+BUILD_CGAME?=YES # cgame shared library. -+BUILD_GAME?=YES # game shared library. + BUILD_CLIENT?=YES # client executable + BUILD_DEDICATED?=YES # server executable + BUILD_CGAME?=YES # cgame dll + BUILD_GAME?=YES # game dll +WITH_OPT_CFLAGS?=YES # Optimized compiler flags. +WITH_HOMEDIR?=YES # Write files in "~/.egl". +# Common variables. +CC?=gcc VERSION=0.0.6 -+EGL_MAKEFILE=makefile - -+# Compiler flags. -+SHARED_FLAGS= $(CFLAGS) -DARCH='\"$(ARCH)\"' \ -+ -DGAME_NAME='\"$(GAME_NAME)\"' \ -+ -DEGLCGAME_NAME='\"$(EGLCGAME_NAME)\"' -+RELEASE_CFLAGS= -Isource/ -I./ -I../ $(SHARED_FLAGS) -+DEBUG_CFLAGS=- g -Isource/ -I./ -I../ $(SHARED_FLAGS) -DC_ONLY - +- -CC=gcc --EGL_MAKEFILE=makefile + EGL_MAKEFILE=makefile -SHARED_FLAGS:= -RELEASE_CFLAGS=-Isource/ -I./ -I../ $(SHARED_FLAGS) -O2 -fno-strict-aliasing -ffast-math -fexpensive-optimizations -DEBUG_CFLAGS=-g -Isource/ -I./ -I../ $(SHARED_FLAGS) -DC_ONLY @@ -36,25 +24,23 @@ -DED_LDFLAGS=-ldl -lm -lz -MODULE_LDFLAGS=-ldl -lm -X11_LDFLAGS=-L/usr/X11R6/lib -lX11 -lXext ++ ++# Compiler flags. ++SHARED_FLAGS:=-Isource -I./ -I../ $(CFLAGS) ++RELEASE_CFLAGS=$(SHARED_FLAGS) ++DEBUG_CFLAGS=$(SHARED_FLAGS) -g -DC_ONLY ++ +# Linker flags. +LDFLAGS+=-lm +DED_LDFLAGS=-lz +MODULE_LDFLAGS= +X11_LDFLAGS=-lX11 -lXext -ljpeg -lpng -lz - ++ +# Compilation commands. SHLIBCFLAGS=-fPIC SHLIBLDFLAGS=-shared - -- - DO_CC=$(CC) $(CFLAGS) -o $@ -c $< - DO_DED_CC=$(CC) $(CFLAGS) -DDEDICATED_ONLY -o $@ -c $< - DO_SHLIB_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $< - -- --# this nice line comes from the linux kernel makefile -+# This nice line comes from the linux kernel makefile. +@@ -26,8 +37,22 @@ ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc/ -e s/sparc64/sparc/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/alpha/axp/) SHLIBEXT =so @@ -67,8 +53,6 @@ + +ifeq ($(OSTYPE),Linux) +LDFLAGS+=-ldl -+GAME_NAME= game$(ARCH) -+EGLCGAME_NAME= eglcgame$(ARCH) +endif + +ifeq ($(OSTYPE),FreeBSD) @@ -77,74 +61,170 @@ + -DDATADIR='\"$(Q2DIR)\"' -DLIBDIR='\"$(LIBDIR)\"' +LDFLAGS+= -L$(LOCALBASE)/lib -L$(X11BASE)/lib +X11_LDFLAGS+= $(PTHREAD_LIBS) -+GAME_NAME= game -+EGLCGAME_NAME= eglcgame +endif ifeq ($(strip $(BUILD_CLIENT)),YES) TARGETS += $(BUILDDIR)/egl -@@ -42,20 +69,27 @@ +@@ -38,19 +63,27 @@ endif ifeq ($(strip $(BUILD_CGAME)),YES) - TARGETS += $(BUILDDIR)/baseq2/eglcgame$(ARCH).$(SHLIBEXT) -+ TARGETS += $(BUILDDIR)/baseq2/$(EGLCGAME_NAME).$(SHLIBEXT) ++ TARGETS += $(BUILDDIR)/baseq2/eglcgame.$(SHLIBEXT) endif ifeq ($(strip $(BUILD_GAME)),YES) - TARGETS += $(BUILDDIR)/baseq2/game$(ARCH).$(SHLIBEXT) -+ TARGETS += $(BUILDDIR)/baseq2/$(GAME_NAME).$(SHLIBEXT) ++ TARGETS += $(BUILDDIR)/baseq2/game.$(SHLIBEXT) endif +-ifeq ($(wildcard /usr/include/X11/extensions/xf86vmode.h),/usr/include/X11/extensions/xf86vmode.h) +ifeq ($(strip $(WITH_OPT_CFLAGS)),YES) +RELEASE_CFLAGS += -O2 -fno-strict-aliasing -ffast-math -fexpensive-optimizations +endif - --ifeq ($(wildcard /usr/include/X11/extensions/xf86vmode.h),/usr/include/X11/extensions/xf86vmode.h) ++ +ifeq ($(strip $(WITH_HOMEDIR)),YES) +SHARED_FLAGS += -DHOMEDIR +endif + -+ifeq ($(wildcard $(X11BASE)/include/X11/extensions/xf86vmode.h),$(X11BASE)/include/X11/extensions/xf86vmode.h) ++ifeq ($(wildcard $(X11BASE)/include/X11/extensions/xf86vmode.h),/usr/include/X11/extensions/xf86vmode.h) SHARED_FLAGS += -DXF86VMODE X11_LDFLAGS += -lXxf86vm endif -ifeq ($(wildcard /usr/include/X11/extensions/xf86dga.h),/usr/include/X11/extensions/xf86dga.h) -+ifeq ($(wildcard $(X11BASE)/include/X11/extensions/xf86dga.h),$(X11BASE)/include/X11/extensions/xf86dga.h) ++ifeq ($(wildcard $(X11BASE)/include/X11/extensions/xf86dga.h),/usr/include/X11/extensions/xf86dga.h) SHARED_FLAGS += -DXF86DGA X11_LDFLAGS += -lXxf86dga endif -@@ -527,7 +561,7 @@ +@@ -111,6 +144,7 @@ + $(BUILDDIR)/client/sv_user.o \ + $(BUILDDIR)/client/sv_world.o \ + \ ++ $(BUILDDIR)/client/cl_acapi.o \ + $(BUILDDIR)/client/cl_cgapi.o \ + $(BUILDDIR)/client/cl_cin.o \ + $(BUILDDIR)/client/cl_console.o \ +@@ -135,7 +169,7 @@ + \ + $(BUILDDIR)/client/r_math.o \ + $(BUILDDIR)/client/rb_batch.o \ +- $(BUILDDIR)/client/rb_cin.o \ ++ $(BUILDDIR)/client/rf_video.o \ + $(BUILDDIR)/client/rb_entity.o \ + $(BUILDDIR)/client/rb_light.o \ + $(BUILDDIR)/client/rb_math.o \ +@@ -173,7 +207,6 @@ + $(BUILDDIR)/client/x11_main.o \ + $(BUILDDIR)/client/x11_utils.o \ + \ +- $(BUILDDIR)/client/byteswap.o \ + $(BUILDDIR)/client/infostrings.o \ + $(BUILDDIR)/client/m_angles.o \ + $(BUILDDIR)/client/m_bounds.o \ +@@ -222,6 +255,7 @@ + $(BUILDDIR)/client/sv_user.o: $(SOURCEDIR)/server/sv_user.c; $(DO_CC) + $(BUILDDIR)/client/sv_world.o: $(SOURCEDIR)/server/sv_world.c; $(DO_CC) + ++$(BUILDDIR)/client/cl_acapi.o: $(SOURCEDIR)/client/cl_acapi.c; $(DO_CC) + $(BUILDDIR)/client/cl_cgapi.o: $(SOURCEDIR)/client/cl_cgapi.c; $(DO_CC) + $(BUILDDIR)/client/cl_cin.o: $(SOURCEDIR)/client/cl_cin.c; $(DO_CC) + $(BUILDDIR)/client/cl_console.o: $(SOURCEDIR)/client/cl_console.c; $(DO_CC) +@@ -246,7 +280,7 @@ + + $(BUILDDIR)/client/r_math.o: $(SOURCEDIR)/renderer/r_math.c; $(DO_CC) + $(BUILDDIR)/client/rb_batch.o: $(SOURCEDIR)/renderer/rb_batch.c; $(DO_CC) +-$(BUILDDIR)/client/rb_cin.o: $(SOURCEDIR)/renderer/rb_cin.c; $(DO_CC) ++$(BUILDDIR)/client/rf_video.o: $(SOURCEDIR)/renderer/rf_video.c; $(DO_CC) + $(BUILDDIR)/client/rb_entity.o: $(SOURCEDIR)/renderer/rb_entity.c; $(DO_CC) + $(BUILDDIR)/client/rb_light.o: $(SOURCEDIR)/renderer/rb_light.c; $(DO_CC) + $(BUILDDIR)/client/rb_math.o: $(SOURCEDIR)/renderer/rb_math.c; $(DO_CC) +@@ -284,7 +318,6 @@ + $(BUILDDIR)/client/x11_main.o: $(SOURCEDIR)/unix/x11_main.c; $(DO_CC) + $(BUILDDIR)/client/x11_utils.o: $(SOURCEDIR)/unix/x11_utils.c; $(DO_CC) + +-$(BUILDDIR)/client/byteswap.o: $(SOURCEDIR)/shared/byteswap.c; $(DO_CC) + $(BUILDDIR)/client/infostrings.o: $(SOURCEDIR)/shared/infostrings.c; $(DO_CC) + $(BUILDDIR)/client/m_angles.o: $(SOURCEDIR)/shared/m_angles.c; $(DO_CC) + $(BUILDDIR)/client/m_bounds.o: $(SOURCEDIR)/shared/m_bounds.c; $(DO_CC) +@@ -337,7 +370,6 @@ + $(BUILDDIR)/dedicated/unix_main.o \ + $(BUILDDIR)/dedicated/unix_udp.o \ + \ +- $(BUILDDIR)/dedicated/byteswap.o \ + $(BUILDDIR)/dedicated/infostrings.o \ + $(BUILDDIR)/dedicated/m_angles.o \ + $(BUILDDIR)/dedicated/m_bounds.o \ +@@ -355,7 +387,7 @@ $(BUILDDIR)/eglded: $(OBJS_DEDICATED) @echo Linking eglded; - $(CC) $(CFLAGS) -o $@ $(OBJS_DEDICATED) $(DED_LDFLAGS) + $(CC) $(CFLAGS) -o $@ $(OBJS_DEDICATED) $(LDFLAGS) $(DED_LDFLAGS) - $(BUILDDIR)/dedicated/alias.o: $(SOURCEDIR)/common/alias.c - $(DO_DED_CC) -@@ -738,9 +772,9 @@ + $(BUILDDIR)/dedicated/alias.o: $(SOURCEDIR)/common/alias.c; $(DO_DED_CC) + $(BUILDDIR)/dedicated/cbuf.o: $(SOURCEDIR)/common/cbuf.c; $(DO_DED_CC) +@@ -390,7 +422,6 @@ + $(BUILDDIR)/dedicated/unix_main.o: $(SOURCEDIR)/unix/unix_main.c; $(DO_DED_CC) + $(BUILDDIR)/dedicated/unix_udp.o: $(SOURCEDIR)/unix/unix_udp.c; $(DO_DED_CC) + +-$(BUILDDIR)/dedicated/byteswap.o: $(SOURCEDIR)/shared/byteswap.c; $(DO_DED_CC) + $(BUILDDIR)/dedicated/infostrings.o: $(SOURCEDIR)/shared/infostrings.c; $(DO_DED_CC) + $(BUILDDIR)/dedicated/m_angles.o: $(SOURCEDIR)/shared/m_angles.c; $(DO_DED_CC) + $(BUILDDIR)/dedicated/m_bounds.o: $(SOURCEDIR)/shared/m_bounds.c; $(DO_DED_CC) +@@ -475,7 +506,6 @@ + \ + $(BUILDDIR)/baseq2/cgame/pmove.o \ + \ +- $(BUILDDIR)/baseq2/cgame/byteswap.o \ + $(BUILDDIR)/baseq2/cgame/infostrings.o \ + $(BUILDDIR)/baseq2/cgame/m_angles.o \ + $(BUILDDIR)/baseq2/cgame/m_bounds.o \ +@@ -490,9 +520,9 @@ $(BUILDDIR)/baseq2/cgame/m_flash.o \ -$(BUILDDIR)/baseq2/eglcgame$(ARCH).$(SHLIBEXT): $(OBJS_CGAME) -+$(BUILDDIR)/baseq2/$(EGLCGAME_NAME).$(SHLIBEXT): $(OBJS_CGAME) ++$(BUILDDIR)/baseq2/eglcgame.$(SHLIBEXT): $(OBJS_CGAME) @echo Linking cgame dll; - $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(OBJS_CGAME) $(MODULE_LDFLAGS) + $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(OBJS_CGAME) $(LDFLAGS) $(MODULE_LDFLAGS) - $(BUILDDIR)/baseq2/cgame/cg_api.o: $(SOURCEDIR)/cgame/cg_api.c - $(DO_SHLIB_CC) -@@ -1026,9 +1060,9 @@ + $(BUILDDIR)/baseq2/cgame/cg_api.o: $(SOURCEDIR)/cgame/cg_api.c; $(DO_SHLIB_CC) + $(BUILDDIR)/baseq2/cgame/cg_console.o: $(SOURCEDIR)/cgame/cg_console.c; $(DO_SHLIB_CC) +@@ -557,7 +587,6 @@ + $(BUILDDIR)/baseq2/cgame/ui_keys.o: $(SOURCEDIR)/cgame/ui/ui_keys.c; $(DO_SHLIB_CC) + $(BUILDDIR)/baseq2/cgame/pmove.o: $(SOURCEDIR)/cgame/pmove.c; $(DO_SHLIB_CC) + +-$(BUILDDIR)/baseq2/cgame/byteswap.o: $(SOURCEDIR)/shared/byteswap.c; $(DO_SHLIB_CC) + $(BUILDDIR)/baseq2/cgame/infostrings.o: $(SOURCEDIR)/shared/infostrings.c; $(DO_SHLIB_CC) + $(BUILDDIR)/baseq2/cgame/m_angles.o: $(SOURCEDIR)/shared/m_angles.c; $(DO_SHLIB_CC) + $(BUILDDIR)/baseq2/cgame/m_bounds.o: $(SOURCEDIR)/shared/m_bounds.c; $(DO_SHLIB_CC) +@@ -625,7 +654,6 @@ + $(BUILDDIR)/baseq2/game/p_view.o \ + $(BUILDDIR)/baseq2/game/p_weapon.o \ + \ +- $(BUILDDIR)/baseq2/game/byteswap.o \ + $(BUILDDIR)/baseq2/game/infostrings.o \ + $(BUILDDIR)/baseq2/game/m_angles.o \ + $(BUILDDIR)/baseq2/game/m_bounds.o \ +@@ -639,9 +667,9 @@ $(BUILDDIR)/baseq2/game/string.o \ -$(BUILDDIR)/baseq2/game$(ARCH).$(SHLIBEXT): $(OBJS_GAME) -+$(BUILDDIR)/baseq2/$(GAME_NAME).$(SHLIBEXT): $(OBJS_GAME) ++$(BUILDDIR)/baseq2/game.$(SHLIBEXT): $(OBJS_GAME) @echo Linking game dll; - $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(OBJS_GAME) $(MODULE_LDFLAGS) + $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(OBJS_GAME) $(LDFLAGS) $(MODULE_LDFLAGS) - $(BUILDDIR)/baseq2/game/cg_api.o: $(SOURCEDIR)/cgame/cg_api.c - $(DO_SHLIB_CC) + $(BUILDDIR)/baseq2/game/g_ai.o: $(SOURCEDIR)/game/g_ai.c; $(DO_SHLIB_CC) + $(BUILDDIR)/baseq2/game/g_chase.o: $(SOURCEDIR)/game/g_chase.c; $(DO_SHLIB_CC) +@@ -691,7 +719,6 @@ + $(BUILDDIR)/baseq2/game/p_view.o: $(SOURCEDIR)/game/p_view.c; $(DO_SHLIB_CC) + $(BUILDDIR)/baseq2/game/p_weapon.o: $(SOURCEDIR)/game/p_weapon.c; $(DO_SHLIB_CC) + +-$(BUILDDIR)/baseq2/game/byteswap.o: $(SOURCEDIR)/shared/byteswap.c; $(DO_SHLIB_CC) + $(BUILDDIR)/baseq2/game/infostrings.o: $(SOURCEDIR)/shared/infostrings.c; $(DO_SHLIB_CC) + $(BUILDDIR)/baseq2/game/m_angles.o: $(SOURCEDIR)/shared/m_angles.c; $(DO_SHLIB_CC) + $(BUILDDIR)/baseq2/game/m_bounds.o: $(SOURCEDIR)/shared/m_bounds.c; $(DO_SHLIB_CC) diff --git a/games/egl/files/patch-renderer__qgl.h b/games/egl/files/patch-renderer__qgl.h deleted file mode 100644 index 8ba30f2f935a..000000000000 --- a/games/egl/files/patch-renderer__qgl.h +++ /dev/null @@ -1,20 +0,0 @@ ---- ./renderer/qgl.h.orig Tue May 23 20:05:59 2006 -+++ ./renderer/qgl.h Tue May 23 20:06:00 2006 -@@ -30,7 +30,7 @@ - - #include <GL/gl.h> - --#if defined(__linux__) || defined(__FreeBSD__) -+#ifdef __unix__ - # include <GL/glx.h> - #endif - -@@ -431,7 +431,7 @@ - - - --#if defined(__linux__) || defined(__FreeBSD__) -+#ifdef __unix__ - - // - // linux diff --git a/games/egl/files/patch-renderer__rb_qgl.h b/games/egl/files/patch-renderer__rb_qgl.h new file mode 100644 index 000000000000..d0d344e6b2f4 --- /dev/null +++ b/games/egl/files/patch-renderer__rb_qgl.h @@ -0,0 +1,13 @@ +--- renderer/rb_qgl.h.orig Mon Jul 24 15:09:29 2006 ++++ renderer/rb_qgl.h Mon Jul 24 15:14:03 2006 +@@ -34,8 +34,10 @@ + # include <GL/glx.h> + #endif + ++#if 0 + typedef int GLsizeiptrARB; + typedef int GLintptrARB; ++#endif + + #ifndef APIENTRY + # define APIENTRY diff --git a/games/egl/files/patch-renderer__r_init.c b/games/egl/files/patch-renderer__rf_init.c index acab148d9f26..743a1bf09c9f 100644 --- a/games/egl/files/patch-renderer__r_init.c +++ b/games/egl/files/patch-renderer__rf_init.c @@ -1,5 +1,5 @@ ---- ./renderer/r_init.c.orig Tue May 23 20:05:59 2006 -+++ ./renderer/r_init.c Tue May 23 20:06:00 2006 +--- ./renderer/rf_init.c.orig Tue May 23 20:05:59 2006 ++++ ./renderer/rf_init.c Tue May 23 20:06:00 2006 @@ -1395,6 +1395,7 @@ Com_Printf (0, "----------------------------------------\n"); diff --git a/games/egl/files/patch-server__sv_main.c b/games/egl/files/patch-server__sv_main.c new file mode 100644 index 000000000000..fb0c9df609cb --- /dev/null +++ b/games/egl/files/patch-server__sv_main.c @@ -0,0 +1,18 @@ +--- server/sv_main.c.orig Mon Jul 24 15:06:36 2006 ++++ server/sv_main.c Mon Jul 24 15:09:02 2006 +@@ -145,6 +145,7 @@ + */ + void SV_UpdateTitle (void) + { ++#if 0 + hostname->modified = qFalse; + + if (Com_ServerState() == SS_GAME) { +@@ -153,6 +154,7 @@ + } + + Sys_SetConsoleTitle (NULL); ++#endif + } + + /* diff --git a/games/egl/files/patch-shared__shared.h b/games/egl/files/patch-shared__shared.h index c80d1af68309..9ffda3c8b663 100644 --- a/games/egl/files/patch-shared__shared.h +++ b/games/egl/files/patch-shared__shared.h @@ -1,277 +1,21 @@ ---- ./shared/shared.h.orig Tue May 23 20:05:59 2006 -+++ ./shared/shared.h Tue May 23 20:06:00 2006 -@@ -41,6 +41,15 @@ - //R1Q2 SPECIFC - - // ========================================================================= -+// Common -+// -+#ifdef NDEBUG -+# define DEBUG_STR "" -+#else -+# define DEBUG_STR " Debug" -+#endif -+ -+// ========================================================================= - // Windows - // - #ifdef WIN32 -@@ -68,23 +77,15 @@ - - # define BUILDSTRING "Win32" - --# ifdef NDEBUG --# ifdef _M_IX86 --# define CPUSTRING "x86" --# elif defined _M_ALPHA --# define CPUSTRING "AXP" --# endif --# else // NDEBUG --# ifdef _M_IX86 --# define CPUSTRING "x86 Debug" --# elif defined _M_ALPHA --# define CPUSTRING "AXP Debug" --# endif --# endif // NDEBUG -+# ifdef _M_IX86 -+# define CPUSTRING "x86" -+# elif defined _M_ALPHA -+# define CPUSTRING "AXP" -+# endif - --typedef __int16 int16; --typedef __int32 int32; --typedef __int64 int64; -+typedef __int16 int16; -+typedef __int32 int32; -+typedef __int64 int64; - typedef unsigned __int16 uint16; - typedef unsigned __int32 uint32; - typedef unsigned __int64 uint64; -@@ -94,49 +95,35 @@ - # define __declspec_naked __declspec(naked) - - // ========================================================================= --// Linux -+// Unix in general (Linux, *BSD, etc) - // --#elif defined __linux__ --# include <stdint.h> -- --# define GL_DRIVERNAME "libGL.so.1" --# define AL_DRIVERNAME "libopenal.so.0" --# define GL_FORCEFINISH -+#elif defined __unix__ - --# define HAVE_INLINE --# define HAVE_STRCASECMP -+// Linux -+# if defined(__linux__) -+# include <stdint.h> - --# define BUILDSTRING "Linux" -+# define BUILDSTRING "Linux" - --# ifdef NDEBUG --# ifdef __i386__ --# define CPUSTRING "i386" --# elif defined(__alpha__) --# define CPUSTRING "AXP" --# endif --# else // NDEBUG --# ifdef __i386__ --# define CPUSTRING "i386 Debug" --# elif defined(__alpha__) --# define CPUSTRING "AXP Debug" -+// FreeBSD -+# elif defined __FreeBSD__ -+# include <machine/param.h> -+# if __FreeBSD_version < 500000 -+# include <inttypes.h> -+# else -+# include <stdint.h> - # endif --# endif // NDEBUG - --typedef int16_t int16; --typedef int32_t int32; --typedef int64_t int64; --typedef uint16_t uint16; --typedef uint32_t uint32; --typedef uint64_t uint64; -+# define BUILDSTRING "FreeBSD" - --# define __declspec --# define __declspec_naked -+# else -+# include <stdint.h> -+# endif - --// ========================================================================= --// FreeBSD --// --#elif defined __FreeBSD__ --# include <stdint.h> -+// Common -+# ifdef ARCH -+# define CPUSTRING ARCH -+# endif - - # define GL_DRIVERNAME "libGL.so.1" - # define AL_DRIVERNAME "libopenal.so.0" -@@ -145,22 +132,6 @@ - # define HAVE_INLINE - # define HAVE_STRCASECMP - --# define BUILDSTRING "FreeBSD" -- --# ifdef NDEBUG --# ifdef __i386__ --# define CPUSTRING "i386" --# elif defined(__alpha__) --# define CPUSTRING "AXP" --# endif --# else // NDEBUG --# ifdef __i386__ --# define CPUSTRING "i386 Debug" --# elif defined(__alpha__) --# define CPUSTRING "AXP Debug" --# endif --# endif // NDEBUG -- - typedef int16_t int16; - typedef int32_t int32; - typedef int64_t int64; -@@ -225,7 +196,7 @@ - - // ========================================================================= - --#if (defined(_M_IX86) || defined(__i386__)) && !defined(C_ONLY) && !defined(__linux__) && !defined(__FreeBSD__) // FIXME: make this work with linux -+#if (defined(_M_IX86) || defined(__i386__)) && !defined(C_ONLY) && !defined(__unix__) // FIXME: make this work with linux - # define id386 - #else - # ifdef id386 -@@ -233,14 +204,6 @@ - # endif - #endif - --#if !defined(ENDIAN_LITTLE) && !defined(ENDIAN_BIG) --# if defined(__i386__) || defined(__ia64__) || defined(WIN32) || (defined(__alpha__) || defined(__alpha)) || defined(__arm__) || (defined(__mips__) && defined(__MIPSEL__)) || defined(__LITTLE_ENDIAN__) --# define ENDIAN_LITTLE --# else --# define ENDIAN_BIG --# endif --#endif -- - #ifndef BUILDSTRING - # define BUILDSTRING "Unknown" - #endif -@@ -755,100 +718,17 @@ +--- shared/shared.h.orig Mon Jul 24 15:01:39 2006 ++++ shared/shared.h Mon Jul 24 15:05:26 2006 +@@ -742,12 +742,12 @@ ============================================================================== - - BYTE ORDER FUNCTIONS -- --============================================================================== --*/ -- --#ifdef USE_BYTESWAP -- --/* --=============== --FloatSwap --=============== --*/ --static inline float FloatSwap (float f) --{ -- union { -- byte b[4]; -- float f; -- } in, out; -- -- in.f = f; - -- out.b[0] = in.b[3]; -- out.b[1] = in.b[2]; -- out.b[2] = in.b[1]; -- out.b[3] = in.b[0]; -- -- return out.f; --} -- -- --/* --=============== --LongSwap --=============== --*/ --static inline int LongSwap (int l) --{ -- union { -- byte b[4]; -- int l; -- } in, out; -- -- in.l = l; -- -- out.b[0] = in.b[3]; -- out.b[1] = in.b[2]; -- out.b[2] = in.b[1]; -- out.b[3] = in.b[0]; -- -- return out.l; --} -- --/* --=============== --ShortSwap --=============== -+============================================================================== */ --static inline int16 ShortSwap (int16 s) --{ -- union { -- byte b[2]; -- int16 s; -- } in, out; -- -- in.s = s; -- out.b[0] = in.b[1]; -- out.b[1] = in.b[0]; -- -- return out.s; --} -- --#if defined(WIN32) || defined(__linux__) || defined(__FreeBSD__) -- --#define LittleFloat --#define LittleLong --#define LittleShort -- --static inline float BigFloat (float f) { return FloatSwap (f); } --static inline int BigLong (int l) { return LongSwap (l); } --static inline int16 BigShort (int16 s) { return ShortSwap (s); } -- --#elif (defined __MACOS__ || defined MACOS_X) -- --#define BigFloat --#define BigLong --#define BigShort -- --static inline float LittleFloat (float f) { return FloatSwap (f); } --static inline int LittleLong (int l) { return LongSwap (l); } --static inline int16 LittleShort (int16 s) { return ShortSwap (s); } -- --#endif -- --#endif // USE_BYTESWAP -+int16 LittleShort (int16 l); -+int32 LittleLong (int32 l); -+float LittleFloat (float l); -+int16 BigShort (int16 l); -+int32 BigLong (int32 l); -+float BigFloat (float l); -+void Swap_Init (void); +-float (*LittleFloat) (float f); +-int (*LittleLong) (int l); +-int16 (*LittleShort) (int16 s); +-float (*BigFloat) (float f); +-int (*BigLong) (int l); +-int16 (*BigShort) (int16 s); ++float LittleFloat (float f); ++int LittleLong (int l); ++int16 LittleShort (int16 s); ++float BigFloat (float f); ++int BigLong (int l); ++int16 BigShort (int16 s); + + void Swap_Init (void); - /* - ============================================================================== diff --git a/games/egl/files/patch-unix__unix_console.c b/games/egl/files/patch-unix__unix_console.c new file mode 100644 index 000000000000..8dcf2c64402e --- /dev/null +++ b/games/egl/files/patch-unix__unix_console.c @@ -0,0 +1,10 @@ +--- unix/unix_console.c.orig Mon Jul 24 21:31:05 2006 ++++ unix/unix_console.c Mon Jul 24 21:32:15 2006 +@@ -25,6 +25,7 @@ + #include "unix_local.h" + #include <unistd.h> + #include <fcntl.h> ++#include <sys/time.h> + + qBool stdin_active = qTrue; + diff --git a/games/egl/files/patch-unix__unix_glimp.c b/games/egl/files/patch-unix__unix_glimp.c new file mode 100644 index 000000000000..82e220eb6db9 --- /dev/null +++ b/games/egl/files/patch-unix__unix_glimp.c @@ -0,0 +1,34 @@ +--- unix/unix_glimp.c.orig Mon Jul 24 16:42:03 2006 ++++ unix/unix_glimp.c Mon Jul 24 16:47:48 2006 +@@ -41,6 +41,9 @@ + + glxState_t glxState = {.OpenGLLib = NULL}; + ++static void *cmd_vid_restart; ++static void *cmd_listremaps; ++ + /* + ============================================================================= + +@@ -208,8 +211,8 @@ + vid_fullscreen = Cvar_Register ("vid_fullscreen", "0", CVAR_ARCHIVE); + + // Add some console commands that we want to handle +- Cmd_AddCommand (qFalse, "vid_restart", VID_Restart_f, "Restarts refresh and media"); +- Cmd_AddCommand (qFalse, "listremaps", ListRemaps_f, "Lists what keys are remapped to AUX* bindings"); ++ cmd_vid_restart = Cmd_AddCommand ("vid_restart", VID_Restart_f, "Restarts refresh and media"); ++ cmd_listremaps = Cmd_AddCommand ("listremaps", ListRemaps_f, "Lists what keys are remapped to AUX* bindings"); + + // Start the graphics mode and load refresh DLL + vid_isActive = qFalse; +@@ -232,8 +235,8 @@ + vid_isActive = qFalse; + } + +- Cmd_RemoveCommand ("vid_restart", NULL); +- Cmd_RemoveCommand ("listremaps", NULL); ++ Cmd_RemoveCommand ("vid_restart", cmd_vid_restart); ++ Cmd_RemoveCommand ("listremaps", cmd_listremaps); + } + + /* diff --git a/games/egl/files/patch-unix__unix_main.c b/games/egl/files/patch-unix__unix_main.c new file mode 100644 index 000000000000..744819756069 --- /dev/null +++ b/games/egl/files/patch-unix__unix_main.c @@ -0,0 +1,42 @@ +--- unix/unix_main.c.orig Mon Jul 24 14:03:13 2006 ++++ unix/unix_main.c Mon Jul 24 14:06:39 2006 +@@ -44,10 +44,6 @@ + #include "../common/common.h" + #include "unix_local.h" + +-#if defined(__FreeBSD__) +-#include <machine/param.h> +-#endif +- + uid_t saved_euid; + + #ifndef DEDICATED_ONLY +@@ -623,8 +619,8 @@ + } libList_t; + + static libList_t sys_libList[LIB_MAX] = { +- { "LIB_CGAME", NULL, "eglcgame" LIBARCH ".so", "GetCGameAPI" }, +- { "LIB_GAME", NULL, "game" LIBARCH ".so", "GetGameAPI" }, ++ { "LIB_CGAME", NULL, "eglcgame.so", "GetCGameAPI" }, ++ { "LIB_GAME", NULL, "game.so", "GetGameAPI" }, + }; + + /* +@@ -660,7 +656,6 @@ + void *Sys_LoadLibrary (libType_t libType, void *parms) + { + char name[MAX_OSPATH]; +- char cwd[MAX_OSPATH]; + char *path; + void *(*APIfunc) (void *); + void **lib; +@@ -713,8 +708,7 @@ + Com_Error (ERR_FATAL, "Sys_LoadLibrary (%s) without Sys_UnloadLibrary", sys_libList[libType].title); + + // Check the current debug directory first for development purposes +- getcwd (cwd, sizeof(cwd)); +- Q_snprintfz (name, sizeof(name), "%s/%s/%s", cwd, debugdir, libName); ++ Q_snprintfz (name, sizeof(name), "%s/%s", debugdir, libName); + *lib = dlopen (name, RTLD_NOW); + + if (*lib) { diff --git a/games/egl/files/patch-unix__unix_snd_oss.c b/games/egl/files/patch-unix__unix_snd_oss.c new file mode 100644 index 000000000000..380ac3e8666f --- /dev/null +++ b/games/egl/files/patch-unix__unix_snd_oss.c @@ -0,0 +1,44 @@ +--- unix/unix_snd_oss.c.orig Mon Jul 24 13:47:59 2006 ++++ unix/unix_snd_oss.c Mon Jul 24 14:01:57 2006 +@@ -29,7 +29,11 @@ + #include <sys/mman.h> + #include <sys/shm.h> + #include <sys/wait.h> ++#ifdef __linux__ + #include <linux/soundcard.h> ++#else ++#include <sys/soundcard.h> ++#endif + #include <stdio.h> + + #include "../client/snd_local.h" +@@ -152,6 +156,14 @@ + else + snd_audioDMA.channels = 1; + ++ rc = ioctl (oss_audioFD, SNDCTL_DSP_SPEED, &snd_audioDMA.speed); ++ if (rc < 0) { ++ perror (oss_curDevice); ++ Com_Printf (PRNT_ERROR, "Could not set %s speed to %d", oss_curDevice, snd_audioDMA.speed); ++ close (oss_audioFD); ++ return qFalse; ++ } ++ + if (snd_audioDMA.sampleBits == 16) { + rc = AFMT_S16_LE; + rc = ioctl (oss_audioFD, SNDCTL_DSP_SETFMT, &rc); +@@ -178,14 +190,6 @@ + close (oss_audioFD); + return qFalse; + } +- +- rc = ioctl (oss_audioFD, SNDCTL_DSP_SPEED, &snd_audioDMA.speed); +- if (rc < 0) { +- perror (oss_curDevice); +- Com_Printf (PRNT_ERROR, "Could not set %s speed to %d", oss_curDevice, snd_audioDMA.speed); +- close (oss_audioFD); +- return qFalse; +- } + + if (ioctl (oss_audioFD, SNDCTL_DSP_GETOSPACE, &info) == -1) { + perror ("GETOSPACE"); diff --git a/games/egl/files/patch-unix__unix_udp.c b/games/egl/files/patch-unix__unix_udp.c new file mode 100644 index 000000000000..9e6ac36e48eb --- /dev/null +++ b/games/egl/files/patch-unix__unix_udp.c @@ -0,0 +1,117 @@ +--- unix/unix_udp.c.orig Mon Jul 24 14:57:47 2006 ++++ unix/unix_udp.c Mon Jul 24 15:00:18 2006 +@@ -88,18 +88,18 @@ + } + } + +-char *NET_AdrToString (netAdr_t a) ++char *NET_AdrToString (netAdr_t *a) + { + static char str[64]; + +- switch (a.naType) { ++ switch (a->naType) { + case NA_LOOPBACK: + Q_snprintfz (str, sizeof (str), "loopback"); + break; + + case NA_IP: + Q_snprintfz (str, sizeof (str), "%i.%i.%i.%i:%i", +- a.ip[0], a.ip[1], a.ip[2], a.ip[3], ntohs(a.port)); ++ a->ip[0], a->ip[1], a->ip[2], a->ip[3], ntohs(a->port)); + break; + } + +@@ -224,7 +224,7 @@ + ============================================================================= + */ + +-qBool NET_GetLoopPacket (int sock, netAdr_t *net_from, netMsg_t *net_message) ++qBool NET_GetLoopPacket (netSrc_t sock, netAdr_t *net_from, netMsg_t *net_message) + { + int i; + loopBack_t *loop; +@@ -248,7 +248,7 @@ + } + + +-void NET_SendLoopPacket (int sock, int length, void *data, netAdr_t to) ++void NET_SendLoopPacket (netSrc_t sock, int length, void *data, netAdr_t to) + { + int i; + loopBack_t *loop; +@@ -264,7 +264,7 @@ + + //============================================================================= + +-qBool NET_GetPacket (int sock, netAdr_t *net_from, netMsg_t *net_message) ++qBool NET_GetPacket (netSrc_t sock, netAdr_t *net_from, netMsg_t *net_message) + { + int ret; + struct sockaddr_in from; +@@ -290,12 +290,12 @@ + if (err == EWOULDBLOCK || err == ECONNREFUSED) + return qFalse; + Com_Printf (0, "NET_GetPacket: %s from %s\n", NET_ErrorString(), +- NET_AdrToString(*net_from)); ++ NET_AdrToString(net_from)); + return 0; + } + + if (ret == net_message->maxSize) { +- Com_Printf (0, "Oversize packet from %s\n", NET_AdrToString (*net_from)); ++ Com_Printf (0, "Oversize packet from %s\n", NET_AdrToString (net_from)); + return qFalse; + } + +@@ -308,15 +308,15 @@ + + //============================================================================= + +-int NET_SendPacket (int sock, int length, void *data, netAdr_t to) ++int NET_SendPacket (netSrc_t sock, int length, void *data, netAdr_t *to) + { + int ret; + struct sockaddr_in addr; + int net_socket; + +- switch (to.naType) { ++ switch (to->naType) { + case NA_LOOPBACK: +- NET_SendLoopPacket (sock, length, data, to); ++ NET_SendLoopPacket (sock, length, data, *to); + return 0; + + case NA_BROADCAST: +@@ -332,11 +332,11 @@ + break; + + default: +- Com_Error (ERR_FATAL, "NET_SendPacket: bad address type: %d", to.naType); ++ Com_Error (ERR_FATAL, "NET_SendPacket: bad address type: %d", to->naType); + break; + } + +- NET_NetadrToSockadr (&to, &addr); ++ NET_NetadrToSockadr (to, &addr); + + ret = sendto (net_socket, data, length, 0, (struct sockaddr *)&addr, sizeof(addr)); + if (ret == -1) { +@@ -358,7 +358,7 @@ + A single player game will only use the loopback code + ==================== + */ +-int NET_Config (int openFlags) ++netConfig_t NET_Config (netConfig_t openFlags) + { + int i; + +@@ -583,7 +583,7 @@ + */ + void NET_Init (void) + { +- cmd_netStats = Cmd_AddCommand (qFalse, "net_stats", NET_Stats_f, "Prints out connection information"); ++ cmd_netStats = Cmd_AddCommand ("net_stats", NET_Stats_f, "Prints out connection information"); + } + + diff --git a/games/egl/files/patch-unix__x11_main.c b/games/egl/files/patch-unix__x11_main.c new file mode 100644 index 000000000000..eb9f14a7a39b --- /dev/null +++ b/games/egl/files/patch-unix__x11_main.c @@ -0,0 +1,28 @@ +--- unix/x11_main.c.orig Mon Jul 24 16:51:38 2006 ++++ unix/x11_main.c Mon Jul 24 16:53:17 2006 +@@ -51,6 +51,7 @@ + + cVar_t *in_mouse; + ++static void *cmd_force_centerview; + /* + ========================================================================== + +@@ -690,7 +691,7 @@ + // Mouse variables + in_dgamouse = Cvar_Register ("in_dgamouse", "1", CVAR_ARCHIVE); + +- Cmd_AddCommand (qFalse, "force_centerview", Force_CenterView_f, "Force the screen to a center view"); ++ cmd_force_centerview = Cmd_AddCommand ("force_centerview", Force_CenterView_f, "Force the screen to a center view"); + } + + +@@ -701,7 +702,7 @@ + */ + void IN_Shutdown (void) + { +- Cmd_RemoveCommand ("force_centerview", NULL); ++ Cmd_RemoveCommand ("force_centerview", cmd_force_centerview); + } + + |