xoreos
0.0.5
|
#include <gff4file.h>
Classes | |
struct | Field |
A field in the GFF4 struct. More... | |
Public Types | |
enum | FieldType { kFieldTypeNone = - 1, kFieldTypeUint8 = 0, kFieldTypeSint8 = 1, kFieldTypeUint16 = 2, kFieldTypeSint16 = 3, kFieldTypeUint32 = 4, kFieldTypeSint32 = 5, kFieldTypeUint64 = 6, kFieldTypeSint64 = 7, kFieldTypeFloat32 = 8, kFieldTypeFloat64 = 9, kFieldTypeVector3f = 10, kFieldTypeVector4f = 12, kFieldTypeQuaternionf = 13, kFieldTypeString = 14, kFieldTypeColor4f = 15, kFieldTypeMatrix4x4f = 16, kFieldTypeTlkString = 17, kFieldTypeNDSFixed = 18, kFieldTypeASCIIString = 20, kFieldTypeStruct = 65534, kFieldTypeGeneric = 65535 } |
The type of a GFF4 field. More... | |
Public Member Functions | |
uint64 | getID () const |
Return the struct's unique ID within the GFF4. More... | |
uint32 | getRefCount () const |
Return the number of structs that refer to this struct. More... | |
uint32 | getLabel () const |
Return the struct's label. More... | |
size_t | getFieldCount () const |
Return the number of fields in this struct. More... | |
bool | hasField (uint32 field) const |
Does this specific field exist? More... | |
const std::vector< uint32 > & | getFieldLabels () const |
Return a list of all field labels in this struct. More... | |
FieldType | getFieldType (uint32 field) const |
Return the type of this field, or kFieldTypeNone if it doesn't exist. More... | |
FieldType | getFieldType (uint32 field, bool &isList) const |
Return the type of this field and whether it's list, or kFieldTypeNone if it doesn't exist. More... | |
bool | getFieldProperties (uint32 field, FieldType &type, uint32 &label, bool &isList) const |
Collectively return all field properties in one go. More... | |
uint64 | getUint (uint32 field, uint64 def=0) const |
int64 | getSint (uint32 field, int64 def=0) const |
bool | getBool (uint32 field, bool def=false) const |
double | getDouble (uint32 field, double def=0.0) const |
float | getFloat (uint32 field, float def=0.0f) const |
Common::UString | getString (uint32 field, Common::Encoding encoding, const Common::UString &def="") const |
Return a field string, read from the given encoding. More... | |
Common::UString | getString (uint32 field, const Common::UString &def="") const |
Return a field string, read from the default UTF-16LE encoding. More... | |
bool | getTalkString (uint32 field, Common::Encoding encoding, uint32 &strRef, Common::UString &str) const |
Return a talk string, which is a reference into the TalkTable and an optional direct string. More... | |
bool | getTalkString (uint32 field, uint32 &strRef, Common::UString &str) const |
Return a talk string, which is a reference into the TalkTable and an optional direct string. More... | |
bool | getVector3 (uint32 field, double &v1, double &v2, double &v3) const |
bool | getVector4 (uint32 field, double &v1, double &v2, double &v3, double &v4) const |
bool | getMatrix4x4 (uint32 field, double(&m)[16]) const |
bool | getVector3 (uint32 field, float &v1, float &v2, float &v3) const |
bool | getVector4 (uint32 field, float &v1, float &v2, float &v3, float &v4) const |
bool | getMatrix4x4 (uint32 field, float(&m)[16]) const |
bool | getVectorMatrix (uint32 field, std::vector< double > &vectorMatrix) const |
Return a field vector or a matrix type as a std::vector of doubles. More... | |
bool | getVectorMatrix (uint32 field, std::vector< float > &vectorMatrix) const |
Return a field vector or a matrix type as a std::vector of doubles. More... | |
bool | getMatrix4x4 (uint32 field, glm::mat4 &m) const |
bool | getUint (uint32 field, std::vector< uint64 > &list) const |
bool | getSint (uint32 field, std::vector< int64 > &list) const |
bool | getBool (uint32 field, std::vector< bool > &list) const |
bool | getDouble (uint32 field, std::vector< double > &list) const |
bool | getFloat (uint32 field, std::vector< float > &list) const |
bool | getString (uint32 field, Common::Encoding encoding, std::vector< Common::UString > &list) const |
Return field strings, read from the given encoding. More... | |
bool | getString (uint32 field, std::vector< Common::UString > &list) const |
Return field strings, read from the default UTF-16LE encoding. More... | |
bool | getTalkString (uint32 field, Common::Encoding encoding, std::vector< uint32 > &strRefs, std::vector< Common::UString > &strs) const |
Return field talk strings. More... | |
bool | getTalkString (uint32 field, std::vector< uint32 > &strRefs, std::vector< Common::UString > &strs) const |
Return field talk strings. More... | |
bool | getVectorMatrix (uint32 field, std::vector< std::vector< double > > &list) const |
Return field vector or a matrix types as std::vectors of doubles. More... | |
bool | getVectorMatrix (uint32 field, std::vector< std::vector< float > > &list) const |
Return field vector or a matrix types as std::vectors of floats. More... | |
bool | getMatrix4x4 (uint32 field, std::vector< glm::mat4 > &list) const |
const GFF4Struct * | getStruct (uint32 field) const |
const GFF4Struct * | getGeneric (uint32 field) const |
const GFF4List & | getList (uint32 field) const |
Common::SeekableReadStream * | getData (uint32 field) const |
Return the raw data of the field as a Seekable(Sub)ReadStream. More... | |
Private Types | |
typedef std::map< uint32, Field > | FieldMap |
Static Private Member Functions | |
static uint64 | generateID (uint32 offset, const GFF4File::StructTemplate *tmplt=0) |
Private Attributes | |
const GFF4File * | _parent |
uint32 | _label |
uint64 | _id |
uint32 | _refCount |
size_t | _fieldCount |
FieldMap | _fields |
std::vector< uint32 > | _fieldLabels |
The labels of all fields in this struct. More... | |
Friends | |
class | GFF4File |
Definition at line 204 of file gff4file.h.
|
private |
Definition at line 370 of file gff4file.h.
The type of a GFF4 field.
Definition at line 207 of file gff4file.h.
|
private |
Load a GFF4 struct.
Definition at line 374 of file gff4file.cpp.
References _id, generateID(), load(), Aurora::GFF4File::registerStruct(), and Aurora::GFF4File::unregisterStruct().
Referenced by loadGeneric(), and loadStructs().
Load a GFF4 generic as a struct.
Definition at line 390 of file gff4file.cpp.
References _id, generateID(), load(), Aurora::GFF4Struct::Field::offset, Aurora::GFF4File::registerStruct(), and Aurora::GFF4File::unregisterStruct().
|
private |
Definition at line 406 of file gff4file.cpp.
|
staticprivate |
Definition at line 556 of file gff4file.cpp.
References Aurora::GFF4File::StructTemplate::index.
Referenced by GFF4Struct(), loadGeneric(), and loadStructs().
bool Aurora::GFF4Struct::getBool | ( | uint32 | field, |
bool | def = false |
||
) | const |
Definition at line 921 of file gff4file.cpp.
References getUint().
bool Aurora::GFF4Struct::getBool | ( | uint32 | field, |
std::vector< bool > & | list | ||
) | const |
Definition at line 1182 of file gff4file.cpp.
References getField(), getListCount(), getUint(), and Aurora::GFF4Struct::Field::type.
Common::SeekableReadStream * Aurora::GFF4Struct::getData | ( | uint32 | field | ) | const |
Return the raw data of the field as a Seekable(Sub)ReadStream.
Dangerous.
Definition at line 1407 of file gff4file.cpp.
References getField(), getFieldSize(), getListCount(), Common::SeekableSubReadStream::pos(), Common::SeekableSubReadStream::size(), and Aurora::GFF4Struct::Field::type.
Referenced by getField(), and Graphics::Aurora::ModelNode_DragonAge::readMesh().
|
private |
Definition at line 638 of file gff4file.cpp.
References _parent, getDataOffset(), and Aurora::GFF4File::getStream().
Definition at line 618 of file gff4file.cpp.
References _parent, Aurora::GFF4File::getDataOffset(), Aurora::GFF4File::getStream(), and Common::SeekableSubReadStreamEndian::readUint32().
Referenced by getData(), getDataOffset(), load(), loadGeneric(), and loadStructs().
Definition at line 631 of file gff4file.cpp.
References getDataOffset(), Aurora::GFF4Struct::Field::isReference, kFieldTypeStruct, Aurora::GFF4Struct::Field::offset, and Aurora::GFF4Struct::Field::type.
double Aurora::GFF4Struct::getDouble | ( | uint32 | field, |
double | def = 0.0 |
||
) | const |
Definition at line 925 of file gff4file.cpp.
References getField(), Aurora::GFF4Struct::Field::isList, and Aurora::GFF4Struct::Field::type.
Referenced by getDouble(), Aurora::GDAFile::getFloat(), getMatrix4x4(), getVector3(), getVector4(), getVectorMatrix(), Engines::Sonic::Placeable::load(), and Aurora::TwoDAFile::load().
bool Aurora::GFF4Struct::getDouble | ( | uint32 | field, |
std::vector< double > & | list | ||
) | const |
Definition at line 1197 of file gff4file.cpp.
References getDouble(), getField(), getListCount(), and Aurora::GFF4Struct::Field::type.
|
private |
Definition at line 804 of file gff4file.cpp.
References kFieldTypeFloat32, kFieldTypeFloat64, kFieldTypeNDSFixed, Common::SeekableSubReadStreamEndian::readIEEEDouble(), Common::SeekableSubReadStreamEndian::readIEEEFloat(), readNintendoFixedPoint(), and Common::SeekableSubReadStreamEndian::readUint32().
|
private |
Definition at line 610 of file gff4file.cpp.
References _fields.
Referenced by getBool(), getData(), getDouble(), getField(), getFieldProperties(), getFieldType(), getFloat(), getGeneric(), getList(), getMatrix4x4(), getSint(), getString(), getStruct(), getTalkString(), getUint(), getVector3(), getVector4(), getVectorMatrix(), and hasField().
|
private |
Definition at line 646 of file gff4file.cpp.
References getData(), and getField().
size_t Aurora::GFF4Struct::getFieldCount | ( | ) | const |
Return the number of fields in this struct.
Definition at line 569 of file gff4file.cpp.
References _fieldCount.
const std::vector< uint32 > & Aurora::GFF4Struct::getFieldLabels | ( | ) | const |
Return a list of all field labels in this struct.
Definition at line 577 of file gff4file.cpp.
References _fieldLabels.
bool Aurora::GFF4Struct::getFieldProperties | ( | uint32 | field, |
FieldType & | type, | ||
uint32 & | label, | ||
bool & | isList | ||
) | const |
Collectively return all field properties in one go.
Definition at line 596 of file gff4file.cpp.
References getField(), Aurora::GFF4Struct::Field::isList, Aurora::GFF4Struct::Field::label, and Aurora::GFF4Struct::Field::type.
Definition at line 687 of file gff4file.cpp.
References kFieldTypeASCIIString, kFieldTypeColor4f, kFieldTypeFloat32, kFieldTypeFloat64, kFieldTypeMatrix4x4f, kFieldTypeQuaternionf, kFieldTypeSint16, kFieldTypeSint32, kFieldTypeSint64, kFieldTypeSint8, kFieldTypeString, kFieldTypeTlkString, kFieldTypeUint16, kFieldTypeUint32, kFieldTypeUint64, kFieldTypeUint8, kFieldTypeVector3f, and kFieldTypeVector4f.
Referenced by getData().
GFF4Struct::FieldType Aurora::GFF4Struct::getFieldType | ( | uint32 | field | ) | const |
Return the type of this field, or kFieldTypeNone if it doesn't exist.
Definition at line 581 of file gff4file.cpp.
GFF4Struct::FieldType Aurora::GFF4Struct::getFieldType | ( | uint32 | field, |
bool & | isList | ||
) | const |
Return the type of this field and whether it's list, or kFieldTypeNone if it doesn't exist.
Definition at line 586 of file gff4file.cpp.
References getField(), Aurora::GFF4Struct::Field::isList, kFieldTypeNone, and Aurora::GFF4Struct::Field::type.
float Aurora::GFF4Struct::getFloat | ( | uint32 | field, |
float | def = 0.0f |
||
) | const |
Definition at line 937 of file gff4file.cpp.
References getField(), Aurora::GFF4Struct::Field::isList, and Aurora::GFF4Struct::Field::type.
Referenced by getFloat(), getMatrix4x4(), getVector3(), getVector4(), and getVectorMatrix().
bool Aurora::GFF4Struct::getFloat | ( | uint32 | field, |
std::vector< float > & | list | ||
) | const |
Definition at line 1212 of file gff4file.cpp.
References getField(), getFloat(), getListCount(), and Aurora::GFF4Struct::Field::type.
|
private |
Definition at line 822 of file gff4file.cpp.
References kFieldTypeFloat32, kFieldTypeFloat64, kFieldTypeNDSFixed, Common::SeekableSubReadStreamEndian::readIEEEDouble(), Common::SeekableSubReadStreamEndian::readIEEEFloat(), readNintendoFixedPoint(), and Common::SeekableSubReadStreamEndian::readUint32().
const GFF4Struct * Aurora::GFF4Struct::getGeneric | ( | uint32 | field | ) | const |
Definition at line 1378 of file gff4file.cpp.
References getField(), kFieldTypeGeneric, Aurora::GFF4Struct::Field::structs, and Aurora::GFF4Struct::Field::type.
Referenced by Graphics::Aurora::Model_DragonAge::load().
uint64 Aurora::GFF4Struct::getID | ( | ) | const |
Return the struct's unique ID within the GFF4.
Definition at line 409 of file gff4file.cpp.
References _id.
uint32 Aurora::GFF4Struct::getLabel | ( | ) | const |
Return the struct's label.
The label is a (non-unique) 4-byte value, most often consisting of upper-case letters ([A-Z]), that can sometimes be used to identify the higher-level meaning of a struct within a GFF4.
It is read as a big-endian 32-bit integer value. See the MKTAG() macro, as defined in src/common/endianness.h, for generating values to compare it against.
The purpose of the label in a GFF4 struct is comparable to the ID in a GFF3 struct.
Definition at line 417 of file gff4file.cpp.
References _label.
Definition at line 1394 of file gff4file.cpp.
References getField(), kFieldTypeStruct, Aurora::GFF4Struct::Field::structs, and Aurora::GFF4Struct::Field::type.
Referenced by Aurora::GDAFile::add(), Aurora::GDAFile::load(), Aurora::TalkTable_GFF::load02(), Aurora::TalkTable_GFF::load05(), Engines::Sonic::Area::loadLayout(), Engines::DragonAge::Object::readVarTable(), and Engines::DragonAge2::Object::readVarTable().
|
private |
Definition at line 674 of file gff4file.cpp.
References _parent, Aurora::GFF4File::getDataOffset(), Aurora::GFF4Struct::Field::isList, Common::SeekableSubReadStreamEndian::readUint32(), and Common::SeekableSubReadStream::seek().
Referenced by getBool(), getData(), getDouble(), getFloat(), getMatrix4x4(), getSint(), getString(), getTalkString(), getUint(), getVectorMatrix(), and loadStructs().
bool Aurora::GFF4Struct::getMatrix4x4 | ( | uint32 | field, |
double(&) | m[16] | ||
) | const |
Definition at line 1073 of file gff4file.cpp.
References getDouble(), getField(), getVectorMatrixLength(), Aurora::GFF4Struct::Field::isList, and kFieldTypeFloat32.
Referenced by getMatrix4x4().
bool Aurora::GFF4Struct::getMatrix4x4 | ( | uint32 | field, |
float(&) | m[16] | ||
) | const |
Definition at line 1089 of file gff4file.cpp.
References getField(), getFloat(), getVectorMatrixLength(), Aurora::GFF4Struct::Field::isList, and kFieldTypeFloat32.
bool Aurora::GFF4Struct::getMatrix4x4 | ( | uint32 | field, |
glm::mat4 & | m | ||
) | const |
Definition at line 1105 of file gff4file.cpp.
References getMatrix4x4().
bool Aurora::GFF4Struct::getMatrix4x4 | ( | uint32 | field, |
std::vector< glm::mat4 > & | list | ||
) | const |
Definition at line 1336 of file gff4file.cpp.
References getField(), getFloat(), getListCount(), getVectorMatrixLength(), and kFieldTypeFloat32.
uint32 Aurora::GFF4Struct::getRefCount | ( | ) | const |
Return the number of structs that refer to this struct.
Definition at line 413 of file gff4file.cpp.
References _refCount.
Definition at line 909 of file gff4file.cpp.
References getField(), Aurora::GFF4Struct::Field::isList, and Aurora::GFF4Struct::Field::type.
Referenced by Aurora::GDAFile::getInt(), getSint(), and Aurora::TwoDAFile::load().
Definition at line 1167 of file gff4file.cpp.
References getField(), getListCount(), getSint(), and Aurora::GFF4Struct::Field::type.
|
private |
Definition at line 771 of file gff4file.cpp.
References kFieldTypeSint16, kFieldTypeSint32, kFieldTypeSint64, kFieldTypeSint8, kFieldTypeUint16, kFieldTypeUint32, kFieldTypeUint64, kFieldTypeUint8, Common::ReadStream::readByte(), Common::ReadStream::readSByte(), Common::SeekableSubReadStreamEndian::readSint16(), Common::SeekableSubReadStreamEndian::readSint32(), Common::SeekableSubReadStreamEndian::readSint64(), Common::SeekableSubReadStreamEndian::readUint16(), Common::SeekableSubReadStreamEndian::readUint32(), and Common::SeekableSubReadStreamEndian::readUint64().
Common::UString Aurora::GFF4Struct::getString | ( | uint32 | field, |
Common::Encoding | encoding, | ||
const Common::UString & | def = "" |
||
) | const |
Return a field string, read from the given encoding.
Definition at line 949 of file gff4file.cpp.
References getField(), and Aurora::GFF4Struct::Field::isList.
Referenced by Aurora::GDAFile::getString(), getString(), getTalkString(), Engines::Sonic::Placeable::load(), Aurora::TwoDAFile::load(), Engines::Sonic::Area::loadLayout(), Engines::DragonAge::ScriptContainer::readScript(), Engines::DragonAge2::ScriptContainer::readScript(), and Aurora::TalkTable_GFF::readString02().
Common::UString Aurora::GFF4Struct::getString | ( | uint32 | field, |
const Common::UString & | def = "" |
||
) | const |
Return a field string, read from the default UTF-16LE encoding.
Definition at line 963 of file gff4file.cpp.
References _parent, Aurora::GFF4File::getNativeEncoding(), and getString().
bool Aurora::GFF4Struct::getString | ( | uint32 | field, |
Common::Encoding | encoding, | ||
std::vector< Common::UString > & | list | ||
) | const |
Return field strings, read from the given encoding.
Definition at line 1227 of file gff4file.cpp.
References getField(), getListCount(), getString(), and Aurora::GFF4Struct::Field::isList.
bool Aurora::GFF4Struct::getString | ( | uint32 | field, |
std::vector< Common::UString > & | list | ||
) | const |
Return field strings, read from the default UTF-16LE encoding.
Definition at line 1250 of file gff4file.cpp.
References _parent, Aurora::GFF4File::getNativeEncoding(), and getString().
|
private |
Definition at line 840 of file gff4file.cpp.
References Common::UString::format(), Common::getBytesPerCodepoint(), Common::kEncodingUTF8, Common::SeekableSubReadStream::pos(), Common::readStringFixed(), and Common::SeekableSubReadStreamEndian::readUint32().
|
private |
Definition at line 858 of file gff4file.cpp.
References getString(), and Common::SeekableSubReadStream::seek().
|
private |
Definition at line 870 of file gff4file.cpp.
References _parent, Aurora::GFF4File::getDataOffset(), Aurora::GFF4File::getSharedString(), getString(), Aurora::GFF4File::hasSharedStrings(), Aurora::GFF4Struct::Field::isGeneric, Common::kEncodingASCII, kFieldTypeASCIIString, kFieldTypeString, Common::SeekableSubReadStream::pos(), Common::SeekableSubReadStreamEndian::readUint32(), and Aurora::GFF4Struct::Field::type.
const GFF4Struct * Aurora::GFF4Struct::getStruct | ( | uint32 | field | ) | const |
Definition at line 1360 of file gff4file.cpp.
References getField(), Aurora::GFF4Struct::Field::isList, kFieldTypeStruct, Aurora::GFF4Struct::Field::structs, and Aurora::GFF4Struct::Field::type.
bool Aurora::GFF4Struct::getTalkString | ( | uint32 | field, |
Common::Encoding | encoding, | ||
uint32 & | strRef, | ||
Common::UString & | str | ||
) | const |
Return a talk string, which is a reference into the TalkTable and an optional direct string.
Definition at line 967 of file gff4file.cpp.
References _parent, Common::UString::clear(), Aurora::GFF4File::getDataOffset(), getField(), Aurora::GFF4File::getSharedString(), getString(), getUint(), Aurora::GFF4File::hasSharedStrings(), Aurora::GFF4Struct::Field::isList, kFieldTypeTlkString, kFieldTypeUint32, and Aurora::GFF4Struct::Field::type.
Referenced by getTalkString().
bool Aurora::GFF4Struct::getTalkString | ( | uint32 | field, |
uint32 & | strRef, | ||
Common::UString & | str | ||
) | const |
Return a talk string, which is a reference into the TalkTable and an optional direct string.
Definition at line 995 of file gff4file.cpp.
References _parent, Aurora::GFF4File::getNativeEncoding(), and getTalkString().
bool Aurora::GFF4Struct::getTalkString | ( | uint32 | field, |
Common::Encoding | encoding, | ||
std::vector< uint32 > & | strRefs, | ||
std::vector< Common::UString > & | strs | ||
) | const |
Return field talk strings.
Definition at line 1254 of file gff4file.cpp.
References _parent, Aurora::GFF4File::getDataOffset(), getField(), getListCount(), Aurora::GFF4File::getSharedString(), getString(), getUint(), Aurora::GFF4File::hasSharedStrings(), kFieldTypeTlkString, kFieldTypeUint32, and Aurora::GFF4Struct::Field::type.
bool Aurora::GFF4Struct::getTalkString | ( | uint32 | field, |
std::vector< uint32 > & | strRefs, | ||
std::vector< Common::UString > & | strs | ||
) | const |
Return field talk strings.
Definition at line 1290 of file gff4file.cpp.
References _parent, Aurora::GFF4File::getNativeEncoding(), and getTalkString().
Definition at line 897 of file gff4file.cpp.
References getField(), Aurora::GFF4Struct::Field::isList, and Aurora::GFF4Struct::Field::type.
Referenced by getBool(), getTalkString(), getUint(), Engines::Sonic::Placeable::load(), Aurora::TwoDAFile::load(), and Aurora::TalkTable_GFF::readString05().
Definition at line 1152 of file gff4file.cpp.
References getField(), getListCount(), getUint(), and Aurora::GFF4Struct::Field::type.
|
private |
Definition at line 738 of file gff4file.cpp.
References kFieldTypeSint16, kFieldTypeSint32, kFieldTypeSint64, kFieldTypeSint8, kFieldTypeUint16, kFieldTypeUint32, kFieldTypeUint64, kFieldTypeUint8, Common::ReadStream::readByte(), Common::ReadStream::readSByte(), Common::SeekableSubReadStreamEndian::readSint16(), Common::SeekableSubReadStreamEndian::readSint32(), Common::SeekableSubReadStreamEndian::readSint64(), Common::SeekableSubReadStreamEndian::readUint16(), Common::SeekableSubReadStreamEndian::readUint32(), and Common::SeekableSubReadStreamEndian::readUint64().
bool Aurora::GFF4Struct::getVector3 | ( | uint32 | field, |
double & | v1, | ||
double & | v2, | ||
double & | v3 | ||
) | const |
Definition at line 999 of file gff4file.cpp.
References getDouble(), getField(), getVectorMatrixLength(), Aurora::GFF4Struct::Field::isList, and kFieldTypeFloat32.
Referenced by Engines::Sonic::Placeable::load().
bool Aurora::GFF4Struct::getVector3 | ( | uint32 | field, |
float & | v1, | ||
float & | v2, | ||
float & | v3 | ||
) | const |
Definition at line 1017 of file gff4file.cpp.
References getField(), getFloat(), getVectorMatrixLength(), Aurora::GFF4Struct::Field::isList, and kFieldTypeFloat32.
bool Aurora::GFF4Struct::getVector4 | ( | uint32 | field, |
double & | v1, | ||
double & | v2, | ||
double & | v3, | ||
double & | v4 | ||
) | const |
Definition at line 1035 of file gff4file.cpp.
References getDouble(), getField(), getVectorMatrixLength(), Aurora::GFF4Struct::Field::isList, and kFieldTypeFloat32.
bool Aurora::GFF4Struct::getVector4 | ( | uint32 | field, |
float & | v1, | ||
float & | v2, | ||
float & | v3, | ||
float & | v4 | ||
) | const |
Definition at line 1054 of file gff4file.cpp.
References getField(), getFloat(), getVectorMatrixLength(), Aurora::GFF4Struct::Field::isList, and kFieldTypeFloat32.
bool Aurora::GFF4Struct::getVectorMatrix | ( | uint32 | field, |
std::vector< double > & | vectorMatrix | ||
) | const |
Return a field vector or a matrix type as a std::vector of doubles.
Definition at line 1114 of file gff4file.cpp.
References getDouble(), getField(), getVectorMatrixLength(), Aurora::GFF4Struct::Field::isList, and kFieldTypeFloat32.
bool Aurora::GFF4Struct::getVectorMatrix | ( | uint32 | field, |
std::vector< float > & | vectorMatrix | ||
) | const |
Return a field vector or a matrix type as a std::vector of doubles.
Definition at line 1132 of file gff4file.cpp.
References getField(), getFloat(), getVectorMatrixLength(), Aurora::GFF4Struct::Field::isList, and kFieldTypeFloat32.
bool Aurora::GFF4Struct::getVectorMatrix | ( | uint32 | field, |
std::vector< std::vector< double > > & | list | ||
) | const |
Return field vector or a matrix types as std::vectors of doubles.
Definition at line 1296 of file gff4file.cpp.
References getDouble(), getField(), getListCount(), getVectorMatrixLength(), and kFieldTypeFloat32.
bool Aurora::GFF4Struct::getVectorMatrix | ( | uint32 | field, |
std::vector< std::vector< float > > & | list | ||
) | const |
Return field vector or a matrix types as std::vectors of floats.
Definition at line 1316 of file gff4file.cpp.
References getField(), getFloat(), getListCount(), getVectorMatrixLength(), and kFieldTypeFloat32.
|
private |
Definition at line 653 of file gff4file.cpp.
References kFieldTypeColor4f, kFieldTypeMatrix4x4f, kFieldTypeQuaternionf, kFieldTypeVector3f, kFieldTypeVector4f, and Aurora::GFF4Struct::Field::type.
Referenced by getMatrix4x4(), getVector3(), getVector4(), and getVectorMatrix().
bool Aurora::GFF4Struct::hasField | ( | uint32 | field | ) | const |
Does this specific field exist?
Definition at line 573 of file gff4file.cpp.
References getField().
Referenced by Engines::Sonic::Placeable::load(), Aurora::TalkTable_GFF::load02(), Aurora::TalkTable_GFF::load05(), Engines::Sonic::Area::loadLayout(), Engines::DragonAge::Object::readVarTable(), and Engines::DragonAge2::Object::readVarTable().
|
private |
Definition at line 423 of file gff4file.cpp.
References _fieldCount, _fieldLabels, _fields, Aurora::GFF4File::StructTemplate::fields, Aurora::GFF4File::StructTemplate::Field::flags, Aurora::GFF4File::hasSharedStrings(), kFieldTypeASCIIString, kFieldTypeGeneric, kFieldTypeStruct, Aurora::GFF4File::StructTemplate::Field::label, loadGeneric(), loadStructs(), Aurora::GFF4File::StructTemplate::Field::offset, Aurora::GFF4File::StructTemplate::Field::type, and Aurora::GFF4Struct::Field::type.
Referenced by GFF4Struct().
Definition at line 514 of file gff4file.cpp.
References _fieldCount, _fieldLabels, _fields, getDataOffset(), Aurora::GFF4File::getStream(), Aurora::GFF4File::hasSharedStrings(), Aurora::GFF4Struct::Field::isList, Aurora::GFF4Struct::Field::isReference, kFieldTypeASCIIString, kFieldTypeGeneric, kFieldTypeStruct, loadStructs(), Aurora::GFF4Struct::Field::offset, Common::SeekableSubReadStream::pos(), Common::SeekableSubReadStreamEndian::readUint32(), Common::SeekableSubReadStream::seek(), and Aurora::GFF4Struct::Field::type.
Definition at line 498 of file gff4file.cpp.
References _refCount, Aurora::GFF4File::findStruct(), generateID(), getDataOffset(), GFF4Struct(), Aurora::GFF4Struct::Field::isList, Aurora::GFF4Struct::Field::offset, and Aurora::GFF4Struct::Field::structs.
Referenced by load().
Definition at line 455 of file gff4file.cpp.
References _refCount, Aurora::GFF4File::findStruct(), generateID(), getDataOffset(), getListCount(), Aurora::GFF4File::getStream(), Aurora::GFF4File::getStructTemplate(), GFF4Struct(), Aurora::GFF4Struct::Field::isReference, Aurora::GFF4Struct::Field::offset, Common::SeekableSubReadStream::pos(), Aurora::GFF4File::StructTemplate::size, Aurora::GFF4Struct::Field::structIndex, and Aurora::GFF4Struct::Field::structs.
Referenced by load().
|
friend |
Definition at line 434 of file gff4file.h.
|
private |
Definition at line 380 of file gff4file.h.
Referenced by getFieldCount(), and load().
|
private |
The labels of all fields in this struct.
Definition at line 385 of file gff4file.h.
Referenced by getFieldLabels(), and load().
|
private |
Definition at line 382 of file gff4file.h.
Referenced by getField(), and load().
|
private |
Definition at line 377 of file gff4file.h.
Referenced by getID(), and GFF4Struct().
|
private |
Definition at line 375 of file gff4file.h.
Referenced by getLabel().
|
private |
Definition at line 373 of file gff4file.h.
Referenced by getData(), getDataOffset(), getListCount(), getString(), and getTalkString().
|
private |
Definition at line 378 of file gff4file.h.
Referenced by getRefCount(), loadGeneric(), Aurora::GFF4File::loadStructs(), and loadStructs().