mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
Saveload: Add helper to skip chunk contents
This commit is contained in:
parent
0dc4be2aa0
commit
61f920138f
@ -2332,6 +2332,17 @@ void SlLoadTableWithArrayLengthPrefixesMissing()
|
|||||||
SetBit(_sl.block_flags, SLBF_TABLE_ARRAY_LENGTH_PREFIX_MISSING);
|
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.
|
* Save or Load (a list of) global variables.
|
||||||
* @param slt The SaveLoad table with objects to save/load.
|
* @param slt The SaveLoad table with objects to save/load.
|
||||||
|
@ -1079,6 +1079,8 @@ void SlSaveTableObjectChunk(const SaveLoadTable &slt);
|
|||||||
void SlLoadTableOrRiffFiltered(const SaveLoadTable &slt);
|
void SlLoadTableOrRiffFiltered(const SaveLoadTable &slt);
|
||||||
void SlLoadTableWithArrayLengthPrefixesMissing();
|
void SlLoadTableWithArrayLengthPrefixesMissing();
|
||||||
|
|
||||||
|
void SlSkipChunkContents();
|
||||||
|
|
||||||
inline void SlSaveTableObjectChunk(const NamedSaveLoadTable &slt)
|
inline void SlSaveTableObjectChunk(const NamedSaveLoadTable &slt)
|
||||||
{
|
{
|
||||||
SlSaveTableObjectChunk(SlTableHeader(slt));
|
SlSaveTableObjectChunk(SlTableHeader(slt));
|
||||||
|
Loading…
Reference in New Issue
Block a user