xoreos
0.0.5
|
Class to hold resource index information of a KEY file. More...
#include <keyfile.h>
Classes | |
struct | Resource |
A key resource index. More... | |
Public Types | |
typedef std::vector< Resource > | ResourceList |
typedef std::vector< Common::UString > | BIFList |
Public Member Functions | |
KEYFile (Common::SeekableReadStream &key) | |
~KEYFile () | |
const BIFList & | getBIFs () const |
Return a list of all managed bifs. More... | |
const ResourceList & | getResources () const |
Return a list of all containing resources. More... | |
Public Member Functions inherited from Aurora::AuroraFile | |
AuroraFile () | |
void | clear () |
uint32 | getID () const |
Return the file's ID. More... | |
uint32 | getVersion () const |
Return the file's version. More... | |
bool | isUTF16LE () const |
Were the ID and version encoded in little-endian UTF-16 in the file? More... | |
Private Member Functions | |
void | load (Common::SeekableReadStream &key) |
void | readBIFList (Common::SeekableReadStream &key, uint32 offset) |
void | readResList (Common::SeekableReadStream &key, uint32 offset) |
Private Attributes | |
BIFList | _bifs |
All managed bifs. More... | |
ResourceList | _resources |
All containing resources. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Aurora::AuroraFile | |
static void | readHeader (Common::ReadStream &stream, uint32 &id, uint32 &version, bool &utf16le) |
Read the header out of a stream. More... | |
static void | readHeader (Common::ReadStream &stream, uint32 &id, uint32 &version) |
Read the ID and version out of a stream. More... | |
static uint32 | readHeaderID (Common::ReadStream &stream) |
Read the ID out of a stream. More... | |
Protected Member Functions inherited from Aurora::AuroraFile | |
void | readHeader (Common::ReadStream &stream) |
Static Protected Member Functions inherited from Aurora::AuroraFile | |
static uint32 | convertUTF16LE (uint32 x1, uint32 x2) |
Protected Attributes inherited from Aurora::AuroraFile | |
uint32 | _id |
The file's ID. More... | |
uint32 | _version |
The file's version. More... | |
bool | _utf16le |
The file's ID and version are in little-endian UTF-16. More... | |
Class to hold resource index information of a KEY file.
A KEY file is one part of the KEY/BIF resource archive system. The KEY file contains the resource names and types, and the BIF file contains the actual resource data. So KEY files only contain the resource meta-data.
A KEY file can index resources of several BIF files and several BIF files can in turn index different resources of the same BIF file.
Additionally, there are BZF files. A BZF is a compressed variation of a BIF file, found exclusively in the iOS version of Knights of the Old Republic.
See also classes BIFFile in biffile.h and BZFFile in bzffile.h.
There are two versions of KEY files known and supported
Please note that KEY (and BIF) files found in Infinity Engine games (Baldur's Gate et al) are not supported at all, even though they claim to be V1.
typedef std::vector<Common::UString> Aurora::KEYFile::BIFList |
typedef std::vector<Resource> Aurora::KEYFile::ResourceList |
Aurora::KEYFile::KEYFile | ( | Common::SeekableReadStream & | key | ) |
Definition at line 43 of file keyfile.cpp.
References load().
Aurora::KEYFile::~KEYFile | ( | ) |
Definition at line 47 of file keyfile.cpp.
const KEYFile::BIFList & Aurora::KEYFile::getBIFs | ( | ) | const |
Return a list of all managed bifs.
Definition at line 141 of file keyfile.cpp.
References _bifs.
Referenced by Aurora::ResourceManager::openKEYBIFs().
const KEYFile::ResourceList & Aurora::KEYFile::getResources | ( | ) | const |
Return a list of all containing resources.
Definition at line 145 of file keyfile.cpp.
References _resources.
Referenced by Aurora::BZFFile::mergeKEY(), and Aurora::BIFFile::mergeKEY().
|
private |
Definition at line 50 of file keyfile.cpp.
References _bifs, Aurora::AuroraFile::_id, _resources, Aurora::AuroraFile::_version, Common::StackException::add(), Common::debugTag(), kKEYID, kVersion1, kVersion11, readBIFList(), Aurora::AuroraFile::readHeader(), readResList(), Common::ReadStream::readUint32LE(), and Common::SeekableReadStream::skip().
Referenced by KEYFile().
|
private |
Definition at line 90 of file keyfile.cpp.
References _bifs, Aurora::AuroraFile::_version, Common::kEncodingASCII, kVersion11, Common::readStringFixed(), Common::ReadStream::readUint16LE(), Common::ReadStream::readUint32LE(), Common::SeekableReadStream::seek(), and Common::SeekableReadStream::skip().
Referenced by load().
|
private |
Definition at line 119 of file keyfile.cpp.
References _resources, Aurora::AuroraFile::_version, Common::kEncodingASCII, kVersion11, Common::readStringFixed(), Common::ReadStream::readUint16LE(), Common::ReadStream::readUint32LE(), and Common::SeekableReadStream::seek().
Referenced by load().
|
private |
All managed bifs.
Definition at line 94 of file keyfile.h.
Referenced by getBIFs(), load(), and readBIFList().
|
private |
All containing resources.
Definition at line 95 of file keyfile.h.
Referenced by getResources(), load(), and readResList().