22 #ifndef BLADERUNNER_SAVEFILE_H 23 #define BLADERUNNER_SAVEFILE_H 25 #include "common/array.h" 26 #include "common/memstream.h" 27 #include "common/savefile.h" 28 #include "common/types.h" 30 #include "graphics/surface.h" 32 #include "engines/savestate.h" 61 static const uint32 kTag =
MKTAG(
'B',
'R',
'S',
'V');
64 static const uint32 kVersion = 4;
71 static const uint32 kNameLengthV2 = 32;
72 static const uint32 kNameLength = 41;
73 static const uint32 kThumbnailSize = 9600;
95 uint32
write(
const void *dataPtr, uint32 dataSize)
override {
return _s.
write(dataPtr, dataSize); }
97 int64
pos()
const override {
return _s.
pos(); }
101 void padBytes(
int count);
103 void writeInt(int32 v);
104 void writeFloat(
float v);
105 void writeBool(
bool v);
107 void writeVector2(
const Vector2 &v);
108 void writeVector3(
const Vector3 &v);
110 void writeBoundingBox(
const BoundingBox &v,
bool serialized);
120 bool eos()
const override {
return _s.
eos(); }
121 uint32
read(
void *dataPtr, uint32 dataSize)
override {
return _s.
read(dataPtr, dataSize); }
122 int64
pos()
const override {
return _s.
pos(); }
124 bool seek(int64 offset,
int whence = SEEK_SET)
override {
return _s.
seek(offset, whence); }
Definition: savefile.h:88
int64 pos() const override
Definition: savefile.h:97
virtual int64 size() const =0
uint32 write(const void *dataPtr, uint32 dataSize) override
Definition: savefile.h:95
virtual int64 pos() const =0
Definition: savefile.h:54
virtual bool seek(int64 offset, int whence=SEEK_SET)=0
virtual bool eos() const =0
Definition: savefile.h:113
bool seek(int64 offset, int whence=SEEK_SET) override
Definition: savefile.h:124
bool eos() const override
Definition: savefile.h:120
virtual bool flush()
Definition: stream.h:103
Definition: savestate.h:56
Definition: boundingbox.h:31
virtual int64 pos() const =0
int64 pos() const override
Definition: savefile.h:122
void debug(MSVC_PRINTF const char *s,...) GCC_PRINTF(1
bool flush() override
Definition: savefile.h:96
uint32 read(void *dataPtr, uint32 dataSize) override
Definition: savefile.h:121
Definition: algorithm.h:29
bool skipThumbnail(Common::SeekableReadStream &in)
int64 size() const override
Definition: savefile.h:123
#define MKTAG(a0, a1, a2, a3)
Definition: endian.h:188
Definition: savefile.h:59
virtual uint32 write(const void *dataPtr, uint32 dataSize)=0
virtual uint32 read(void *dataPtr, uint32 dataSize)=0