Merge branch 'divVerent/MAX_MAP_DRAW_INDEXES'
This commit is contained in:
commit
57ee804448
|
|
@ -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_VISIBILITY (VIS_HEADER_SIZE + MAX_MAP_VISCLUSTERS * (((MAX_MAP_VISCLUSTERS + 63) & ~63) >> 3))
|
||||||
|
|
||||||
#define MAX_MAP_DRAW_SURFS 0x20000
|
#define MAX_MAP_DRAW_SURFS 0x20000
|
||||||
#define MAX_MAP_DRAW_INDEXES 0x80000
|
|
||||||
|
|
||||||
#define MAX_MAP_ADVERTISEMENTS 30
|
#define MAX_MAP_ADVERTISEMENTS 30
|
||||||
|
|
||||||
|
|
@ -2514,7 +2513,8 @@ 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 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 int numBSPDrawSurfaces Q_ASSIGN( 0 );
|
||||||
Q_EXTERN bspDrawSurface_t *bspDrawSurfaces Q_ASSIGN( NULL );
|
Q_EXTERN bspDrawSurface_t *bspDrawSurfaces Q_ASSIGN( NULL );
|
||||||
|
|
|
||||||
|
|
@ -2435,8 +2435,7 @@ void EmitDrawIndexes( mapDrawSurface_t *ds, bspDrawSurface_t *out )
|
||||||
/* copy new unique indexes */
|
/* copy new unique indexes */
|
||||||
for( i = 0; i < ds->numIndexes; i++ )
|
for( i = 0; i < ds->numIndexes; i++ )
|
||||||
{
|
{
|
||||||
if( numBSPDrawIndexes == MAX_MAP_DRAW_INDEXES )
|
AUTOEXPAND_BY_REALLOC_BSP(DrawIndexes, 1024);
|
||||||
Error( "MAX_MAP_DRAW_INDEXES" );
|
|
||||||
bspDrawIndexes[ numBSPDrawIndexes ] = ds->indexes[ i ];
|
bspDrawIndexes[ numBSPDrawIndexes ] = ds->indexes[ i ];
|
||||||
|
|
||||||
/* validate the index */
|
/* validate the index */
|
||||||
|
|
|
||||||
|
|
@ -388,6 +388,7 @@ void BeginBSPFile( void )
|
||||||
|
|
||||||
/* ydnar: gs mods: set the first 6 drawindexes to 0 1 2 2 1 3 for triangles and quads */
|
/* ydnar: gs mods: set the first 6 drawindexes to 0 1 2 2 1 3 for triangles and quads */
|
||||||
numBSPDrawIndexes = 6;
|
numBSPDrawIndexes = 6;
|
||||||
|
AUTOEXPAND_BY_REALLOC_BSP(DrawIndexes, 1024);
|
||||||
bspDrawIndexes[ 0 ] = 0;
|
bspDrawIndexes[ 0 ] = 0;
|
||||||
bspDrawIndexes[ 1 ] = 1;
|
bspDrawIndexes[ 1 ] = 1;
|
||||||
bspDrawIndexes[ 2 ] = 2;
|
bspDrawIndexes[ 2 ] = 2;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user