]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
unlimit MAX_MAP_DRAW_INDEXES
authorRudolf Polzer <divverent@alientrap.org>
Sun, 12 Feb 2012 18:00:55 +0000 (19:00 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 12 Feb 2012 18:00:55 +0000 (19:00 +0100)
tools/quake3/q3map2/q3map2.h
tools/quake3/q3map2/surface.c

index 89dbe3c9b2ff58fd973ab3eeb094ff376a1baa33..f4b88d7a68c8ac1463217dd8fd9c95668a434aa2 100644 (file)
@@ -327,7 +327,6 @@ abstracted bsp file
 #define        MAX_MAP_VISIBILITY              (VIS_HEADER_SIZE + MAX_MAP_VISCLUSTERS * (((MAX_MAP_VISCLUSTERS + 63) & ~63) >> 3))
 
 #define        MAX_MAP_DRAW_SURFS              0x20000
-#define        MAX_MAP_DRAW_INDEXES    0x80000
 
 #define MAX_MAP_ADVERTISEMENTS 30
 
@@ -2511,10 +2510,11 @@ Q_EXTERN int                            numBSPVisBytes Q_ASSIGN( 0 );
 Q_EXTERN byte                          bspVisBytes[ MAX_MAP_VISIBILITY ];
 
 Q_EXTERN int                           numBSPDrawVerts Q_ASSIGN( 0 );
-Q_EXTERN bspDrawVert_t         *bspDrawVerts Q_ASSIGN( NULL );
+Q_EXTERN bspDrawVert_t                 *bspDrawVerts Q_ASSIGN( NULL );
 
 Q_EXTERN int                           numBSPDrawIndexes Q_ASSIGN( 0 );
-Q_EXTERN int                           bspDrawIndexes[ MAX_MAP_DRAW_INDEXES ];
+Q_EXTERN int                           allocatedBSPDrawIndexes Q_ASSIGN( 0 );
+Q_EXTERN int                           *bspDrawIndexes Q_ASSIGN(NULL);
 
 Q_EXTERN int                           numBSPDrawSurfaces Q_ASSIGN( 0 );
 Q_EXTERN bspDrawSurface_t      *bspDrawSurfaces Q_ASSIGN( NULL );
index e2ec89093b9155fd5946a38e1dc80e2987887e39..005456ef78b86c958ed325c40edde1d650177f54 100644 (file)
@@ -2435,8 +2435,7 @@ void EmitDrawIndexes( mapDrawSurface_t *ds, bspDrawSurface_t *out )
                /* copy new unique indexes */
                for( i = 0; i < ds->numIndexes; i++ )
                {
-                       if( numBSPDrawIndexes == MAX_MAP_DRAW_INDEXES )
-                               Error( "MAX_MAP_DRAW_INDEXES" );
+                       AUTOEXPAND_BY_REALLOC_BSP(DrawIndexes, 1024);
                        bspDrawIndexes[ numBSPDrawIndexes ] = ds->indexes[ i ];
 
                        /* validate the index */