Saveload: Add helper to skip chunk contents

This commit is contained in:
Jonathan G Rennison
2024-07-07 15:34:09 +01:00
parent 0dc4be2aa0
commit 61f920138f
2 changed files with 13 additions and 0 deletions

View File

@@ -2332,6 +2332,17 @@ void SlLoadTableWithArrayLengthPrefixesMissing()
SetBit(_sl.block_flags, SLBF_TABLE_ARRAY_LENGTH_PREFIX_MISSING);
}
void SlSkipChunkContents()
{
if (SlIsTableChunk()) SlSkipTableHeader();
if (_sl.block_mode == CH_RIFF) {
SlSkipBytes(SlGetFieldLength());
} else {
SlSkipArray();
}
}
/**
* Save or Load (a list of) global variables.
* @param slt The SaveLoad table with objects to save/load.