diff options
| author | withmorten <morten.with@gmail.com> | 2021-07-05 18:07:26 +0200 |
|---|---|---|
| committer | withmorten <morten.with@gmail.com> | 2021-07-10 17:30:27 +0200 |
| commit | 011aafa0435d2c60dc4e0769ed4c93ed1761e3f6 (patch) | |
| tree | 4f6c78844f547651730f82043b28662a9b7239e9 /src/save/SaveBuf.h | |
| parent | readme: fix lto option (diff) | |
| download | re3-011aafa0435d2c60dc4e0769ed4c93ed1761e3f6.tar.gz | |
finish COMPATIBLE_SAVES and FIX_INCOMPATIBLE_SAVES
Diffstat (limited to 'src/save/SaveBuf.h')
| -rw-r--r-- | src/save/SaveBuf.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/save/SaveBuf.h b/src/save/SaveBuf.h index 98fe888b..aad2e1a8 100644 --- a/src/save/SaveBuf.h +++ b/src/save/SaveBuf.h @@ -36,6 +36,15 @@ WriteSaveBuf(uint8 *&buf, const T &value) return p; } +#ifdef COMPATIBLE_SAVES +inline void +ZeroSaveBuf(uint8 *&buf, uint32 length) +{ + memset(buf, 0, length); + SkipSaveBuf(buf, length); +} +#endif + #define SAVE_HEADER_SIZE (4 * sizeof(char) + sizeof(uint32)) #define WriteSaveHeader(buf, a, b, c, d, size) \ |
