Move openings to r_memory
This commit is contained in:
parent
74e1955afa
commit
60c0dcc3c7
10 changed files with 67 additions and 38 deletions
|
|
@ -74,20 +74,4 @@ namespace swrenderer
|
|||
|
||||
return ds_p++;
|
||||
}
|
||||
|
||||
ptrdiff_t R_NewOpening(ptrdiff_t len)
|
||||
{
|
||||
ptrdiff_t res = lastopening;
|
||||
len = (len + 1) & ~1; // only return DWORD aligned addresses because some code stores fixed_t's and floats in openings...
|
||||
lastopening += len;
|
||||
if ((size_t)lastopening > maxopenings)
|
||||
{
|
||||
do
|
||||
maxopenings = maxopenings ? maxopenings * 2 : 16384;
|
||||
while ((size_t)lastopening > maxopenings);
|
||||
openings = (short *)M_Realloc(openings, maxopenings * sizeof(*openings));
|
||||
DPrintf(DMSG_NOTIFY, "MaxOpenings increased to %zu\n", maxopenings);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue