]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - misc/mediasource/netradiant-src/tools/quake3/q3map2/lightmaps.c
Rename mediasource to source
[voretournament/voretournament.git] / misc / mediasource / netradiant-src / tools / quake3 / q3map2 / lightmaps.c
diff --git a/misc/mediasource/netradiant-src/tools/quake3/q3map2/lightmaps.c b/misc/mediasource/netradiant-src/tools/quake3/q3map2/lightmaps.c
deleted file mode 100644 (file)
index 13f5c53..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
-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 "qbsp.h"
-
-
-/*
-
-  Lightmap allocation has to be done after all flood filling and
-  visible surface determination.
-
-*/
-
-int                                    numSortShaders;
-mapDrawSurface_t       **surfsOnShader;
-int allocatedSurfsOnShader;
-
-
-int            allocated[ LIGHTMAP_WIDTH ];
-
-int            numLightmaps = 1;
-int            c_exactLightmap = 0;
-int            c_planarPatch = 0;
-int            c_nonplanarLightmap = 0;
-
-
-void PrepareNewLightmap( void ) {
-       memset( allocated, 0, sizeof( allocated ) );
-       numLightmaps++;
-}
-
-/*
-===============
-AllocLMBlock
-
-returns a texture number and the position inside it
-===============
-*/
-qboolean AllocLMBlock (int w, int h, int *x, int *y)
-{
-       int             i, j;
-       int             best, best2;
-
-       best = LIGHTMAP_HEIGHT;
-
-       for ( i=0 ; i <= LIGHTMAP_WIDTH-w ; i++ ) {
-               best2 = 0;
-
-               for (j=0 ; j<w ; j++) {
-                       if (allocated[i+j] >= best) {
-                               break;
-                       }
-                       if (allocated[i+j] > best2) {
-                               best2 = allocated[i+j];
-                       }
-               }
-               if (j == w)     {       // this is a valid spot
-                       *x = i;
-                       *y = best = best2;
-               }
-       }
-
-       if (best + h > LIGHTMAP_HEIGHT) {
-               return qfalse;
-       }
-
-       for (i=0 ; i<w ; i++) {
-               allocated[*x + i] = best + h;
-       }
-
-       return qtrue;
-}
-
-
-/*
-===================
-AllocateLightmapForPatch
-===================
-*/
-//#define LIGHTMAP_PATCHSHIFT
-
-
-
-/*
-===================
-AllocateLightmapForSurface
-===================
-*/
-
-//#define      LIGHTMAP_BLOCK  16
-
-
-
-/*
-===================
-AllocateLightmaps
-===================
-*/
-
-
-