updated to compile linux and SDL ports

This commit is contained in:
faded 2003-02-13 19:46:54 +00:00
parent 09d9121083
commit c99489e9b9
7 changed files with 129 additions and 67 deletions

34
glNV.h
View file

@ -1,4 +1,29 @@
// - DC -
/*
Quake code is Copyright (C) 1996-1997 Id Software, Inc.
Tenebrae code is Copyright (C) 2002-2003 Tenebrae Team
portions of OpenGL APIs declarations included herein are
the property of Copyright (C) Nvidia Corporation and Ati Technologies 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.
*/
// NVidia defines
#ifndef GLNV_H
#define GLNV_H
@ -28,13 +53,14 @@ typedef void (APIENTRY * PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage,
typedef void (APIENTRY * PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
typedef void (APIENTRY * PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
#endif
/* NV_register_combiners2 */
typedef void (APIENTRY * PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
typedef void (APIENTRY * PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
#endif
extern PFNGLCOMBINERPARAMETERFVNVPROC qglCombinerParameterfvNV;
extern PFNGLCOMBINERPARAMETERIVNVPROC qglCombinerParameterivNV;
extern PFNGLCOMBINERPARAMETERFNVPROC qglCombinerParameterfNV;
@ -148,4 +174,4 @@ extern PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC qglGetCombinerStageParameterfvNV;
}
#endif
#endif GLNV_H
#endif /* GLNV_H */

View file

@ -17,6 +17,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <termios.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
@ -456,6 +457,9 @@ void VID_Shutdown(void)
}
XCloseDisplay(dpy);
}
// lets free up the shaders memory
R_ShutdownShaders();
vidmode_active = false;
dpy = NULL;
glwin = 0;

View file

@ -207,6 +207,7 @@ void VID_Init (unsigned char *palette)
void VID_Shutdown (void)
{
R_ShutdownShaders();
SDL_Quit();
}

View file

@ -117,6 +117,8 @@ GLQUAKE_OBJS= \
$(BUILDDIR)/glquake/gl_svbsp.o \
$(BUILDDIR)/glquake/gl_test.o \
$(BUILDDIR)/glquake/gl_warp.o \
$(BUILDDIR)/glquake/shaders.o \
$(BUILDDIR)/glquake/textures.o \
\
$(BUILDDIR)/glquake/host.o \
$(BUILDDIR)/glquake/host_cmd.o \
@ -144,6 +146,7 @@ GLQUAKE_OBJS= \
$(BUILDDIR)/glquake/wad.o \
$(BUILDDIR)/glquake/world.o \
$(BUILDDIR)/glquake/cd_linux.o \
$(BUILDDIR)/glquake/sys_uxfindfirst.o \
$(BUILDDIR)/glquake/sys_linux.o \
$(BUILDDIR)/glquake/snd_dma.o \
$(BUILDDIR)/glquake/snd_mem.o \
@ -284,6 +287,12 @@ $(BUILDDIR)/glquake/gl_vidlinuxglx.o : $(MOUNT_DIR)/gl_vidlinuxglx.c
$(BUILDDIR)/glquake/gl_warp.o : $(MOUNT_DIR)/gl_warp.c
$(DO_GL_CC)
$(BUILDDIR)/glquake/shaders.o : $(MOUNT_DIR)/shaders.c
$(DO_GL_CC)
$(BUILDDIR)/glquake/textures.o : $(MOUNT_DIR)/textures.c
$(DO_GL_CC)
$(BUILDDIR)/glquake/host.o : $(MOUNT_DIR)/host.c
$(DO_GL_CC)
@ -293,7 +302,7 @@ $(BUILDDIR)/glquake/host_cmd.o : $(MOUNT_DIR)/host_cmd.c
$(BUILDDIR)/glquake/keys.o : $(MOUNT_DIR)/keys.c
$(DO_GL_CC)
$(BUILDDIR)/glquake/menu.o : $(MOUNT_DIR)/menu.c
$(BUILDDIR)/glquake/menu.o : $(MOUNT_DIR)/xmlmenu.c
$(DO_GL_CC)
$(BUILDDIR)/glquake/mathlib.o : $(MOUNT_DIR)/mathlib.c
@ -362,6 +371,9 @@ $(BUILDDIR)/glquake/world.o : $(MOUNT_DIR)/world.c
$(BUILDDIR)/glquake/cd_linux.o : $(MOUNT_DIR)/cd_linux.c
$(DO_GL_CC)
$(BUILDDIR)/glquake/sys_uxfindfirst.o : $(MOUNT_DIR)/sys_uxfindfirst.c
$(DO_GL_CC)
$(BUILDDIR)/glquake/sys_linux.o : $(MOUNT_DIR)/sys_linux.c
$(DO_GL_CC)

View file

@ -11,10 +11,10 @@ tenebrae_sdl_CFLAGS = @CFLAGS@ -DGLQUAKE -DBASEDIR=@GAMEDIR@ -I$(MASTER_DIR)
tenebrae_sdl_SOURCES = \
$(MASTER_DIR)/adivtab.h \
$(MASTER_DIR)/anorm_dots.h \
$(MASTER_DIR)/anorm_dots.h \
$(MASTER_DIR)/anorms.h \
$(MASTER_DIR)/asm_draw.h \
$(MASTER_DIR)/asm_i386.h \
$(MASTER_DIR)/asm_draw.h \
$(MASTER_DIR)/asm_i386.h \
$(MASTER_DIR)/block16.h \
$(MASTER_DIR)/block8.h \
$(MASTER_DIR)/bspfile.h \
@ -22,90 +22,94 @@ tenebrae_sdl_SOURCES = \
$(MASTER_DIR)/cdaudio.h \
$(MASTER_DIR)/chase.c \
$(MASTER_DIR)/cl_demo.c \
$(MASTER_DIR)/cl_input.c \
$(MASTER_DIR)/cl_input.c \
$(MASTER_DIR)/cl_main.c \
$(MASTER_DIR)/cl_parse.c \
$(MASTER_DIR)/cl_parse.c \
$(MASTER_DIR)/cl_tent.c \
$(MASTER_DIR)/client.h \
$(MASTER_DIR)/cmd.c \
$(MASTER_DIR)/cmd.h \
$(MASTER_DIR)/cmd.c \
$(MASTER_DIR)/cmd.h \
$(MASTER_DIR)/common.c \
$(MASTER_DIR)/common.h \
$(MASTER_DIR)/conproc.h \
$(MASTER_DIR)/console.c \
$(MASTER_DIR)/console.h \
$(MASTER_DIR)/crc.c \
$(MASTER_DIR)/crc.h \
$(MASTER_DIR)/cvar.c \
$(MASTER_DIR)/cvar.h \
$(MASTER_DIR)/draw.h \
$(MASTER_DIR)/host.c \
$(MASTER_DIR)/host_cmd.c \
$(MASTER_DIR)/crc.c \
$(MASTER_DIR)/crc.h \
$(MASTER_DIR)/cvar.c \
$(MASTER_DIR)/cvar.h \
$(MASTER_DIR)/draw.h \
$(MASTER_DIR)/host.c \
$(MASTER_DIR)/host_cmd.c \
$(MASTER_DIR)/input.h \
$(MASTER_DIR)/keys.c \
$(MASTER_DIR)/keys.h \
$(MASTER_DIR)/keys.c \
$(MASTER_DIR)/keys.h \
$(MASTER_DIR)/mathlib.c \
$(MASTER_DIR)/mathlib.h \
$(MASTER_DIR)/menu.c \
$(MASTER_DIR)/menu.h \
$(MASTER_DIR)/modelgen.h \
$(MASTER_DIR)/mpdosock.h \
$(MASTER_DIR)/net.h \
$(MASTER_DIR)/xmlmenu.c \
$(MASTER_DIR)/xmlmenu.h \
$(MASTER_DIR)/modelgen.h \
$(MASTER_DIR)/mpdosock.h \
$(MASTER_DIR)/net.h \
$(MASTER_DIR)/net_bsd.c \
$(MASTER_DIR)/net_bw.h \
$(MASTER_DIR)/net_dgrm.c \
$(MASTER_DIR)/net_dgrm.h \
$(MASTER_DIR)/net_loop.c \
$(MASTER_DIR)/net_loop.h \
$(MASTER_DIR)/net_main.c \
$(MASTER_DIR)/net_dgrm.c \
$(MASTER_DIR)/net_dgrm.h \
$(MASTER_DIR)/net_loop.c \
$(MASTER_DIR)/net_loop.h \
$(MASTER_DIR)/net_main.c \
$(MASTER_DIR)/net_udp.c \
$(MASTER_DIR)/net_udp.h \
$(MASTER_DIR)/net_vcr.c \
$(MASTER_DIR)/net_vcr.h \
$(MASTER_DIR)/pr_cmds.c \
$(MASTER_DIR)/pr_comp.h \
$(MASTER_DIR)/pr_edict.c \
$(MASTER_DIR)/pr_edict.c \
$(MASTER_DIR)/pr_exec.c \
$(MASTER_DIR)/progdefs.h \
$(MASTER_DIR)/progs.h \
$(MASTER_DIR)/protocol.h \
$(MASTER_DIR)/quakeasm.h \
$(MASTER_DIR)/quakedef.h \
$(MASTER_DIR)/progdefs.h \
$(MASTER_DIR)/progs.h \
$(MASTER_DIR)/protocol.h \
$(MASTER_DIR)/quakeasm.h \
$(MASTER_DIR)/quakedef.h \
$(MASTER_DIR)/r_part.c \
$(MASTER_DIR)/r_local.h \
$(MASTER_DIR)/r_shared.h \
$(MASTER_DIR)/r_shared.h \
$(MASTER_DIR)/render.h \
$(MASTER_DIR)/resource.h \
$(MASTER_DIR)/sbar.c \
$(MASTER_DIR)/sbar.h \
$(MASTER_DIR)/resource.h \
$(MASTER_DIR)/sbar.c \
$(MASTER_DIR)/sbar.h \
$(MASTER_DIR)/screen.h \
$(MASTER_DIR)/server.h \
$(MASTER_DIR)/shaders.c \
$(MASTER_DIR)/snd_dma.c \
$(MASTER_DIR)/snd_mem.c \
$(MASTER_DIR)/snd_mix.c \
$(MASTER_DIR)/snd_sdl.c \
$(MASTER_DIR)/sound.h \
$(MASTER_DIR)/spritegn.h \
$(MASTER_DIR)/spritegn.h \
$(MASTER_DIR)/sv_main.c \
$(MASTER_DIR)/sv_move.c \
$(MASTER_DIR)/sv_phys.c \
$(MASTER_DIR)/sv_q3support.c \
$(MASTER_DIR)/sv_user.c \
$(MASTER_DIR)/sys.h \
$(MASTER_DIR)/sys.h \
$(MASTER_DIR)/sys_uxfindfirst.c \
$(MASTER_DIR)/sys_sdl.c \
$(MASTER_DIR)/te_scripts.c \
$(MASTER_DIR)/te_scripts.h \
$(MASTER_DIR)/vgamodes.h \
$(MASTER_DIR)/vid.h \
$(MASTER_DIR)/gl_vidsdl.c \
$(MASTER_DIR)/view.c \
$(MASTER_DIR)/view.h \
$(MASTER_DIR)/wad.c \
$(MASTER_DIR)/wad.h \
$(MASTER_DIR)/winquake.h \
$(MASTER_DIR)/te_scripts.c \
$(MASTER_DIR)/te_scripts.h \
$(MASTER_DIR)/vgamodes.h \
$(MASTER_DIR)/vid.h \
$(MASTER_DIR)/gl_vidsdl.c \
$(MASTER_DIR)/view.c \
$(MASTER_DIR)/view.h \
$(MASTER_DIR)/wad.c \
$(MASTER_DIR)/wad.h \
$(MASTER_DIR)/winquake.h \
$(MASTER_DIR)/world.c \
$(MASTER_DIR)/world.h \
$(MASTER_DIR)/zone.c \
$(MASTER_DIR)/zone.h \
$(MASTER_DIR)/zone.c \
$(MASTER_DIR)/zone.h \
$(MASTER_DIR)/textures.c \
$(GL_SRCS) \
$(GL_TENEBRAE_SRCS) \
$(LEX_TENEBRAE_SRCS)
@ -237,8 +241,8 @@ NEXT_SRCS = \
GL_SRCS = \
$(MASTER_DIR)/gl_decals.c \
$(MASTER_DIR)/gl_draw.c \
$(MASTER_DIR)/gl_mesh.c \
$(MASTER_DIR)/gl_draw.c \
$(MASTER_DIR)/gl_mesh.c \
$(MASTER_DIR)/gl_model.c \
$(MASTER_DIR)/gl_model.h \
$(MASTER_DIR)/gl_refrag.c \
@ -247,10 +251,10 @@ GL_SRCS = \
$(MASTER_DIR)/gl_rmisc.c \
$(MASTER_DIR)/gl_rsurf.c \
$(MASTER_DIR)/gl_screen.c \
$(MASTER_DIR)/gl_test.c \
$(MASTER_DIR)/gl_warp.c \
$(MASTER_DIR)/gl_test.c \
$(MASTER_DIR)/gl_warp.c \
$(MASTER_DIR)/gl_warp_sin.h \
$(MASTER_DIR)/glquake.h \
$(MASTER_DIR)/glquake.h \
$(MASTER_DIR)/glquake2.h
GL_TENEBRAE_SRCS = \
@ -264,8 +268,10 @@ GL_TENEBRAE_SRCS = \
$(MASTER_DIR)/gl_bumpparhelia.c \
$(MASTER_DIR)/gl_bumpradeon.c \
$(MASTER_DIR)/gl_common.c \
$(MASTER_DIR)/gl_curves.c \
$(MASTER_DIR)/gl_glare.c \
$(MASTER_DIR)/gl_md3.c \
$(MASTER_DIR)/gl_q3bsp.c \
$(MASTER_DIR)/gl_screenrect.c \
$(MASTER_DIR)/gl_shadow.c \
$(MASTER_DIR)/gl_svbsp.c

View file

@ -88,17 +88,30 @@ PNG_VERSION=1.2.0
# AC_CHECK_PROG (variable, prog-to-check-for, value-if-found, [value-if-not-found], [path], [reject])
AC_CHECK_PROG(PNGLIBS,libpng-config,`libpng-config --libs`, )
AC_CHECK_PROG(PNG_LIBS,libpng-config,`libpng-config --libs`, )
if test x"$PNGLIBS" = x; then
if test x"$PNG_LIBS" = x; then
AC_MSG_ERROR([*** libpng not found!])
else
AC_CHECK_PROG(PNG_CFLAGS,libpng-config,`libpng-config --cflags`, )
fi
AC_SUBST(PNGLIBS)
AC_SUBST(PNG_CFLAGS)
AC_SUBST(PNG_LIBS)
AC_CHECK_PROG(XML_LIBS,xml2-config,`xml2-config --libs`, )
CFLAGS="$CFLAGS $SDL_CFLAGS -DSDL $PNG_FLAGS"
LIBS="$LIBS $SDL_LIBS $PNGLIBS"
if test x"$XML_LIBS" = x; then
AC_MSG_ERROR([*** libxml2 not found!])
else
AC_CHECK_PROG(XML_CFLAGS,xml2-config,`xml2-config --cflags`, )
fi
AC_SUBST(XML_LIBS)
AC_SUBST(XML_CFLAGS)
CFLAGS="$CFLAGS $SDL_CFLAGS -DSDL $PNG_CFLAGS $XML_CFLAGS"
LIBS="$LIBS $SDL_LIBS $PNG_LIBS $XML_LIBS"
# Game data

View file

@ -465,7 +465,7 @@ void R_InitShaders() {
Con_Printf("=================================\n");
}
#ifndef _WIN32
#if !defined(_WIN32) && !defined(SDL) && !defined(__glx__)
//warn non win32 devs they should free the memory...
#error Call this routine from vid shutdown!
#endif