mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-30 17:01:03 +00:00
Added Xfree() function to accompany the Xmalloc() family of functions and change all uses of Bfree() to Xfree()
This was necessary because everything is already allocated with the Xmalloc() functions, but a future commit will make blocks allocated with those functions no longer compatible with the system implementation of free(), which Bfree() wraps. git-svn-id: https://svn.eduke32.com/eduke32@7705 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/build/src/build.cpp # source/build/src/mdsprite.cpp # source/build/src/polymer.cpp # source/build/src/polymost.cpp # source/build/src/texcache.cpp # source/build/src/voxmodel.cpp
This commit is contained in:
parent
dc62b986e8
commit
ccdba037b5
47 changed files with 343 additions and 338 deletions
|
@ -445,11 +445,11 @@ void polymost_glreset()
|
|||
if (pth->flags & PTH_HASFULLBRIGHT)
|
||||
{
|
||||
delete pth->ofb->glpic;
|
||||
Bfree(pth->ofb);
|
||||
Xfree(pth->ofb);
|
||||
}
|
||||
|
||||
delete pth->glpic;
|
||||
Bfree(pth);
|
||||
Xfree(pth);
|
||||
pth = next;
|
||||
}
|
||||
|
||||
|
@ -1781,7 +1781,7 @@ void gloadtile_art(int32_t dapic, int32_t dapal, int32_t tintpalnum, int32_t das
|
|||
(npoty ? DAMETH_NPOTWALL : 0) |
|
||||
(hasalpha ? (DAMETH_HASALPHA|DAMETH_ONEBITALPHA) : 0));
|
||||
|
||||
Bfree(pic);
|
||||
Xfree(pic);
|
||||
}
|
||||
|
||||
polymost_setuptexture(pth->glpic, dameth, -1);
|
||||
|
@ -1916,7 +1916,7 @@ int32_t gloadtile_hi(int32_t dapic,int32_t dapalnum, int32_t facen, hicreplctyp
|
|||
{
|
||||
if (kprender(kpzbuf,picfillen,(intptr_t)pic,bytesperline,siz.x,siz.y))
|
||||
{
|
||||
Bfree(pic);
|
||||
Xfree(pic);
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
|
@ -1934,7 +1934,7 @@ int32_t gloadtile_hi(int32_t dapic,int32_t dapalnum, int32_t facen, hicreplctyp
|
|||
}
|
||||
else if (lastsize < siz.x*siz.y)
|
||||
{
|
||||
Bfree(lastpic);
|
||||
Xfree(lastpic);
|
||||
lastpic = (coltype *)Xmalloc(siz.x*siz.y*sizeof(coltype));
|
||||
}
|
||||
if (lastpic)
|
||||
|
@ -2057,7 +2057,7 @@ int32_t gloadtile_hi(int32_t dapic,int32_t dapalnum, int32_t facen, hicreplctyp
|
|||
(onebitalpha ? DAMETH_ONEBITALPHA : 0) |
|
||||
(hasalpha ? DAMETH_HASALPHA : 0));
|
||||
|
||||
Bfree(pic);
|
||||
Xfree(pic);
|
||||
}
|
||||
|
||||
// precalculate scaling parameters for replacement
|
||||
|
@ -7370,7 +7370,7 @@ static int32_t gen_font_glyph_tex(void)
|
|||
polymosttext->CreateTexture(256, 128, false, false);
|
||||
polymosttext->LoadTexture((uint8_t*)tbuf); // RGBA
|
||||
polymosttext->SetSampler(Sampler2DNoFilter);
|
||||
Bfree(tbuf);
|
||||
Xfree(tbuf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue