xoreos
0.0.5
|
#include <thewitchersavewriter.h>
Classes | |
struct | Resource |
Public Member Functions | |
TheWitcherSaveWriter (const Common::UString &areaName, Common::SeekableWriteStream &stream) | |
Create a new TheWitcherSave writer. More... | |
void | add (const Common::UString &resRef, const Aurora::FileType fileType, Common::ReadStream &stream) |
Add a file to this TheWitcherSave archive. More... | |
void | finish () |
Finish the stream and write the file table at the end of the stream, and set the finished flag to prevent further adds. More... | |
Private Attributes | |
Common::SeekableWriteStream & | _stream |
bool | _finished |
std::vector< Resource > | _resources |
Definition at line 34 of file thewitchersavewriter.h.
Aurora::TheWitcherSaveWriter::TheWitcherSaveWriter | ( | const Common::UString & | areaName, |
Common::SeekableWriteStream & | stream | ||
) |
Create a new TheWitcherSave writer.
areaName | Set the area name which should be written into the header. |
stream | The stream to write the file to. |
Definition at line 34 of file thewitchersavewriter.cpp.
References Common::kEncodingUTF16LE, Aurora::kRGMHID, Common::writeStringFixed(), Common::WriteStream::writeUint32BE(), Common::WriteStream::writeUint32LE(), Common::WriteStream::writeUint64LE(), and Common::WriteStream::writeZeros().
void Aurora::TheWitcherSaveWriter::add | ( | const Common::UString & | resRef, |
const Aurora::FileType | fileType, | ||
Common::ReadStream & | stream | ||
) |
Add a file to this TheWitcherSave archive.
resRef | The filename of the stream to write |
fileType | The file type of the resource to add |
stream | The stream of the |
Definition at line 65 of file thewitchersavewriter.cpp.
References _finished, _resources, _stream, Aurora::TheWitcherSaveWriter::Resource::name, Aurora::TheWitcherSaveWriter::Resource::offset, Common::SeekableWriteStream::pos(), Aurora::TheWitcherSaveWriter::Resource::size, TypeMan, and Common::WriteStream::writeStream().
void Aurora::TheWitcherSaveWriter::finish | ( | ) |
Finish the stream and write the file table at the end of the stream, and set the finished flag to prevent further adds.
Definition at line 77 of file thewitchersavewriter.cpp.
References _finished, _resources, _stream, Common::kEncodingASCII, Aurora::TheWitcherSaveWriter::Resource::name, Aurora::TheWitcherSaveWriter::Resource::offset, Common::SeekableWriteStream::pos(), Aurora::TheWitcherSaveWriter::Resource::size, Common::UString::size(), Common::writeString(), and Common::WriteStream::writeUint32LE().
|
private |
Definition at line 66 of file thewitchersavewriter.h.
|
private |
Definition at line 67 of file thewitchersavewriter.h.
|
private |
Definition at line 64 of file thewitchersavewriter.h.