mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Add P_SaveBufferRemaining, returns remaining size of save buffer
This commit is contained in:
parent
5109e3bdf9
commit
e55f03648f
2 changed files with 13 additions and 0 deletions
|
|
@ -5714,3 +5714,15 @@ void P_SaveBufferFree(savebuffer_t *save)
|
|||
Z_Free(save->buffer);
|
||||
P_SaveBufferInvalidate(save);
|
||||
}
|
||||
|
||||
size_t P_SaveBufferRemaining(const savebuffer_t *save)
|
||||
{
|
||||
if (save->p < save->end)
|
||||
{
|
||||
return save->end - save->p;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ boolean P_SaveBufferFromExisting(savebuffer_t *save, UINT8 *existing_buffer, siz
|
|||
boolean P_SaveBufferFromLump(savebuffer_t *save, lumpnum_t lump);
|
||||
boolean P_SaveBufferFromFile(savebuffer_t *save, char const *name);
|
||||
void P_SaveBufferFree(savebuffer_t *save);
|
||||
size_t P_SaveBufferRemaining(const savebuffer_t *save);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue