diff --git a/configure.in b/configure.in index c646b8e..cb2198d 100644 --- a/configure.in +++ b/configure.in @@ -936,28 +936,38 @@ dnl ================================================================== dnl Find out what to build and finish dnl ================================================================== +ENABLE_MGL=yes +ENABLE_GGI=yes +ENABLE_SDL=yes +ENABLE_SGL=yes +ENABLE_SVGA=yes +ENABLE_X11=yes +ENABLE_GLX=yes +ENABLE_3DFX=yes +ENABLE_DED=no + CL_TARGETS="" -if test "x$HAVE_MGL" = xyes; then +if test "x$HAVE_MGL" = xyes -a "x$ENABLE_MGL" = xyes; then # TARGETS="$TARGETS $PACKAGE-mgl\$(EXEEXT)" CL_TARGETS="$CL_TARGETS MGL" fi -if test "x$HAVE_GGI" = xyes; then +if test "x$HAVE_GGI" = xyes -a "x$ENABLE_GGI" = xyes; then # TARGETS="$TARGETS $PACKAGE-ggi\$(EXEEXT)" CL_TARGETS="$CL_TARGETS GGI" fi -if test "x$HAVE_SDL" = xyes; then +if test "x$HAVE_SDL" = xyes -a "x$ENABLE_SDL" = xyes; then TARGETS="$TARGETS $PACKAGE-sdl\$(EXEEXT)" CL_TARGETS="$CL_TARGETS SDL" fi -if test "x$HAVE_SGL" = xyes -a "x$HAVE_GLX" = xyes; then +if test "x$HAVE_SGL" = xyes -a "x$HAVE_GLX" = xyes -a "x$ENABLE_SGL" = xyes; then TARGETS="$TARGETS $PACKAGE-sgl\$(EXEEXT)" CL_TARGETS="$CL_TARGETS SDL-GL" fi -if test "x$HAVE_SVGA" = xyes; then +if test "x$HAVE_SVGA" = xyes -a "x$ENABLE_SVGA" = xyes; then TARGETS="$TARGETS $PACKAGE-svga\$(EXEEXT)" CL_TARGETS="$CL_TARGETS SVGAlib" fi -if test "x$HAVE_X" = xyes; then +if test "x$HAVE_X" = xyes -a "x$ENABLE_X11" = xyes; then TARGETS="$TARGETS $PACKAGE-x11\$(EXEEXT)" CL_TARGETS="$CL_TARGETS X11" if test "x$HAVE_GLX" = xyes; then @@ -965,10 +975,13 @@ if test "x$HAVE_X" = xyes; then CL_TARGETS="$CL_TARGETS GLX" fi fi -if test "x$HAVE_TDFXGL" = xyes; then +if test "x$HAVE_TDFXGL" = xyes -a "x$ENABLE_3DFX" = xyes; then TARGETS="$TARGETS $PACKAGE-3dfx\$(EXEEXT)" CL_TARGETS="$CL_TARGETS 3Dfx" fi +if test "x$ENABLE_DED" = xyes -a "x$ENABLE_DED" = xyes; then + TARGETS="$TARGETS $PACKAGE-ded\$(EXEEXT)" +fi AC_SUBST(TARGETS) dnl Output files @@ -989,6 +1002,7 @@ AC_MSG_RESULT([ Build type: $BUILD_TYPE Targets:$CL_TARGETS + Server:$ENABLE_DED System game data directory: $sharepath Per-user game data directory: $userpath diff --git a/source/Makefile.am b/source/Makefile.am index e6f8d5c..03605d4 100644 --- a/source/Makefile.am +++ b/source/Makefile.am @@ -35,7 +35,7 @@ INCLUDES= -I$(top_srcdir)/include $(GGI_CFLAGS) $(MGL_CFLAGS) $(SDL_CFLAGS) $(SV bin_PROGRAMS = @TARGETS@ EXTRA_PROGRAMS= nuq-ggi nuq-mgl nuq-sdl nuq-svga nuq-x11 \ - nuq-3dfx nuq-glx nuq-sgl nuq-wgl + nuq-3dfx nuq-glx nuq-sgl nuq-wgl nuq-ded noinst_LIBRARIES= libqfsys.a libqfsnd.a libqfcd.a libqfnet.a @@ -50,7 +50,7 @@ common_ASM= sys_ia32.S worlda.S $(math_ASM) common_SOURCES= crc.c cvar.c cmd.c mathlib.c wad.c world.c \ model.c model_alias.c model_brush.c model_sprite.c \ - msg.c r_part.c sizebuf.c qendian.c qargs.c quakefs.c \ + msg.c sizebuf.c qendian.c qargs.c quakefs.c \ va.c quakeio.c link.c com.c \ zone.c $(common_ASM) @@ -114,7 +114,7 @@ EXTRA_libqfcd_a_SOURCES=net_dos.c net_bw.c net_ipx.c net_mp.c net_ser.c \ client_LIBS= -L. -lqfsys -lqfsnd -lqfcd -lqfnet $(SOUND_LIBS) $(NET_LIBS) client_SOURCES= cl_cam.c cl_demo.c cl_input.c cl_main.c cl_parse.c \ - cl_tent.c console.c keys.c menu.c sbar.c r_view.c \ + cl_tent.c console.c keys.c menu.c sbar.c r_part.c r_view.c \ nonintel.c gib.c gib_instructions.c gib_vars.c \ gib_interpret.c gib_modules.c gib_parse.c gib_stack.c @@ -228,6 +228,15 @@ nuq_wgl_SOURCES= $(combined_SOURCES) $(ogl_SOURCES) $(wgl_SOURCES) nuq_wgl_LDADD= $(client_LIBS) nuq_wgl_DEPENDENCIES=libqfsys.a libqfsnd.a libqfcd.a libqfnet.a +# +# dedicated server +# +ded_SOURCES=sys_unixd.c sv_ded.c + +nuq_ded_SOURCES=$(common_SOURCES) $(server_SOURCES) $(ded_SOURCES) +nuq_ded_LDADD= libqfnet.a +nuq_ded_DEPENDENCIES=libqfnet.a + # # Stuff that doesn't get linked into an executable NEEDS to be mentioned here, # or it won't be distributed with 'make dist' diff --git a/source/sv_ded.c b/source/sv_ded.c new file mode 100644 index 0000000..c1de87e --- /dev/null +++ b/source/sv_ded.c @@ -0,0 +1,82 @@ +/* + sv_ded.c + + @description@ + + 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: + + Free Software Foundation, Inc. + 59 Temple Place - Suite 330 + Boston, MA 02111-1307, USA + + $Id$ +*/ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include + +#include "cvar.h" +#include "host.h" +#include "keys.h" + +int m_return_state; +qboolean m_return_onerror; +char m_return_reason[32]; +enum {m_none, m_main, m_singleplayer, m_load, m_save, m_multiplayer, m_setup, m_net, m_options, m_video, m_keys, m_help, m_quit, m_serialconfig, m_modemconfig, m_lanconfig, m_gameoptions, m_search, m_slist} m_state; +keydest_t key_dest; + +void +Con_Printf(char *fmt, ...) +{ + va_list args; + + va_start(args,fmt); + vprintf(fmt,args); + va_end(args); +} + +void +Con_DPrintf(char *fmt, ...) +{ + va_list args; + + if (!developer->int_val) + return; + + va_start(args,fmt); + vprintf(fmt,args); + va_end(args); +} + +void +SCR_UpdateScreen(void) +{ +} + +void +SCR_BeginLoadingPlaque(void) +{ +} + +void +SCR_EndLoadingPlaque(void) +{ +} diff --git a/source/sys_unixd.c b/source/sys_unixd.c index 9e2bf4b..9d8407c 100644 --- a/source/sys_unixd.c +++ b/source/sys_unixd.c @@ -48,6 +48,11 @@ #include #include +#include "client.h" +#include "sys.h" +#include "host.h" +#include "qtypes.h" +#include "qargs.h" qboolean isDedicated; @@ -401,6 +406,7 @@ main (int argc, char *argv[]) double time, oldtime; quakeparms_t parms; char *newargv[256]; + int j; // signal (SIGFPE, floating_point_exception_handler); signal (SIGFPE, SIG_IGN); @@ -441,7 +447,7 @@ main (int argc, char *argv[]) while (1) { // Main message loop time = Sys_DoubleTime (); - if ((time - oldtime) < sys_ticrate->value { + if ((time - oldtime) < sys_ticrate->value) { usleep(1); continue; }