diff --git a/games/Makefile b/games/Makefile index aa81d0182b21..b20ae6923b1a 100644 --- a/games/Makefile +++ b/games/Makefile @@ -125,6 +125,7 @@ SUBDIR += darkplaces SUBDIR += deal SUBDIR += defendguin + SUBDIR += demonquake SUBDIR += deng SUBDIR += digger-vgl SUBDIR += dmjava diff --git a/games/demonquake/Makefile b/games/demonquake/Makefile new file mode 100644 index 000000000000..d21dc878789b --- /dev/null +++ b/games/demonquake/Makefile @@ -0,0 +1,58 @@ +# New ports collection makefile for: demonquake +# Date created: 13 May 2006 +# Whom: alepulver +# +# $FreeBSD$ +# + +PORTNAME= demonquake +PORTVERSION= 0.16 +CATEGORIES= games +MASTER_SITES= http://qudos.quakedev.com/linux/quake1/ +DISTNAME= DemonQuake-v${PORTVERSION}-bin-src.linux +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ + DemonQuake-data${EXTRACT_SUFX} + +MAINTAINER= alepulver@FreeBSD.org +COMMENT= Another improved Quake engine based on FuhQuake + +LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg \ + png.5:${PORTSDIR}/graphics/png + +USE_GMAKE= yes +USE_GL= yes +USE_BZIP2= yes + +OPTIONS= OPTIMIZED_CFLAGS "Enable compilation optimizations" on \ + SDL "Build SDL client" on + +ALL_TARGET= release + +PLIST_FILES= bin/${PORTNAME} \ + %%Q1DIR%%/${PORTNAME}/pak0.pak +PLIST_DIRS= %%Q1DIR%%/${PORTNAME} + +.include "${.CURDIR}/../quake-data/Makefile.include" + +.include + +.if !defined(WITHOUT_OPTIMIZED_CFLAGS) +MAKE_ENV+= WITH_OPTIMIZED_CFLAGS=YES +.endif + +.if !defined(WITHOUT_SDL) +USE_SDL= sdl +MAKE_ENV+= BUILD_SDL=YES +PLIST_FILES+= bin/${PORTNAME}-sdl +.endif + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/release/${PORTNAME} ${PREFIX}/bin +.if !defined(WITHOUT_SDL) + ${INSTALL_PROGRAM} ${WRKSRC}/release/${PORTNAME}-sdl ${PREFIX}/bin +.endif + ${MKDIR} ${Q1DIR}/${PORTNAME} + ${INSTALL_DATA} ${WRKDIR}/DemonQuake-data/${PORTNAME}/pak0.pak \ + ${Q1DIR}/${PORTNAME} + +.include diff --git a/games/demonquake/distinfo b/games/demonquake/distinfo new file mode 100644 index 000000000000..590f47ca7ce5 --- /dev/null +++ b/games/demonquake/distinfo @@ -0,0 +1,6 @@ +MD5 (DemonQuake-v0.16-bin-src.linux.tar.bz2) = 225c5eb6a9eeef543d59c57b930cfac4 +SHA256 (DemonQuake-v0.16-bin-src.linux.tar.bz2) = db8a33d8d998ad0a008c2d206dc981da963f478d820b43cf45346206bf8918e5 +SIZE (DemonQuake-v0.16-bin-src.linux.tar.bz2) = 1251239 +MD5 (DemonQuake-data.tar.bz2) = 09c0ee487be2b5eb9b5c9d119d2203a5 +SHA256 (DemonQuake-data.tar.bz2) = a61c130d5b2f3d8938d776921f3dea2f99efe8befbf9d5c6e7657a3503c576fb +SIZE (DemonQuake-data.tar.bz2) = 20718975 diff --git a/games/demonquake/files/patch-Makefile b/games/demonquake/files/patch-Makefile new file mode 100644 index 000000000000..16c3e95d4e1a --- /dev/null +++ b/games/demonquake/files/patch-Makefile @@ -0,0 +1,110 @@ +--- ./Makefile.orig Thu Nov 10 09:52:39 2005 ++++ ./Makefile Tue May 16 14:33:39 2006 +@@ -8,7 +8,7 @@ + # Modified by QuDos at http://qudos.quakedev.com + + BASEVERSION=0.16 +-VERSION=$(BASEVERSION)$(GLIBC) ++VERSION=$(BASEVERSION) + + ifneq (,$(findstring libc6,$(shell if [ -e /lib/libc.so.6 ];then echo libc6;fi))) + GLIBC=-glibc +@@ -16,45 +16,42 @@ + GLIBC= + endif + +-ifneq (,$(findstring alpha,$(shell uname -m))) +-ARCH=axp +-else +-ARCH=i386 +-endif + NOARCH=noarch + + MOUNT_DIR=./src + +-BUILD_DEBUG_DIR=debug$(ARCH)$(GLIBC) +-BUILD_RELEASE_DIR=release$(ARCH)$(GLIBC) ++BUILD_DEBUG_DIR=debug ++BUILD_RELEASE_DIR=release + +-BUILD_SDL=YES # demonquake sdl glx executable (uses SDL for cdrom and sound) ++BUILD_SDL?=NO # demonquake sdl glx executable (uses SDL for cdrom and sound) + +-CC=gcc ++CC?=gcc + +-BASE_CFLAGS=-Dstricmp=strcasecmp -Did386 -funsigned-char #-Wall ++BASE_CFLAGS=$(CFLAGS) -DDATADIR='"$(Q1DIR)"' -Dstricmp=strcasecmp -funsigned-char #-Wall + +-RELEASE_CFLAGS=$(BASE_CFLAGS) -march=i686 -O2 -ffast-math -funroll-loops \ ++ifeq ($(ARCH),i386) ++BASE_CFLAGS+=-Did386 ++endif ++ ++RELEASE_CFLAGS=$(BASE_CFLAGS) ++ifeq ($(WITH_OPTIMIZED_CFLAGS),YES) ++RELEASE_CFLAGS+=-O2 -ffast-math -funroll-loops \ + -fomit-frame-pointer -fexpensive-optimizations -fno-strict-aliasing -pipe #-Wall ++endif + + DEBUG_CFLAGS=$(BASE_CFLAGS) -g #-DDEBUG_MEM + +- +-LDFLAGS=-lm -ldl +- +-LDFLAGS += -L./src/fmod -Wl,-rpath,. -lfmod #-L./src/mss -Wl,-rpath,. -lmss ++LDFLAGS+=-lm + + ifeq ($(strip $(BUILD_SDL)),YES) +- SDLCFLAGS=$(shell sdl-config --cflags) +- SDLLDFLAGS=$(shell sdl-config --libs) +- LDFLAGS += \ +- -lSDL ++ SDLCFLAGS=$(shell $(SDL_CONFIG) --cflags) ++ SDLLDFLAGS=$(shell $(SDL_CONFIG) --libs) + BASE_CFLAGS += \ + -D_SDL_FIX -D_SDL_BIN + endif + +-GLLDFLAGS=-L/usr/X11R6/lib -L/usr/lib -L/usr/local/lib -lGL -lGLU -lX11 -lXext -ldl -lXxf86dga -lXxf86vm -lm -lz -lpng -ljpeg +-GLCFLAGS=-DGLQUAKE -I/usr/include -I/usr/X11R6/include ++GLLDFLAGS=-L$(X11BASE)/lib -L/usr/lib -L$(LOCALBASE)/lib -lGL -lGLU -lX11 -lXext -lXxf86dga -lXxf86vm -lm -lz -lpng -ljpeg ++GLCFLAGS=-DGLQUAKE -I/usr/include -I$(X11BASE)/include -I$(LOCALBASE)/include + + DO_CC=$(CC) $(CFLAGS) -o $@ -c $< + DO_DEBUG_CC=$(CC) $(DEBUG_CFLAGS) -o $@ -c $< +@@ -70,10 +67,10 @@ + # SETUP AND BUILD + ############################################################################# + +- TARGETS=$(BUILDDIR)/demonquake.glx ++ TARGETS=$(BUILDDIR)/demonquake + + ifeq ($(strip $(BUILD_SDL)),YES) +- TARGETS +=$(BUILDDIR)/demonquake-sdl.glx ++ TARGETS +=$(BUILDDIR)/demonquake-sdl + endif + + all: +@@ -183,10 +180,10 @@ + GLX_OBJS=$(BUILDDIR)/glquake/vid_glx.o \ + $(BUILDDIR)/glquake/vid_common_gl.o + +-$(BUILDDIR)/demonquake.glx : $(GLQUAKE_OBJS) $(GLQUAKE_LNX_OBJS) $(GLX_OBJS) ++$(BUILDDIR)/demonquake : $(GLQUAKE_OBJS) $(GLQUAKE_LNX_OBJS) $(GLX_OBJS) + $(CC) $(CFLAGS) -o $@ $(GLQUAKE_OBJS) $(GLQUAKE_LNX_OBJS) $(GLX_OBJS) $(GLLDFLAGS) $(LDFLAGS) + +-$(BUILDDIR)/demonquake-sdl.glx : $(GLQUAKE_OBJS) $(GLQUAKE_SDL_OBJS) $(GLX_OBJS) ++$(BUILDDIR)/demonquake-sdl : $(GLQUAKE_OBJS) $(GLQUAKE_SDL_OBJS) $(GLX_OBJS) + $(CC) $(CFLAGS) -o $@ $(GLQUAKE_OBJS) $(GLQUAKE_SDL_OBJS) $(GLX_OBJS) $(GLLDFLAGS) $(LDFLAGS) $(SDLLDFLAGS) + + $(BUILDDIR)/glquake/cl_collision.o : $(MOUNT_DIR)/cl_collision.c +@@ -291,7 +288,7 @@ + $(BUILDDIR)/glquake/mathlib.o : $(MOUNT_DIR)/mathlib.c + $(DO_GL_CC) + +-$(BUILDDIR)/glquake/mod.o : $(MOUNT_DIR)/mod.c ++$(BUILDDIR)/glquake/mod.o : $(MOUNT_DIR)/mod.c + $(DO_GL_CC) + + $(BUILDDIR)/glquake/nehahra.o : $(MOUNT_DIR)/nehahra.c diff --git a/games/demonquake/files/patch-src__cd_linux.c b/games/demonquake/files/patch-src__cd_linux.c new file mode 100644 index 000000000000..d70ea3c037c8 --- /dev/null +++ b/games/demonquake/files/patch-src__cd_linux.c @@ -0,0 +1,326 @@ +--- ./src/cd_linux.c.orig Thu Nov 3 16:05:07 2005 ++++ ./src/cd_linux.c Tue May 16 14:33:39 2006 +@@ -31,7 +31,12 @@ + #include + #include + ++#ifdef __FreeBSD__ ++#include ++#define CDROM_DATA_TRACK 4 ++#else + #include ++#endif + + #include "quakedef.h" + +@@ -54,8 +59,13 @@ + if (cdfile == -1 || !enabled) + return; // no cd init'd + ++#ifdef __FreeBSD__ ++ if (ioctl(cdfile, CDIOCEJECT) == -1) ++ Con_DPrintf ("ioctl cdioceject failed\n"); ++#else + if ( ioctl(cdfile, CDROMEJECT) == -1 ) + Con_DPrintf("ioctl cdromeject failed\n"); ++#endif + } + + +@@ -64,30 +74,53 @@ + if (cdfile == -1 || !enabled) + return; // no cd init'd + ++#ifdef __FreeBSD__ ++ if (ioctl(cdfile, CDIOCCLOSE) == -1) ++ Con_DPrintf ("ioctl cdiocclose failed\n"); ++#else + if ( ioctl(cdfile, CDROMCLOSETRAY) == -1 ) + Con_DPrintf("ioctl cdromclosetray failed\n"); ++#endif + } + + static int CDAudio_GetAudioDiskInfo(void) + { ++#ifdef __FreeBSD__ ++ struct ioc_toc_header tochdr; ++#else + struct cdrom_tochdr tochdr; ++#endif + + cdValid = false; + ++#ifdef __FreeBSD__ ++ if (ioctl(cdfile, CDIOREADTOCHEADER, &tochdr) == -1) ++ { ++ Con_DPrintf ("ioctl cdioreadtocheader failed\n"); ++#else + if ( ioctl(cdfile, CDROMREADTOCHDR, &tochdr) == -1 ) + { + Con_DPrintf("ioctl cdromreadtochdr failed\n"); + return -1; ++#endif + } + ++#ifdef __FreeBSD__ ++ if (tochdr.starting_track < 1) ++#else + if (tochdr.cdth_trk0 < 1) ++#endif + { + Con_DPrintf("CDAudio: no music tracks\n"); + return -1; + } + + cdValid = true; ++#ifdef __FreeBSD__ ++ maxTrack = tochdr.ending_track; ++#else + maxTrack = tochdr.cdth_trk1; ++#endif + + return 0; + } +@@ -95,8 +128,14 @@ + + void CDAudio_Play(byte track, qboolean looping) + { ++#ifdef __FreeBSD__ ++ struct ioc_read_toc_entry entry; ++ struct cd_toc_entry toc_buffer; ++ struct ioc_play_track ti; ++#else + struct cdrom_tocentry entry; + struct cdrom_ti ti; ++#endif + + if (cdfile == -1 || !enabled) + return; +@@ -116,6 +155,20 @@ + return; + } + ++#ifdef __FreeBSD__ ++ bzero((char *)&toc_buffer, sizeof(toc_buffer)); ++ entry.data_len = sizeof(toc_buffer); ++ entry.data = &toc_buffer; ++ // don't try to play a non-audio track ++ entry.starting_track = track; ++ entry.address_format = CD_MSF_FORMAT; ++ if ( ioctl(cdfile, CDIOREADTOCENTRYS, &entry) == -1 ) ++ { ++ Con_DPrintf("ioctl cdromreadtocentry failed\n"); ++ return; ++ } ++ if (toc_buffer.control == CDROM_DATA_TRACK) ++#else + // don't try to play a non-audio track + entry.cdte_track = track; + entry.cdte_format = CDROM_MSF; +@@ -125,6 +178,7 @@ + return; + } + if (entry.cdte_ctrl == CDROM_DATA_TRACK) ++#endif + { + Con_Printf("CDAudio: track %i is not audio\n", track); + return; +@@ -137,19 +191,37 @@ + CDAudio_Stop(); + } + ++#ifdef __FreeBSD__ ++ ti.start_track = track; ++ ti.end_track = track; ++ ti.start_index = 1; ++ ti.end_index = 99; ++#else + ti.cdti_trk0 = track; + ti.cdti_trk1 = track; + ti.cdti_ind0 = 1; + ti.cdti_ind1 = 99; ++#endif + ++#ifdef __FreeBSD__ ++ if (ioctl(cdfile, CDIOCPLAYTRACKS, &ti) == -1) ++ { ++ Con_DPrintf ("ioctl cdiocplaytracks failed\n"); ++#else + if ( ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1 ) + { + Con_DPrintf("ioctl cdromplaytrkind failed\n"); + return; ++#endif + } + ++#ifdef __FreeBSD__ ++ if (ioctl(cdfile, CDIOCRESUME) == -1) ++ Con_DPrintf ("ioctl cdiocresume failed\n"); ++#else + if ( ioctl(cdfile, CDROMRESUME) == -1 ) + Con_DPrintf("ioctl cdromresume failed\n"); ++#endif + + playLooping = looping; + playTrack = track; +@@ -166,8 +238,14 @@ + int track, i = 0, free_tracks = 0, remap_track; + float f; + byte* track_bools; ++#ifdef __FreeBSD__ ++ struct ioc_read_toc_entry entry; ++ struct cd_toc_entry toc_buffer; ++ struct ioc_play_track ti; ++#else + struct cdrom_tocentry entry; + struct cdrom_ti ti; ++#endif + + if (cdfile == -1 || !enabled) + return; +@@ -181,15 +259,30 @@ + + for (; i < maxTrack; i++) + { ++#ifdef __FreeBSD__ ++ bzero((char *)&toc_buffer, sizeof(toc_buffer)); ++ entry.data_len = sizeof(toc_buffer); ++ entry.data = &toc_buffer; ++ // don't try to play a non-audio track ++ entry.starting_track = remap[i]; ++ entry.address_format = CD_LBA_FORMAT; ++ if ( ioctl(cdfile, CDIOREADTOCENTRYS, &entry) == -1 ) ++ { ++ track_bools[i] = 0; ++ } ++ else ++ track_bools[i] = (toc_buffer.control != CDROM_DATA_TRACK); ++#else + entry.cdte_track = remap[i]; + entry.cdte_format = CDROM_LBA; + if ( ioctl(cdfile, CDROMREADTOCENTRY, &entry) == -1 ) + { + track_bools[i] = 0; + } +- else ++ else + track_bools[i] = (entry.cdte_ctrl != CDROM_DATA_TRACK); + ++#endif + free_tracks += track_bools[i]; + } + +@@ -220,13 +313,25 @@ + CDAudio_Stop(); + } + ++#ifdef __FreeBSD__ ++ ti.start_track = track; ++ ti.end_track = track; ++ ti.start_index = 1; ++ ti.end_index = 99; ++#else + ti.cdti_trk0 = remap_track; + ti.cdti_trk1 = remap_track; + ti.cdti_ind0 = 0; + ti.cdti_ind1 = 0; ++#endif + ++#ifdef __FreeBSD__ ++ if (ioctl(cdfile, CDIOCPLAYTRACKS, &ti) == -1) ++ { ++#else + if ( ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1 ) + { ++#endif + track_bools[track] = 0; + free_tracks--; + } +@@ -254,8 +359,13 @@ + if (!playing) + return; + ++#ifdef __FreeBSD__ ++ if (ioctl(cdfile, CDIOCSTOP) == -1) ++ Con_DPrintf ("ioctl cdiocstop failed (%d)\n", errno); ++#else + if ( ioctl(cdfile, CDROMSTOP) == -1 ) + Con_DPrintf("ioctl cdromstop failed (%d)\n", errno); ++#endif + + wasPlaying = false; + playing = false; +@@ -269,8 +379,13 @@ + if (!playing) + return; + ++#ifdef __FreeBSD__ ++ if (ioctl(cdfile, CDIOCPAUSE) == -1) ++ Con_DPrintf ("ioctl cdiocpause failed\n"); ++#else + if ( ioctl(cdfile, CDROMPAUSE) == -1 ) + Con_DPrintf("ioctl cdrompause failed\n"); ++#endif + + wasPlaying = playing; + playing = false; +@@ -288,8 +403,13 @@ + if (!wasPlaying) + return; + ++#ifdef __FreeBSD__ ++ if (ioctl(cdfile, CDIOCRESUME) == -1) ++ Con_DPrintf ("ioctl cdiocresume failed\n"); ++#else + if ( ioctl(cdfile, CDROMRESUME) == -1 ) + Con_DPrintf("ioctl cdromresume failed\n"); ++#endif + playing = true; + } + +@@ -422,7 +542,12 @@ + + void CDAudio_Update(void) + { ++#ifdef __FreeBSD__ ++ struct ioc_read_subchannel subchnl; ++ struct cd_sub_channel_info data; ++#else + struct cdrom_subchnl subchnl; ++#endif + static time_t lastchk; + + if (!enabled) +@@ -446,6 +571,24 @@ + + if (playing && lastchk < time(NULL)) { + lastchk = time(NULL) + 2; //two seconds between chks ++#if defined(__FreeBSD__) ++ subchnl.address_format = CD_MSF_FORMAT; ++ subchnl.data_format = CD_CURRENT_POSITION; ++ subchnl.data_len = sizeof(data); ++ subchnl.track = playTrack; ++ subchnl.data = &data; ++ if (ioctl(cdfile, CDIOCREADSUBCHANNEL, &subchnl) == -1 ) { ++ Con_DPrintf("ioctl cdiocreadsubchannel failed\n"); ++ playing = false; ++ return; ++ } ++ if (subchnl.data->header.audio_status != CD_AS_PLAY_IN_PROGRESS && ++ subchnl.data->header.audio_status != CD_AS_PLAY_PAUSED) { ++ playing = false; ++ if (playLooping) ++ CDAudio_Play(playTrack, true); ++ } ++#else + subchnl.cdsc_format = CDROM_MSF; + if (ioctl(cdfile, CDROMSUBCHNL, &subchnl) == -1 ) { + Con_DPrintf("ioctl cdromsubchnl failed\n"); +@@ -458,6 +601,7 @@ + if (playLooping) + CDAudio_Play(playTrack, true); + } ++#endif + } + } + diff --git a/games/demonquake/files/patch-src__cdaudio.h b/games/demonquake/files/patch-src__cdaudio.h new file mode 100644 index 000000000000..5bd22fb588f5 --- /dev/null +++ b/games/demonquake/files/patch-src__cdaudio.h @@ -0,0 +1,11 @@ +--- ./src/cdaudio.h.orig Thu Nov 3 16:03:41 2005 ++++ ./src/cdaudio.h Tue May 16 14:33:39 2006 +@@ -26,7 +26,7 @@ + void CDAudio_Shutdown(void); + void CDAudio_Update(void); + //QuDos- +-#ifdef __linux__ //Thx quake2 icculus ++#ifdef __unix__ //Thx quake2 icculus + void CDAudio_RandomPlay(void); + #endif + //-QuDos diff --git a/games/demonquake/files/patch-src__cl_parse.c b/games/demonquake/files/patch-src__cl_parse.c new file mode 100644 index 000000000000..f643f5131804 --- /dev/null +++ b/games/demonquake/files/patch-src__cl_parse.c @@ -0,0 +1,11 @@ +--- ./src/cl_parse.c.orig Thu Nov 3 16:06:26 2005 ++++ ./src/cl_parse.c Tue May 16 14:33:39 2006 +@@ -974,7 +974,7 @@ + cl.looptrack = MSG_ReadByte (); + if ((cls.demoplayback || cls.demorecording) && (cls.forcetrack != -1)) { + //QuDos- cd tracks randomplay support ### FIXME ### tracks stop when changing levels +-#ifdef __linux__ ++#ifdef __unix__ + CDAudio_RandomPlay(); + #endif + //-QuDos diff --git a/games/demonquake/files/patch-src__common.c b/games/demonquake/files/patch-src__common.c new file mode 100644 index 000000000000..a13c6bb65eae --- /dev/null +++ b/games/demonquake/files/patch-src__common.c @@ -0,0 +1,56 @@ +--- ./src/common.c.orig Thu Nov 10 09:51:58 2005 ++++ ./src/common.c Tue May 16 14:33:39 2006 +@@ -1820,14 +1820,18 @@ + */ + void COM_InitFilesystem (void) + { ++ char *home; ++ char homepath[MAX_OSPATH]; + int i; + ++ home = getenv("HOME"); ++ + // -basedir + // Overrides the system supplied base directory (under GAMENAME) + if ((i = COM_CheckParm ("-basedir")) && i < com_argc-1) + Q_strcpy (com_basedir, com_argv[i+1]); + else +- Q_strcpy (com_basedir, host_parms. basedir); ++ Q_strcpy (com_basedir, DATADIR); + + for (i=0 ; i < strlen(com_basedir) ; i++) + { +@@ -1845,10 +1849,17 @@ + COM_AddGameDirectory (va("%s/"GAMENAME, com_basedir)); + Q_strncpy (demodir, "/id1", sizeof(demodir)); + ++ ++ if (home != NULL) ++ COM_AddGameDirectory(va("%s/.demonquake/id1", homepath)); ++ + // add demonquake to the path (demonquake) + COM_AddGameDirectory (va("%s/"BASENAME, com_basedir)); + Q_strncpy (demodir, "/demonquake", sizeof(demodir)); + ++ if (home != NULL) ++ COM_AddGameDirectory(va("%s/.demonquake/demonquake", homepath)); ++ + // reckless (expanded checks): + if (COM_CheckParm("-rogue")) { + COM_AddGameDirectory (va("%s/rogue", com_basedir)); +@@ -1878,6 +1889,15 @@ + if ((i = COM_CheckParm ("-game")) && i < com_argc-1) { + COM_AddGameDirectory (va("%s/%s", com_basedir, com_argv[i+1])); + Q_strncpy (demodir, va("/%s", com_argv[i+1]), sizeof(demodir)); ++ } ++ ++ if (home != NULL) { ++ Q_snprintfz(homepath, sizeof(homepath), "%s/.demonquake/%s", ++ home, strrchr(com_gamedir, '/') + 1 ? ++ strrchr(com_gamedir, '/') + 1 : "demonquake"); ++ COM_CreatePath(homepath); ++ Sys_mkdir(homepath); ++ COM_AddGameDirectory(homepath); + } + + if (!strncmp(demodir, "/rogue", 6)) { diff --git a/games/demonquake/files/patch-src__host.c b/games/demonquake/files/patch-src__host.c new file mode 100644 index 000000000000..2ee9fdadce28 --- /dev/null +++ b/games/demonquake/files/patch-src__host.c @@ -0,0 +1,11 @@ +--- ./src/host.c.orig Thu Nov 3 16:12:17 2005 ++++ ./src/host.c Tue May 16 14:36:05 2006 +@@ -1046,7 +1046,7 @@ + // joe: same here + //QuDos- enable/disable cmdhist.dat file creation, i don't need this feature + //if (con_initialized && (cmdhist = fopen("cmdhist.dat", "wb"))) +- if (con_initialized && cmdhist_file.value && (cmdhist = fopen("cmdhist.dat", "wb"))) ++ if (con_initialized && (cmdhist = fopen(va("%s/cmdhist.dat", com_gamedir), "wb"))) + //QuDos- + { + for (i=0 ; i<64 ; i++) diff --git a/games/demonquake/files/patch-src__keys.c b/games/demonquake/files/patch-src__keys.c new file mode 100644 index 000000000000..8748547b73b4 --- /dev/null +++ b/games/demonquake/files/patch-src__keys.c @@ -0,0 +1,11 @@ +--- ./src/keys.c.orig Thu Nov 3 16:14:02 2005 ++++ ./src/keys.c Tue May 16 14:36:16 2006 +@@ -663,7 +663,7 @@ + + //QuDos- enable/disable cmdhist.dat file creation, i don't need this feature + // if ((cmdhist = fopen ("cmdhist.dat", "rb"))) +- if (cmdhist_file.value && (cmdhist = fopen("cmdhist.dat", "rb"))) ++ if (cmdhist = fopen(va("%s/cmdhist.dat", com_gamedir), "rb")) + //QuDos- + { + fread (&cmdhistory, sizeof(cmdhistory_t), 1, cmdhist); diff --git a/games/demonquake/files/patch-src__mod.c b/games/demonquake/files/patch-src__mod.c new file mode 100644 index 000000000000..797473063501 --- /dev/null +++ b/games/demonquake/files/patch-src__mod.c @@ -0,0 +1,47 @@ +--- ./src/mod.c.orig Sat Oct 8 14:08:32 2005 ++++ ./src/mod.c Tue May 16 14:33:39 2006 +@@ -30,14 +30,17 @@ + + void MOD_stop (void) + { ++#if 0 + if (modplaying) { + FMUSIC_FreeSong (mod); + } + modplaying = 0; ++#endif + } + + void MOD_play (void) + { ++#if 0 + char modname[256], *buffer; + int mark; + +@@ -69,10 +72,12 @@ + + modplaying = 1; + FMUSIC_PlaySong (mod); ++#endif + } + + void MOD_init (void) + { ++#if 0 + FSOUND_SetBufferSize (300); + if (!FSOUND_Init(11025, 32, 0)) { + Con_Printf ("%s\n", FMOD_ErrorString(FSOUND_GetError())); +@@ -109,10 +114,13 @@ + + Cmd_AddCommand ("stopmod", MOD_stop); + Cmd_AddCommand ("playmod", MOD_play); ++#endif + }; + + void MOD_done (void) + { ++#if 0 + FSOUND_Close (); ++#endif + }; + #endif diff --git a/games/demonquake/files/patch-src__net.h b/games/demonquake/files/patch-src__net.h new file mode 100644 index 000000000000..1298278aafc0 --- /dev/null +++ b/games/demonquake/files/patch-src__net.h @@ -0,0 +1,11 @@ +--- ./src/net.h.orig Sun May 30 22:34:26 2004 ++++ ./src/net.h Tue May 16 14:33:39 2006 +@@ -253,7 +253,7 @@ + extern int hostCacheCount; + extern hostcache_t hostcache[HOSTCACHESIZE]; + +-#if !defined(_WIN32 ) && !defined (__linux__) ++#if !defined(_WIN32 ) && !defined (__unix__) + #ifndef htonl + extern unsigned long htonl (unsigned long hostlong); + #endif diff --git a/games/demonquake/files/patch-src__snd_linux.c b/games/demonquake/files/patch-src__snd_linux.c new file mode 100644 index 000000000000..ae4f68d10f89 --- /dev/null +++ b/games/demonquake/files/patch-src__snd_linux.c @@ -0,0 +1,14 @@ +--- ./src/snd_linux.c.orig Thu Nov 3 16:19:53 2005 ++++ ./src/snd_linux.c Tue May 16 14:33:39 2006 +@@ -25,7 +25,11 @@ + #include + #include + #include ++#ifdef __linux__ + #include ++#else ++#include ++#endif + #include + #include "quakedef.h" + diff --git a/games/demonquake/files/patch-src__sys.h b/games/demonquake/files/patch-src__sys.h new file mode 100644 index 000000000000..b6a252c480b2 --- /dev/null +++ b/games/demonquake/files/patch-src__sys.h @@ -0,0 +1,11 @@ +--- ./src/sys.h.orig Thu Nov 3 16:20:30 2005 ++++ ./src/sys.h Tue May 16 14:33:39 2006 +@@ -65,7 +65,7 @@ + + char *Sys_GetClipboardData (void); + //QuDos- +-#ifdef __linux__ ++#ifdef __unix__ + //linux *pak loading Tenebrae + typedef struct + { diff --git a/games/demonquake/files/patch-src__vid_glx.c b/games/demonquake/files/patch-src__vid_glx.c new file mode 100644 index 000000000000..fbf59e7c7ce2 --- /dev/null +++ b/games/demonquake/files/patch-src__vid_glx.c @@ -0,0 +1,12 @@ +--- ./src/vid_glx.c.orig Thu Nov 3 17:12:46 2005 ++++ ./src/vid_glx.c Tue May 16 14:33:39 2006 +@@ -20,7 +20,9 @@ + #include + #include + #include ++#ifdef __linux__ + #include ++#endif + #include + #include + #include diff --git a/games/demonquake/pkg-descr b/games/demonquake/pkg-descr new file mode 100644 index 000000000000..73e606c1f78b --- /dev/null +++ b/games/demonquake/pkg-descr @@ -0,0 +1 @@ +DemonQuake is another improved Quake engine based on FuhQuake. diff --git a/games/demonquake/pkg-message b/games/demonquake/pkg-message new file mode 100644 index 000000000000..99609d5ec30f --- /dev/null +++ b/games/demonquake/pkg-message @@ -0,0 +1,18 @@ +============================================================================== + +DemonQuake has been installed. + +To start it in full-screen mode you can run it with the "-fullscreen" +parameter. + +If you have mouse problems you can try running it with the "-nomdga" +parameter (this will make the mouse work fine when the DGA X11 extension is +disabled). + +If you hace sound problems try running it with the parameter +"-sndspeed ", where "" could be 22050 or 44100 for example. + +The console history file is disabled by default, to enable it set the variable +"cmdhist_file" to "1". + +==============================================================================