44 _appearanceID(0xFFFFFFFF) {
58 _model->setPosition(x, y, z);
66 _model->setOrientation(x, y, z, angle);
80 status(
"Placeable \"%s\" (\"%s\"): \"%s\"",
92 _model->drawBound(enabled);
109 load(placeable, utp ? &utp->getTopLevel() : 0);
152 const float position[3] = {
158 setPosition(position[0], position[1], position[2]);
163 const float orientation[4] = {
170 setOrientation(orientation[0], orientation[1], orientation[2], orientation[3]);
Handling version V3.2/V3.3 of BioWare's GFFs (generic file format).
A placeable object in a Dragon Age: Origins area.
#define MKTAG(a0, a1, a2, a3)
A wrapper macro used around four character constants, like 'DATA', to ensure portability.
Handling BioWare's GDAs (2DAs, two-dimensional array, within V4.0 GFFs).
void load(const Aurora::GFF3Struct &placeable)
bool getBool(const Common::UString &field, bool def=false) const
bool getLocString(const Common::UString &field, LocString &str) const
bool _static
Is the object static?
void reset(PointerType o=0)
Resets the pointer with the new value.
Common::ScopedPtr< Graphics::Aurora::Model > _model
The placeable's model.
bool hasField(const Common::UString &field) const
Does this specific field exist?
uint64 getUint(const Common::UString &field, uint64 def=0) const
size_t findRow(uint32 id) const
Find a row by its ID value.
Aurora::GFF3File * loadOptionalGFF3(const Common::UString &gff3, Aurora::FileType type, uint32 id, bool repairNWNPremium)
Load a GFF3, but return 0 instead of throwing on error.
Aurora::LocString _description
The object's description.
uint32 _appearanceID
The placeable's appearance; index into the Placeables MGDA.
void highlight(bool enabled)
(Un)Highlight the placeable.
void setPosition(float x, float y, float z)
Set the placeable's position.
const Aurora::GDAFile & getMGDA(uint32 id)
const Common::UString & getString(Language language, LanguageGender gender=kLanguageGenderCurrent) const
Get the string of that language.
bool click(Object *triggerer=0)
The placeable was clicked.
bool _usable
Is the object usable?
const char * c_str() const
Return the (utf8 encoded) string data.
Utility templates and functions.
double getDouble(const Common::UString &field, double def=0.0) const
Placeable template (user), GFF.
Dragon Age: Origins utility functions.
bool empty() const
Is the string empty?
virtual void getOrientation(float &x, float &y, float &z, float &angle) const
Return the object's orientation.
Common::UString _resRef
The object's resource reference.
void hide()
Hide the placeable's model.
Aurora::LocString _name
The object's display name.
void show()
Show the placeable's model.
void readVarTable(const Aurora::GFF3List &varTable)
void leave()
The cursor left the placeable.
Common::UString getString(size_t row, uint32 columnHash, const Common::UString &def="") const
std::list< uint32 > _ids
The object's model IDs.
Placeable(const Aurora::GFF3Struct &placeable)
Load from a placeable instance.
void loadProperties(const Aurora::GFF3Struct &gff)
virtual void setPosition(float x, float y, float z)
Set the object's position within its area.
void status(const char *s,...)
Common::UString getString(const Common::UString &field, const Common::UString &def="") const
void readScript(const Aurora::GFF3Struct &gff)
void setOrientation(float x, float y, float z, float angle)
Set the placeable's orientation.
static float rad2deg(float rad)
Generic Aurora engines utility functions.
bool isClickable() const
Can the player click the object?
Graphics::Aurora::Model * loadModelObject(const Common::UString &resref, const Common::UString &texture)
virtual void getPosition(float &x, float &y, float &z) const
Return the object's position within its area.
Common::UString _conversation
The object's default conversation.
bool runScript(EventType event, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference())
virtual void setOrientation(float x, float y, float z, float angle)
Set the object's orientation.
void enableEvents(bool enabled)
Enable/Disable the handling of all events.
void enter()
The cursor entered the placeable.
Class to hold the GFF'd two-dimensional array of a GDA file.
Generic Aurora engines model functions.