mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-31 11:23:21 +00:00
Codechange: Move SlSkipBytes to saveload.h
This commit is contained in:
parent
cf8ccf4b08
commit
54237b0e98
@ -467,16 +467,6 @@ static inline void SlWriteUint64(uint64 x)
|
|||||||
SlWriteUint32((uint32)x);
|
SlWriteUint32((uint32)x);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Read in bytes from the file/data structure but don't do
|
|
||||||
* anything with them, discarding them in effect
|
|
||||||
* @param length The amount of bytes that is being treated this way
|
|
||||||
*/
|
|
||||||
static inline void SlSkipBytes(size_t length)
|
|
||||||
{
|
|
||||||
for (; length != 0; length--) SlReadByte();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read in the header descriptor of an object or an array.
|
* Read in the header descriptor of an object or an array.
|
||||||
* If the highest bit is set (7), then the index is bigger than 127
|
* If the highest bit is set (7), then the index is bigger than 127
|
||||||
|
@ -900,6 +900,16 @@ void NORETURN SlErrorCorruptFmt(const char *format, ...) WARN_FORMAT(1, 2);
|
|||||||
|
|
||||||
bool SaveloadCrashWithMissingNewGRFs();
|
bool SaveloadCrashWithMissingNewGRFs();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read in bytes from the file/data structure but don't do
|
||||||
|
* anything with them, discarding them in effect
|
||||||
|
* @param length The amount of bytes that is being treated this way
|
||||||
|
*/
|
||||||
|
static inline void SlSkipBytes(size_t length)
|
||||||
|
{
|
||||||
|
for (; length != 0; length--) SlReadByte();
|
||||||
|
}
|
||||||
|
|
||||||
extern char _savegame_format[8];
|
extern char _savegame_format[8];
|
||||||
extern bool _do_autosave;
|
extern bool _do_autosave;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user