entirely remove MAX_ORIGINAL_EDGES and MAX_EDGE_LINES

git-svn-id: svn://svn.icculus.org/netradiant/trunk@187 61c419a2-8eb2-4b30-bcec-8cead039b335
This commit is contained in:
divverent 2009-02-12 06:37:47 +00:00
parent 5ad75e84a3
commit 257c44e531

View File

@ -63,14 +63,14 @@ typedef struct {
bspDrawVert_t *dv[2]; bspDrawVert_t *dv[2];
} originalEdge_t; } originalEdge_t;
#define MAX_ORIGINAL_EDGES 0x100000 originalEdge_t *originalEdges = NULL;
originalEdge_t originalEdges[MAX_ORIGINAL_EDGES];
int numOriginalEdges; int numOriginalEdges;
int allocatedOriginalEdges = 0;
#define MAX_EDGE_LINES 0x100000 edgeLine_t *edgeLines = NULL;
edgeLine_t edgeLines[MAX_EDGE_LINES];
int numEdgeLines; int numEdgeLines;
int allocatedEdgeLines = 0;
int c_degenerateEdges; int c_degenerateEdges;
int c_addedVerts; int c_addedVerts;
@ -153,9 +153,7 @@ int AddEdge( vec3_t v1, vec3_t v2, qboolean createNonAxial ) {
if ( !createNonAxial ) { if ( !createNonAxial ) {
if ( fabs( dir[0] + dir[1] + dir[2] ) != 1.0 ) { if ( fabs( dir[0] + dir[1] + dir[2] ) != 1.0 ) {
if ( numOriginalEdges == MAX_ORIGINAL_EDGES ) { AUTOEXPAND_BY_REALLOC(originalEdges, numOriginalEdges, allocatedOriginalEdges, 1024);
Error( "MAX_ORIGINAL_EDGES" );
}
originalEdges[ numOriginalEdges ].dv[0] = (bspDrawVert_t *)v1; originalEdges[ numOriginalEdges ].dv[0] = (bspDrawVert_t *)v1;
originalEdges[ numOriginalEdges ].dv[1] = (bspDrawVert_t *)v2; originalEdges[ numOriginalEdges ].dv[1] = (bspDrawVert_t *)v2;
originalEdges[ numOriginalEdges ].length = d; originalEdges[ numOriginalEdges ].length = d;
@ -192,9 +190,7 @@ int AddEdge( vec3_t v1, vec3_t v2, qboolean createNonAxial ) {
} }
// create a new edge // create a new edge
if ( numEdgeLines >= MAX_EDGE_LINES ) { AUTOEXPAND_BY_REALLOC(edgeLines, numEdgeLines, allocatedEdgeLines, 1024);
Error( "MAX_EDGE_LINES" );
}
e = &edgeLines[ numEdgeLines ]; e = &edgeLines[ numEdgeLines ];
numEdgeLines++; numEdgeLines++;