xoreos  0.0.5
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Aurora::TalkTable_GFF Class Reference

Loading BioWare's GFF'd talk tables. More...

#include <talktable_gff.h>

Inheritance diagram for Aurora::TalkTable_GFF:
Inheritance graph
[legend]
Collaboration diagram for Aurora::TalkTable_GFF:
Collaboration graph
[legend]

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::UStringgetString (uint32 strRef) const
 
const Common::UStringgetSoundResRef (uint32 strRef) const
 
uint32 getSoundID (uint32 strRef) const
 
- Public Member Functions inherited from Aurora::TalkTable
virtual ~TalkTable ()
 

Private Types

typedef Common::PtrMap< uint32, EntryEntries
 

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 TalkTableload (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
 

Detailed Description

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.

Member Typedef Documentation

◆ Entries

Definition at line 83 of file talktable_gff.h.

Constructor & Destructor Documentation

◆ TalkTable_GFF()

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().

Here is the call graph for this function:

◆ ~TalkTable_GFF()

Aurora::TalkTable_GFF::~TalkTable_GFF ( )

Definition at line 51 of file talktable_gff.cpp.

Member Function Documentation

◆ getSoundID()

uint32 Aurora::TalkTable_GFF::getSoundID ( uint32  strRef) const
virtual

Implements Aurora::TalkTable.

Definition at line 73 of file talktable_gff.cpp.

References Aurora::kFieldIDInvalid.

◆ getSoundResRef()

const Common::UString & Aurora::TalkTable_GFF::getSoundResRef ( uint32  strRef) const
virtual

Implements Aurora::TalkTable.

Definition at line 69 of file talktable_gff.cpp.

References Aurora::kEmptyString.

◆ getString()

const Common::UString & Aurora::TalkTable_GFF::getString ( uint32  strRef) const
virtual

Implements Aurora::TalkTable.

Definition at line 59 of file talktable_gff.cpp.

References _entries, Aurora::kEmptyString, and readString().

Here is the call graph for this function:

◆ hasEntry()

bool Aurora::TalkTable_GFF::hasEntry ( uint32  strRef) const
virtual

Implements Aurora::TalkTable.

Definition at line 54 of file talktable_gff.cpp.

References _entries.

◆ load()

void Aurora::TalkTable_GFF::load ( Common::SeekableReadStream tlk)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load02()

void Aurora::TalkTable_GFF::load02 ( const GFF4Struct top)
private

◆ load05()

void Aurora::TalkTable_GFF::load05 ( const GFF4Struct top)
private

◆ readString()

void Aurora::TalkTable_GFF::readString ( Entry entry) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readString02()

void Aurora::TalkTable_GFF::readString02 ( Entry entry) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readString05() [1/2]

void Aurora::TalkTable_GFF::readString05 ( Entry entry,
bool  bigEndian 
) const
private

Definition at line 167 of file talktable_gff.cpp.

References _gff, Aurora::GFF4FieldNamesEnum::kGFF4HuffTalkStringBitStream, and Aurora::GFF4FieldNamesEnum::kGFF4HuffTalkStringHuffTree.

Referenced by readString().

Here is the caller graph for this function:

◆ readString05() [2/2]

void Aurora::TalkTable_GFF::readString05 ( Common::SeekableSubReadStreamEndian huffTree,
Common::SeekableSubReadStreamEndian bitStream,
Entry entry 
) const
private

Member Data Documentation

◆ _entries

Entries Aurora::TalkTable_GFF::_entries
mutableprivate

Definition at line 88 of file talktable_gff.h.

Referenced by getString(), hasEntry(), load02(), and load05().

◆ _gff

Common::ScopedPtr<GFF4File> Aurora::TalkTable_GFF::_gff
private

Definition at line 86 of file talktable_gff.h.

Referenced by load(), readString(), and readString05().


The documentation for this class was generated from the following files: