47 _lastOpenedBy(0), _lastClosedBy(0), _lastUsedBy(0) {
107 _model->setPosition(x, y, z);
115 _model->setOrientation(x, y, z, angle);
165 float bearing = instance.
getDouble(
"Bearing");
172 if (instance.
hasField(
"OrientationW")) {
173 rotX = instance.
getDouble(
"OrientationX");
174 rotY = instance.
getDouble(
"OrientationY");
175 rotZ = instance.
getDouble(
"OrientationZ");
Class to hold the two-dimensional array of a 2DA file.
void loadModel()
Load the situated object's model.
Handling version V3.2/V3.3 of BioWare's GFFs (generic file format).
Common::UString _soundUsed
The sound the object makes when used.
void load(const Aurora::GFF3Struct &instance, const Aurora::GFF3Struct *blueprint=0)
Load the situated object from an instance and its blueprint.
virtual void setPosition(float x, float y, float z)
Set the object's position within its area.
const Common::UString & getString(size_t column) const
Return the contents of a cell as a string.
bool getBool(const Common::UString &field, bool def=false) const
bool getLocString(const Common::UString &field, LocString &str) const
An object within a Witcher area.
void reset(PointerType o=0)
Resets the pointer with the new value.
Common::ScopedPtr< Graphics::Aurora::Model > _model
The situated object's model.
Object * getLastClosedBy() const
Return the object that last closed this situated object.
bool hasField(const Common::UString &field) const
Does this specific field exist?
A situated object in a The Witcher area.
void readScripts(const Aurora::GFF3Struct &gff)
uint64 getUint(const Common::UString &field, uint64 def=0) const
virtual void getPosition(float &x, float &y, float &z) const
Return the object's position within its area.
Common::UString _modelName
The model's resource name.
const Common::UString & getString(Language language, LanguageGender gender=kLanguageGenderCurrent) const
Get the string of that language.
bool _locked
Is the situated object locked?
bool isClickable() const
Can the player click the object?
Object * getLastOpenedBy() const
Return the object that last opened this situated object.
Object * _lastUsedBy
The object that last used this situated object.
Basic exceptions to throw.
const char * c_str() const
Return the (utf8 encoded) string data.
virtual void setLocked(bool locked)
Lock/Unlock the situated object.
virtual void getOrientation(float &x, float &y, float &z, float &angle) const
Return the object's orientation.
Utility templates and functions.
Common::UString _soundClosed
The sound the object makes when closed.
Aurora::LocString _description
The object's description.
uint32 _soundAppType
The index within the situated sounds 2DA.
double getDouble(const Common::UString &field, double def=0.0) const
Common::UString _soundDestroyed
The sound the object makes when destroyed.
Handling BioWare's 2DAs (two-dimensional array).
Common::UString _soundLocked
The sound the object makes when locked.
Common::UString _uniqueID
A globally unique ID.
bool empty() const
Is the string empty?
void loadProperties(const Aurora::GFF3Struct &gff)
#define TwoDAReg
Shortcut for accessing the 2da registry.
void setOrientation(float x, float y, float z, float angle)
Set the situated object's orientation.
void unloadModel()
Unload the situated object's model.
bool _static
Is the object static?
void warning(const char *s,...)
bool isLocked() const
Is the situated object locked?
Handling BioWare's localized strings.
virtual void refreshLocalized()
Refresh all localized strings.
bool _usable
Is the object usable?
void setPosition(float x, float y, float z)
Set the situated object's position.
virtual void setOrientation(float x, float y, float z, float angle)
Set the object's orientation.
Object * _lastOpenedBy
The object that last opened this situated object.
void show()
Show the situated object's model.
Object * _lastClosedBy
The object that last closed this situated object.
const TwoDARow & getRow(size_t row) const
Get a row.
Common::UString _soundOpened
The sound the object makes when opened.
static const uint32 kFieldIDInvalid
Common::UString _conversation
The object's default conversation.
Common::UString getString(const Common::UString &field, const Common::UString &def="") const
static float rad2deg(float rad)
Aurora::LocString _name
The object's name.
Generic Aurora engines utility functions.
Object * getLastUsedBy() const
Return the object that last used this situated object.
virtual void loadObject(const Aurora::GFF3Struct &gff)=0
Load object-specific properties.
Graphics::Aurora::Model * loadModelObject(const Common::UString &resref, const Common::UString &texture)
Situated(ObjectType type)
std::list< uint32 > _ids
The object's model IDs.
void hide()
Hide the situated object's model.
Generic Aurora engines model functions.