38 namespace DragonAge2 {
42 using ::Aurora::GFF3File;
43 using ::Aurora::GFF3Struct;
46 using ::Aurora::GFF4File;
47 using ::Aurora::GFF4Struct;
155 float x, y, z, angle;
175 for (GFF3List::const_iterator v = varTable.begin(); v != varTable.end(); ++v) {
177 const uint8 type = (*v)->getUint (
"Type");
193 setVariable(name, (
float) (*v)->getDouble(
"Value"));
213 for (GFF4List::const_iterator v = varTable.begin(); v != varTable.end(); ++v) {
214 if (!*v || ((*v)->getLabel() !=
kVARSID))
221 if (name.
empty() || (type == 0) || !value || !value->hasField(0))
Handling version V3.2/V3.3 of BioWare's GFFs (generic file format).
virtual void show()
Show the object's model(s).
#define MKTAG(a0, a1, a2, a3)
A wrapper macro used around four character constants, like 'DATA', to ensure portability.
bool _usable
Is the object usable?
bool isUsable() const
Can the object be used by the PC?
A class holding an UTF-8 string.
virtual void enter()
The cursor entered the object.
virtual void setOrientation(float x, float y, float z, float angle)
Set the object's orientation.
const Aurora::LocString & getDescription() const
Return the object's description.
virtual void setPosition(float x, float y, float z)
Set the object's position within its area.
bool hasField(const Common::UString &field) const
Does this specific field exist?
bool isClickable() const
Can the player click the object?
Utility functions for generating unique IDs.
Common::UString _resRef
The object's resource reference.
An object in a Dragon Age II area.
bool _static
Is the object static?
ObjectType getType() const
Return the exact type of the object.
Common::UString _conversation
The object's default conversation.
float _orientation[4]
The object's orientation.
const Common::UString & getConversation() const
Return the object's default conversation (DLG).
std::vector< const GFF4Struct * > GFF4List
Handling version V4.0/V4.1 of BioWare's GFFs (generic file format).
Basic exceptions to throw.
const char * c_str() const
Return the (utf8 encoded) string data.
void setNonLocalizedName(const Common::UString &name)
Set the object's non-localized name.
Utility templates and functions.
virtual void getOrientation(float &x, float &y, float &z, float &angle) const
Return the object's orientation.
const std::list< uint32 > & getIDs() const
Return the object's model IDs.
bool hasField(uint32 field) const
Does this specific field exist?
bool empty() const
Is the string empty?
virtual void hide()
Hide the object's model(s).
virtual void highlight(bool enabled)
(Un)Highlight the object.
std::vector< const GFF3Struct * > GFF3List
const GFF3List & getList(const Common::UString &field) const
ObjectType
Object type, matches the bitfield in script.ldf.
const Common::UString & getNonLocalizedName() const
Return the object's non-localized name.
Common::UString _nonLocalizedName
The object's non-localized name.
static const uint32 kVARSID
ObjectType _type
The object's type.
const Common::UString & getResRef() const
Return the object's resource reference.
virtual void getPosition(float &x, float &y, float &z) const
Return the object's position within its area.
Aurora::LocString _name
The object's display name.
virtual void leave()
The cursor left the object.
Aurora::LocString _description
The object's description.
void setVariable(const Common::UString &var, const Variable &value)
virtual bool click(Object *triggerer=0)
The object was clicked.
const GFF4List & getList(uint32 field) const
const Aurora::LocString & getName() const
Return the object's name.
float _position[3]
The object's position.
void readVarTable(const Aurora::GFF3List &varTable)
uint32 generateIDNumber()
std::list< uint32 > _ids
The object's model IDs.
bool isStatic() const
Is the object static (not manipulable at all)?