diff --git a/neo/sys/scons/SConscript.core b/neo/sys/scons/SConscript.core index 6ecad72c..2ac5b8d6 100644 --- a/neo/sys/scons/SConscript.core +++ b/neo/sys/scons/SConscript.core @@ -278,8 +278,6 @@ source_list = core_list source_list += idlib_objects source_list += sound_lib -source_list += g_env_noopt.StaticObject( '../../tools/compilers/dmap/optimize_gcc.cpp' ) - if ( local_gamedll == 0 ): source_list += game_objects diff --git a/neo/tools/compilers/dmap/optimize.cpp b/neo/tools/compilers/dmap/optimize.cpp index 4c8f8915..07d67440 100644 --- a/neo/tools/compilers/dmap/optimize.cpp +++ b/neo/tools/compilers/dmap/optimize.cpp @@ -181,12 +181,6 @@ static void LinkEdge( optEdge_t *e ) { e->v2->edges = e; } -#ifdef __unix__ - -optVertex_t *FindOptVertex( idDrawVert *v, optimizeGroup_t *opt ); - -#else - /* ================ FindOptVertex @@ -227,8 +221,6 @@ static optVertex_t *FindOptVertex( idDrawVert *v, optimizeGroup_t *opt ) { return vert; } -#endif - /* ================ DrawAllEdges diff --git a/neo/tools/compilers/dmap/optimize_gcc.cpp b/neo/tools/compilers/dmap/optimize_gcc.cpp deleted file mode 100644 index 6187d3a5..00000000 --- a/neo/tools/compilers/dmap/optimize_gcc.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* -=========================================================================== - -Doom 3 GPL Source Code -Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. - -This file is part of the Doom 3 GPL Source Code ("Doom 3 Source Code"). - -Doom 3 Source Code 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 3 of the License, or -(at your option) any later version. - -Doom 3 Source Code 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 Doom 3 Source Code. If not, see . - -In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. - -If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. - -=========================================================================== -*/ -/* -crazy gcc 3.3.5 optimization bug -happens even at -O1 -if you remove the 'return NULL;' after Error(), it only happens at -O3 / release -see dmap.gcc.zip test map and .proc outputs -*/ - -#include "../../../idlib/precompiled.h" -#pragma hdrstop - -#include "dmap.h" - -extern idBounds optBounds; - -#define MAX_OPT_VERTEXES 0x10000 -extern int numOptVerts; -extern optVertex_t optVerts[MAX_OPT_VERTEXES]; - -/* -================ -FindOptVertex -================ -*/ -optVertex_t *FindOptVertex( idDrawVert *v, optimizeGroup_t *opt ) { - int i; - float x, y; - optVertex_t *vert; - - // deal with everything strictly as 2D - x = v->xyz * opt->axis[0]; - y = v->xyz * opt->axis[1]; - - // should we match based on the t-junction fixing hash verts? - for ( i = 0 ; i < numOptVerts ; i++ ) { - if ( optVerts[i].pv[0] == x && optVerts[i].pv[1] == y ) { - return &optVerts[i]; - } - } - - if ( numOptVerts >= MAX_OPT_VERTEXES ) { - common->Error( "MAX_OPT_VERTEXES" ); - return NULL; - } - - numOptVerts++; - - vert = &optVerts[i]; - memset( vert, 0, sizeof( *vert ) ); - vert->v = *v; - vert->pv[0] = x; - vert->pv[1] = y; - vert->pv[2] = 0; - - optBounds.AddPoint( vert->pv ); - - return vert; -}