xoreos
0.0.5
|
Loading BioWare's GFF'd talk tables. More...
#include <talktable_gff.h>
Classes | |
struct | Entry |
Public Member Functions | |
TalkTable_GFF (Common::SeekableReadStream *tlk, Common::Encoding encoding) | |
Take over this stream and read a GFF'd TLK out of it. More... | |
~TalkTable_GFF () | |
bool | hasEntry (uint32 strRef) const |
const Common::UString & | getString (uint32 strRef) const |
const Common::UString & | getSoundResRef (uint32 strRef) const |
uint32 | getSoundID (uint32 strRef) const |
Public Member Functions inherited from Aurora::TalkTable | |
virtual | ~TalkTable () |
Private Types | |
typedef Common::PtrMap< uint32, Entry > | Entries |
Private Member Functions | |
void | load (Common::SeekableReadStream *tlk) |
void | load02 (const GFF4Struct &top) |
void | load05 (const GFF4Struct &top) |
void | readString (Entry &entry) const |
void | readString02 (Entry &entry) const |
void | readString05 (Entry &entry, bool bigEndian) const |
void | readString05 (Common::SeekableSubReadStreamEndian &huffTree, Common::SeekableSubReadStreamEndian &bitStream, Entry &entry) const |
Private Attributes | |
Common::ScopedPtr< GFF4File > | _gff |
Entries | _entries |
Additional Inherited Members | |
Static Public Member Functions inherited from Aurora::TalkTable | |
static TalkTable * | load (Common::SeekableReadStream *tlk, Common::Encoding encoding) |
Take over this stream and read a talk table (of either format) out of it. More... | |
Protected Member Functions inherited from Aurora::TalkTable | |
TalkTable (Common::Encoding encoding) | |
Protected Attributes inherited from Aurora::TalkTable | |
Common::Encoding | _encoding |
Loading BioWare's GFF'd talk tables.
See class TalkTable for a general overview how talk tables work.
Unlike TalkTable_TLK, a GFF talk table stores the string data within a V4.0 GFF. It does not store any language ID (the language is implicit in the talk tables file name), nor any other data besides the raw strings. getSoundResRef() always returns an empty string.
There are three versions of GFF'd talk tables known and supported
Definition at line 60 of file talktable_gff.h.
|
private |
Definition at line 83 of file talktable_gff.h.
Aurora::TalkTable_GFF::TalkTable_GFF | ( | Common::SeekableReadStream * | tlk, |
Common::Encoding | encoding | ||
) |
Take over this stream and read a GFF'd TLK out of it.
Definition at line 45 of file talktable_gff.cpp.
References load().
Aurora::TalkTable_GFF::~TalkTable_GFF | ( | ) |
Definition at line 51 of file talktable_gff.cpp.
Implements Aurora::TalkTable.
Definition at line 73 of file talktable_gff.cpp.
References Aurora::kFieldIDInvalid.
|
virtual |
Implements Aurora::TalkTable.
Definition at line 69 of file talktable_gff.cpp.
References Aurora::kEmptyString.
|
virtual |
Implements Aurora::TalkTable.
Definition at line 59 of file talktable_gff.cpp.
References _entries, Aurora::kEmptyString, and readString().
|
virtual |
|
private |
Definition at line 77 of file talktable_gff.cpp.
References _gff, Common::StackException::add(), kTLKID, kVersion02, kVersion04, kVersion05, load02(), and load05().
Referenced by TalkTable_GFF().
|
private |
Definition at line 100 of file talktable_gff.cpp.
References _entries, Common::ScopedPtrBase< T, Deallocator >::get(), Aurora::GFF4Struct::getList(), Aurora::GFF4Struct::hasField(), Aurora::GFF4FieldNamesEnum::kGFF4TalkStringID, Aurora::GFF4FieldNamesEnum::kGFF4TalkStringList, and Common::ScopedPtrBase< T, Deallocator >::release().
Referenced by load().
|
private |
Definition at line 122 of file talktable_gff.cpp.
References _entries, Common::ScopedPtrBase< T, Deallocator >::get(), Aurora::GFF4Struct::getList(), Aurora::GFF4Struct::hasField(), Aurora::GFF4FieldNamesEnum::kGFF4HuffTalkStringBitStream, Aurora::GFF4FieldNamesEnum::kGFF4HuffTalkStringHuffTree, Aurora::GFF4FieldNamesEnum::kGFF4HuffTalkStringID, Aurora::GFF4FieldNamesEnum::kGFF4HuffTalkStringList, and Common::ScopedPtrBase< T, Deallocator >::release().
Referenced by load().
|
private |
Definition at line 146 of file talktable_gff.cpp.
References _gff, kVersion02, kVersion04, kVersion05, readString02(), readString05(), and Aurora::TalkTable_GFF::Entry::strct.
Referenced by getString().
|
private |
Definition at line 160 of file talktable_gff.cpp.
References Aurora::TalkTable::_encoding, Aurora::GFF4Struct::getString(), Common::kEncodingInvalid, Aurora::GFF4FieldNamesEnum::kGFF4TalkString, Aurora::TalkTable_GFF::Entry::strct, and Aurora::TalkTable_GFF::Entry::text.
Referenced by readString().
|
private |
Definition at line 167 of file talktable_gff.cpp.
References _gff, Aurora::GFF4FieldNamesEnum::kGFF4HuffTalkStringBitStream, and Aurora::GFF4FieldNamesEnum::kGFF4HuffTalkStringHuffTree.
Referenced by readString().
|
private |
Definition at line 181 of file talktable_gff.cpp.
References Aurora::GFF4Struct::getUint(), Common::kEncodingUTF16LE, Aurora::GFF4FieldNamesEnum::kGFF4HuffTalkStringBitOffset, Common::SeekableSubReadStreamEndian::readSint32(), Common::readString(), Common::SeekableSubReadStreamEndian::readUint32(), Common::SeekableSubReadStream::seek(), Common::SeekableSubReadStream::size(), Aurora::TalkTable_GFF::Entry::strct, and Aurora::TalkTable_GFF::Entry::text.
|
mutableprivate |
Definition at line 88 of file talktable_gff.h.
Referenced by getString(), hasEntry(), load02(), and load05().
|
private |
Definition at line 86 of file talktable_gff.h.
Referenced by load(), readString(), and readString05().