#include <savefile.h>
Public Member Functions | |
SavePartVars (GobEngine *vm, uint32 size) | |
bool | read (Common::ReadStream &stream) override |
bool | write (Common::WriteStream &stream) const override |
bool | readFrom (uint32 var, uint32 offset, uint32 size) |
bool | writeInto (uint32 var, uint32 offset, uint32 size) const |
bool | readFromRaw (const byte *data, uint32 offset, uint32 size) |
bool | writeIntoRaw (byte *data, uint32 offset, uint32 size) const |
const byte * | data () const |
Public Member Functions inherited from Gob::SavePart | |
virtual uint32 | getSize () const |
Static Public Attributes | |
static const uint32 | kVersion = 1 |
static const uint32 | kID = MKTAG('V','A','R','S') |
Additional Inherited Members | |
Protected Attributes inherited from Gob::SavePart | |
SaveHeader | _header |
A save part holding script variables.
|
overridevirtual |
Read the part (with header) out of the stream.
Implements Gob::SavePart.
|
overridevirtual |
Write the part (with header) into the stream.
Implements Gob::SavePart.
bool Gob::SavePartVars::readFrom | ( | uint32 | var, |
uint32 | offset, | ||
uint32 | size | ||
) |
Read size bytes of variables starting at var into the part at the specified offset.
bool Gob::SavePartVars::writeInto | ( | uint32 | var, |
uint32 | offset, | ||
uint32 | size | ||
) | const |
Write size bytes of the part at the specified offset into the variable starting at var.
bool Gob::SavePartVars::readFromRaw | ( | const byte * | data, |
uint32 | offset, | ||
uint32 | size | ||
) |
Read size bytes of raw data into the part.
bool Gob::SavePartVars::writeIntoRaw | ( | byte * | data, |
uint32 | offset, | ||
uint32 | size | ||
) | const |
Write size bytes of the part at the specified offset into a raw buffer.