From: rpolzer Date: Tue, 18 Nov 2008 09:43:25 +0000 (+0000) Subject: trivial patch: remove MAX_MAP_DRAW_VERTS limit completely (the code could already... X-Git-Tag: svn-r421~292 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e9bdda13d30e6c7bc4122c179bee282530aaea8c;p=xonotic%2Fnetradiant.git trivial patch: remove MAX_MAP_DRAW_VERTS limit completely (the code could already cope with it being dynamic) git-svn-id: svn://svn.icculus.org/netradiant/trunk@128 61c419a2-8eb2-4b30-bcec-8cead039b335 --- diff --git a/tools/quake3/q3map2/bspfile_abstract.c b/tools/quake3/q3map2/bspfile_abstract.c index 31b6f171..5b515fc8 100644 --- a/tools/quake3/q3map2/bspfile_abstract.c +++ b/tools/quake3/q3map2/bspfile_abstract.c @@ -64,7 +64,7 @@ void IncDrawVerts() if(bspDrawVerts == 0) { - numBSPDrawVertsBuffer = MAX_MAP_DRAW_VERTS / 37; + numBSPDrawVertsBuffer = 1024; bspDrawVerts = safe_malloc_info(sizeof(bspDrawVert_t) * numBSPDrawVertsBuffer, "IncDrawVerts"); @@ -74,9 +74,6 @@ void IncDrawVerts() numBSPDrawVertsBuffer *= 3; // multiply by 1.5 numBSPDrawVertsBuffer /= 2; - if(numBSPDrawVertsBuffer > MAX_MAP_DRAW_VERTS) - numBSPDrawVertsBuffer = MAX_MAP_DRAW_VERTS; - bspDrawVerts = realloc(bspDrawVerts, sizeof(bspDrawVert_t) * numBSPDrawVertsBuffer); if(!bspDrawVerts) diff --git a/tools/quake3/q3map2/q3map2.h b/tools/quake3/q3map2/q3map2.h index f26caf26..045b7586 100644 --- a/tools/quake3/q3map2/q3map2.h +++ b/tools/quake3/q3map2/q3map2.h @@ -322,7 +322,6 @@ abstracted bsp file #define MAX_MAP_VISIBILITY 0x200000 #define MAX_MAP_DRAW_SURFS 0x20000 -#define MAX_MAP_DRAW_VERTS 0x80000 #define MAX_MAP_DRAW_INDEXES 0x80000 #define MAX_MAP_ADVERTISEMENTS 30 diff --git a/tools/quake3/q3map2/surface.c b/tools/quake3/q3map2/surface.c index 30b4be57..82968420 100644 --- a/tools/quake3/q3map2/surface.c +++ b/tools/quake3/q3map2/surface.c @@ -2250,8 +2250,6 @@ void EmitDrawVerts( mapDrawSurface_t *ds, bspDrawSurface_t *out ) for( i = 0; i < ds->numVerts; i++ ) { /* allocate a new vert */ - if( numBSPDrawVerts == MAX_MAP_DRAW_VERTS ) - Error( "MAX_MAP_DRAW_VERTS" ); IncDrawVerts(); dv = &bspDrawVerts[ numBSPDrawVerts - 1 ];