diff --git a/codemp/rd-rend2/tr_init.cpp b/codemp/rd-rend2/tr_init.cpp index 0ed30bad46..99268bb561 100644 --- a/codemp/rd-rend2/tr_init.cpp +++ b/codemp/rd-rend2/tr_init.cpp @@ -278,6 +278,8 @@ cvar_t *cl_ratioFix; cvar_t *r_patchStitching; +cvar_t *r_patchStitching; + extern void RB_SetGL2D (void); static void R_Splash() { diff --git a/shared/rd-rend2/tr_bsp.cpp b/shared/rd-rend2/tr_bsp.cpp index 1f2442afa6..94e3c7d9ba 100644 --- a/shared/rd-rend2/tr_bsp.cpp +++ b/shared/rd-rend2/tr_bsp.cpp @@ -2174,8 +2174,8 @@ static void R_CreateWorldVBOs( world_t *worldData ) ri.Printf(PRINT_ALL, "...calculating world VBO %d ( %i verts %i tris )\n", k, numVerts, numIndexes / 3); // create arrays - verts = (packedVertex_t *)Hunk_AllocateTempMemory(numVerts * sizeof(packedVertex_t)); - indexes = (glIndex_t *)Hunk_AllocateTempMemory(numIndexes * sizeof(glIndex_t)); + verts = (packedVertex_t *)ri.Hunk_AllocateTempMemory(numVerts * sizeof(packedVertex_t)); + indexes = (glIndex_t *)ri.Hunk_AllocateTempMemory(numIndexes * sizeof(glIndex_t)); // set up indices and copy vertices numVerts = 0; @@ -2319,7 +2319,7 @@ static void R_LoadSurfaces( world_t *worldData, lump_t *surfs, lump_t *verts, lu if ( indexLump->filelen % sizeof(*indexes)) ri.Error (ERR_DROP, "LoadMap: funny lump size in %s",worldData->name); - out = (msurface_t *)Hunk_Alloc ( count * sizeof(*out), h_low ); + out = (msurface_t *)ri.Hunk_Alloc ( count * sizeof(*out), h_low ); worldData->surfaces = out; worldData->numsurfaces = count; @@ -2538,7 +2538,7 @@ static void R_LoadNodesAndLeafs (world_t *worldData, lump_t *nodeLump, lump_t *l numNodes = nodeLump->filelen / sizeof(dnode_t); numLeafs = leafLump->filelen / sizeof(dleaf_t); - out = (mnode_t *)Hunk_Alloc ( (numNodes + numLeafs) * sizeof(*out), h_low); + out = (mnode_t *)ri.Hunk_Alloc ( (numNodes + numLeafs) * sizeof(*out), h_low); worldData->nodes = out; worldData->numnodes = numNodes + numLeafs; @@ -2637,7 +2637,7 @@ static void R_LoadMarksurfaces (world_t *worldData, lump_t *l) if (l->filelen % sizeof(*in)) ri.Error (ERR_DROP, "LoadMap: funny lump size in %s",worldData->name); count = l->filelen / sizeof(*in); - out = (int *)Hunk_Alloc ( count*sizeof(*out), h_low); + out = (int *)ri.Hunk_Alloc ( count*sizeof(*out), h_low); worldData->marksurfaces = out; worldData->nummarksurfaces = count; @@ -2666,8 +2666,8 @@ static void R_LoadPlanes( world_t *worldData, lump_t *l ) { if (l->filelen % sizeof(*in)) ri.Error (ERR_DROP, "LoadMap: funny lump size in %s",worldData->name); count = l->filelen / sizeof(*in); - out = (cplane_t *)Hunk_Alloc ( count*2*sizeof(*out), h_low); - + out = (cplane_t *)ri.Hunk_Alloc ( count*2*sizeof(*out), h_low); + worldData->planes = out; worldData->numplanes = count; diff --git a/shared/rd-rend2/tr_curve.cpp b/shared/rd-rend2/tr_curve.cpp index ad923dc50d..7983ec1c9b 100644 --- a/shared/rd-rend2/tr_curve.cpp +++ b/shared/rd-rend2/tr_curve.cpp @@ -386,21 +386,21 @@ srfBspSurface_t *R_CreateSurfaceGridMesh(int width, int height, // copy the results out to a grid size = (width * height - 1) * sizeof( srfVert_t ) + sizeof( *grid ); - grid = /*ri.Hunk_Alloc*/ (srfBspSurface_t *)R_Malloc( size, TAG_GRIDMESH ); + grid = /*ri.Hunk_Alloc*/ (srfBspSurface_t *)Z_Malloc( size, TAG_GRIDMESH ); Com_Memset(grid, 0, size); - grid->widthLodError = /*ri.Hunk_Alloc*/ (float *)R_Malloc( width * 4, TAG_GRIDMESH ); + grid->widthLodError = /*ri.Hunk_Alloc*/ (float *)Z_Malloc( width * 4, TAG_GRIDMESH ); Com_Memcpy( grid->widthLodError, errorTable[0], width * 4 ); - grid->heightLodError = /*ri.Hunk_Alloc*/ (float *)R_Malloc( height * 4, TAG_GRIDMESH ); + grid->heightLodError = /*ri.Hunk_Alloc*/ (float *)Z_Malloc( height * 4, TAG_GRIDMESH ); Com_Memcpy( grid->heightLodError, errorTable[1], height * 4 ); grid->numIndexes = numIndexes; - grid->indexes = (glIndex_t *)R_Malloc(grid->numIndexes * sizeof(glIndex_t), TAG_GRIDMESH); + grid->indexes = (glIndex_t *)Z_Malloc(grid->numIndexes * sizeof(glIndex_t), TAG_GRIDMESH); Com_Memcpy(grid->indexes, indexes, numIndexes * sizeof(glIndex_t)); grid->numVerts = (width * height); - grid->verts = (srfVert_t *)R_Malloc(grid->numVerts * sizeof(srfVert_t), TAG_GRIDMESH); + grid->verts = (srfVert_t *)Z_Malloc(grid->numVerts * sizeof(srfVert_t), TAG_GRIDMESH); grid->width = width; grid->height = height;