mirror of
https://github.com/GTAmodding/re3.git
synced 2024-12-29 19:55:41 +00:00
fix WriteSaveHeader
This commit is contained in:
parent
f3a931e1c9
commit
4819d195d8
1 changed files with 8 additions and 8 deletions
|
@ -38,15 +38,15 @@ WriteSaveBuf(uint8 *&buf, const T &value)
|
||||||
|
|
||||||
#define SAVE_HEADER_SIZE (4 * sizeof(char) + sizeof(uint32))
|
#define SAVE_HEADER_SIZE (4 * sizeof(char) + sizeof(uint32))
|
||||||
|
|
||||||
#define WriteSaveHeader(buf, a, b, c, d, size) \
|
#define WriteSaveHeader(buf, a, b, c, d, size) \
|
||||||
WriteSaveBuf(buf, a); \
|
WriteSaveBuf(buf, a); \
|
||||||
WriteSaveBuf(buf, b); \
|
WriteSaveBuf(buf, b); \
|
||||||
WriteSaveBuf(buf, c); \
|
WriteSaveBuf(buf, c); \
|
||||||
WriteSaveBuf(buf, d); \
|
WriteSaveBuf(buf, d); \
|
||||||
WriteSaveBuf(buf, (uint32)size);
|
WriteSaveBuf(buf, (uint32)(size));
|
||||||
|
|
||||||
#ifdef VALIDATE_SAVE_SIZE
|
#ifdef VALIDATE_SAVE_SIZE
|
||||||
#define CheckSaveHeader(buf, a, b, c, d, size) { \
|
#define CheckSaveHeader(buf, a, b, c, d, size) do { \
|
||||||
char _C; uint32 _size;\
|
char _C; uint32 _size;\
|
||||||
ReadSaveBuf(&_C, buf);\
|
ReadSaveBuf(&_C, buf);\
|
||||||
assert(_C == a);\
|
assert(_C == a);\
|
||||||
|
@ -58,7 +58,7 @@ WriteSaveBuf(uint8 *&buf, const T &value)
|
||||||
assert(_C == d);\
|
assert(_C == d);\
|
||||||
ReadSaveBuf(&_size, buf);\
|
ReadSaveBuf(&_size, buf);\
|
||||||
assert(_size == size);\
|
assert(_size == size);\
|
||||||
}
|
} while(0)
|
||||||
#else
|
#else
|
||||||
#define CheckSaveHeader(buf, a, b, c, d, size) SkipSaveBuf(buf, 8);
|
#define CheckSaveHeader(buf, a, b, c, d, size) SkipSaveBuf(buf, 8);
|
||||||
#endif
|
#endif
|
Loading…
Reference in a new issue