From 642b28a3af2aa968e116d8e5deaefbcd2bc39ab7 Mon Sep 17 00:00:00 2001 From: sezero Date: Sat, 24 Apr 2010 13:55:00 +0000 Subject: [PATCH] removed gl_test.c git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@138 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/Makefile | 4 +- Quake/Makefile.darwin | 6 +- Quake/Makefile.w32 | 4 +- Quake/Makefile.w64 | 4 +- Quake/gl_test.c | 183 ------------------------------------------ 5 files changed, 9 insertions(+), 192 deletions(-) delete mode 100644 Quake/gl_test.c diff --git a/Quake/Makefile b/Quake/Makefile index 1cc5fd59..e72f4ece 100644 --- a/Quake/Makefile +++ b/Quake/Makefile @@ -1,4 +1,4 @@ -# GNU Makefile for QuakeSpasm, Feb. 18, 2010 +# GNU Makefile for QuakeSpasm, Apr. 24, 2010 # # You need SDL and SDL_net fully installed. # "make DEBUG=1" builds debug client @@ -127,7 +127,7 @@ cd_sdl.o console.o gl_rmain.o host.o net_main.o r_part.o sv_m chase.o crc.o gl_rmisc.o image.o net_sdlnet.o r_sprite.o sv_phys.o \ cl_demo.o cvar.o gl_screen.o in_sdl.o net_sdl.o r_world.o sv_user.o \ cl_input.o gl_draw.o gl_sky.o keys.o pl_linux.o sbar.o sys_sdl.o \ -cl_main.o gl_fog.o gl_test.o main.o pr_cmds.o snd_dma.o view.o \ +cl_main.o gl_fog.o main.o pr_cmds.o snd_dma.o view.o \ cl_parse.o gl_mesh.o gl_texmgr.o mathlib.o pr_edict.o snd_mem.o wad.o \ cl_tent.o gl_model.o gl_vidsdl.o menu.o pr_exec.o snd_mix.o world.o \ cmd.o gl_refrag.o gl_warp.o net_dgrm.o r_alias.o snd_sdl.o zone.o \ diff --git a/Quake/Makefile.darwin b/Quake/Makefile.darwin index 45f0ab74..a0f14da4 100644 --- a/Quake/Makefile.darwin +++ b/Quake/Makefile.darwin @@ -1,4 +1,4 @@ -# GNU Makefile for QuakeSpasm, Feb. 18, 2010 +# GNU Makefile for QuakeSpasm, Apr. 24, 2010 # # You need SDL and SDL_net fully installed. # "make DEBUG=1" builds debug client @@ -134,8 +134,8 @@ OBJS := \ cd_sdl.o console.o gl_rmain.o host.o net_main.o r_part.o sv_move.o \ chase.o crc.o gl_rmisc.o image.o net_sdlnet.o r_sprite.o sv_phys.o \ cl_demo.o cvar.o gl_screen.o in_sdl.o net_sdl.o r_world.o sv_user.o \ -cl_input.o gl_draw.o gl_sky.o keys.o pl_osx.o sbar.o sys_sdl.o \ -cl_main.o gl_fog.o gl_test.o main.o pr_cmds.o snd_dma.o view.o \ +cl_input.o gl_draw.o gl_sky.o keys.o pl_osx.o sbar.o sys_sdl.o \ +cl_main.o gl_fog.o main.o pr_cmds.o snd_dma.o view.o \ cl_parse.o gl_mesh.o gl_texmgr.o mathlib.o pr_edict.o snd_mem.o wad.o \ cl_tent.o gl_model.o gl_vidsdl.o menu.o pr_exec.o snd_mix.o world.o \ cmd.o gl_refrag.o gl_warp.o net_dgrm.o r_alias.o snd_sdl.o zone.o \ diff --git a/Quake/Makefile.w32 b/Quake/Makefile.w32 index 5a0224f0..ecca0cba 100644 --- a/Quake/Makefile.w32 +++ b/Quake/Makefile.w32 @@ -1,5 +1,5 @@ # GNU Makefile for cross-compiling quakespasm.exe (Win32 : MinGW) -# using cross-toolchains on a linux host / Feb. 18, 2010. +# using cross-toolchains on a linux host / Apr. 24, 2010. # "make DEBUG=1" builds debug client # "make SDL_CONFIG=/path/to/sdl-config" for sdl-config from cross-compiled SDL @@ -80,7 +80,7 @@ cd_sdl.o console.o gl_rmain.o host.o net_main.o r_part.o sv_m chase.o crc.o gl_rmisc.o image.o net_sdlnet.o r_sprite.o sv_phys.o \ cl_demo.o cvar.o gl_screen.o in_sdl.o net_sdl.o r_world.o sv_user.o \ cl_input.o gl_draw.o gl_sky.o keys.o pl_win.o sbar.o sys_sdl.o \ -cl_main.o gl_fog.o gl_test.o main.o pr_cmds.o snd_dma.o view.o \ +cl_main.o gl_fog.o main.o pr_cmds.o snd_dma.o view.o \ cl_parse.o gl_mesh.o gl_texmgr.o mathlib.o pr_edict.o snd_mem.o wad.o \ cl_tent.o gl_model.o gl_vidsdl.o menu.o pr_exec.o snd_mix.o world.o \ cmd.o gl_refrag.o gl_warp.o net_dgrm.o r_alias.o snd_sdl.o zone.o \ diff --git a/Quake/Makefile.w64 b/Quake/Makefile.w64 index ece7e61c..cc5a01c6 100644 --- a/Quake/Makefile.w64 +++ b/Quake/Makefile.w64 @@ -1,5 +1,5 @@ # GNU Makefile for cross-compiling quakespasm.exe (Win64 : MinGW-w64) -# using cross-toolchains on a linux host / Feb. 18, 2010. +# using cross-toolchains on a linux host / Apr. 24, 2010. # "make DEBUG=1" builds debug client # "make SDL_CONFIG=/path/to/sdl-config" for sdl-config from cross-compiled SDL @@ -80,7 +80,7 @@ cd_sdl.o console.o gl_rmain.o host.o net_main.o r_part.o sv_m chase.o crc.o gl_rmisc.o image.o net_sdlnet.o r_sprite.o sv_phys.o \ cl_demo.o cvar.o gl_screen.o in_sdl.o net_sdl.o r_world.o sv_user.o \ cl_input.o gl_draw.o gl_sky.o keys.o pl_win.o sbar.o sys_sdl.o \ -cl_main.o gl_fog.o gl_test.o main.o pr_cmds.o snd_dma.o view.o \ +cl_main.o gl_fog.o main.o pr_cmds.o snd_dma.o view.o \ cl_parse.o gl_mesh.o gl_texmgr.o mathlib.o pr_edict.o snd_mem.o wad.o \ cl_tent.o gl_model.o gl_vidsdl.o menu.o pr_exec.o snd_mix.o world.o \ cmd.o gl_refrag.o gl_warp.o net_dgrm.o r_alias.o snd_sdl.o zone.o \ diff --git a/Quake/gl_test.c b/Quake/gl_test.c deleted file mode 100644 index bfca05d6..00000000 --- a/Quake/gl_test.c +++ /dev/null @@ -1,183 +0,0 @@ -/* -Copyright (C) 1996-2001 Id Software, Inc. -Copyright (C) 2002-2009 John Fitzgibbons and others - -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. - -*/ - -#include "quakedef.h" - -#ifdef GLTEST - -typedef struct -{ - plane_t *plane; - vec3_t origin; - vec3_t normal; - vec3_t up; - vec3_t right; - vec3_t reflect; - float length; -} puff_t; - -#define MAX_PUFFS 64 - -puff_t puffs[MAX_PUFFS]; - - -void Test_Init (void) -{ -} - - - -plane_t junk; -plane_t *HitPlane (vec3_t start, vec3_t end) -{ - trace_t trace; - -// fill in a default trace - memset (&trace, 0, sizeof(trace_t)); - trace.fraction = 1; - trace.allsolid = true; - VectorCopy (end, trace.endpos); - - SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1, start, end, &trace); - - junk = trace.plane; - return &junk; -} - -void Test_Spawn (vec3_t origin) -{ - int i; - puff_t *p; - vec3_t temp; - vec3_t normal; - vec3_t incoming; - plane_t *plane; - float d; - - for (i=0,p=puffs ; ilength <= 0) - break; - } - if (i == MAX_PUFFS) - return; - - VectorSubtract (r_refdef.vieworg, origin, incoming); - VectorSubtract (origin, incoming, temp); - plane = HitPlane (r_refdef.vieworg, temp); - - VectorNormalize (incoming); - d = DotProduct (incoming, plane->normal); - VectorSubtract (vec3_origin, incoming, p->reflect); - VectorMA (p->reflect, d*2, plane->normal, p->reflect); - - VectorCopy (origin, p->origin); - VectorCopy (plane->normal, p->normal); - - CrossProduct (incoming, p->normal, p->up); - - CrossProduct (p->up, p->normal, p->right); - - p->length = 8; -} - -void DrawPuff (puff_t *p) -{ - vec3_t pts[2][3]; - int i, j; - float s, d; - - for (i=0 ; i<2 ; i++) - { - if (i == 1) - { - s = 6; - d = p->length; - } - else - { - s = 2; - d = 0; - } - - for (j=0 ; j<3 ; j++) - { - pts[i][0][j] = p->origin[j] + p->up[j]*s + p->reflect[j]*d; - pts[i][1][j] = p->origin[j] + p->right[j]*s + p->reflect[j]*d; - pts[i][2][j] = p->origin[j] + -p->right[j]*s + p->reflect[j]*d; - } - } - - glColor3f (1, 0, 0); - -#if 0 - glBegin (GL_LINES); - glVertex3fv (p->origin); - glVertex3f (p->origin[0] + p->length*p->reflect[0], - p->origin[1] + p->length*p->reflect[1], - p->origin[2] + p->length*p->reflect[2]); - - glVertex3fv (pts[0][0]); - glVertex3fv (pts[1][0]); - - glVertex3fv (pts[0][1]); - glVertex3fv (pts[1][1]); - - glVertex3fv (pts[0][2]); - glVertex3fv (pts[1][2]); - - glEnd (); -#endif - - glBegin (GL_QUADS); - for (i=0 ; i<3 ; i++) - { - j = (i+1)%3; - glVertex3fv (pts[0][j]); - glVertex3fv (pts[1][j]); - glVertex3fv (pts[1][i]); - glVertex3fv (pts[0][i]); - } - glEnd (); - - glBegin (GL_TRIANGLES); - glVertex3fv (pts[1][0]); - glVertex3fv (pts[1][1]); - glVertex3fv (pts[1][2]); - glEnd (); - - p->length -= host_frametime*2; -} - - -void Test_Draw (void) -{ - int i; - puff_t *p; - - for (i=0, p=puffs ; ilength > 0) - DrawPuff (p); - } -} - -#endif