46 _lastOpenedBy(0), _lastClosedBy(0), _lastUsedBy(0) {
110 _model->setPosition(x, y, z);
118 _model->setOrientation(x, y, z, angle);
173 float bearing = instance.
getDouble(
"Bearing");
212 if (portraitID != 0) {
216 if (!portrait.
empty())
virtual void loadAppearance()=0
Load appearance-specific properties.
Class to hold the two-dimensional array of a 2DA file.
void destroyTooltip()
Destroy all tooltips on this object.
Handling version V3.2/V3.3 of BioWare's GFFs (generic file format).
virtual void getOrientation(float &x, float &y, float &z, float &angle) const
Return the object's orientation.
virtual void setLocked(bool locked)
Lock/Unlock the situated object.
const Common::UString & getString(size_t column) const
Return the contents of a cell as a string.
void readScripts(const Aurora::GFF3Struct &gff)
bool getBool(const Common::UString &field, bool def=false) const
A class holding an UTF-8 string.
bool isClickable() const
Can the player click the object?
virtual void setOrientation(float x, float y, float z, float angle)
Set the object's orientation.
Object * getLastClosedBy() const
Return the object that last closed this situated object.
void reset(PointerType o=0)
Resets the pointer with the new value.
Situated(ObjectType type)
bool _locked
Is the situated object locked?
Object * getLastOpenedBy() const
Return the object that last opened this situated object.
Common::UString _name
The object's display name.
void load(const Aurora::GFF3Struct &instance, const Aurora::GFF3Struct *blueprint=0)
Load the situated object from an instance and its blueprint.
uint64 getUint(const Common::UString &field, uint64 def=0) const
Common::UString _soundClosed
The sound the object makes when closed.
Common::ScopedPtr< Graphics::Aurora::Model > _model
The situated object's model.
Basic exceptions to throw.
const char * c_str() const
Return the (utf8 encoded) string data.
std::list< uint32 > _ids
The object's model IDs.
virtual void getPosition(float &x, float &y, float &z) const
Return the object's position within its area.
void loadProperties(const Aurora::GFF3Struct &gff)
Utility templates and functions.
Common::UString _soundOpened
The sound the object makes when opened.
double getDouble(const Common::UString &field, double def=0.0) const
Handling BioWare's 2DAs (two-dimensional array).
void unloadModel()
Unload the situated object's model.
Common::ScopedPtr< Tooltip > _tooltip
The tooltip displayed over the object.
void setPosition(float x, float y, float z)
Set the situated object's position.
Common::UString _soundLocked
The sound the object makes when locked.
Common::UString _soundDestroyed
The sound the object makes when destroyed.
virtual void setPosition(float x, float y, float z)
Set the object's position within its area.
Common::UString _description
The object's description.
bool _static
Is the object static?
bool empty() const
Is the string empty?
#define TwoDAReg
Shortcut for accessing the 2da registry.
Object * _lastClosedBy
The object that last closed this situated object.
uint32 _appearanceID
The index within the situated appearance 2DA.
uint32 _soundAppType
The index within the situated sounds 2DA.
void warning(const char *s,...)
void setOrientation(float x, float y, float z, float angle)
Set the situated object's orientation.
Object * _lastUsedBy
The object that last used this situated object.
void loadPortrait(const Aurora::GFF3Struct &gff)
ObjectType
Object type, matches the bitfield in nwscript.nss.
Common::UString _portrait
The object's portrait.
Object * getLastUsedBy() const
Return the object that last used this situated object.
Object * _lastOpenedBy
The object that last opened this situated object.
const TwoDARow & getRow(size_t row) const
Get a row.
virtual void loadObject(const Aurora::GFF3Struct &gff)=0
Load object-specific properties.
bool isLocked() const
Is the situated object locked?
static const uint32 kFieldIDInvalid
bool _usable
Is the object usable?
Common::UString getString(const Common::UString &field, const Common::UString &def="") const
void loadModel()
Load the situated object's model.
static float rad2deg(float rad)
Generic Aurora engines utility functions.
A situated object in a Neverwinter Nights area.
Graphics::Aurora::Model * loadModelObject(const Common::UString &resref, const Common::UString &texture)
bool createTooltip(Tooltip::Type type)
Create an empty tooltip.
Common::UString _soundUsed
The sound the object makes when used.
Common::UString _conversation
The object's default conversation.
void hideTooltip()
Hide the tooltip again.
void show()
Show the situated object's model.
void hide()
Hide the situated object's model.
Common::UString _modelName
The model's resource name.
Generic Aurora engines model functions.