From 61a03e2ee74ba8ab441d9e786bb680c35aeb3379 Mon Sep 17 00:00:00 2001 From: Timothee 'TTimo' Besset Date: Mon, 4 Jun 2012 23:42:31 -0500 Subject: [PATCH] add license info on a few things --- contrib/bobtoolz/ScriptParser.cpp | 18 ++ contrib/bobtoolz/ScriptParser.h | 18 ++ contrib/bobtoolz/bsploader.cpp | 19 ++ contrib/bobtoolz/bsploader.h | 19 ++ contrib/bobtoolz/interfaces/IScriptParser.h | 18 ++ contrib/bobtoolz/visfind.h | 18 ++ include/aboutmsg.h | 2 +- libs/bytebool.h | 21 ++ libs/mathlib/linear.c | 108 ---------- libs/mathlib/mathlib.vcproj | 4 - libs/splines/splines.h | 21 ++ plugins/entity/light.cpp | 20 ++ plugins/mapxml/plugin.cpp | 20 ++ plugins/mapxml/plugin.h | 20 ++ plugins/mapxml/xmlparse.cpp | 20 ++ plugins/mapxml/xmlwrite.cpp | 20 ++ plugins/model/remap.cpp | 20 ++ plugins/vfswad/unwad.cpp | 20 ++ plugins/vfswad/unwad.h | 20 ++ radiant/surfaceplugin.h | 20 ++ tools/quake2/common/md4.c | 0 tools/quake3/common/md4.c | 0 tools/urt/libs/mathlib/linear.c | 214 -------------------- tools/urt/libs/mathlib/mathlib.vcproj | 22 -- 24 files changed, 333 insertions(+), 349 deletions(-) delete mode 100644 libs/mathlib/linear.c delete mode 100644 tools/quake2/common/md4.c delete mode 100644 tools/quake3/common/md4.c delete mode 100644 tools/urt/libs/mathlib/linear.c diff --git a/contrib/bobtoolz/ScriptParser.cpp b/contrib/bobtoolz/ScriptParser.cpp index 21f9f14f..b71a15dc 100644 --- a/contrib/bobtoolz/ScriptParser.cpp +++ b/contrib/bobtoolz/ScriptParser.cpp @@ -1,3 +1,21 @@ +/* + BobToolz plugin for GtkRadiant + Copyright (C) 2001 Gordon Biggans + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #include "StdAfx.h" #include "ScriptParser.h" diff --git a/contrib/bobtoolz/ScriptParser.h b/contrib/bobtoolz/ScriptParser.h index a779cdb8..0083ee97 100644 --- a/contrib/bobtoolz/ScriptParser.h +++ b/contrib/bobtoolz/ScriptParser.h @@ -1,3 +1,21 @@ +/* + BobToolz plugin for GtkRadiant + Copyright (C) 2001 Gordon Biggans + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #ifndef _SCRIPTPARSER_H_ #define _SCRIPTPARSER_H_ diff --git a/contrib/bobtoolz/bsploader.cpp b/contrib/bobtoolz/bsploader.cpp index aadd2b31..14a4680d 100644 --- a/contrib/bobtoolz/bsploader.cpp +++ b/contrib/bobtoolz/bsploader.cpp @@ -1,3 +1,22 @@ +/* + BobToolz plugin for GtkRadiant + Copyright (C) 2001 Gordon Biggans + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + #include "StdAfx.h" #include "./dialogs/dialogs-gtk.h" #include "bsploader.h" diff --git a/contrib/bobtoolz/bsploader.h b/contrib/bobtoolz/bsploader.h index f4ecea87..63df4919 100644 --- a/contrib/bobtoolz/bsploader.h +++ b/contrib/bobtoolz/bsploader.h @@ -1,3 +1,22 @@ +/* + BobToolz plugin for GtkRadiant + Copyright (C) 2001 Gordon Biggans + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + #define LUMP_ENTITIES 0 #define LUMP_SHADERS 1 #define LUMP_PLANES 2 diff --git a/contrib/bobtoolz/interfaces/IScriptParser.h b/contrib/bobtoolz/interfaces/IScriptParser.h index 88759ceb..106d5471 100644 --- a/contrib/bobtoolz/interfaces/IScriptParser.h +++ b/contrib/bobtoolz/interfaces/IScriptParser.h @@ -1,3 +1,21 @@ +/* + BobToolz plugin for GtkRadiant + Copyright (C) 2001 Gordon Biggans + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #ifndef _ISCRIPTPARSER_H_ #define _ISCRIPTPARSER_H_ diff --git a/contrib/bobtoolz/visfind.h b/contrib/bobtoolz/visfind.h index be825413..d847fe16 100644 --- a/contrib/bobtoolz/visfind.h +++ b/contrib/bobtoolz/visfind.h @@ -1 +1,19 @@ +/* + BobToolz plugin for GtkRadiant + Copyright (C) 2001 Gordon Biggans + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ list *BuildTrace( char* filename, vec3_t v_origin ); diff --git a/include/aboutmsg.h b/include/aboutmsg.h index 765b7124..834373f1 100644 --- a/include/aboutmsg.h +++ b/include/aboutmsg.h @@ -1,2 +1,2 @@ // generated header, see makeversion.py -#define RADIANT_ABOUTMSG "Experimental Build - Official" +#define RADIANT_ABOUTMSG "http://icculus.org/GtkRadiant/" diff --git a/libs/bytebool.h b/libs/bytebool.h index a6fcb326..01c98747 100644 --- a/libs/bytebool.h +++ b/libs/bytebool.h @@ -1,3 +1,24 @@ +/* + Copyright (C) 1999-2007 id Software, Inc. and contributors. + For a list of contributors, see the accompanying CONTRIBUTORS file. + + This file is part of GtkRadiant. + + GtkRadiant 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. + + GtkRadiant 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 GtkRadiant; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + #ifndef __BYTEBOOL__ #define __BYTEBOOL__ diff --git a/libs/mathlib/linear.c b/libs/mathlib/linear.c deleted file mode 100644 index faab9742..00000000 --- a/libs/mathlib/linear.c +++ /dev/null @@ -1,108 +0,0 @@ -#ifndef __APPLE__ -#include -#else -#include -#endif -#include -#include - -#include "mathlib.h" - -#define TINY FLT_MIN - -void lubksb( float **a, int n, int *indx, float b[] ){ -// Solves the set of n linear equations A.X=B. Here a[n][n] is input, not as the matrix -// A but rather as its LU decomposition determined by the routine ludcmp. indx[n] is input -// as the permutation vector returned by ludcmp. b[n] is input as the right-hand side vector -// B, and returns with the solution vector X. a, n and indx are not modified by this routine -// and can be left in place for successive calls with different right-hand sides b. This routine takes -// into account the possibility that b will begin with many zero elements, so it is efficient for use -// in matrix inversion - int i,ii = -1,ip,j; - float sum; - - for ( i = 0; i < n; i++ ) { - ip = indx[i]; - sum = b[ip]; - b[ip] = b[i]; - if ( ii >= 0 ) { - for ( j = ii; j < i; j++ ) sum -= a[i][j] * b[j]; - } - else if ( sum ) { - ii = i; - } - b[i] = sum; - } - for ( i = n - 1; i >= 0; i-- ) { - sum = b[i]; - for ( j = i + 1; j < n; j++ ) sum -= a[i][j] * b[j]; - b[i] = sum / a[i][i]; - } -} -/* (C) Copr. 1986-92 Numerical Recipes Software */ - - -int ludcmp( float **a, int n, int *indx, float *d ){ -// given a matrix a[n][n] this routine replaces it with the LU decomposition of a rowwise -// permutation of itself. a and n are input. a is output, arranged as in above equation; -// indx[n] is an output vector that records the row permutation effected by the partial -// pivoting; d is output as +/-1 depending on whether the number of row interchanges was even -// or odd, respectively. This routine is used in combination with lubksb to solve linear -// equations or invert a matrix. - int i,imax,j,k; - float big,dum,sum,temp; - float *vv; - - imax = 0; - vv = (float*)malloc( sizeof( float ) * n ); - *d = 1.0; - for ( i = 0; i < n; i++ ) { - big = 0.0; - for ( j = 0; j < n; j++ ) - if ( ( temp = (float)fabs( a[i][j] ) ) > big ) { - big = temp; - } - if ( big == 0.0 ) { - return 1; - } - vv[i] = 1.0f / big; - } - for ( j = 0; j < n; j++ ) { - for ( i = 0; i < j; i++ ) { - sum = a[i][j]; - for ( k = 0; k < i; k++ ) sum -= a[i][k] * a[k][j]; - a[i][j] = sum; - } - big = 0.0; - for ( i = j; i < n; i++ ) { - sum = a[i][j]; - for ( k = 0; k < j; k++ ) - sum -= a[i][k] * a[k][j]; - a[i][j] = sum; - if ( ( dum = vv[i] * (float)fabs( sum ) ) >= big ) { - big = dum; - imax = i; - } - } - if ( j != imax ) { - for ( k = 0; k < n; k++ ) { - dum = a[imax][k]; - a[imax][k] = a[j][k]; - a[j][k] = dum; - } - *d = -( *d ); - vv[imax] = vv[j]; - } - indx[j] = imax; - if ( a[j][j] == 0.0 ) { - a[j][j] = TINY; - } - if ( j != n ) { - dum = 1.0f / ( a[j][j] ); - for ( i = j + 1; i < n; i++ ) a[i][j] *= dum; - } - } - free( vv ); - return 0; -} -/* (C) Copr. 1986-92 Numerical Recipes Software */ diff --git a/libs/mathlib/mathlib.vcproj b/libs/mathlib/mathlib.vcproj index 9d255797..55ec5ee5 100644 --- a/libs/mathlib/mathlib.vcproj +++ b/libs/mathlib/mathlib.vcproj @@ -146,10 +146,6 @@ RelativePath=".\bbox.c" > - - diff --git a/libs/splines/splines.h b/libs/splines/splines.h index b1b447f9..f55525b8 100644 --- a/libs/splines/splines.h +++ b/libs/splines/splines.h @@ -1,3 +1,24 @@ +/* + Copyright (C) 1999-2007 id Software, Inc. and contributors. + For a list of contributors, see the accompanying CONTRIBUTORS file. + + This file is part of GtkRadiant. + + GtkRadiant 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. + + GtkRadiant 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 GtkRadiant; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + #ifndef __SPLINES_H #define __SPLINES_H diff --git a/plugins/entity/light.cpp b/plugins/entity/light.cpp index b447628f..9ffe9ed0 100644 --- a/plugins/entity/light.cpp +++ b/plugins/entity/light.cpp @@ -1,3 +1,23 @@ +/* + Copyright (C) 1999-2007 id Software, Inc. and contributors. + For a list of contributors, see the accompanying CONTRIBUTORS file. + + This file is part of GtkRadiant. + + GtkRadiant 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. + + GtkRadiant 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 GtkRadiant; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ #include "plugin.h" #include "entity.h" diff --git a/plugins/mapxml/plugin.cpp b/plugins/mapxml/plugin.cpp index ba178c88..4f7c77f1 100644 --- a/plugins/mapxml/plugin.cpp +++ b/plugins/mapxml/plugin.cpp @@ -1,3 +1,23 @@ +/* + Copyright (C) 1999-2007 id Software, Inc. and contributors. + For a list of contributors, see the accompanying CONTRIBUTORS file. + + This file is part of GtkRadiant. + + GtkRadiant 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. + + GtkRadiant 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 GtkRadiant; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ #include "plugin.h" // ============================================================================= diff --git a/plugins/mapxml/plugin.h b/plugins/mapxml/plugin.h index 417d1789..65527126 100644 --- a/plugins/mapxml/plugin.h +++ b/plugins/mapxml/plugin.h @@ -1,3 +1,23 @@ +/* + Copyright (C) 1999-2007 id Software, Inc. and contributors. + For a list of contributors, see the accompanying CONTRIBUTORS file. + + This file is part of GtkRadiant. + + GtkRadiant 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. + + GtkRadiant 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 GtkRadiant; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ #ifndef _PLUGIN_H_ #define _PLUGIN_H_ diff --git a/plugins/mapxml/xmlparse.cpp b/plugins/mapxml/xmlparse.cpp index 0f86b177..0de0a98b 100644 --- a/plugins/mapxml/xmlparse.cpp +++ b/plugins/mapxml/xmlparse.cpp @@ -1,3 +1,23 @@ +/* + Copyright (C) 1999-2007 id Software, Inc. and contributors. + For a list of contributors, see the accompanying CONTRIBUTORS file. + + This file is part of GtkRadiant. + + GtkRadiant 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. + + GtkRadiant 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 GtkRadiant; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ // // parses xml tree format into internal objects // diff --git a/plugins/mapxml/xmlwrite.cpp b/plugins/mapxml/xmlwrite.cpp index e8c88140..10052ee2 100644 --- a/plugins/mapxml/xmlwrite.cpp +++ b/plugins/mapxml/xmlwrite.cpp @@ -1,3 +1,23 @@ +/* + Copyright (C) 1999-2007 id Software, Inc. and contributors. + For a list of contributors, see the accompanying CONTRIBUTORS file. + + This file is part of GtkRadiant. + + GtkRadiant 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. + + GtkRadiant 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 GtkRadiant; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ // // writes xml tree format from internal objects // diff --git a/plugins/model/remap.cpp b/plugins/model/remap.cpp index 4ffc342a..5e313222 100644 --- a/plugins/model/remap.cpp +++ b/plugins/model/remap.cpp @@ -1,3 +1,23 @@ +/* + Copyright (C) 1999-2007 id Software, Inc. and contributors. + For a list of contributors, see the accompanying CONTRIBUTORS file. + + This file is part of GtkRadiant. + + GtkRadiant 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. + + GtkRadiant 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 GtkRadiant; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ #include "cpicomodel.h" #include "qertypes.h" diff --git a/plugins/vfswad/unwad.cpp b/plugins/vfswad/unwad.cpp index 1cf875a8..279697a9 100644 --- a/plugins/vfswad/unwad.cpp +++ b/plugins/vfswad/unwad.cpp @@ -1,3 +1,23 @@ +/* + Copyright (C) 1999-2007 id Software, Inc. and contributors. + For a list of contributors, see the accompanying CONTRIBUTORS file. + + This file is part of GtkRadiant. + + GtkRadiant 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. + + GtkRadiant 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 GtkRadiant; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ #include #include #include diff --git a/plugins/vfswad/unwad.h b/plugins/vfswad/unwad.h index 9a606079..ecddb795 100644 --- a/plugins/vfswad/unwad.h +++ b/plugins/vfswad/unwad.h @@ -1,3 +1,23 @@ +/* + Copyright (C) 1999-2007 id Software, Inc. and contributors. + For a list of contributors, see the accompanying CONTRIBUTORS file. + + This file is part of GtkRadiant. + + GtkRadiant 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. + + GtkRadiant 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 GtkRadiant; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ #ifndef _WAD3_H_ #define _WAD3_H_ diff --git a/radiant/surfaceplugin.h b/radiant/surfaceplugin.h index 85e513c8..c375f049 100644 --- a/radiant/surfaceplugin.h +++ b/radiant/surfaceplugin.h @@ -1,3 +1,23 @@ +/* + Copyright (C) 1999-2007 id Software, Inc. and contributors. + For a list of contributors, see the accompanying CONTRIBUTORS file. + + This file is part of GtkRadiant. + + GtkRadiant 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. + + GtkRadiant 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 GtkRadiant; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ #ifndef _SURFACEPLUGIN_H #define _SURFACEPLUGIN_H diff --git a/tools/quake2/common/md4.c b/tools/quake2/common/md4.c deleted file mode 100644 index e69de29b..00000000 diff --git a/tools/quake3/common/md4.c b/tools/quake3/common/md4.c deleted file mode 100644 index e69de29b..00000000 diff --git a/tools/urt/libs/mathlib/linear.c b/tools/urt/libs/mathlib/linear.c deleted file mode 100644 index cede7a1c..00000000 --- a/tools/urt/libs/mathlib/linear.c +++ /dev/null @@ -1,214 +0,0 @@ - -#include -#include -#include - -#include "mathlib.h" - -#define TINY FLT_MIN - -void lubksb( float **a, int n, int *indx, float b[] ){ -// Solves the set of n linear equations A.X=B. Here a[n][n] is input, not as the matrix -// A but rather as its LU decomposition determined by the routine ludcmp. indx[n] is input -// as the permutation vector returned by ludcmp. b[n] is input as the right-hand side vector -// B, and returns with the solution vector X. a, n and indx are not modified by this routine -// and can be left in place for successive calls with different right-hand sides b. This routine takes -// into account the possibility that b will begin with many zero elements, so it is efficient for use -// in matrix inversion - int i,ii = -1,ip,j; - float sum; - - for ( i = 0; i < n; i++ ) { - ip = indx[i]; - sum = b[ip]; - b[ip] = b[i]; - if ( ii >= 0 ) { - for ( j = ii; j < i; j++ ) sum -= a[i][j] * b[j]; - } - else if ( sum ) { - ii = i; - } - b[i] = sum; - } - for ( i = n - 1; i >= 0; i-- ) { - sum = b[i]; - for ( j = i + 1; j < n; j++ ) sum -= a[i][j] * b[j]; - b[i] = sum / a[i][i]; - } -} -/* (C) Copr. 1986-92 Numerical Recipes Software */ - - -int ludcmp( float **a, int n, int *indx, float *d ){ -// given a matrix a[n][n] this routine replaces it with the LU decomposition of a rowwise -// permutation of itself. a and n are input. a is output, arranged as in above equation; -// indx[n] is an output vector that records the row permutation effected by the partial -// pivoting; d is output as +/-1 depending on whether the number of row interchanges was even -// or odd, respectively. This routine is used in combination with lubksb to solve linear -// equations or invert a matrix. - int i,imax,j,k; - float big,dum,sum,temp; - float *vv; - - vv = (float*)malloc( sizeof( float ) * n ); - *d = 1.0; - for ( i = 0; i < n; i++ ) { - big = 0.0; - for ( j = 0; j < n; j++ ) - if ( ( temp = (float)fabs( a[i][j] ) ) > big ) { - big = temp; - } - if ( big == 0.0 ) { - return 1; - } - vv[i] = 1.0f / big; - } - for ( j = 0; j < n; j++ ) { - for ( i = 0; i < j; i++ ) { - sum = a[i][j]; - for ( k = 0; k < i; k++ ) sum -= a[i][k] * a[k][j]; - a[i][j] = sum; - } - big = 0.0; - for ( i = j; i < n; i++ ) { - sum = a[i][j]; - for ( k = 0; k < j; k++ ) - sum -= a[i][k] * a[k][j]; - a[i][j] = sum; - if ( ( dum = vv[i] * (float)fabs( sum ) ) >= big ) { - big = dum; - imax = i; - } - } - if ( j != imax ) { - for ( k = 0; k < n; k++ ) { - dum = a[imax][k]; - a[imax][k] = a[j][k]; - a[j][k] = dum; - } - *d = -( *d ); - vv[imax] = vv[j]; - } - indx[j] = imax; - if ( a[j][j] == 0.0 ) { - a[j][j] = TINY; - } - if ( j != n ) { - dum = 1.0f / ( a[j][j] ); - for ( i = j + 1; i < n; i++ ) a[i][j] *= dum; - } - } - free( vv ); - return 0; -} -/* (C) Copr. 1986-92 Numerical Recipes Software */ - - -/* - void ludcmp(float **a, int n, int *indx, float *d) - //Given a matrix a[1..n][1..n], this routine replaces it by the LU decomposition of a rowwise - //permutation of itself. a and n are input. a is output, arranged as in equation (2.3.14) above; - //indx[1..n] is an output vector that records the row permutation e ected by the partial - //pivoting; d is output as .1 depending on whether the number of row interchanges was even - //or odd, respectively. This routine is used in combination with lubksb to solve linear equations - //or invert a matrix. - { - int i,imax,j,k; - float big,dum,sum,temp; - float *vv; //vv stores the implicit scaling of each row. - vv=vector(1,n); - *d=1.0; //No row interchanges yet. - for (i=1;i<=n;i++) { //Loop over rows to get the implicit scaling information. - big=0.0; - for (j=1;j<=n;j++) - if ((temp=fabs(a[i][j])) > big) big=temp; - if (big == 0.0) nrerror("Singular matrix in routine ludcmp"); - //No nonzero largest element. - vv[i]=1.0/big; //Save the scaling. - } - for (j=1;j<=n;j++) { //This is the loop over columns of Crout's method. - for (i=1;i= big) { - //Is the figure of merit for the pivot better than the best so far? - big=dum; - imax=i; - } - } - if (j != imax) { //Do we need to interchange rows? - for (k=1;k<=n;k++) { Yes, do so... - dum=a[imax][k]; - a[imax][k]=a[j][k]; - a[j][k]=dum; - } - *d = -(*d); //...and change the parity of d. - vv[imax]=vv[j]; //Also interchange the scale factor. - } - indx[j]=imax; - if (a[j][j] == 0.0) a[j][j]=TINY; - //If the pivot element is zero the matrix is singular (at least to the precision of the - // algorithm). For some applications on singular matrices, it is desirable to substitute - // TINY for zero. - if (j != n) { //Now, finally, divide by the pivot element. - dum=1.0/(a[j][j]); - for (i=j+1;i<=n;i++) a[i][j] *= dum; - } - } //Go back for the next column in the reduction. - free_vector(vv,1,n); - } - - void lubksb(float **a, int n, int *indx, float b[]) - //Solves the set of n linear equations A.X = B. Here a[1..n][1..n] is input, not as the matrix - //A but rather as its LU decomposition, determined by the routine ludcmp. indx[1..n] is input - //as the permutation vector returned by ludcmp. b[1..n] is input as the right-hand side vector - //B, and returns with the solution vector X. a, n, and indx are not modi ed by this routine - //and can be left in place for successive calls with di erent right-hand sides b. This routine takes - //into account the possibility that b will begin with many zero elements, so it is e.cient for use - //in matrix inversion. - { - int i,ii=0,ip,j; - float sum; - for (i=1;i<=n;i++) { //When ii is set to a positive value, it will become the - //index of the first nonvanishing element of b. Wenow - //do the forward substitution, equation (2.3.6). The - //only new wrinkle is to unscramble the permutation - //as we go. - ip=indx[i]; - sum=b[ip]; - b[ip]=b[i]; - if (ii) - for (j=ii;j<=i-1;j++) sum -= a[i][j]*b[j]; - else if (sum) ii=i; //A nonzero element was encountered, so from now on we - //will have to do the sums in the loop above. b[i]=sum; - } - for (i=n;i>=1;i--) { //Now we do the backsubstitution, equation (2.3.7). - sum=b[i]; - for (j=i+1;j<=n;j++) sum -= a[i][j]*b[j]; - b[i]=sum/a[i][i]; //Store a component of the solution vector X. - } //All done! - } - - void bleh() - { - #define N ... - float **a,**y,d,*col; - int i,j,*indx; - ... - ludcmp(a,N,indx,&d); //Decompose the matrix just once. - for(j=1;j<=N;j++) { //Find inverse by columns. - for(i=1;i<=N;i++) col[i]=0.0; - col[j]=1.0; - lubksb(a,N,indx,col); - for(i=1;i<=N;i++) y[i][j]=col[i]; - } - } - */ diff --git a/tools/urt/libs/mathlib/mathlib.vcproj b/tools/urt/libs/mathlib/mathlib.vcproj index fa2fb7d2..b371ccfe 100644 --- a/tools/urt/libs/mathlib/mathlib.vcproj +++ b/tools/urt/libs/mathlib/mathlib.vcproj @@ -216,28 +216,6 @@ /> - - - - - - - -