diff options
author | Rene Ladan <rene@FreeBSD.org> | 2014-03-24 19:51:54 +0000 |
---|---|---|
committer | Rene Ladan <rene@FreeBSD.org> | 2014-03-24 19:51:54 +0000 |
commit | 0a26f843518b39bdd0a2ccbc09adea04bdb5c85c (patch) | |
tree | 0d487a7713c017c35f040aea6f093d8a2224aee0 /games/fuhquake | |
parent | 611cc4f4c601604022ec64afad99aff4b4d4f057 (diff) | |
download | ports-0a26f843518b39bdd0a2ccbc09adea04bdb5c85c.tar.gz ports-0a26f843518b39bdd0a2ccbc09adea04bdb5c85c.zip |
Notes
Diffstat (limited to 'games/fuhquake')
-rw-r--r-- | games/fuhquake/Makefile | 111 | ||||
-rw-r--r-- | games/fuhquake/distinfo | 6 | ||||
-rw-r--r-- | games/fuhquake/files/Makefile | 211 | ||||
-rw-r--r-- | games/fuhquake/files/cd_freebsd.c | 426 | ||||
-rw-r--r-- | games/fuhquake/files/nonintel.c | 51 | ||||
-rw-r--r-- | games/fuhquake/files/patch-cl_main.c | 44 | ||||
-rw-r--r-- | games/fuhquake/files/patch-common.c | 110 | ||||
-rw-r--r-- | games/fuhquake/files/patch-gl_texture.c | 11 | ||||
-rw-r--r-- | games/fuhquake/files/patch-image.c | 38 | ||||
-rw-r--r-- | games/fuhquake/files/patch-menu.c | 90 | ||||
-rw-r--r-- | games/fuhquake/files/patch-modules.c | 13 | ||||
-rw-r--r-- | games/fuhquake/files/patch-modules.h | 11 | ||||
-rw-r--r-- | games/fuhquake/files/patch-mp3_player.c | 14 | ||||
-rw-r--r-- | games/fuhquake/files/patch-r_part.c | 11 | ||||
-rw-r--r-- | games/fuhquake/files/patch-snd_dma.c | 19 | ||||
-rw-r--r-- | games/fuhquake/files/patch-version.h | 17 | ||||
-rw-r--r-- | games/fuhquake/files/patch-vid_glx.c | 12 | ||||
-rw-r--r-- | games/fuhquake/files/snd_freebsd.c | 279 | ||||
-rw-r--r-- | games/fuhquake/pkg-descr | 5 | ||||
-rw-r--r-- | games/fuhquake/pkg-plist | 77 |
20 files changed, 0 insertions, 1556 deletions
diff --git a/games/fuhquake/Makefile b/games/fuhquake/Makefile deleted file mode 100644 index 3219f2d29a2e..000000000000 --- a/games/fuhquake/Makefile +++ /dev/null @@ -1,111 +0,0 @@ -# Created by: Alexey Dokuchaev <danfe@regency.nsu.ru> -# $FreeBSD$ - -PORTNAME= fuhquake -PORTVERSION= 0.31 -PORTREVISION= 8 -CATEGORIES= games -MASTER_SITES= http://www.fuhquake.net/files/releases/v${PORTVERSION}/ \ - http://www.fuhquake.net/files/misc/:misc -DISTNAME= ${PORTNAME}-source-v${PORTVERSION} -EXTRACT_SUFX= .zip -DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ - ${PORTNAME}-linux-v${PORTVERSION}${EXTRACT_SUFX} -DIST_SUBDIR= ${PORTNAME} - -MAINTAINER= ports@FreeBSD.org -COMMENT= Excellent and feature-rich QuakeWorld client - -DEPRECATED= Upstream disappeared; no more public distfiles; unmaintained -EXPIRATION_DATE=2014-03-23 - -MAKEFILE= ${FILESDIR}/Makefile -WRKSRC= ${WRKDIR}/source - -DATADIR= ${Q1DIR} -MAKE_ENV= DATADIR="${DATADIR}" - -OPTIONS_DEFINE= HUD OPTIMIZED_CFLAGS XMMS DOCS -OPTIONS_MULTI= CLIENT -OPTIONS_MULTI_CLIENT= GLX X11 -OPTIONS_DEFAULT= GLX OPTIMIZED_CFLAGS X11 DOCS -OPTIONS_DEFINE_i386= ASM -OPTIONS_DEFAULT_i386= ASM - -CLIENT_DESC= Clients -GLX_DESC= Build GLX client -X11_DESC= Build X11 client -HUD_DESC= Install high quality HUD images -XMMS_DESC= Enable MP3 player feature - -.include "${.CURDIR}/../quake-data/Makefile.include" -.include <bsd.port.options.mk> - -.if ${PORT_OPTIONS:MGLX} -USE_GL= gl -LIB_DEPENDS+= libpng15.so:${PORTSDIR}/graphics/png \ - libjpeg.so:${PORTSDIR}/graphics/jpeg -CFLAGS+= -I${LOCALBASE}/include/libpng15 -PLIST_SUB+= GLX="" -CLIENTS+= glx -.else -PLIST_SUB+= GLX="@comment " -.endif - -.if ${PORT_OPTIONS:MX11} -USE_XORG= x11 xxf86dga -PLIST_SUB+= X11="" -CLIENTS+= x11 -.else -PLIST_SUB+= X11="@comment " -.endif - -.if ${PORT_OPTIONS:MHUD} -DISTFILES+= fuh-hud${EXTRACT_SUFX}:misc -PLIST_SUB+= HUD="" -.else -PLIST_SUB+= HUD="@comment " -.endif - -.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} -MAKE_ARGS+= -DWITH_OPTIMIZED_CFLAGS -.endif - -.if ! ${PORT_OPTIONS:MASM} -MAKE_ARGS+= -DWITHOUT_X86_ASM -.endif - -.if ${PORT_OPTIONS:MXMMS} || exists(${LOCALBASE}/lib/libxmms.so) -LIB_DEPENDS+= libxmms.so:${PORTSDIR}/multimedia/xmms -MAKE_ARGS+= -DWITH_XMMS PTHREAD_LIBS=-pthread -.endif - -post-patch: - @${CP} ${FILESDIR}/*.c ${WRKSRC} - -do-build: -.for f in ${CLIENTS} - @(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ - ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} clean ${f}) -.endfor - -do-install: -.for f in ${CLIENTS} - ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}-${f} ${STAGEDIR}${PREFIX}/bin -.endfor - @${MKDIR} ${STAGEDIR}${DATADIR}/${PORTNAME} - ${INSTALL_DATA} ${WRKDIR}/qw/*.dat ${STAGEDIR}${DATADIR}/${PORTNAME} - ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}/pak0.pak \ - ${STAGEDIR}${DATADIR}/${PORTNAME} -.if ${PORT_OPTIONS:MHUD} - @${MKDIR} ${STAGEDIR}${DATADIR}/${PORTNAME}/textures/wad - ${INSTALL_DATA} ${WRKDIR}/qw/charset.png \ - ${STAGEDIR}${DATADIR}/${PORTNAME} - ${INSTALL_DATA} ${WRKDIR}/qw/textures/wad/* \ - ${STAGEDIR}${DATADIR}/${PORTNAME}/textures/wad -.endif - @${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}/doc/*.txt ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.txt ${STAGEDIR}${DOCSDIR} - -.include <bsd.port.mk> diff --git a/games/fuhquake/distinfo b/games/fuhquake/distinfo deleted file mode 100644 index d67271a02697..000000000000 --- a/games/fuhquake/distinfo +++ /dev/null @@ -1,6 +0,0 @@ -SHA256 (fuhquake/fuhquake-source-v0.31.zip) = 905c973e34e3d511665cc26f9f2b64fcb568e9c8363b93af5d5685e979309139 -SIZE (fuhquake/fuhquake-source-v0.31.zip) = 789610 -SHA256 (fuhquake/fuhquake-linux-v0.31.zip) = f9a9bce98a2a8f76f75c344b14a338b33ebc9d0e9b018e0965a1080586b9cda4 -SIZE (fuhquake/fuhquake-linux-v0.31.zip) = 4520020 -SHA256 (fuhquake/fuh-hud.zip) = d5632ef9f2a31ec59055b311edf022e1695f88e0e44a524f7fdc594b114ced05 -SIZE (fuhquake/fuh-hud.zip) = 518560 diff --git a/games/fuhquake/files/Makefile b/games/fuhquake/files/Makefile deleted file mode 100644 index 2357c3bbca2c..000000000000 --- a/games/fuhquake/files/Makefile +++ /dev/null @@ -1,211 +0,0 @@ -# -# QuakeWorld/FuhQuake Makefile for FreeBSD -# -# - now should build on non-x86 -# - no longer requires gmake(1) -# - debug targets support axed out -# - couple of useful knobs added -# -# Created on Wednesday, May 21 2003 by Alexey Dokuchaev <danfe@regency.nsu.ru> -# -# $FreeBSD$ -# - -DO_CFLAGS = ${CFLAGS} -funsigned-char -I${LOCALBASE}/include -I${LOCALBASE}/include -DDATADIR='"${DATADIR}"' -DLOCALBASE='"${LOCALBASE}"' - -.if ${MACHINE_ARCH} == "i386" && !defined(WITHOUT_X86_ASM) -DO_CFLAGS += -Did386 -.endif - -.if make(glx) -DO_CFLAGS += -DWITH_ZLIB -DWITH_PNG -DWITH_JPEG -DGLQUAKE -DWITH_DGA -DWITH_VMODE -.endif - -.if defined(WITH_OPTIMIZED_CFLAGS) -DO_CFLAGS += -O -pipe -s -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -.endif - -.if defined(WITH_XMMS) -XMMS_CFLAGS != glib-config --cflags -DO_CFLAGS += -D__XMMS__ ${XMMS_CFLAGS} ${PTHREAD_CFLAGS} -XMMS_LIBS = -L${LOCALBASE}/lib -lxmms ${PTHREAD_LIBS} -.endif - -######################################################################## - -CL_COMMON_OBJS = \ - host.o \ - sys_linux.o \ - nonintel.o \ -\ - cd_freebsd.o \ - snd_freebsd.o \ - snd_dma.o \ - snd_mem.o \ - snd_mix.o \ -\ - cl_input.o \ - keys.o \ -\ - net_chan.o \ - net_udp.o \ -\ - pr_cmds.o \ - pr_edict.o \ - pr_exec.o \ -\ - pmove.o \ - pmovetst.o \ - sv_ccmds.o \ - sv_ents.o \ - sv_init.o \ - sv_main.o \ - sv_move.o \ - sv_nchan.o \ - sv_phys.o \ - sv_save.o \ - sv_send.o \ - sv_user.o \ - sv_world.o \ -\ - cl_cam.o \ - cl_cmd.o \ - cl_demo.o \ - cl_ents.o \ - cl_main.o \ - cl_parse.o \ - cl_pred.o \ - cl_screen.o \ - cl_slist.o \ - cl_tent.o \ - cl_view.o \ -\ - cmd.o \ - com_msg.o \ - common.o \ - console.o \ - crc.o \ - cvar.o \ - image.o \ - mathlib.o \ - mdfour.o \ - menu.o \ - sbar.o \ - skin.o \ - teamplay.o \ - version.o \ - wad.o \ - zone.o \ -\ - auth.o \ - config_manager.o \ - fchecks.o \ - fmod.o \ - fragstats.o \ - ignore.o \ - logging.o \ - match_tools.o \ - modules.o \ - movie.o \ - mp3_player.o \ - rulesets.o \ - utils.o - -.if ${MACHINE_ARCH} == "i386" && !defined(WITHOUT_X86_ASM) -CL_COMMON_AS_OBJS = \ - cl_math.o \ - math.o \ - snd_mixa.o \ - sys_x86.o -.endif - -CL_SOFT_OBJS = \ - d_edge.o \ - d_fill.o \ - d_init.o \ - d_modech.o \ - d_polyse.o \ - d_scan.o \ - d_sky.o \ - d_sprite.o \ - d_surf.o \ - d_vars.o \ - d_zpoint.o \ -\ - r_aclip.o \ - r_alias.o \ - r_bsp.o \ - r_draw.o \ - r_edge.o \ - r_efrag.o \ - r_light.o \ - r_main.o \ - r_misc.o \ - r_model.o \ - r_part.o \ - r_rast.o \ - r_sky.o \ - r_sprite.o \ - r_surf.o \ - r_vars.o - -.if ${MACHINE_ARCH} == "i386" && !defined(WITHOUT_X86_ASM) -CL_SOFT_AS_OBJS = \ - d_draw.o \ - d_draw16.o \ - d_parta.o \ - d_polysa.o \ - d_scana.o \ - d_spr8.o \ - d_varsa.o \ - r_aclipa.o \ - r_aliasa.o \ - r_drawa.o \ - r_edgea.o \ - r_varsa.o \ - surf8.o -.endif - -CL_X11_OBJS = vid_x11.o - -CL_GLX_OBJS = \ - gl_draw.o \ - gl_mesh.o \ - gl_model.o \ - gl_ngraph.o \ - gl_refrag.o \ - gl_rlight.o \ - gl_rmain.o \ - gl_rmisc.o \ - gl_rpart.o \ - gl_rsurf.o \ - gl_texture.o \ - gl_warp.o \ - r_part.o \ - vid_common_gl.o \ - vid_glx.o - -CL_COMMON_LIBS = -lm -CL_X11_LIBS = -L${LOCALBASE}/lib -lX11 -lXext -CL_GLX_LIBS = -L${LOCALBASE}/lib -lpng -ljpeg -L${LOCALBASE}/lib -lX11 -lGL -lXxf86dga -lXxf86vm - -.c.o: - ${CC} ${DO_CFLAGS} -c $< -o $*.o - -.s.o: - ${CC} ${DO_CFLAGS} -DELF -x assembler-with-cpp -c $< -o $*.o - -x11: ${CL_COMMON_OBJS} ${CL_COMMON_AS_OBJS} \ - ${CL_SOFT_OBJS} ${CL_SOFT_AS_OBJS} ${CL_X11_OBJS} - ${CC} ${CFLAGS} -o fuhquake-x11 \ - ${CL_COMMON_OBJS} ${CL_COMMON_AS_OBJS} ${CL_SOFT_OBJS} \ - ${CL_SOFT_AS_OBJS} ${CL_X11_OBJS} \ - ${CL_COMMON_LIBS} ${CL_X11_LIBS} ${XMMS_LIBS} - -glx: ${CL_COMMON_OBJS} ${CL_COMMON_AS_OBJS} ${CL_GLX_OBJS} - ${CC} ${CFLAGS} -o fuhquake-glx \ - ${CL_COMMON_OBJS} ${CL_COMMON_AS_OBJS} ${CL_GLX_OBJS} \ - ${CL_COMMON_LIBS} ${CL_GLX_LIBS} ${XMMS_LIBS} - -clean: - -rm -f *.o *.core diff --git a/games/fuhquake/files/cd_freebsd.c b/games/fuhquake/files/cd_freebsd.c deleted file mode 100644 index 5f911a47d992..000000000000 --- a/games/fuhquake/files/cd_freebsd.c +++ /dev/null @@ -1,426 +0,0 @@ -/* -Copyright (C) 2003 Alexey Dokuchaev. -Copyright (C) 1996-1997 Id Software, Inc. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -See the included (GNU.txt) GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ -// cd_freebsd.c - -#include <stdio.h> -#include <unistd.h> -#include <stdlib.h> -#include <sys/ioctl.h> -#include <sys/file.h> -#include <sys/types.h> -#include <fcntl.h> -#include <string.h> -#include <time.h> -#include <errno.h> -#include <sys/cdio.h> - -#include "quakedef.h" -#include "cdaudio.h" -#include "sound.h" - -/* Obtained from /usr/include/linux/cdrom.h */ -#define CDROM_DATA_TRACK 4 - -static qboolean cdValid = false; -static qboolean playing = false; -static qboolean wasPlaying = false; -static qboolean initialized = false; -static qboolean enabled = true; -static qboolean playLooping = false; -static float cdvolume; -static byte remap[100]; -static byte playTrack; -static byte maxTrack; - -static int cdfile = -1; -static char cd_dev[64] = "/dev/cdrom"; - -static void CDAudio_Eject(void) -{ - if (cdfile == -1 || !enabled) - return; // no cd init'd - - ioctl(cdfile, CDIOCALLOW); - - if ( ioctl(cdfile, CDIOCEJECT) == -1 ) - Com_DPrintf ("ioctl cdioceject failed\n"); -} - - -static void CDAudio_CloseDoor(void) -{ - if (cdfile == -1 || !enabled) - return; // no cd init'd - - ioctl(cdfile, CDIOCALLOW); - - if ( ioctl(cdfile, CDIOCCLOSE) == -1 ) - Com_DPrintf ("ioctl cdiocclose failed\n"); -} - -static int CDAudio_GetAudioDiskInfo(void) -{ - struct ioc_toc_header tochdr; - - cdValid = false; - - if ( ioctl(cdfile, CDIOREADTOCHEADER, &tochdr) == -1 ) - { - Com_DPrintf ("ioctl cdioreadtocheader failed\n"); - return -1; - } - - if (tochdr.starting_track < 1) - { - Com_DPrintf ("CDAudio: no music tracks\n"); - return -1; - } - - cdValid = true; - maxTrack = tochdr.ending_track; - - return 0; -} - - -void CDAudio_Play(byte track, qboolean looping) -{ - struct ioc_read_toc_single_entry entry; - struct ioc_play_track ti; - - if (cdfile == -1 || !enabled) - return; - - if (!cdValid) - { - CDAudio_GetAudioDiskInfo(); - if (!cdValid) - return; - } - - track = remap[track]; - - if (track < 1 || track > maxTrack) - { - Com_DPrintf ("CDAudio: Bad track number %u.\n", track); - return; - } - - // don't try to play a non-audio track - entry.track = track; - entry.address_format = CD_MSF_FORMAT; - if ( ioctl(cdfile, CDIOREADTOCENTRY, &entry) == -1 ) - { - Com_DPrintf ("ioctl cdioreadtocentry failed\n"); - return; - } - if (entry.entry.control == CDROM_DATA_TRACK) - { - Com_Printf ("CDAudio: track %i is not audio\n", track); - return; - } - - if (playing) - { - if (playTrack == track) - return; - CDAudio_Stop(); - } - - ti.start_track = track; - ti.end_track = track; - ti.start_index = 1; - ti.start_index = 99; - - if ( ioctl(cdfile, CDIOCPLAYTRACKS, &ti) == -1 ) - { - Com_DPrintf ("ioctl cdiocplaytracks failed\n"); - return; - } - - if ( ioctl(cdfile, CDIOCRESUME) == -1 ) - Com_DPrintf ("ioctl cdiocresume failed\n"); - - playLooping = looping; - playTrack = track; - playing = true; - - if (cdvolume == 0.0) - CDAudio_Pause (); -} - - -void CDAudio_Stop(void) -{ - if (cdfile == -1 || !enabled) - return; - - if (!playing) - return; - - if ( ioctl(cdfile, CDIOCSTOP) == -1 ) - Com_DPrintf ("ioctl cdiocstop failed (%d)\n", errno); - - ioctl(cdfile, CDIOCALLOW); - - wasPlaying = false; - playing = false; -} - -void CDAudio_Pause(void) -{ - if (cdfile == -1 || !enabled) - return; - - if (!playing) - return; - - if ( ioctl(cdfile, CDIOCPAUSE) == -1 ) - Com_DPrintf ("ioctl cdiocpause failed\n"); - - wasPlaying = playing; - playing = false; -} - - -void CDAudio_Resume(void) -{ - if (cdfile == -1 || !enabled) - return; - - if (!cdValid) - return; - - if (!wasPlaying) - return; - - if ( ioctl(cdfile, CDIOCRESUME) == -1 ) - Com_DPrintf ("ioctl cdiocresume failed\n"); - playing = true; -} - -static void CD_f (void) -{ - char *command; - int ret; - int n; - - if (Cmd_Argc() < 2) - return; - - command = Cmd_Argv (1); - - if (Q_strcasecmp(command, "on") == 0) - { - enabled = true; - return; - } - - if (Q_strcasecmp(command, "off") == 0) - { - if (playing) - CDAudio_Stop(); - enabled = false; - return; - } - - if (Q_strcasecmp(command, "reset") == 0) - { - enabled = true; - if (playing) - CDAudio_Stop(); - for (n = 0; n < 100; n++) - remap[n] = n; - CDAudio_GetAudioDiskInfo(); - return; - } - - if (Q_strcasecmp(command, "remap") == 0) - { - ret = Cmd_Argc() - 2; - if (ret <= 0) - { - for (n = 1; n < 100; n++) - if (remap[n] != n) - Com_Printf (" %u -> %u\n", n, remap[n]); - return; - } - for (n = 1; n <= ret; n++) - remap[n] = Q_atoi(Cmd_Argv (n+1)); - return; - } - - if (Q_strcasecmp(command, "close") == 0) - { - CDAudio_CloseDoor(); - return; - } - - if (!cdValid) - { - CDAudio_GetAudioDiskInfo(); - if (!cdValid) - { - Com_Printf ("No CD in player.\n"); - return; - } - } - - if (Q_strcasecmp(command, "play") == 0) - { - CDAudio_Play((byte)Q_atoi(Cmd_Argv (2)), false); - return; - } - - if (Q_strcasecmp(command, "loop") == 0) - { - CDAudio_Play((byte)Q_atoi(Cmd_Argv (2)), true); - return; - } - - if (Q_strcasecmp(command, "stop") == 0) - { - CDAudio_Stop(); - return; - } - - if (Q_strcasecmp(command, "pause") == 0) - { - CDAudio_Pause(); - return; - } - - if (Q_strcasecmp(command, "resume") == 0) - { - CDAudio_Resume(); - return; - } - - if (Q_strcasecmp(command, "eject") == 0) - { - if (playing) - CDAudio_Stop(); - CDAudio_Eject(); - cdValid = false; - return; - } - - if (Q_strcasecmp(command, "info") == 0) - { - Com_Printf ("%u tracks\n", maxTrack); - if (playing) - Com_Printf ("Currently %s track %u\n", playLooping ? "looping" : "playing", playTrack); - else if (wasPlaying) - Com_Printf ("Paused %s track %u\n", playLooping ? "looping" : "playing", playTrack); - Com_Printf ("Volume is %f\n", cdvolume); - return; - } -} - -void CDAudio_Update(void) -{ - struct ioc_read_subchannel subchnl; - struct cd_sub_channel_info data; - static time_t lastchk; - - if (!enabled) - return; - - if (bgmvolume.value != cdvolume) - { - if (cdvolume) - { - Cvar_SetValue (&bgmvolume, 0.0); - cdvolume = bgmvolume.value; - CDAudio_Pause (); - } - else - { - Cvar_SetValue (&bgmvolume, 1.0); - cdvolume = bgmvolume.value; - CDAudio_Resume (); - } - } - - if (playing && lastchk < time(NULL)) { - lastchk = time(NULL) + 2; //two seconds between chks - bzero(&subchnl, sizeof(subchnl)); - subchnl.data = &data; - subchnl.data_len = sizeof(data); - subchnl.address_format = CD_MSF_FORMAT; - subchnl.data_format = CD_CURRENT_POSITION; - if (ioctl(cdfile, CDIOCREADSUBCHANNEL, &subchnl) == -1 ) { - Com_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); - } - } -} - -int CDAudio_Init(void) -{ - int i; - - if (!COM_CheckParm("-cdaudio")) - return -1; - - if ((i = COM_CheckParm("-cddev")) != 0 && i < com_argc - 1) - Q_strncpyz (cd_dev, com_argv[i + 1], sizeof(cd_dev)); - - if ((cdfile = open(cd_dev, O_RDONLY)) == -1) { - Com_Printf ("CDAudio_Init: open of \"%s\" failed (%i)\n", cd_dev, errno); - cdfile = -1; - return -1; - } - - for (i = 0; i < 100; i++) - remap[i] = i; - initialized = true; - enabled = true; - - if (CDAudio_GetAudioDiskInfo()) - { - Com_Printf ("CDAudio_Init: No CD in player.\n"); - cdValid = false; - } - - Cmd_AddCommand ("cd", CD_f); - - Com_Printf ("CD Audio Initialized\n"); - - return 0; -} - - -void CDAudio_Shutdown(void) -{ - if (!initialized) - return; - CDAudio_Stop(); - close(cdfile); - cdfile = -1; -} diff --git a/games/fuhquake/files/nonintel.c b/games/fuhquake/files/nonintel.c deleted file mode 100644 index e97c68856a23..000000000000 --- a/games/fuhquake/files/nonintel.c +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright (C) 1996-1997 Id Software, Inc. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ -// -// nonintel.c: code for non-Intel processors only -// - -#include "common.h" - -#if !id386 - -/* -================ -R_Surf8Patch -================ -*/ -void R_Surf8Patch () -{ - // we only patch code on Intel -} - - -/* -================ -R_SurfacePatch -================ -*/ -void R_SurfacePatch (void) -{ - // we only patch code on Intel -} - - -#endif // !id386 - diff --git a/games/fuhquake/files/patch-cl_main.c b/games/fuhquake/files/patch-cl_main.c deleted file mode 100644 index 0452509972eb..000000000000 --- a/games/fuhquake/files/patch-cl_main.c +++ /dev/null @@ -1,44 +0,0 @@ ---- cl_main.c.orig 2004-01-07 00:39:44.000000000 +0600 -+++ cl_main.c 2007-11-15 00:01:57.000000000 +0600 -@@ -44,6 +44,10 @@ - #include "mp3_player.h" - - #ifndef _WIN32 -+#include <sys/types.h> -+#include <sys/socket.h> -+#include <netinet/in.h> -+#include <arpa/inet.h> - #include <netdb.h> - #endif - -@@ -380,7 +384,7 @@ - Q_strncpyz(address, Cmd_Argv(1), sizeof(address)); - if (s = strchr(address, ':')) - *s = 0; -- if (((int) addr.s_addr = inet_addr(address)) == INADDR_NONE) { -+ if ((addr.s_addr = inet_addr(address)) == INADDR_NONE) { - //forward lookup - if (!(h = gethostbyname(address))) { - Com_Printf("Couldn't resolve %s\n", address); -@@ -850,19 +854,16 @@ - Sys_Error ("Couldn't load gfx/colormap.lmp"); - FMod_CheckModel("gfx/colormap.lmp", host_colormap, com_filesize); - -- Sys_mkdir(va("%s/qw", com_basedir)); -- Sys_mkdir(va("%s/fuhquake", com_basedir)); -- - Key_Init (); - V_Init (); - --#ifdef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) - IN_Init (); - #endif - - VID_Init (host_basepal); - --#ifndef __linux__ -+#if !(defined(__linux__) || defined(__FreeBSD__)) - IN_Init (); - #endif - diff --git a/games/fuhquake/files/patch-common.c b/games/fuhquake/files/patch-common.c deleted file mode 100644 index 39b1ac3b70f1..000000000000 --- a/games/fuhquake/files/patch-common.c +++ /dev/null @@ -1,110 +0,0 @@ ---- common.c.orig Wed Jan 7 00:39:44 2004 -+++ common.c Tue Jan 31 14:39:05 2006 -@@ -652,16 +652,10 @@ - //The filename will be prefixed by com_basedir - qboolean COM_WriteFile (char *filename, void *data, int len) { - FILE *f; -- char name[MAX_OSPATH]; - -- Q_snprintfz (name, sizeof(name), "%s/%s", com_basedir, filename); -- -- if (!(f = fopen (name, "wb"))) { -- COM_CreatePath (name); -- if (!(f = fopen (name, "wb"))) -- return false; -- } -- Sys_Printf ("COM_WriteFile: %s\n", name); -+ if (!(f = fopen (filename, "wb"))) -+ return false; -+ Sys_Printf ("COM_WriteFile: %s\n", filename); - fwrite (data, 1, len, f); - fclose (f); - return true; -@@ -670,6 +664,7 @@ - //Only used for CopyFile and download - - -+#if 0 - #define _MAX_SUBSIRS 8 - void COM_CreatePath (char *path) { - char *slash = NULL; -@@ -699,6 +694,22 @@ - path[slash_indices[i]] = '/'; - } - } -+#else -+void COM_CreatePath (char *path) -+{ -+ char *ofs; -+ -+ for (ofs = path+1 ; *ofs ; ofs++) -+ { -+ if (*ofs == '/') -+ { // create the directory -+ *ofs = 0; -+ Sys_mkdir (path); -+ *ofs = '/'; -+ } -+ } -+} -+#endif - - //Copies a file over from the net to the local cache, creating any directories - //needed. This is for the convenience of developers using ISDN from home. -@@ -976,7 +987,7 @@ - - sprintf (com_gamedir, "%s/%s", com_basedir, dir); - -- if (!strcmp(dir, "id1") || !strcmp(dir, "qw") || !strcmp(dir, "fuhquake")) -+ if (!strcmp(dir, "id1") || !strcmp(dir, "fuhquake")) - return; - - // add the directory to the search path -@@ -999,14 +1010,17 @@ - } - - void FS_InitFilesystem (void) { -+ char *home, homepath[MAX_OSPATH]; - int i; - -+ home = getenv("HOME"); -+ - // -basedir <path> - // Overrides the system supplied base directory (under id1) - if ((i = COM_CheckParm ("-basedir")) && i < com_argc - 1) - Q_strncpyz (com_basedir, com_argv[i + 1], sizeof(com_basedir)); - else -- getcwd(com_basedir, sizeof(com_basedir) - 1); -+ Q_strncpyz(com_basedir, DATADIR, sizeof(com_basedir)); - - for (i = 0; i < strlen(com_basedir); i++) - if (com_basedir[i] == '\\') -@@ -1018,8 +1032,13 @@ - - // start up with id1 by default - FS_AddGameDirectory ( va("%s/id1", com_basedir) ); -+ -+ if (home != NULL) { -+ Q_snprintfz(homepath, sizeof(homepath), "%s/.fuhquake/id1", home, com_gamedirfile); -+ FS_AddGameDirectory(homepath); -+ } -+ - FS_AddGameDirectory ( va("%s/fuhquake", com_basedir) ); -- FS_AddGameDirectory ( va("%s/qw", com_basedir) ); - - // any set gamedirs will be freed up to here - com_base_searchpaths = com_searchpaths; -@@ -1029,6 +1048,13 @@ - i = COM_CheckParm ("+gamedir"); - if (i && i < com_argc - 1) - FS_SetGamedir (com_argv[i + 1]); -+ -+ if (home != NULL) { -+ Q_snprintfz(homepath, sizeof(homepath), "%s/.fuhquake/%s", home, com_gamedirfile); -+ COM_CreatePath(homepath); -+ Sys_mkdir(homepath); -+ FS_AddGameDirectory(homepath); -+ } - } - - /* diff --git a/games/fuhquake/files/patch-gl_texture.c b/games/fuhquake/files/patch-gl_texture.c deleted file mode 100644 index 415b500dd9d0..000000000000 --- a/games/fuhquake/files/patch-gl_texture.c +++ /dev/null @@ -1,11 +0,0 @@ ---- gl_texture.c.orig 2007-11-15 00:10:30.000000000 +0600 -+++ gl_texture.c 2007-11-15 00:10:38.000000000 +0600 -@@ -159,7 +159,7 @@ - } - - static GLenum oldtarget = GL_TEXTURE0_ARB; --static int cnttextures[4] = {-1, -1, -1, -1}; -+int cnttextures[4] = {-1, -1, -1, -1}; - static qboolean mtexenabled = false; - - diff --git a/games/fuhquake/files/patch-image.c b/games/fuhquake/files/patch-image.c deleted file mode 100644 index 24084f0116ad..000000000000 --- a/games/fuhquake/files/patch-image.c +++ /dev/null @@ -1,38 +0,0 @@ ---- image.c.orig 2004-01-07 00:43:22.000000000 +0100 -+++ image.c 2012-05-26 15:10:53.000000000 +0200 -@@ -24,6 +24,8 @@ - - #ifdef WITH_PNG - #include "png.h" -+#include "zlib.h" -+#include "pngpriv.h" - #endif - - #ifdef WITH_JPEG -@@ -569,7 +571,7 @@ - return NULL; - } - -- if (setjmp(png_ptr->jmpbuf)) { -+ if (setjmp(png_ptr->longjmp_buffer)) { - qpng_destroy_read_struct(&png_ptr, &pnginfo, NULL); - fclose(fin); - return NULL; -@@ -678,7 +680,7 @@ - return false; - } - -- if (setjmp(png_ptr->jmpbuf)) { -+ if (setjmp(png_ptr->longjmp_buffer)) { - qpng_destroy_write_struct(&png_ptr, &info_ptr); - fclose(fp); - return false; -@@ -743,7 +745,7 @@ - return false; - } - -- if (setjmp(png_ptr->jmpbuf)) { -+ if (setjmp(png_ptr->longjmp_buffer)) { - qpng_destroy_write_struct(&png_ptr, &info_ptr); - fclose(fp); - return false; diff --git a/games/fuhquake/files/patch-menu.c b/games/fuhquake/files/patch-menu.c deleted file mode 100644 index e57e2054a1f7..000000000000 --- a/games/fuhquake/files/patch-menu.c +++ /dev/null @@ -1,90 +0,0 @@ ---- menu.c.orig Wed Jan 7 01:02:12 2004 -+++ menu.c Tue Jan 31 13:49:29 2006 -@@ -411,9 +411,11 @@ - Cvar_SetValue (&cl_hudswap, !cl_hudswap.value); - break; - -+#ifndef NO_WINDOWED_MOUSE - case 17: // _windowed_mouse - Cvar_SetValue (&_windowed_mouse, !_windowed_mouse.value); - break; -+#endif - } - } - -@@ -873,24 +875,24 @@ - M_Print (16, 96, " Pickup flashes"); - M_DrawCheckbox (ALIGN_FPS_OPTIONS, 96, v_bonusflash.value); - -- M_Print (16, 104, " Powerup glow"); -+ M_Print (16, 104, " Powerup glow"); - M_Print (ALIGN_FPS_OPTIONS, 104, r_powerupglow.value==2 ? "own off" : - r_powerupglow.value ? "on" : "off"); - -- M_Print (16, 112, " Draw torches"); -+ M_Print (16, 112, " Draw torches"); - M_DrawCheckbox (ALIGN_FPS_OPTIONS, 112, r_drawflame.value); - -- M_Print (16, 120, " Fast sky"); -+ M_Print (16, 120, " Fast sky"); - M_DrawCheckbox (ALIGN_FPS_OPTIONS, 120, r_fastsky.value); - - #ifdef GLQUAKE -- M_Print (16, 128, " Fast lights"); -+ M_Print (16, 128, " Fast lights"); - M_DrawCheckbox (ALIGN_FPS_OPTIONS, 128, gl_flashblend.value); - #endif - -- M_PrintWhite (16, 136, " Fast mode"); -+ M_PrintWhite (16, 136, " Fast mode"); - -- M_PrintWhite (16, 144, " High quality"); -+ M_PrintWhite (16, 144, " High quality"); - - // cursor - M_DrawCharacter (196, 32 + fps_cursor * 8, 12 + ((int) (curtime * 4) & 1)); -@@ -1225,8 +1227,6 @@ - - - progs = (dprograms_t *) FS_LoadHunkFile ("spprogs.dat"); -- if (progs && !file_from_gamedir) -- Cbuf_AddText ("gamedir qw\n"); - Cbuf_AddText ("map start\n"); - } - -@@ -1385,7 +1385,7 @@ - return; - - M_EnterMenu (m_load); -- M_ScanSaves (!file_from_gamedir ? "qw" : com_gamedir); -+ M_ScanSaves (com_gamedir); - } - - void M_Menu_Save_f (void) { -@@ -1443,7 +1443,7 @@ - - // issue the load command - if (FS_LoadHunkFile ("spprogs.dat") && !file_from_gamedir) -- Cbuf_AddText("disconnect; gamedir qw\n"); -+ Cbuf_AddText("disconnect\n"); - Cbuf_AddText (va ("load s%i\n", load_cursor) ); - return; - -@@ -2209,7 +2209,7 @@ - return; - } - #else -- if (!(d = opendir(va("%s%s", com_basedir, demo_currentdir)))) { -+ if (!(d = opendir(va("%s/%s", com_gamedir, demo_currentdir)))) { - demolist_data[demolist_count].name = strdup ("Error reading directory"); - demolist_data[demolist_count].type = dt_msg; - demolist_count++; -@@ -2315,7 +2315,7 @@ - *s = 0; - } - } else { -- strcpy(demo_currentdir, "/qw"); -+ strcpy(demo_currentdir, com_gamedir); - } - } - diff --git a/games/fuhquake/files/patch-modules.c b/games/fuhquake/files/patch-modules.c deleted file mode 100644 index 36752538f4f6..000000000000 --- a/games/fuhquake/files/patch-modules.c +++ /dev/null @@ -1,13 +0,0 @@ ---- modules.c.orig Wed Jan 7 03:51:30 2004 -+++ modules.c Sun Jan 22 22:07:23 2006 -@@ -31,10 +31,6 @@ - char _temp_modulename[MAX_OSPATH]; - static registeredModule_t registeredModules[qlib_nummodules]; - --#ifdef __linux --#include <dlfcn.h> --#endif -- - #ifdef _WIN32 - #define SECURITY_GETFUNC(f) (Security_##f = (Security_##f##_t) GetProcAddress(hSecurity, "Security_" #f)) - #else diff --git a/games/fuhquake/files/patch-modules.h b/games/fuhquake/files/patch-modules.h deleted file mode 100644 index 54623ceeaecb..000000000000 --- a/games/fuhquake/files/patch-modules.h +++ /dev/null @@ -1,11 +0,0 @@ ---- modules.h.orig Wed Jan 7 00:43:26 2004 -+++ modules.h Sun Jan 22 22:07:23 2006 -@@ -24,7 +24,7 @@ - - #include "security.h" - --#ifdef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) - #include <dlfcn.h> - #endif - diff --git a/games/fuhquake/files/patch-mp3_player.c b/games/fuhquake/files/patch-mp3_player.c deleted file mode 100644 index 93b58cbc7a99..000000000000 --- a/games/fuhquake/files/patch-mp3_player.c +++ /dev/null @@ -1,14 +0,0 @@ ---- mp3_player.c.orig Wed Jan 7 00:45:20 2004 -+++ mp3_player.c Sun Jan 22 22:07:23 2006 -@@ -56,9 +56,10 @@ - - #ifdef __XMMS__ - -+#include <sys/signal.h> - #include <sys/wait.h> - --cvar_t mp3_dir = {"mp3_xmms_dir", "/usr/local/bin"}; -+cvar_t mp3_dir = {"mp3_xmms_dir", LOCALBASE "/bin"}; - cvar_t mp3_xmms_session = {"mp3_xmms_session", "0"}; - - #endif diff --git a/games/fuhquake/files/patch-r_part.c b/games/fuhquake/files/patch-r_part.c deleted file mode 100644 index 79d9af80864d..000000000000 --- a/games/fuhquake/files/patch-r_part.c +++ /dev/null @@ -1,11 +0,0 @@ ---- r_part.c.orig Wed Jan 7 00:39:44 2004 -+++ r_part.c Sun Jan 22 22:07:23 2006 -@@ -58,7 +58,7 @@ - - vec3_t r_pright, r_pup, r_ppn; - --#if !id386 -+#if !defined(id386) && !defined(GLQUAKE) - - void D_DrawParticle (particle_t *pparticle) { - vec3_t local, transformed; diff --git a/games/fuhquake/files/patch-snd_dma.c b/games/fuhquake/files/patch-snd_dma.c deleted file mode 100644 index 193caf6cd9b7..000000000000 --- a/games/fuhquake/files/patch-snd_dma.c +++ /dev/null @@ -1,19 +0,0 @@ ---- snd_dma.c.orig 2007-11-14 23:38:25.000000000 +0600 -+++ snd_dma.c 2007-11-14 23:41:15.000000000 +0600 -@@ -49,11 +49,11 @@ - volatile dma_t *shm = 0; - volatile dma_t sn; - --static vec3_t listener_origin; --static vec3_t listener_forward; --static vec3_t listener_right; --static vec3_t listener_up; --static vec_t sound_nominal_clip_dist = 1000.0; -+vec3_t listener_origin; -+vec3_t listener_forward; -+vec3_t listener_right; -+vec3_t listener_up; -+vec_t sound_nominal_clip_dist = 1000.0; - - static int soundtime; // sample PAIRS - int paintedtime; // sample PAIRS diff --git a/games/fuhquake/files/patch-version.h b/games/fuhquake/files/patch-version.h deleted file mode 100644 index e09de65b7638..000000000000 --- a/games/fuhquake/files/patch-version.h +++ /dev/null @@ -1,17 +0,0 @@ ---- version.h.orig Wed Jan 7 00:58:18 2004 -+++ version.h Sun Jan 22 22:07:23 2006 -@@ -4,10 +4,12 @@ - #define FUH_VERSION "0.31" - #define LINUX_VERSION 0.98 - --#ifdef _WIN32 -+#if defined(_WIN32) - #define QW_PLATFORM "Win32" --#else -+#elif defined(__linux__) - #define QW_PLATFORM "Linux" -+#elif defined(__FreeBSD__) -+#define QW_PLATFORM "FreeBSD" - #endif - - #ifdef GLQUAKE diff --git a/games/fuhquake/files/patch-vid_glx.c b/games/fuhquake/files/patch-vid_glx.c deleted file mode 100644 index 7d89c3a1c3ab..000000000000 --- a/games/fuhquake/files/patch-vid_glx.c +++ /dev/null @@ -1,12 +0,0 @@ ---- vid_glx.c.orig Wed Jan 7 00:39:44 2004 -+++ vid_glx.c Sun Jan 22 22:07:23 2006 -@@ -20,7 +20,9 @@ - #include <termios.h> - #include <sys/ioctl.h> - #include <sys/stat.h> -+#ifdef __linux__ - #include <sys/vt.h> -+#endif - #include <stdarg.h> - #include <stdio.h> - #include <signal.h> diff --git a/games/fuhquake/files/snd_freebsd.c b/games/fuhquake/files/snd_freebsd.c deleted file mode 100644 index 9cab11f472ee..000000000000 --- a/games/fuhquake/files/snd_freebsd.c +++ /dev/null @@ -1,279 +0,0 @@ -#include <unistd.h> -#include <fcntl.h> -#include <stdlib.h> -#include <sys/types.h> -#include <sys/ioctl.h> -#include <sys/mman.h> -#include <sys/shm.h> -#include <sys/wait.h> -#if defined(__linux__) -#include <linux/soundcard.h> -#elif defined(__FreeBSD__) -#include <sys/soundcard.h> -#endif -#include <stdio.h> - -#include "quakedef.h" -#include "sound.h" - -int audio_fd; -int snd_inited; -const char *snddev = "/dev/dsp"; - -static int tryrates[] = { 11025, 22051, 44100, 8000 }; - -qboolean -SNDDMA_Init(void) -{ - int tmp; - char *s; - struct audio_buf_info info; - - snd_inited = 0; - - if (s = getenv("SNDDEV")) - snddev = s; - if (tmp = COM_CheckParm("-snddev")) - snddev = com_argv[tmp + 1]; - - /* - * Open audio device, confirm capability to mmap, - * and get size of DMA buffer. - */ - - if ((audio_fd = open(snddev, O_RDWR)) < 0) - { - perror(snddev); - Com_Printf("Could not open %s\n", snddev); - return (0); - } - - if (ioctl(audio_fd, SNDCTL_DSP_RESET, 0) < 0) - { - perror(snddev); - Com_Printf("Could not reset %s\n", snddev); - close(audio_fd); - return (0); - } - - if (ioctl(audio_fd, SNDCTL_DSP_GETCAPS, &tmp) == -1) - { - perror(snddev); - Com_Printf("Sound driver too old\n"); - close(audio_fd); - return (0); - } - - if (!(tmp & DSP_CAP_TRIGGER) || !(tmp & DSP_CAP_MMAP)) - { - Com_Printf("Sorry, but your soundcard cannot do memory-mapped I/O\n"); - close(audio_fd); - return (0); - } - - if (ioctl(audio_fd, SNDCTL_DSP_GETOSPACE, &info) == -1) - { - perror(snddev); - Com_Printf("Um, cannot do GETOSPACE?\n"); - close(audio_fd); - return (0); - } - - shm = &sn; - shm->splitbuffer = 0; - - /* Set sample bits & speed. */ - - if (s = getenv("QUAKE_SOUND_SAMPLEBITS")) - shm->samplebits = atoi(s); - else if (tmp = COM_CheckParm("-sndbits")) - shm->samplebits = atoi(com_argv[tmp + 1]); - - if (shm->samplebits != 16 && shm->samplebits != 8) - { - ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &tmp); - if (tmp & AFMT_S16_LE) - shm->samplebits = 16; - else if (tmp & AFMT_U8) - shm->samplebits = 8; - else { - Com_Printf("Could not set sample format\n"); - close(audio_fd); - return (0); - } - } - - if (s = getenv("QUAKE_SOUND_SPEED")) - shm->speed = atoi(s); - else if (tmp = COM_CheckParm("-sndspeed")) - shm->speed = atoi(com_argv[tmp + 1]); - else - { - for (tmp = 0; tmp < sizeof(tryrates) / 4; tmp++) - if (!ioctl(audio_fd, SNDCTL_DSP_SPEED, &tryrates[tmp])) - break; - shm->speed = tryrates[tmp]; - } - - if (s = getenv("QUAKE_SOUND_CHANNELS")) - shm->channels = atoi(s); - else if (tmp = COM_CheckParm("-sndmono")) - shm->channels = 1; - else shm->channels = 2; - - shm->samples = info.fragstotal * info.fragsize / (shm->samplebits / 8); - shm->submission_chunk = 1; - - if (shm->channels == 2) - tmp = 1; - else - tmp = 0; - - if (ioctl(audio_fd, SNDCTL_DSP_STEREO, &tmp) < 0) - { - perror(snddev); - Com_Printf("Could not set %s to stereo = %d\n", snddev, shm->channels); - close(audio_fd); - return (0); - } - - Com_Printf("Sound using stereo = %d\n", shm->channels); - - if (tmp) - shm->channels = 2; - else - shm->channels = 1; - - if (ioctl(audio_fd, SNDCTL_DSP_SPEED, &shm->speed) < 0) - { - perror(snddev); - Com_Printf("Could not set %s speed to %d\n", snddev, shm->speed); - close(audio_fd); - return (0); - } - - Com_Printf("Sound on speed = %d\n", shm->speed); - - if (shm->samplebits == 16) - { - tmp = AFMT_S16_LE; - if (ioctl(audio_fd, SNDCTL_DSP_SETFMT, &tmp)) - { - perror(snddev); - Com_Printf("Could not support 16-bit data, try 8-bit\n"); - close(audio_fd); - return (0); - } - } - else if (shm->samplebits == 8) - { - tmp = AFMT_U8; - if (ioctl(audio_fd, SNDCTL_DSP_SETFMT, &tmp)) - { - perror(snddev); - Com_Printf("Could not support 8-bit data\n"); - close(audio_fd); - return (0); - } - } - else { - perror(snddev); - Com_Printf("%d-bit sound not supported\n", shm->samplebits); - close(audio_fd); - return (0); - } - - Com_Printf("%s is set to %d-bit format.\n", snddev, shm->samplebits); - - /* Finally, memory map the DMA buffer. */ - - shm->buffer = (unsigned char *)mmap(NULL, info.fragstotal - * info.fragsize, -#ifdef __FreeBSD__ - PROT_READ | PROT_WRITE, -#else - PROT_WRITE, -#endif - MAP_FILE | MAP_SHARED, audio_fd, 0); - - if (!shm->buffer || shm->buffer == MAP_FAILED) - { - perror(snddev); - Com_Printf("Could not mmap %s\n", snddev); - close(audio_fd); - return (0); - } - - /* Toggle the trigger & start her up. */ - - tmp = 0; - if (ioctl(audio_fd, SNDCTL_DSP_SETTRIGGER, &tmp) < 0) - { - perror(snddev); - Com_Printf("Could not toggle\n"); - munmap(shm->buffer, shm->samples * shm->samplebits / 8); - close(audio_fd); - return (0); - } - - tmp = PCM_ENABLE_OUTPUT; - if (ioctl(audio_fd, SNDCTL_DSP_SETTRIGGER, &tmp) < 0) - { - perror(snddev); - Com_Printf("Could not toggle\n"); - close(audio_fd); - return (0); - } - - shm->samplepos = 0; - snd_inited = 1; - - return (1); -} - -int -SNDDMA_GetDMAPos(void) -{ - struct count_info count; - - if (!snd_inited) - return (0); - - if (ioctl(audio_fd, SNDCTL_DSP_GETOPTR, &count) == -1) - { - perror(snddev); - Com_Printf("Uh, sound dead\n"); - close(audio_fd); - snd_inited = 0; - return (0); - } - - /* shm->samplepos = (count.bytes / (shm->samplebits / 8)) & (shm->samples-1); - fprintf(stderr, "%d \r", count.ptr); */ - - shm->samplepos = count.ptr / (shm->samplebits / 8); - - return (shm->samplepos); -} - -void -SNDDMA_Shutdown(void) -{ - if (snd_inited) - { - close(audio_fd); - snd_inited = 0; - } -} - -/* -============== -SNDDMA_Submit - -Send sound to device if buffer isn't really the DMA buffer -=============== -*/ -void -SNDDMA_Submit(void) -{ -} diff --git a/games/fuhquake/pkg-descr b/games/fuhquake/pkg-descr deleted file mode 100644 index 07a7b7cc9887..000000000000 --- a/games/fuhquake/pkg-descr +++ /dev/null @@ -1,5 +0,0 @@ -FuhQuake is a QuakeWorld client that aims to not only to have a plethora -of gameplay and console improvements, but to also incorporate stunning -visual effects and eyecandy. - -WWW: http://www.fuhquake.net/ diff --git a/games/fuhquake/pkg-plist b/games/fuhquake/pkg-plist deleted file mode 100644 index bd7d3ceea95b..000000000000 --- a/games/fuhquake/pkg-plist +++ /dev/null @@ -1,77 +0,0 @@ -%%GLX%%bin/fuhquake-glx -%%X11%%bin/fuhquake-x11 -%%PORTDOCS%%%%DOCSDIR%%/FAQ-v0.30-b585.txt -%%PORTDOCS%%%%DOCSDIR%%/FuhQuake-v0.31-FAQ.txt -%%PORTDOCS%%%%DOCSDIR%%/benchmark.txt -%%PORTDOCS%%%%DOCSDIR%%/config_manager.txt -%%PORTDOCS%%%%DOCSDIR%%/crosshairs.txt -%%PORTDOCS%%%%DOCSDIR%%/fuhquake.txt -%%PORTDOCS%%%%DOCSDIR%%/linux.txt -%%PORTDOCS%%%%DOCSDIR%%/logitech.txt -%%PORTDOCS%%%%DOCSDIR%%/match_tools.txt -%%PORTDOCS%%%%DOCSDIR%%/mp3.txt -%%PORTDOCS%%%%DOCSDIR%%/particles.txt -%%PORTDOCS%%%%DOCSDIR%%/pointing.txt -%%PORTDOCS%%%%DOCSDIR%%/rulesets.txt -%%PORTDOCS%%%%DOCSDIR%%/track.txt -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/anum_0.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/anum_1.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/anum_2.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/anum_3.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/anum_4.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/anum_5.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/anum_6.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/anum_7.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/anum_8.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/anum_9.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/anum_colon.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/anum_minus.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/anum_slash.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/disc.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/face1.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/face2.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/face3.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/face4.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/face5.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/face_inv2.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/face_invis.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/face_invul2.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/face_p1.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/face_p2.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/face_p3.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/face_p4.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/face_p5.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/face_quad.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/num_0.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/num_1.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/num_2.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/num_3.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/num_4.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/num_5.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/num_6.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/num_7.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/num_8.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/num_9.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/num_colon.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/num_minus.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/num_slash.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/sb_armor1.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/sb_armor2.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/sb_armor3.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/sb_cells.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/sb_invis.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/sb_invuln.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/sb_nails.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/sb_quad.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/sb_rocket.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/sb_shells.png -%%HUD%%%%DATADIR%%/fuhquake/textures/wad/sb_suit.png -%%HUD%%%%DATADIR%%/fuhquake/charset.png -%%DATADIR%%/fuhquake/fragfile.dat -%%DATADIR%%/fuhquake/pak0.pak -%%DATADIR%%/fuhquake/qwprogs.dat -%%DATADIR%%/fuhquake/spprogs.dat -%%HUD%%@dirrm %%DATADIR%%/fuhquake/textures/wad -%%HUD%%@dirrm %%DATADIR%%/fuhquake/textures -@dirrm %%DATADIR%%/fuhquake -%%PORTDOCS%%@dirrm %%DOCSDIR%% |