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
This commit is contained in:
parent
df486c66bb
commit
e9bdda13d3
|
|
@ -64,7 +64,7 @@ void IncDrawVerts()
|
||||||
|
|
||||||
if(bspDrawVerts == 0)
|
if(bspDrawVerts == 0)
|
||||||
{
|
{
|
||||||
numBSPDrawVertsBuffer = MAX_MAP_DRAW_VERTS / 37;
|
numBSPDrawVertsBuffer = 1024;
|
||||||
|
|
||||||
bspDrawVerts = safe_malloc_info(sizeof(bspDrawVert_t) * numBSPDrawVertsBuffer, "IncDrawVerts");
|
bspDrawVerts = safe_malloc_info(sizeof(bspDrawVert_t) * numBSPDrawVertsBuffer, "IncDrawVerts");
|
||||||
|
|
||||||
|
|
@ -74,9 +74,6 @@ void IncDrawVerts()
|
||||||
numBSPDrawVertsBuffer *= 3; // multiply by 1.5
|
numBSPDrawVertsBuffer *= 3; // multiply by 1.5
|
||||||
numBSPDrawVertsBuffer /= 2;
|
numBSPDrawVertsBuffer /= 2;
|
||||||
|
|
||||||
if(numBSPDrawVertsBuffer > MAX_MAP_DRAW_VERTS)
|
|
||||||
numBSPDrawVertsBuffer = MAX_MAP_DRAW_VERTS;
|
|
||||||
|
|
||||||
bspDrawVerts = realloc(bspDrawVerts, sizeof(bspDrawVert_t) * numBSPDrawVertsBuffer);
|
bspDrawVerts = realloc(bspDrawVerts, sizeof(bspDrawVert_t) * numBSPDrawVertsBuffer);
|
||||||
|
|
||||||
if(!bspDrawVerts)
|
if(!bspDrawVerts)
|
||||||
|
|
|
||||||
|
|
@ -322,7 +322,6 @@ abstracted bsp file
|
||||||
#define MAX_MAP_VISIBILITY 0x200000
|
#define MAX_MAP_VISIBILITY 0x200000
|
||||||
|
|
||||||
#define MAX_MAP_DRAW_SURFS 0x20000
|
#define MAX_MAP_DRAW_SURFS 0x20000
|
||||||
#define MAX_MAP_DRAW_VERTS 0x80000
|
|
||||||
#define MAX_MAP_DRAW_INDEXES 0x80000
|
#define MAX_MAP_DRAW_INDEXES 0x80000
|
||||||
|
|
||||||
#define MAX_MAP_ADVERTISEMENTS 30
|
#define MAX_MAP_ADVERTISEMENTS 30
|
||||||
|
|
|
||||||
|
|
@ -2250,8 +2250,6 @@ void EmitDrawVerts( mapDrawSurface_t *ds, bspDrawSurface_t *out )
|
||||||
for( i = 0; i < ds->numVerts; i++ )
|
for( i = 0; i < ds->numVerts; i++ )
|
||||||
{
|
{
|
||||||
/* allocate a new vert */
|
/* allocate a new vert */
|
||||||
if( numBSPDrawVerts == MAX_MAP_DRAW_VERTS )
|
|
||||||
Error( "MAX_MAP_DRAW_VERTS" );
|
|
||||||
IncDrawVerts();
|
IncDrawVerts();
|
||||||
dv = &bspDrawVerts[ numBSPDrawVerts - 1 ];
|
dv = &bspDrawVerts[ numBSPDrawVerts - 1 ];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user