From e9bdda13d30e6c7bc4122c179bee282530aaea8c Mon Sep 17 00:00:00 2001 From: rpolzer Date: Tue, 18 Nov 2008 09:43:25 +0000 Subject: [PATCH] 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 --- tools/quake3/q3map2/bspfile_abstract.c | 5 +---- tools/quake3/q3map2/q3map2.h | 1 - tools/quake3/q3map2/surface.c | 2 -- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/tools/quake3/q3map2/bspfile_abstract.c b/tools/quake3/q3map2/bspfile_abstract.c index 31b6f17..5b515fc 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 f26caf2..045b758 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 30b4be5..8296842 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 ]; -- 2.39.2