mirror of
https://git.code.sf.net/p/quake/quake2forge
synced 2024-11-10 07:12:01 +00:00
Merged in Steven Fuller's r0.9 changes:
- mouse wheel support - swapped SDL mouse buttons to be correct (closes: #17) - some FreeBSD patches - Bug Gun + save game crashes fixed (not sure about this one) - Mouse buttons 4 and 5 under SDL - IPv6 support - Makefile will build xatrix and rogue source if available
This commit is contained in:
parent
a82e3734a8
commit
065639f494
28 changed files with 656 additions and 144 deletions
311
Makefile
311
Makefile
|
@ -18,8 +18,15 @@ BUILD_GLX=YES # X11 GLX driver. Works somewhat ok.
|
|||
BUILD_FXGL=NO # FXMesa driver. Not tested. (used only for V1 and V2).
|
||||
BUILD_SDL=YES # SDL software driver. Works fine for some people.
|
||||
BUILD_SDLGL=YES # SDL OpenGL driver. Works fine for some people.
|
||||
BUILD_CTFDLL=YES # gamei386.so for ctf
|
||||
# i can add support for building xatrix and rogue libs if needed
|
||||
BUILD_CTFDLL=YES # game$(ARCH).so for ctf
|
||||
BUILD_XATRIX=NO # game$(ARCH).so for xatrix
|
||||
BUILD_ROGUE=NO # game$(ARCH).so for rogue
|
||||
|
||||
# Other compile time options:
|
||||
# Compile with IPv6 (Protocol independent api, tested on FreeBSD)
|
||||
HAVE_IPV6=NO
|
||||
|
||||
# hopefully end of configurable options
|
||||
|
||||
# this nice line comes from the linux kernel makefile
|
||||
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/)
|
||||
|
@ -37,7 +44,6 @@ RELEASE_CFLAGS+=-O2 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -g
|
|||
# -malign-jumps=2 -malign-functions=2
|
||||
endif
|
||||
|
||||
# (hopefully) end of configurable options
|
||||
VERSION=3.21
|
||||
|
||||
MOUNT_DIR=.
|
||||
|
@ -53,9 +59,17 @@ SRC_DIR=$(MOUNT_DIR)/src
|
|||
GAME_DIR=$(MOUNT_DIR)/game
|
||||
CTF_DIR=$(MOUNT_DIR)/ctf
|
||||
XATRIX_DIR=$(MOUNT_DIR)/xatrix
|
||||
ROGUE_DIR=$(MOUNT_DIR)/rogue
|
||||
|
||||
BASE_CFLAGS=-Dstricmp=strcasecmp -Wall -Werror -pipe #-pedantic
|
||||
|
||||
ifeq ($(HAVE_IPV6),YES)
|
||||
BASE_CFLAGS+=-DHAVE_IPV6 -DHAVE_SIN6_LEN
|
||||
NET_UDP=net_udp6
|
||||
else
|
||||
NET_UDP=net_udp
|
||||
endif
|
||||
|
||||
ifneq ($(ARCH),i386)
|
||||
BASE_CFLAGS+=-DC_ONLY
|
||||
endif
|
||||
|
@ -66,17 +80,17 @@ LDFLAGS=-lm -ldl -lpthread
|
|||
|
||||
SVGALDFLAGS=-lvga
|
||||
|
||||
XCFLAGS=
|
||||
XCFLAGS=-I/usr/X11R6/include
|
||||
XLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm
|
||||
|
||||
SDLCFLAGS=$(shell sdl-config --cflags)
|
||||
SDLLDFLAGS=$(shell sdl-config --libs)
|
||||
|
||||
FXGLCFLAGS=
|
||||
FXGLCFLAGS=-I/usr/X11R6/include
|
||||
FXGLLDFLAGS=-L/usr/local/glide/lib -L/usr/X11/lib -L/usr/local/lib \
|
||||
-L/usr/X11R6/lib -lX11 -lXext -lGL -lvga
|
||||
|
||||
GLXCFLAGS=
|
||||
GLXCFLAGS=-I/usr/X11R6/include
|
||||
GLXLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm
|
||||
|
||||
SDLGLCFLAGS=$(SDLCFLAGS) -DOPENGL
|
||||
|
@ -106,6 +120,14 @@ ifeq ($(strip $(BUILD_CTFDLL)),YES)
|
|||
TARGETS += $(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(BUILD_XATRIX)),YES)
|
||||
TARGETS+=$(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(BUILD_ROGUE)),YES)
|
||||
TARGETS+=$(BUILDDIR)/rogue/game$(ARCH).$(SHLIBEXT)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(BUILD_SDLQUAKE2)),YES)
|
||||
TARGETS += $(BUILDDIR)/sdlquake2
|
||||
endif
|
||||
|
@ -145,8 +167,10 @@ build_debug:
|
|||
$(BUILD_DEBUG_DIR)/ref_soft \
|
||||
$(BUILD_DEBUG_DIR)/ref_gl \
|
||||
$(BUILD_DEBUG_DIR)/game \
|
||||
$(BUILD_DEBUG_DIR)/ctf
|
||||
$(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS)"
|
||||
$(BUILD_DEBUG_DIR)/ctf \
|
||||
$(BUILD_DEBUG_DIR)/xatrix \
|
||||
$(BUILD_DEBUG_DIR)/rogue
|
||||
$(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS) -DLINUX_VERSION='\"$(VERSION) Debug\"'"
|
||||
|
||||
build_release:
|
||||
@-mkdir -p $(BUILD_RELEASE_DIR) \
|
||||
|
@ -154,8 +178,10 @@ build_release:
|
|||
$(BUILD_RELEASE_DIR)/ref_soft \
|
||||
$(BUILD_RELEASE_DIR)/ref_gl \
|
||||
$(BUILD_RELEASE_DIR)/game \
|
||||
$(BUILD_RELEASE_DIR)/ctf
|
||||
$(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(RELEASE_CFLAGS)"
|
||||
$(BUILD_RELEASE_DIR)/ctf \
|
||||
$(BUILD_RELEASE_DIR)/xatrix \
|
||||
$(BUILD_RELEASE_DIR)/rogue
|
||||
$(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(RELEASE_CFLAGS) -DLINUX_VERSION='\"$(VERSION)\"'"
|
||||
|
||||
targets: $(TARGETS)
|
||||
|
||||
|
@ -209,7 +235,7 @@ QUAKE2_OBJS = \
|
|||
$(BUILDDIR)/client/vid_so.o \
|
||||
$(BUILDDIR)/client/main.o \
|
||||
$(BUILDDIR)/client/glob.o \
|
||||
$(BUILDDIR)/client/net_udp.o \
|
||||
$(BUILDDIR)/client/$(NET_UDP).o \
|
||||
\
|
||||
$(BUILDDIR)/client/q_shared.o \
|
||||
$(BUILDDIR)/client/pmove.o
|
||||
|
@ -373,6 +399,9 @@ $(BUILDDIR)/client/glob.o : $(SRC_DIR)/glob.c
|
|||
$(BUILDDIR)/client/net_udp.o : $(SRC_DIR)/net_udp.c
|
||||
$(DO_CC)
|
||||
|
||||
$(BUILDDIR)/client/net_udp6.o : $(SRC_DIR)/net_udp6.c
|
||||
$(DO_CC)
|
||||
|
||||
$(BUILDDIR)/client/cd.o : $(SRC_DIR)/cd.c
|
||||
$(DO_CC)
|
||||
|
||||
|
@ -705,6 +734,7 @@ $(BUILDDIR)/ctf/q_shared.o : $(CTF_DIR)/q_shared.c
|
|||
|
||||
XATRIX_OBJS = \
|
||||
$(BUILDDIR)/xatrix/g_ai.o \
|
||||
$(BUILDDIR)/xatrix/g_chase.o \
|
||||
$(BUILDDIR)/xatrix/g_cmds.o \
|
||||
$(BUILDDIR)/xatrix/g_combat.o \
|
||||
$(BUILDDIR)/xatrix/g_func.o \
|
||||
|
@ -762,6 +792,9 @@ $(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT) : $(XATRIX_OBJS)
|
|||
$(BUILDDIR)/xatrix/g_ai.o : $(XATRIX_DIR)/g_ai.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/xatrix/g_chase.o : $(XATRIX_DIR)/g_chase.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/xatrix/g_cmds.o : $(XATRIX_DIR)/g_cmds.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
|
@ -912,6 +945,262 @@ $(BUILDDIR)/xatrix/p_weapon.o : $(XATRIX_DIR)/p_weapon.c
|
|||
$(BUILDDIR)/xatrix/q_shared.o : $(XATRIX_DIR)/q_shared.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
#############################################################################
|
||||
# ROGUE
|
||||
#############################################################################
|
||||
|
||||
ROGUE_OBJS = \
|
||||
$(BUILDDIR)/rogue/dm_ball.o \
|
||||
$(BUILDDIR)/rogue/dm_tag.o \
|
||||
$(BUILDDIR)/rogue/g_ai.o \
|
||||
$(BUILDDIR)/rogue/g_chase.o \
|
||||
$(BUILDDIR)/rogue/g_cmds.o \
|
||||
$(BUILDDIR)/rogue/g_combat.o \
|
||||
$(BUILDDIR)/rogue/g_func.o \
|
||||
$(BUILDDIR)/rogue/g_items.o \
|
||||
$(BUILDDIR)/rogue/g_main.o \
|
||||
$(BUILDDIR)/rogue/g_misc.o \
|
||||
$(BUILDDIR)/rogue/g_monster.o \
|
||||
$(BUILDDIR)/rogue/g_newai.o \
|
||||
$(BUILDDIR)/rogue/g_newdm.o \
|
||||
$(BUILDDIR)/rogue/g_newfnc.o \
|
||||
$(BUILDDIR)/rogue/g_newtarg.o \
|
||||
$(BUILDDIR)/rogue/g_newtrig.o \
|
||||
$(BUILDDIR)/rogue/g_newweap.o \
|
||||
$(BUILDDIR)/rogue/g_phys.o \
|
||||
$(BUILDDIR)/rogue/g_save.o \
|
||||
$(BUILDDIR)/rogue/g_spawn.o \
|
||||
$(BUILDDIR)/rogue/g_sphere.o \
|
||||
$(BUILDDIR)/rogue/g_svcmds.o \
|
||||
$(BUILDDIR)/rogue/g_target.o \
|
||||
$(BUILDDIR)/rogue/g_trigger.o \
|
||||
$(BUILDDIR)/rogue/g_turret.o \
|
||||
$(BUILDDIR)/rogue/g_utils.o \
|
||||
$(BUILDDIR)/rogue/g_weapon.o \
|
||||
$(BUILDDIR)/rogue/m_actor.o \
|
||||
$(BUILDDIR)/rogue/m_berserk.o \
|
||||
$(BUILDDIR)/rogue/m_boss2.o \
|
||||
$(BUILDDIR)/rogue/m_boss3.o \
|
||||
$(BUILDDIR)/rogue/m_boss31.o \
|
||||
$(BUILDDIR)/rogue/m_boss32.o \
|
||||
$(BUILDDIR)/rogue/m_brain.o \
|
||||
$(BUILDDIR)/rogue/m_carrier.o \
|
||||
$(BUILDDIR)/rogue/m_chick.o \
|
||||
$(BUILDDIR)/rogue/m_flash.o \
|
||||
$(BUILDDIR)/rogue/m_flipper.o \
|
||||
$(BUILDDIR)/rogue/m_float.o \
|
||||
$(BUILDDIR)/rogue/m_flyer.o \
|
||||
$(BUILDDIR)/rogue/m_gladiator.o \
|
||||
$(BUILDDIR)/rogue/m_gunner.o \
|
||||
$(BUILDDIR)/rogue/m_hover.o \
|
||||
$(BUILDDIR)/rogue/m_infantry.o \
|
||||
$(BUILDDIR)/rogue/m_insane.o \
|
||||
$(BUILDDIR)/rogue/m_medic.o \
|
||||
$(BUILDDIR)/rogue/m_move.o \
|
||||
$(BUILDDIR)/rogue/m_mutant.o \
|
||||
$(BUILDDIR)/rogue/m_parasite.o \
|
||||
$(BUILDDIR)/rogue/m_soldier.o \
|
||||
$(BUILDDIR)/rogue/m_stalker.o \
|
||||
$(BUILDDIR)/rogue/m_supertank.o \
|
||||
$(BUILDDIR)/rogue/m_tank.o \
|
||||
$(BUILDDIR)/rogue/m_turret.o \
|
||||
$(BUILDDIR)/rogue/m_widow.o \
|
||||
$(BUILDDIR)/rogue/m_widow2.o \
|
||||
$(BUILDDIR)/rogue/p_client.o \
|
||||
$(BUILDDIR)/rogue/p_hud.o \
|
||||
$(BUILDDIR)/rogue/p_trail.o \
|
||||
$(BUILDDIR)/rogue/p_view.o \
|
||||
$(BUILDDIR)/rogue/p_weapon.o \
|
||||
$(BUILDDIR)/rogue/q_shared.o
|
||||
|
||||
$(BUILDDIR)/rogue/game$(ARCH).$(SHLIBEXT) : $(ROGUE_OBJS)
|
||||
$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(ROGUE_OBJS)
|
||||
|
||||
$(BUILDDIR)/rogue/dm_ball.o : $(ROGUE_DIR)/dm_ball.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/dm_tag.o : $(ROGUE_DIR)/dm_tag.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_ai.o : $(ROGUE_DIR)/g_ai.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_chase.o : $(ROGUE_DIR)/g_chase.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_cmds.o : $(ROGUE_DIR)/g_cmds.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_combat.o : $(ROGUE_DIR)/g_combat.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_func.o : $(ROGUE_DIR)/g_func.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_items.o : $(ROGUE_DIR)/g_items.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_main.o : $(ROGUE_DIR)/g_main.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_misc.o : $(ROGUE_DIR)/g_misc.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_monster.o : $(ROGUE_DIR)/g_monster.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_newai.o : $(ROGUE_DIR)/g_newai.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_newdm.o : $(ROGUE_DIR)/g_newdm.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_newfnc.o : $(ROGUE_DIR)/g_newfnc.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_newtarg.o : $(ROGUE_DIR)/g_newtarg.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_newtrig.o : $(ROGUE_DIR)/g_newtrig.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_newweap.o : $(ROGUE_DIR)/g_newweap.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_phys.o : $(ROGUE_DIR)/g_phys.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_save.o : $(ROGUE_DIR)/g_save.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_spawn.o : $(ROGUE_DIR)/g_spawn.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_sphere.o : $(ROGUE_DIR)/g_sphere.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_svcmds.o : $(ROGUE_DIR)/g_svcmds.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_target.o : $(ROGUE_DIR)/g_target.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_trigger.o : $(ROGUE_DIR)/g_trigger.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_turret.o : $(ROGUE_DIR)/g_turret.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_utils.o : $(ROGUE_DIR)/g_utils.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_weapon.o : $(ROGUE_DIR)/g_weapon.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_actor.o : $(ROGUE_DIR)/m_actor.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_berserk.o : $(ROGUE_DIR)/m_berserk.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_boss2.o : $(ROGUE_DIR)/m_boss2.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_boss3.o : $(ROGUE_DIR)/m_boss3.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_boss31.o : $(ROGUE_DIR)/m_boss31.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_boss32.o : $(ROGUE_DIR)/m_boss32.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_brain.o : $(ROGUE_DIR)/m_brain.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_carrier.o : $(ROGUE_DIR)/m_carrier.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_chick.o : $(ROGUE_DIR)/m_chick.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_flash.o : $(ROGUE_DIR)/m_flash.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_flipper.o : $(ROGUE_DIR)/m_flipper.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_float.o : $(ROGUE_DIR)/m_float.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_flyer.o : $(ROGUE_DIR)/m_flyer.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_gladiator.o : $(ROGUE_DIR)/m_gladiator.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_gunner.o : $(ROGUE_DIR)/m_gunner.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_hover.o : $(ROGUE_DIR)/m_hover.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_infantry.o : $(ROGUE_DIR)/m_infantry.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_insane.o : $(ROGUE_DIR)/m_insane.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_medic.o : $(ROGUE_DIR)/m_medic.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_move.o : $(ROGUE_DIR)/m_move.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_mutant.o : $(ROGUE_DIR)/m_mutant.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_parasite.o : $(ROGUE_DIR)/m_parasite.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_soldier.o : $(ROGUE_DIR)/m_soldier.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_stalker.o : $(ROGUE_DIR)/m_stalker.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_supertank.o : $(ROGUE_DIR)/m_supertank.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_tank.o : $(ROGUE_DIR)/m_tank.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_turret.o : $(ROGUE_DIR)/m_turret.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_widow.o : $(ROGUE_DIR)/m_widow.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_widow2.o : $(ROGUE_DIR)/m_widow2.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/p_client.o : $(ROGUE_DIR)/p_client.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/p_hud.o : $(ROGUE_DIR)/p_hud.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/p_trail.o : $(ROGUE_DIR)/p_trail.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/p_view.o : $(ROGUE_DIR)/p_view.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/p_weapon.o : $(ROGUE_DIR)/p_weapon.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/q_shared.o : $(ROGUE_DIR)/q_shared.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
#############################################################################
|
||||
# REF_SOFT
|
||||
|
|
|
@ -423,6 +423,8 @@ void CL_SendConnectPacket (void)
|
|||
netadr_t adr;
|
||||
int port;
|
||||
|
||||
memset(&adr, 0, sizeof(adr));
|
||||
|
||||
if (!NET_StringToAdr (cls.servername, &adr))
|
||||
{
|
||||
Com_Printf ("Bad server address\n");
|
||||
|
@ -544,6 +546,8 @@ void CL_Rcon_f (void)
|
|||
return;
|
||||
}
|
||||
|
||||
memset(&to, 0, sizeof(to));
|
||||
|
||||
message[0] = (char)255;
|
||||
message[1] = (char)255;
|
||||
message[2] = (char)255;
|
||||
|
@ -819,6 +823,13 @@ void CL_PingServers_f (void)
|
|||
Netchan_OutOfBandPrint (NS_CLIENT, adr, va("info %i", PROTOCOL_VERSION));
|
||||
}
|
||||
|
||||
#ifdef HAVE_IPV6
|
||||
Com_Printf("pinging multicast...\n");
|
||||
adr.type = NA_MULTICAST6;
|
||||
adr.port = BigShort(PORT_SERVER);
|
||||
Netchan_OutOfBandPrint(NS_CLIENT, adr, va("info %i", PROTOCOL_VERSION));
|
||||
#endif
|
||||
|
||||
noipx = Cvar_Get ("noipx", "0", CVAR_NOSET);
|
||||
if (!noipx->value)
|
||||
{
|
||||
|
@ -1787,7 +1798,7 @@ void CL_Init (void)
|
|||
// all archived variables will now be loaded
|
||||
|
||||
Con_Init ();
|
||||
#if defined __linux__ || defined __sgi
|
||||
#if defined __linux__ || defined __FreeBSD__ || defined __sgi
|
||||
S_Init ();
|
||||
VID_Init ();
|
||||
#else
|
||||
|
|
|
@ -352,7 +352,11 @@ void CL_PrepRefresh (void)
|
|||
cl.force_refdef = true; // make sure we have a valid refdef
|
||||
|
||||
// start the cd track
|
||||
CDAudio_Play (atoi(cl.configstrings[CS_CDTRACK]), true);
|
||||
if (Cvar_VariableValue("cd_shuffle")) {
|
||||
CDAudio_RandomPlay();
|
||||
} else {
|
||||
CDAudio_Play (atoi(cl.configstrings[CS_CDTRACK]), true);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -38,21 +38,19 @@ int edit_line=0;
|
|||
int history_line=0;
|
||||
|
||||
int key_waiting;
|
||||
char *keybindings[K_LAST];
|
||||
qboolean consolekeys[K_LAST]; // if true, can't be rebound while in console
|
||||
qboolean menubound[K_LAST]; // if true, can't be rebound while in menu
|
||||
int keyshift[K_LAST]; // key to map to if shift held down in console
|
||||
int key_repeats[K_LAST]; // if > 1, it is autorepeating
|
||||
qboolean keydown[K_LAST];
|
||||
char * keybindings[K_LAST];
|
||||
qboolean consolekeys[K_LAST]; // if true, can't be rebound while in console
|
||||
qboolean menubound[K_LAST]; // if true, can't be rebound while in menu
|
||||
int keyshift[K_LAST]; // key to map to if shift held down in console
|
||||
int key_repeats[K_LAST]; // if > 1, it is autorepeating
|
||||
qboolean keydown[K_LAST];
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
char *name;
|
||||
int keynum;
|
||||
} keyname_t;
|
||||
|
||||
keyname_t keynames[] =
|
||||
{
|
||||
keyname_t keynames[] = {
|
||||
{"TAB", K_TAB},
|
||||
{"ENTER", K_ENTER},
|
||||
{"ESCAPE", K_ESCAPE},
|
||||
|
@ -90,6 +88,8 @@ keyname_t keynames[] =
|
|||
{"MOUSE1", K_MOUSE1},
|
||||
{"MOUSE2", K_MOUSE2},
|
||||
{"MOUSE3", K_MOUSE3},
|
||||
{"MOUSE4", K_MOUSE4},
|
||||
{"MOUSE5", K_MOUSE5},
|
||||
|
||||
{"JOY1", K_JOY1},
|
||||
{"JOY2", K_JOY2},
|
||||
|
@ -553,11 +553,10 @@ void Key_Unbind_f (void)
|
|||
Key_SetBinding (b, "");
|
||||
}
|
||||
|
||||
void Key_Unbindall_f (void)
|
||||
{
|
||||
int i;
|
||||
void Key_Unbindall_f (void) {
|
||||
int i;
|
||||
|
||||
for (i=0 ; i<K_LAST ; i++)
|
||||
for (i = 0; i < K_LAST; i++)
|
||||
if (keybindings[i])
|
||||
Key_SetBinding (i, "");
|
||||
}
|
||||
|
@ -615,11 +614,10 @@ Key_WriteBindings
|
|||
Writes lines containing "bind key value"
|
||||
============
|
||||
*/
|
||||
void Key_WriteBindings (FILE *f)
|
||||
{
|
||||
int i;
|
||||
void Key_WriteBindings (FILE *f) {
|
||||
int i;
|
||||
|
||||
for (i=0 ; i<K_LAST ; i++)
|
||||
for (i = 0; i < K_LAST; i++)
|
||||
if (keybindings[i] && keybindings[i][0])
|
||||
fprintf (f, "bind %s \"%s\"\n", Key_KeynumToString(i), keybindings[i]);
|
||||
}
|
||||
|
@ -631,11 +629,10 @@ Key_Bindlist_f
|
|||
|
||||
============
|
||||
*/
|
||||
void Key_Bindlist_f (void)
|
||||
{
|
||||
int i;
|
||||
void Key_Bindlist_f (void) {
|
||||
int i;
|
||||
|
||||
for (i=0 ; i<K_LAST ; i++)
|
||||
for (i = 0; i < K_LAST; i++)
|
||||
if (keybindings[i] && keybindings[i][0])
|
||||
Com_Printf ("%s \"%s\"\n", Key_KeynumToString(i), keybindings[i]);
|
||||
}
|
||||
|
@ -646,12 +643,10 @@ void Key_Bindlist_f (void)
|
|||
Key_Init
|
||||
===================
|
||||
*/
|
||||
void Key_Init (void)
|
||||
{
|
||||
int i;
|
||||
void Key_Init (void) {
|
||||
int i;
|
||||
|
||||
for (i=0 ; i<32 ; i++)
|
||||
{
|
||||
for (i = 0; i < 32; i++) {
|
||||
key_lines[i][0] = ']';
|
||||
key_lines[i][1] = 0;
|
||||
}
|
||||
|
@ -662,6 +657,7 @@ void Key_Init (void)
|
|||
//
|
||||
for (i=32 ; i<128 ; i++)
|
||||
consolekeys[i] = true;
|
||||
|
||||
consolekeys[K_ENTER] = true;
|
||||
consolekeys[K_KP_ENTER] = true;
|
||||
consolekeys[K_TAB] = true;
|
||||
|
@ -694,10 +690,11 @@ void Key_Init (void)
|
|||
consolekeys['`'] = false;
|
||||
consolekeys['~'] = false;
|
||||
|
||||
for (i=0 ; i<K_LAST ; i++)
|
||||
for (i = 0; i < K_LAST; i++)
|
||||
keyshift[i] = i;
|
||||
for (i='a' ; i<='z' ; i++)
|
||||
for (i = 'a'; i <= 'z'; i++)
|
||||
keyshift[i] = i - 'a' + 'A';
|
||||
|
||||
keyshift['1'] = '!';
|
||||
keyshift['2'] = '@';
|
||||
keyshift['3'] = '#';
|
||||
|
@ -721,7 +718,8 @@ void Key_Init (void)
|
|||
keyshift['\\'] = '|';
|
||||
|
||||
menubound[K_ESCAPE] = true;
|
||||
for (i=0 ; i<12 ; i++)
|
||||
|
||||
for (i = 0 ; i < 12; i++)
|
||||
menubound[K_F1+i] = true;
|
||||
|
||||
//
|
||||
|
@ -915,15 +913,13 @@ void Key_Event (int key, qboolean down, unsigned time)
|
|||
Key_ClearStates
|
||||
===================
|
||||
*/
|
||||
void Key_ClearStates (void)
|
||||
{
|
||||
int i;
|
||||
void Key_ClearStates (void) {
|
||||
int i;
|
||||
|
||||
anykeydown = false;
|
||||
|
||||
for (i=0 ; i<K_LAST ; i++)
|
||||
{
|
||||
if ( keydown[i] || key_repeats[i] )
|
||||
for (i = 0; i < K_LAST; i++) {
|
||||
if (keydown[i] || key_repeats[i])
|
||||
Key_Event( i, false, 0 );
|
||||
keydown[i] = 0;
|
||||
key_repeats[i] = 0;
|
||||
|
|
|
@ -79,6 +79,8 @@ enum QKEYS {
|
|||
K_MOUSE1 = 200,
|
||||
K_MOUSE2 = 201,
|
||||
K_MOUSE3 = 202,
|
||||
K_MOUSE4 = 241,
|
||||
K_MOUSE5 = 242,
|
||||
|
||||
//
|
||||
// joystick buttons
|
||||
|
@ -133,8 +135,8 @@ enum QKEYS {
|
|||
K_LAST
|
||||
};
|
||||
|
||||
extern char *keybindings[K_LAST];
|
||||
extern int key_repeats[K_LAST];
|
||||
extern char * keybindings[K_LAST];
|
||||
extern int key_repeats[K_LAST];
|
||||
|
||||
extern int anykeydown;
|
||||
extern char chat_buffer[];
|
||||
|
|
|
@ -207,6 +207,8 @@ const char *Default_MenuKey( menuframework_s *m, int key )
|
|||
case K_MOUSE1:
|
||||
case K_MOUSE2:
|
||||
case K_MOUSE3:
|
||||
case K_MOUSE4:
|
||||
case K_MOUSE5:
|
||||
case K_JOY1:
|
||||
case K_JOY2:
|
||||
case K_JOY3:
|
||||
|
@ -582,6 +584,7 @@ char *bindnames[][2] =
|
|||
{
|
||||
{"+attack", "attack"},
|
||||
{"weapnext", "next weapon"},
|
||||
{"weapprev", "previous weapon"},
|
||||
{"+forward", "walk forward"},
|
||||
{"+back", "backpedal"},
|
||||
{"+left", "turn left"},
|
||||
|
@ -1083,7 +1086,7 @@ static void ControlsSetMenuItemValues( void )
|
|||
s_options_sfxvolume_slider.curvalue = Cvar_VariableValue( "s_volume" ) * 10;
|
||||
s_options_cdvolume_box.curvalue = !Cvar_VariableValue("cd_nocd");
|
||||
|
||||
Cvar_SetValue ( "cd_shuffle", 0);
|
||||
s_options_cdshuffle_box.curvalue = Cvar_VariableValue("cd_shuffle");
|
||||
|
||||
s_options_quality_list.curvalue = !Cvar_VariableValue( "s_loadas8bit" );
|
||||
s_options_sensitivity_slider.curvalue = ( sensitivity->value ) * 2;
|
||||
|
@ -1139,9 +1142,8 @@ static void UpdateVolumeFunc( void *unused )
|
|||
Cvar_SetValue( "s_volume", s_options_sfxvolume_slider.curvalue / 10 );
|
||||
}
|
||||
|
||||
static void CDShuffleFunc( void *unused )
|
||||
{
|
||||
Cvar_SetValue("cd_shuffle", !s_options_cdshuffle_box.curvalue);
|
||||
static void CDShuffleFunc(void * unused) {
|
||||
Cvar_SetValue("cd_shuffle", s_options_cdshuffle_box.curvalue);
|
||||
}
|
||||
|
||||
static void UpdateCDVolumeFunc( void *unused )
|
||||
|
@ -1151,17 +1153,12 @@ static void UpdateCDVolumeFunc( void *unused )
|
|||
if (s_options_cdvolume_box.curvalue)
|
||||
{
|
||||
CDAudio_Init();
|
||||
if (s_options_cdshuffle_box.curvalue)
|
||||
{
|
||||
if (s_options_cdshuffle_box.curvalue) {
|
||||
CDAudio_RandomPlay();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
CDAudio_Play(atoi(cl.configstrings[CS_CDTRACK]), true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
CDAudio_Stop();
|
||||
}
|
||||
}
|
||||
|
@ -2272,7 +2269,13 @@ void M_AddToServerList (netadr_t adr, char *info)
|
|||
return;
|
||||
|
||||
local_server_netadr[m_num_servers] = adr;
|
||||
#ifdef HAVE_IPV6
|
||||
// show the IP address as well, useful to idenfity whether the server
|
||||
// is IPv6 or IPv4
|
||||
Com_sprintf(local_server_names[m_num_servers], sizeof(local_server_names[0])-1, "%s %s", info, NET_AdrToString(adr));
|
||||
#else
|
||||
strncpy (local_server_names[m_num_servers], info, sizeof(local_server_names[0])-1);
|
||||
#endif
|
||||
m_num_servers++;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ short *snd_out;
|
|||
|
||||
void S_WriteLinearBlastStereo16 (void);
|
||||
|
||||
#if !(defined __linux__ && defined __i386__)
|
||||
#if !((defined __linux__ || defined __FreeBSD__) && defined __i386__)
|
||||
#if !id386
|
||||
|
||||
void S_WriteLinearBlastStereo16 (void)
|
||||
|
@ -362,7 +362,7 @@ void S_InitScaletable (void)
|
|||
}
|
||||
|
||||
|
||||
#if !(defined __linux__ && defined __i386__)
|
||||
#if !((defined __linux__ || __FreeBSD__) && defined __i386__)
|
||||
#if !id386
|
||||
|
||||
void S_PaintChannelFrom8 (channel_t *ch, sfxcache_t *sc, int count, int offset)
|
||||
|
|
|
@ -345,7 +345,7 @@ BoxOnPlaneSide
|
|||
Returns 1, 2, or 1 + 2
|
||||
==================
|
||||
*/
|
||||
#if !id386 || defined __linux__
|
||||
#if !id386 || defined __linux__ || defined __FreeBSD__
|
||||
int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
|
||||
{
|
||||
float dist1, dist2;
|
||||
|
|
|
@ -146,7 +146,7 @@ extern vec3_t vec3_origin;
|
|||
// microsoft's fabs seems to be ungodly slow...
|
||||
//float Q_fabs (float f);
|
||||
//#define fabs(f) Q_fabs(f)
|
||||
#if !defined C_ONLY && !defined __linux__ && !defined __sgi
|
||||
#if !defined C_ONLY && !defined __linux__ && !defined __FreeBSD__ && !defined __sgi
|
||||
extern long Q_ftol( float f );
|
||||
#else
|
||||
#define Q_ftol( f ) ( long ) (f)
|
||||
|
|
174
docs/README.sdl
174
docs/README.sdl
|
@ -1,6 +1,9 @@
|
|||
id Software's Quake2 3.21+Changes by Steven Fuller <relnev@icculus.org>,
|
||||
et al.
|
||||
Minor OS-oriented changes to id Software's Quake2 3.21:
|
||||
"It works for me, v1.0"
|
||||
|
||||
(NOTE: throughout this document, references to i386 [debugi386, releasei386,
|
||||
gamei386.so] are used. If your architecture is not i386, just substitute
|
||||
that for i386. The Makefile gives some hints as to what is supported.)
|
||||
|
||||
For this to be of any use, you _must_ own a copy of Quake 2. The demo would
|
||||
also work, but you might as well buy the full thing now.
|
||||
|
@ -12,7 +15,7 @@ Be sure to install SDL 1.2 (http://www.libsdl.org) if you want to use the
|
|||
softsdl or sdlgl drivers, or the sdlquake2 binary.
|
||||
|
||||
'make' will, by default, build both the debug and release files.
|
||||
To build fully optimized binaries: make build_release
|
||||
To build just the optimized binaries: make build_release
|
||||
The resulting binaries are then put in releasei386.
|
||||
|
||||
|
||||
|
@ -37,16 +40,21 @@ BUILD_SDL Build ref_softsdl.so, a quake2 video driver that
|
|||
BUILD_SDLGL Build ref_sdlgl.so, a quake2 video driver that uses
|
||||
OpenGL with SDL (default = YES).
|
||||
BUILD_CTFDLL Build the Threewave CTF gamei386.so (default = NO).
|
||||
|
||||
BUILD_XATRIX Build the Xatrix gamei386.so for the "The Reckoning"
|
||||
Mission Pack (default = NO). [see notes below]
|
||||
BUILD_ROGUE Build the Rogue gamei386.so for the "Ground Zero"
|
||||
Mission Pack (default = NO). [see notes below]
|
||||
HAVE_IPV6 Build quake2 with IPv6 support (currently only
|
||||
tested on FreeBSD, see below for info) (default = NO).
|
||||
|
||||
To install the Quake2 gamedata:
|
||||
-------------------------------
|
||||
(installdir is wherever you want to install quake2, and cdromdir is wherever
|
||||
you mount the Quake 2 CD-ROM)
|
||||
1. copy <cdromdir>/Install/Data/baseq2/pak0.pak to <installdir>/baseq2/
|
||||
2. copy <cdromdir>/Install/Data/baseq2/videos/ to <installdir>/baseq2/
|
||||
2. copy <cdromdir>/Install/Data/baseq2/video/ to <installdir>/baseq2/
|
||||
(optional)
|
||||
3. Download q2-3.20-x86-full.exe from
|
||||
3. download q2-3.20-x86-full.exe from
|
||||
ftp://ftp.idsoftware.com/idstuff/quake2/ or a mirror site, and extract the
|
||||
contents to a temporary directory (use unzip -L, as this is a standard zip
|
||||
file).
|
||||
|
@ -56,15 +64,52 @@ you mount the Quake 2 CD-ROM)
|
|||
<installdir>/baseq2/
|
||||
6. copy <q2-3.20-x86-full.exe temp directory>/baseq2/players/ to
|
||||
<installdir>/baseq2/
|
||||
7. if you really want to use the crakhor model, you can find the
|
||||
skins/sounds on websites like http://www.mike-d.com/games/modskins.html
|
||||
(optional)
|
||||
|
||||
To install this program:
|
||||
------------------------
|
||||
(builddir is either debugi386 or releasei386)
|
||||
0. edit Makefile if needed, then 'make'
|
||||
1. copy <builddir>/gamei386.so to <installdir>/baseq2/
|
||||
2. copy <builddir>/ref_*.so to <installdir>
|
||||
3. copy <builddir>/quake2 to <installdir>
|
||||
4. copy <builddir>/sdlquake2 to <installdir> (optional)
|
||||
5. copy <builddir>/ctf/gamei386.so to <installdir>/ctf/ (optional)
|
||||
|
||||
To install the "The Reckoning" Mission Pack (Xatrix):
|
||||
-----------------------------------------------------
|
||||
(cdromdir is wherever you mount The Reckoning CD-ROM)
|
||||
1. enable BUILD_XATRIX in Makefile
|
||||
2. download xatrixsrc320.shar.Z from
|
||||
ftp://ftp.idsoftware.com/idstuff/quake2/source/ or a mirror site, extract
|
||||
it (it's a compressed shell script) and place the contents in
|
||||
<quake2-rX.X.X>/src/xatrix/
|
||||
3. make
|
||||
4. copy <builddir>/xatrix/gamei386.so to <installdir>/xatrix/
|
||||
5. copy <cdromdir>/Data/all/pak0.pak to <installdir>/xatrix/
|
||||
6. copy <cdromdir>/Data/max/xatrix/video/ to <installdir>/xatrix/ (optional)
|
||||
7. when starting quake2, use "+set game xatrix" on the command line
|
||||
|
||||
To install the "Ground Zero" Mission Pack (Rogue):
|
||||
--------------------------------------------------
|
||||
(cdromdir is wherever you mount the Ground Zero CD-ROM)
|
||||
1. enable BUILD_ROGUE in Makefile
|
||||
2. download roguesrc320.shar.Z from
|
||||
ftp://ftp.idsoftware.com/idstuff/quake2/source or a mirror site, extract
|
||||
it (it's a compressed shell script) and place the contents in
|
||||
<quake2-rX.X.X>/src/rogue/
|
||||
3. make
|
||||
4. if the compilation fails, change line 31 of src/rogue/g_local.h from:
|
||||
#define _isnan(a) ((a)==NAN)
|
||||
to:
|
||||
#define _isnan(a) isnan(a)
|
||||
and try again.
|
||||
5. copy <builddir>/rogue/gamei386.so to <installdir>/rogue/
|
||||
6. copy <cdromdir>/Data/all/pak0.pak to <installdir>/rogue/
|
||||
7. copy <cdromdir>/Data/max/Rogue/video/ to <installdir>/rogue/ (optional)
|
||||
8. when starting quake2, use "+set game rogue" on the command line
|
||||
|
||||
To run:
|
||||
-------
|
||||
|
@ -72,7 +117,9 @@ cd <installdir> && ./quake2
|
|||
Or:
|
||||
quake2 +set basedir <installdir>
|
||||
|
||||
/etc/quake2.conf is no longer needed; instead, the ref_*.so files are loaded
|
||||
Add +set game <moddir> to load a mod (like the mission packs).
|
||||
|
||||
/etc/quake2.conf is no longer used; instead, the ref_*.so files are loaded
|
||||
from basedir (basedir is "." by default, and can only be set at the command
|
||||
line).
|
||||
|
||||
|
@ -85,15 +132,52 @@ so is at your own risk.
|
|||
NOTE: Save games will not work across different versions or builds, because
|
||||
of the way they are stored.
|
||||
|
||||
|
||||
Binary-Only Mods:
|
||||
-----------------
|
||||
Chances are that they will not work. I suspect that it has something to do
|
||||
with the mods being built with older versions of gcc/glibc2. EraserBot, for
|
||||
example, has source available except for one file, p_trail.o. Trying to
|
||||
use an EraserBot gamei386.so results in a crash somewhere inside p_trail.o.
|
||||
|
||||
Dedicated Server:
|
||||
-----------------
|
||||
If there is a demand for it, I can add support for an explicit q2ded binary.
|
||||
Else, using +set dedicated 1 should be fine.
|
||||
|
||||
IPv6 Support:
|
||||
-------------
|
||||
Currently experimental, so it may or may not work. Here is some information
|
||||
about it from Florent Parent:
|
||||
|
||||
quake2 +set dedicated 1
|
||||
Runs server listening on both IPv4 and IPv6 sockets
|
||||
|
||||
quake2 +set dedicated 1 +set multicast <interface>
|
||||
IPv6 server joins quake2 multicast group ff12::666
|
||||
|
||||
quake2 +set dedicated 1 +set ip <IPv6 address> +set multicast <interface>
|
||||
IPv6 server only. Listens on <IPv6 address>
|
||||
Examples of <IPv6 address>:
|
||||
3ffe:b00:c18::666 (global IPv6 address)
|
||||
fe80::202:b3ff:fe04:1234%fxp0 (link-local address. scope required)
|
||||
:: (unspecified, binds on all IPv6
|
||||
addresses)
|
||||
quake2 +set dedicated 1 +set ip <IPv4 address>
|
||||
IPv4 server only. Listens on <IPv4 address>
|
||||
0.0.0.0 can be used to bind on all IPv4 addresses
|
||||
|
||||
Joystick Support:
|
||||
-----------------
|
||||
None yet.
|
||||
|
||||
Windows Support:
|
||||
----------------
|
||||
In order to compile the source:
|
||||
|
||||
If you don't already have it, you'll need to download:
|
||||
http://oss.sgi.com/projects/ogl-sample/ABI/glext.h
|
||||
|
||||
Commonly used commands:
|
||||
-----------------------
|
||||
cd_nocd 0 // disable CD audio
|
||||
|
@ -110,11 +194,14 @@ snd_restart // restart sound driver
|
|||
basedir <dir> // point quake2 to where the data is
|
||||
gl_driver <libGL.so> // point quake2 to your libGL
|
||||
dedicated 1 // run quake2 as a dedicated server
|
||||
game <subdir> // load the quake2 mod in that directory
|
||||
|
||||
When using these commands on the quake2 command line, use +set to cause the
|
||||
variables be set before the config files are loaded (important for
|
||||
gl_driver). e.g.
|
||||
./quake2 +set vid_ref glx +set gl_driver /usr/lib/libGL.so.1
|
||||
Note that variables like basedir and game _require_ using +set to ensure
|
||||
the desired functionality.
|
||||
|
||||
If quake2 crashes when trying to load an OpenGL based driver (glx, sdlgl),
|
||||
make sure its not loading the wrong libGL.
|
||||
|
@ -125,14 +212,36 @@ export LD_PRELOAD=/usr/lib/libGL.so, and run quake2 again.
|
|||
Is lighting slow in OpenGL (while firing, explosions, etc.)? Disable
|
||||
multitexturing (gl_ext_multitexture 0; vid_restart).
|
||||
|
||||
More information can be found in src/docs/.
|
||||
|
||||
Known Bugs and Workarounds:
|
||||
---------------------------
|
||||
Bug: Shooting the Tank Commander in the boss2 easter egg can cause Quake 2
|
||||
to lock up (reported by Gary Briggs).
|
||||
Workaround: Don't do that, I guess. The problem is with game/g_weapon.c,
|
||||
line 674 (fire_rail). Something goes wrong(?) with the raytrace and
|
||||
tr.endpos ends up changing very little, if at all, so the game gets stuck
|
||||
in the loop.
|
||||
|
||||
FAQ:
|
||||
----
|
||||
Q: Quake2 crashes when starting a new game.
|
||||
A: It's most likely that the gamei386.so was not installed correctly.
|
||||
Do not use the version that comes with the 3.20 release! See the
|
||||
installation instructions above.
|
||||
|
||||
Q: Quake2 doesn't want to load mods correctly with +game.
|
||||
A: Use +set game.
|
||||
|
||||
Q: ErasorBot doesn't work.
|
||||
A: Not all the source was released for ErasorBot. See explanation above.
|
||||
|
||||
Website:
|
||||
--------
|
||||
I'll post any updates I make at http://www.icculus.org/quake2/
|
||||
(which currently redirects to http://www.icculus.org/~relnev/)
|
||||
|
||||
Mailing List:
|
||||
-------------
|
||||
Mailing List and Contact:
|
||||
-------------------------
|
||||
to subscribe: send a blank email to quake2-subscribe@icculus.org
|
||||
to post: send email to quake2@icculus.org
|
||||
|
||||
|
@ -148,13 +257,36 @@ https://bugzilla.icculus.org
|
|||
|
||||
TODO:
|
||||
-----
|
||||
Try out RCG's key idea.
|
||||
Fix save games.
|
||||
Verify FXGL works.
|
||||
Verify that FXGL works.
|
||||
Joystick support.
|
||||
Fullscreen/DGA support in X11 driver.
|
||||
Fully switch to glext.h.
|
||||
Suggestions, anyone?
|
||||
Have menu only list ref libs that are available.
|
||||
Have menu only list window sizes that are available.
|
||||
Make a list of tested mods.
|
||||
Make Q2 as Arch/OS independent as possible.
|
||||
|
||||
Many Thanks to all these people:
|
||||
--------------------------------
|
||||
John Allensworth
|
||||
Stephen Anthony
|
||||
William Aoki
|
||||
Robert Bäuml
|
||||
Vincent Cojot
|
||||
Michel Dänzer
|
||||
Ryan C. Gordon
|
||||
Angelo Grossini
|
||||
Nicolai Haehnle
|
||||
Thijmen Klok
|
||||
Hampton Maxwell
|
||||
Ludwig Nussel
|
||||
Peter van Paassen
|
||||
Florent Parent
|
||||
Zachary 'zakk' Slater
|
||||
Matti Valtonen
|
||||
|
||||
v0.0.9: [XX/XX/XX] CVS
|
||||
-------
|
||||
|
||||
v0.0.8: [01/04/02]
|
||||
-------
|
||||
|
@ -207,17 +339,3 @@ v0.0.1: [12/22/01]
|
|||
+ Updates to Linux Makefile (it was missing a few files).
|
||||
+ Added ref_softsdl.so (Software SDL Renderer).
|
||||
- OpenGL not yet supported.
|
||||
|
||||
Thanks:
|
||||
-------
|
||||
John Allensworth
|
||||
Stephen Anthony
|
||||
William Aoki
|
||||
Robert Bäuml
|
||||
Vincent Cojot
|
||||
Michel Dänzer
|
||||
Ryan C. Gordon
|
||||
Ludwig Nussel
|
||||
Peter van Paassen
|
||||
Zachary 'zakk' Slater
|
||||
Matti Valtonen
|
||||
|
|
|
@ -158,8 +158,7 @@ void Cmd_Give_f (edict_t *ent)
|
|||
qboolean give_all;
|
||||
edict_t *it_ent;
|
||||
|
||||
if (deathmatch->value && !sv_cheats->value)
|
||||
{
|
||||
if ((deathmatch->value || coop->value) && !sv_cheats->value) {
|
||||
gi.cprintf (ent, PRINT_HIGH, "You must run the server with '+set cheats 1' to enable this command.\n");
|
||||
return;
|
||||
}
|
||||
|
@ -309,8 +308,7 @@ void Cmd_God_f (edict_t *ent)
|
|||
{
|
||||
char *msg;
|
||||
|
||||
if (deathmatch->value && !sv_cheats->value)
|
||||
{
|
||||
if ((deathmatch->value || coop->value) && !sv_cheats->value) {
|
||||
gi.cprintf (ent, PRINT_HIGH, "You must run the server with '+set cheats 1' to enable this command.\n");
|
||||
return;
|
||||
}
|
||||
|
@ -338,8 +336,7 @@ void Cmd_Notarget_f (edict_t *ent)
|
|||
{
|
||||
char *msg;
|
||||
|
||||
if (deathmatch->value && !sv_cheats->value)
|
||||
{
|
||||
if ((deathmatch->value || coop->value) && !sv_cheats->value) {
|
||||
gi.cprintf (ent, PRINT_HIGH, "You must run the server with '+set cheats 1' to enable this command.\n");
|
||||
return;
|
||||
}
|
||||
|
@ -365,8 +362,7 @@ void Cmd_Noclip_f (edict_t *ent)
|
|||
{
|
||||
char *msg;
|
||||
|
||||
if (deathmatch->value && !sv_cheats->value)
|
||||
{
|
||||
if ((deathmatch->value || coop->value) && !sv_cheats->value) {
|
||||
gi.cprintf (ent, PRINT_HIGH, "You must run the server with '+set cheats 1' to enable this command.\n");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -343,9 +343,10 @@ void ReadField (FILE *f, field_t *field, byte *base)
|
|||
len = *(int *)p;
|
||||
if (!len)
|
||||
*(char **)p = NULL;
|
||||
else
|
||||
{
|
||||
*(char **)p = gi.TagMalloc (len, TAG_LEVEL);
|
||||
else {
|
||||
/* SBF: FIXME: 32 extra bytes alloc'd since the saved
|
||||
* string might not be long enough */
|
||||
*(char **) p = gi.TagMalloc(len+32, TAG_LEVEL);
|
||||
fread (*(char **)p, len, 1, f);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -345,7 +345,7 @@ BoxOnPlaneSide
|
|||
Returns 1, 2, or 1 + 2
|
||||
==================
|
||||
*/
|
||||
#if !id386 || defined __linux__
|
||||
#if !id386 || defined __linux__ || defined __FreeBSD__
|
||||
int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
|
||||
{
|
||||
float dist1, dist2;
|
||||
|
|
|
@ -30,6 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#pragma warning(disable : 4018) // signed/unsigned mismatch
|
||||
#pragma warning(disable : 4305) // truncation from const double to float
|
||||
|
||||
#define vsnprintf _vsnprintf
|
||||
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -146,7 +148,7 @@ extern vec3_t vec3_origin;
|
|||
// microsoft's fabs seems to be ungodly slow...
|
||||
//float Q_fabs (float f);
|
||||
//#define fabs(f) Q_fabs(f)
|
||||
#if !defined C_ONLY && !defined __linux__ && !defined __sgi
|
||||
#if !defined C_ONLY && defined _WIN32
|
||||
extern long Q_ftol( float f );
|
||||
#else
|
||||
#define Q_ftol( f ) ( long ) (f)
|
||||
|
|
|
@ -35,17 +35,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#else
|
||||
#define BUILDSTRING "Win32 DEBUG"
|
||||
#endif
|
||||
|
||||
/*
|
||||
#ifdef _M_IX86
|
||||
#define CPUSTRING "x86"
|
||||
#elif defined _M_ALPHA
|
||||
#define CPUSTRING "AXP"
|
||||
#endif
|
||||
|
||||
#elif defined __linux__
|
||||
*/
|
||||
#elif defined __linux__ || defined __bsd__
|
||||
|
||||
#define BUILDSTRING "Linux"
|
||||
|
||||
/*
|
||||
#ifdef __i386__
|
||||
#define CPUSTRING "i386"
|
||||
#elif defined __alpha__
|
||||
|
@ -53,24 +53,26 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#else
|
||||
#define CPUSTRING "Unknown"
|
||||
#endif
|
||||
|
||||
*/
|
||||
#elif defined __sun__
|
||||
|
||||
#define BUILDSTRING "Solaris"
|
||||
|
||||
/*
|
||||
#ifdef __i386__
|
||||
#define CPUSTRING "i386"
|
||||
#else
|
||||
#define CPUSTRING "sparc"
|
||||
#endif
|
||||
|
||||
*/
|
||||
#else // !WIN32
|
||||
|
||||
#define BUILDSTRING "NON-WIN32"
|
||||
#define CPUSTRING "NON-WIN32"
|
||||
/* #define CPUSTRING "NON-WIN32" */
|
||||
|
||||
#endif
|
||||
|
||||
/* all that crud above should die -- jaq */
|
||||
#define CPUSTRING ARCH
|
||||
//============================================================================
|
||||
|
||||
typedef struct sizebuf_s
|
||||
|
@ -528,7 +530,26 @@ NET
|
|||
#define MAX_MSGLEN 1400 // max length of a message
|
||||
#define PACKET_HEADER 10 // two ints and a short
|
||||
|
||||
typedef enum {NA_LOOPBACK, NA_BROADCAST, NA_IP, NA_IPX, NA_BROADCAST_IPX} netadrtype_t;
|
||||
/* from relnev 0.9 -- jaq */
|
||||
#ifdef HAVE_IPV6
|
||||
typedef enum {
|
||||
NA_LOOPBACK,
|
||||
NA_BROADCAST,
|
||||
NA_IP,
|
||||
NA_IPX,
|
||||
NA_BROADCAST_IPX,
|
||||
NA_IP6,
|
||||
NA_MULTICAST6
|
||||
} netadrtype_t;
|
||||
#else
|
||||
typedef enum {
|
||||
NA_LOOPBACK,
|
||||
NA_BROADCAST,
|
||||
NA_IP,
|
||||
NA_IPX,
|
||||
NA_BROADCAST_IPX
|
||||
} netadrtype_t;
|
||||
#endif
|
||||
|
||||
typedef enum {NS_CLIENT, NS_SERVER} netsrc_t;
|
||||
|
||||
|
@ -536,7 +557,14 @@ typedef struct
|
|||
{
|
||||
netadrtype_t type;
|
||||
|
||||
/* from relnev 0.9 -- jaq */
|
||||
#ifdef HAVE_IPV6
|
||||
/* TODO: use sockaddr_storage instead */
|
||||
byte ip[16];
|
||||
unsigned int scope_id;
|
||||
#else
|
||||
byte ip[4];
|
||||
#endif
|
||||
byte ipx[10];
|
||||
|
||||
unsigned short port;
|
||||
|
|
|
@ -422,7 +422,7 @@ void R_AliasSetUpTransform (void)
|
|||
R_AliasTransformFinalVerts
|
||||
================
|
||||
*/
|
||||
#if id386 && !defined __linux__
|
||||
#if id386 && !defined __linux__ && !defined __FreeBSD__
|
||||
void R_AliasTransformFinalVerts( int numpoints, finalvert_t *fv, dtrivertx_t *oldv, dtrivertx_t *newv )
|
||||
{
|
||||
float lightcos;
|
||||
|
|
|
@ -34,7 +34,7 @@ typedef struct
|
|||
|
||||
static partparms_t partparms;
|
||||
|
||||
#if id386 && !defined __linux__
|
||||
#if id386 && !defined __linux__ && !defined __FreeBSD__
|
||||
|
||||
static unsigned s_prefetch_address;
|
||||
|
||||
|
@ -597,7 +597,7 @@ void R_DrawParticles (void)
|
|||
{
|
||||
particle_t *p;
|
||||
int i;
|
||||
#if id386 && !defined __linux__
|
||||
#if id386 && !defined __linux__ && !defined __FreeBSD__
|
||||
extern unsigned long fpu_sp24_cw, fpu_chop_cw;
|
||||
#endif
|
||||
|
||||
|
@ -605,7 +605,7 @@ void R_DrawParticles (void)
|
|||
VectorScale( vup, yscaleshrink, r_pup );
|
||||
VectorCopy( vpn, r_ppn );
|
||||
|
||||
#if id386 && !defined __linux__
|
||||
#if id386 && !defined __linux__ && !defined __FreeBSD__
|
||||
__asm fldcw word ptr [fpu_sp24_cw]
|
||||
#endif
|
||||
|
||||
|
@ -622,7 +622,7 @@ void R_DrawParticles (void)
|
|||
partparms.particle = p;
|
||||
partparms.color = p->color;
|
||||
|
||||
#if id386 && !defined __linux__
|
||||
#if id386 && !defined __linux__ && !defined __FreeBSD__
|
||||
if ( i < r_newrefdef.num_particles-1 )
|
||||
s_prefetch_address = ( unsigned int ) ( p + 1 );
|
||||
else
|
||||
|
@ -632,7 +632,7 @@ void R_DrawParticles (void)
|
|||
R_DrawParticle();
|
||||
}
|
||||
|
||||
#if id386 && !defined __linux__
|
||||
#if id386 && !defined __linux__ && !defined __FreeBSD__
|
||||
__asm fldcw word ptr [fpu_chop_cw]
|
||||
#endif
|
||||
|
||||
|
|
|
@ -411,7 +411,7 @@ void R_PolysetSetUpForLineScan(fixed8_t startvertu, fixed8_t startvertv,
|
|||
R_PolysetCalcGradients
|
||||
================
|
||||
*/
|
||||
#if id386 && !defined __linux__
|
||||
#if id386 && !defined __linux__ && !defined __FreeBSD__
|
||||
void R_PolysetCalcGradients( int skinwidth )
|
||||
{
|
||||
static float xstepdenominv, ystepdenominv, t0, t1;
|
||||
|
|
|
@ -34,7 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include <termios.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/vt.h>
|
||||
/* #include <sys/vt.h> */
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#ifndef __GLW_H__
|
||||
#define __GLW_H__
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined __linux__ || defined __bsd__ || defined __sgi
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
|
38
src/main.c
38
src/main.c
|
@ -84,18 +84,18 @@ void Sys_ConsoleOutput (char *string)
|
|||
fputs(string, stdout);
|
||||
}
|
||||
|
||||
void Sys_Printf (char *fmt, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char text[1024];
|
||||
unsigned char *p;
|
||||
void Sys_Printf (char *fmt, ...) {
|
||||
va_list argptr;
|
||||
char text[1024];
|
||||
unsigned char * p;
|
||||
|
||||
va_start (argptr,fmt);
|
||||
vsnprintf (text,1024,fmt,argptr);
|
||||
va_end (argptr);
|
||||
|
||||
if (strlen(text) > sizeof(text))
|
||||
Sys_Error("memory overwrite in Sys_Printf");
|
||||
/* relnev 0.9 deleted -- jaq */
|
||||
/* if (strlen(text) > sizeof(text))
|
||||
Sys_Error("memory overwrite in Sys_Printf"); */
|
||||
|
||||
if (nostdout && nostdout->value)
|
||||
return;
|
||||
|
@ -241,7 +241,10 @@ void *Sys_GetGameAPI (void *parms)
|
|||
char *path;
|
||||
char *str_p;
|
||||
|
||||
const char *gamename = "game"ARCH".so";
|
||||
/* relnev 0.9 added -- jaq */
|
||||
FILE * fp;
|
||||
|
||||
const char * gamename = "game"ARCH".so";
|
||||
|
||||
setreuid(getuid(), getuid());
|
||||
setegid(getgid());
|
||||
|
@ -259,16 +262,22 @@ void *Sys_GetGameAPI (void *parms)
|
|||
if (!path)
|
||||
return NULL; // couldn't find one anywhere
|
||||
snprintf (name, MAX_OSPATH, "%s/%s", path, gamename);
|
||||
game_library = dlopen (name, RTLD_NOW );
|
||||
if (game_library)
|
||||
{
|
||||
|
||||
/* relnev 0.9 added -- jaq */
|
||||
/* skip it if it just doesn't exist */
|
||||
fp = fopen(name, "rb");
|
||||
if (fp == NULL)
|
||||
continue;
|
||||
fclose(fp);
|
||||
|
||||
game_library = dlopen(name, RTLD_NOW);
|
||||
if (game_library) {
|
||||
Com_MDPrintf ("LoadLibrary (%s)\n",name);
|
||||
break;
|
||||
} else {
|
||||
Com_MDPrintf ("LoadLibrary (%s)\n", name);
|
||||
str_p = strchr(dlerror(), ':'); // skip the path (already shown)
|
||||
if (str_p != NULL)
|
||||
{
|
||||
if (str_p != NULL) {
|
||||
Com_MDPrintf (" **");
|
||||
while (*str_p)
|
||||
Com_MDPrintf ("%c", *(++str_p));
|
||||
|
@ -315,6 +324,9 @@ int main (int argc, char **argv)
|
|||
saved_euid = geteuid();
|
||||
seteuid(getuid());
|
||||
|
||||
/* relnev 0.9 added -- jaq */
|
||||
printf("Quake II -- Version %s\n", LINUX_VERSION);
|
||||
|
||||
Qcommon_Init(argc, argv);
|
||||
|
||||
/* sys_irix.c had this and the fcntl line 3 lines down commented out */
|
||||
|
|
22
src/q_sh.c
22
src/q_sh.c
|
@ -35,6 +35,10 @@
|
|||
|
||||
#include "../qcommon/qcommon.h"
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
#include <machine/param.h>
|
||||
#endif
|
||||
|
||||
//===============================================================================
|
||||
|
||||
byte *membase;
|
||||
|
@ -80,6 +84,24 @@ int Hunk_End (void)
|
|||
{
|
||||
byte *n;
|
||||
|
||||
/* from relnev 0.9 -- jaq */
|
||||
#ifdef __FreeBSD__
|
||||
size_t old_size = maxhunksize;
|
||||
size_t new_size = curhunksize + sizeof(int);
|
||||
void * unmap_base;
|
||||
size_t unmap_len;
|
||||
|
||||
new_size = round_page(new_size);
|
||||
old_size = round_page(old_size);
|
||||
if (new_size > old_size)
|
||||
n = 0; /* error */
|
||||
else if (new_size < old_size) {
|
||||
unmap_base = (caddr_t) (membase + new_size);
|
||||
unmap_len = old_size - new_size;
|
||||
n = munmap(unmap_base, unmap_len) + membase;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
n = mremap(membase, maxhunksize, curhunksize + sizeof(int), 0);
|
||||
#else /* sun */
|
||||
|
|
|
@ -3065,6 +3065,10 @@ qboolean QGL_Init( const char *dllname )
|
|||
putenv( envbuffer );
|
||||
}
|
||||
|
||||
/* from relnev 0.9 -- jaq */
|
||||
if (glw_state.OpenGLLib)
|
||||
QGL_Shutdown();
|
||||
|
||||
if ( ( glw_state.OpenGLLib = dlopen( dllname, RTLD_LAZY | RTLD_GLOBAL ) ) == 0 )
|
||||
{
|
||||
char fn[MAX_OSPATH];
|
||||
|
|
18
src/rw_sdl.c
18
src/rw_sdl.c
|
@ -166,6 +166,16 @@ void RW_IN_Commands (void)
|
|||
if ( !(mouse_buttonstate & (1<<i)) && (mouse_oldbuttonstate & (1<<i)) )
|
||||
in_state->Key_Event_fp (K_MOUSE1 + i, false);
|
||||
}
|
||||
/* can't put in loop because K_MOUSE4 doesn't come after K_MOUSE3 */
|
||||
if ((mouse_buttonstate & (1<<3)) && !(mouse_oldbuttonstate & (1<<3)))
|
||||
in_state->Key_Event_fp(K_MOUSE4, true);
|
||||
if (!(mouse_buttonstate * (1<<3)) && (mouse_oldbuttonstate & (1<<3)))
|
||||
in_state->Key_Event_fp(K_MOUSE4, false);
|
||||
if ((mouse_buttonstate & (1<<4)) && !(mouse_oldbuttonstate & (1<<4)))
|
||||
in_state->Key_Event_fp(K_MOUSE5, true);
|
||||
if (!(mouse_buttonstate * (1<<4)) && (mouse_oldbuttonstate & (1<<4)))
|
||||
in_state->Key_Event_fp(K_MOUSE5, false);
|
||||
|
||||
mouse_oldbuttonstate = mouse_buttonstate;
|
||||
}
|
||||
|
||||
|
@ -858,10 +868,14 @@ void KBD_Update(void)
|
|||
bstate = SDL_GetMouseState(NULL, NULL);
|
||||
if (SDL_BUTTON(1) & bstate)
|
||||
mouse_buttonstate |= (1 << 0);
|
||||
if (SDL_BUTTON(2) & bstate)
|
||||
if (SDL_BUTTON(3) & bstate) /* quake2 has the right button be mouse2 */
|
||||
mouse_buttonstate |= (1 << 1);
|
||||
if (SDL_BUTTON(3) & bstate)
|
||||
if (SDL_BUTTON(2) & bstate) /* quake2 has the middle button be mouse3 */
|
||||
mouse_buttonstate |= (1 << 2);
|
||||
if (SDL_BUTTON(6) & bstate)
|
||||
mouse_buttonstate |= (1 << 3);
|
||||
if (SDL_BUTTON(7) & bstate)
|
||||
mouse_buttonstate |= (1 << 4);
|
||||
|
||||
if (old_windowed_mouse != _windowed_mouse->value) {
|
||||
old_windowed_mouse = _windowed_mouse->value;
|
||||
|
|
|
@ -93,7 +93,7 @@ int i;
|
|||
|
||||
for (i = 0; i < num_modes; i++)
|
||||
if (modes[i].width)
|
||||
ri.Con_Printf(PRINT_ALL, "mode %d: %d %d\n", modes[i].width, modes[i].height);
|
||||
ri.Con_Printf(PRINT_ALL, "mode %d: %d %d\n", i, modes[i].width, modes[i].height);
|
||||
|
||||
}
|
||||
|
||||
|
|
10
src/snd.c
10
src/snd.c
|
@ -37,7 +37,7 @@
|
|||
#ifdef __linux__
|
||||
#include <linux/soundcard.h>
|
||||
#else /* bsd */
|
||||
#include <soundcard.h>
|
||||
#include <soundcard.h> /* freebsd might be <sys/soundcard.h> */
|
||||
#endif /* __linux__ */
|
||||
|
||||
#else /* __sgi */
|
||||
|
@ -293,7 +293,8 @@ qboolean SNDDMA_Init(void) {
|
|||
if (fmt & AFMT_S16_NE) dma.samplebits = 16;
|
||||
else if (fmt & AFMT_U8) dma.samplebits = 8;
|
||||
}
|
||||
|
||||
/* in relnev 0.9, from here until the next RELNEV 0.9 comment has been moved
|
||||
* down to the following RELNEV 0.9 comment -- jaq */
|
||||
dma.speed = (int)sndspeed->value;
|
||||
if (!dma.speed) {
|
||||
for (i=0 ; i<sizeof(tryrates)/4 ; i++)
|
||||
|
@ -341,6 +342,7 @@ qboolean SNDDMA_Init(void) {
|
|||
dma.channels = 2;
|
||||
else
|
||||
dma.channels = 1;
|
||||
/* RELNEV 0.9 end deletion */
|
||||
|
||||
if (dma.samplebits == 16)
|
||||
{
|
||||
|
@ -377,6 +379,8 @@ qboolean SNDDMA_Init(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* RELNEV 0.9 insert some here */
|
||||
|
||||
rc = ioctl(audio_fd, SNDCTL_DSP_SPEED, &dma.speed);
|
||||
if (rc < 0)
|
||||
{
|
||||
|
@ -387,6 +391,8 @@ qboolean SNDDMA_Init(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* RELNEV 0.9 insert the mmap stuff here */
|
||||
|
||||
// toggle the trigger & start her up
|
||||
|
||||
if (!mmapped) {
|
||||
|
|
|
@ -91,6 +91,8 @@ SNDDMA_Init (void)
|
|||
desired.channels = (Cvar_Get("sndchannels", "2", CVAR_ARCHIVE))->value;
|
||||
|
||||
if (desired.freq == 44100)
|
||||
desired.samples = 2048;
|
||||
else if (desired.freq == 22050)
|
||||
desired.samples = 1024;
|
||||
else
|
||||
desired.samples = 512;
|
||||
|
|
|
@ -162,12 +162,14 @@ static void ApplyChanges( void *unused )
|
|||
break;
|
||||
case REF_GLX:
|
||||
Cvar_Set( "vid_ref", "glx" );
|
||||
/* below is wrong if we use different libs for different GL reflibs */
|
||||
Cvar_Set( "gl_driver", "libGL.so" );
|
||||
if (gl_driver->modified)
|
||||
vid_ref->modified = true;
|
||||
break;
|
||||
case REF_SDLGL:
|
||||
Cvar_Set( "vid_ref", "sdlgl" );
|
||||
/* below is wrong if we use different libs for different GL reflibs */
|
||||
Cvar_Set( "gl_driver", "libGL.so" );
|
||||
if (gl_driver->modified)
|
||||
vid_ref->modified = true;
|
||||
|
|
Loading…
Reference in a new issue