xoreos  0.0.5
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Engines::DragonAge2::Object Class Reference

#include <object.h>

Inheritance diagram for Engines::DragonAge2::Object:
Inheritance graph
[legend]
Collaboration diagram for Engines::DragonAge2::Object:
Collaboration graph
[legend]

Public Member Functions

 Object (ObjectType type=kObjectTypeInvalid)
 
virtual ~Object ()
 
ObjectType getType () const
 Return the exact type of the object. More...
 
virtual void show ()
 Show the object's model(s). More...
 
virtual void hide ()
 Hide the object's model(s). More...
 
const std::list< uint32 > & getIDs () const
 Return the object's model IDs. More...
 
const Common::UStringgetResRef () const
 Return the object's resource reference. More...
 
const Aurora::LocStringgetName () const
 Return the object's name. More...
 
const Aurora::LocStringgetDescription () const
 Return the object's description. More...
 
const Common::UStringgetConversation () const
 Return the object's default conversation (DLG). More...
 
const Common::UStringgetNonLocalizedName () const
 Return the object's non-localized name. More...
 
void setNonLocalizedName (const Common::UString &name)
 Set the object's non-localized name. More...
 
bool isStatic () const
 Is the object static (not manipulable at all)? More...
 
bool isUsable () const
 Can the object be used by the PC? More...
 
bool isClickable () const
 Can the player click the object? More...
 
virtual void getPosition (float &x, float &y, float &z) const
 Return the object's position within its area. More...
 
virtual void getOrientation (float &x, float &y, float &z, float &angle) const
 Return the object's orientation. More...
 
virtual void setPosition (float x, float y, float z)
 Set the object's position within its area. More...
 
virtual void setOrientation (float x, float y, float z, float angle)
 Set the object's orientation. More...
 
virtual void enter ()
 The cursor entered the object. More...
 
virtual void leave ()
 The cursor left the object. More...
 
virtual void highlight (bool enabled)
 (Un)Highlight the object. More...
 
virtual bool click (Object *triggerer=0)
 The object was clicked. More...
 
- Public Member Functions inherited from Aurora::NWScript::Object
 Object ()
 
uint32 getID () const
 
const Common::UStringgetTag () const
 
- Public Member Functions inherited from Aurora::NWScript::VariableContainer
 VariableContainer ()
 
virtual ~VariableContainer ()
 
bool hasVariable (const Common::UString &var) const
 
VariablegetVariable (const Common::UString &var, Type type=kTypeVoid)
 
const VariablegetVariable (const Common::UString &var) const
 
void setVariable (const Common::UString &var, const Variable &value)
 
void removeVariable (const Common::UString &var)
 
void clearVariables ()
 
- Public Member Functions inherited from Engines::DragonAge2::ScriptContainer
 ScriptContainer ()
 
 ~ScriptContainer ()
 
const Common::UStringgetScript () const
 
bool hasScript () const
 
void enableEvent (EventType event, bool enabled)
 Enable/Disable the handling of a specific event. More...
 
void enableEvents (bool enabled)
 Enable/Disable the handling of all events. More...
 
bool runScript (EventType event, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference())
 
bool runScript (Event &event)
 

Protected Member Functions

void syncPosition ()
 
void syncOrientation ()
 
void readVarTable (const Aurora::GFF3List &varTable)
 
void readVarTable (const Aurora::GFF3Struct &gff)
 
void readVarTable (const Aurora::GFF4List &varTable)
 
void readVarTable (const Aurora::GFF4Struct &gff)
 
- Protected Member Functions inherited from Engines::DragonAge2::ScriptContainer
void clearScript ()
 
void readScript (const Aurora::GFF3Struct &gff)
 
void readScript (const Aurora::GFF4Struct &gff)
 

Protected Attributes

ObjectType _type
 The object's type. More...
 
Common::UString _resRef
 The object's resource reference. More...
 
Aurora::LocString _name
 The object's display name. More...
 
Aurora::LocString _description
 The object's description. More...
 
Common::UString _nonLocalizedName
 The object's non-localized name. More...
 
Common::UString _conversation
 The object's default conversation. More...
 
Common::UString _soundSet
 The object's sound set. More...
 
bool _static
 Is the object static? More...
 
bool _usable
 Is the object usable? More...
 
std::list< uint32_ids
 The object's model IDs. More...
 
float _position [3]
 The object's position. More...
 
float _orientation [4]
 The object's orientation. More...
 
- Protected Attributes inherited from Aurora::NWScript::Object
uint32 _id
 
Common::UString _tag
 

Additional Inherited Members

- Static Public Member Functions inherited from Engines::DragonAge2::ScriptContainer
static bool runScript (const Common::UString &script, EventType event, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference())
 
static bool runScript (const Common::UString &script, EventType event, const Aurora::NWScript::ScriptState &state, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference())
 
static bool runScript (const Common::UString &script, Event &event)
 
static bool runScript (const Common::UString &script, Event &event, const Aurora::NWScript::ScriptState &state)
 

Detailed Description

Definition at line 46 of file object.h.

Constructor & Destructor Documentation

◆ Object()

Engines::DragonAge2::Object::Object ( ObjectType  type = kObjectTypeInvalid)

Definition at line 52 of file object.cpp.

References Aurora::NWScript::Object::_id, _orientation, _position, Common::generateIDNumber(), and ObjectMan.

Here is the call graph for this function:

◆ ~Object()

Engines::DragonAge2::Object::~Object ( )
virtual

Reimplemented from Aurora::NWScript::Object.

Definition at line 66 of file object.cpp.

References ObjectMan.

Member Function Documentation

◆ click()

bool Engines::DragonAge2::Object::click ( Object triggerer = 0)
virtual

The object was clicked.

Reimplemented in Engines::DragonAge2::Creature, and Engines::DragonAge2::Placeable.

Definition at line 170 of file object.cpp.

Referenced by Engines::DragonAge2::Area::click().

Here is the caller graph for this function:

◆ enter()

void Engines::DragonAge2::Object::enter ( )
virtual

The cursor entered the object.

Reimplemented in Engines::DragonAge2::Creature, and Engines::DragonAge2::Placeable.

Definition at line 161 of file object.cpp.

Referenced by Engines::DragonAge2::Area::setActive().

Here is the caller graph for this function:

◆ getConversation()

const Common::UString & Engines::DragonAge2::Object::getConversation ( ) const

Return the object's default conversation (DLG).

Definition at line 104 of file object.cpp.

References _conversation.

◆ getDescription()

const Aurora::LocString & Engines::DragonAge2::Object::getDescription ( ) const

Return the object's description.

Definition at line 92 of file object.cpp.

References _description.

◆ getIDs()

const std::list< uint32 > & Engines::DragonAge2::Object::getIDs ( ) const

Return the object's model IDs.

Definition at line 80 of file object.cpp.

References _ids.

◆ getName()

const Aurora::LocString & Engines::DragonAge2::Object::getName ( ) const

Return the object's name.

Definition at line 88 of file object.cpp.

References _name.

◆ getNonLocalizedName()

const Common::UString & Engines::DragonAge2::Object::getNonLocalizedName ( ) const

Return the object's non-localized name.

The non-localized name has a higher priority than the default, localized name.

Definition at line 96 of file object.cpp.

References _nonLocalizedName.

◆ getOrientation()

void Engines::DragonAge2::Object::getOrientation ( float &  x,
float &  y,
float &  z,
float &  angle 
) const
virtual

Return the object's orientation.

Definition at line 126 of file object.cpp.

References _orientation.

Referenced by Engines::DragonAge2::Placeable::setOrientation(), Engines::DragonAge2::Creature::setOrientation(), and syncOrientation().

Here is the caller graph for this function:

◆ getPosition()

void Engines::DragonAge2::Object::getPosition ( float &  x,
float &  y,
float &  z 
) const
virtual

◆ getResRef()

const Common::UString & Engines::DragonAge2::Object::getResRef ( ) const

Return the object's resource reference.

Definition at line 84 of file object.cpp.

References _resRef.

◆ getType()

ObjectType Engines::DragonAge2::Object::getType ( ) const

Return the exact type of the object.

Definition at line 70 of file object.cpp.

References _type.

Referenced by Engines::DragonAge2::Functions::getNearestObject(), Engines::DragonAge2::Functions::getNearestObjectByTag(), Engines::DragonAge2::Functions::getObjectType(), and Engines::DragonAge2::Functions::getParamObject().

Here is the caller graph for this function:

◆ hide()

void Engines::DragonAge2::Object::hide ( )
virtual

Hide the object's model(s).

Reimplemented in Engines::DragonAge2::Area, Engines::DragonAge2::Creature, and Engines::DragonAge2::Placeable.

Definition at line 77 of file object.cpp.

◆ highlight()

void Engines::DragonAge2::Object::highlight ( bool  enabled)
virtual

(Un)Highlight the object.

Reimplemented in Engines::DragonAge2::Creature, and Engines::DragonAge2::Placeable.

Definition at line 167 of file object.cpp.

◆ isClickable()

bool Engines::DragonAge2::Object::isClickable ( ) const

Can the player click the object?

Definition at line 116 of file object.cpp.

References _static, and _usable.

Referenced by Engines::DragonAge2::Placeable::load().

Here is the caller graph for this function:

◆ isStatic()

bool Engines::DragonAge2::Object::isStatic ( ) const

Is the object static (not manipulable at all)?

Definition at line 108 of file object.cpp.

References _static.

Referenced by Engines::DragonAge2::Area::loadObject().

Here is the caller graph for this function:

◆ isUsable()

bool Engines::DragonAge2::Object::isUsable ( ) const

Can the object be used by the PC?

Definition at line 112 of file object.cpp.

References _usable.

◆ leave()

void Engines::DragonAge2::Object::leave ( )
virtual

The cursor left the object.

Reimplemented in Engines::DragonAge2::Campaign, Engines::DragonAge2::Creature, and Engines::DragonAge2::Placeable.

Definition at line 164 of file object.cpp.

Referenced by Engines::DragonAge2::Area::removeFocus(), and Engines::DragonAge2::Area::setActive().

Here is the caller graph for this function:

◆ readVarTable() [1/4]

void Engines::DragonAge2::Object::readVarTable ( const Aurora::GFF3List varTable)
protected

◆ readVarTable() [2/4]

void Engines::DragonAge2::Object::readVarTable ( const Aurora::GFF3Struct gff)
protected

Definition at line 207 of file object.cpp.

References Aurora::GFF3Struct::getList(), Aurora::GFF3Struct::hasField(), and readVarTable().

Here is the call graph for this function:

◆ readVarTable() [3/4]

void Engines::DragonAge2::Object::readVarTable ( const Aurora::GFF4List varTable)
protected

◆ readVarTable() [4/4]

void Engines::DragonAge2::Object::readVarTable ( const Aurora::GFF4Struct gff)
protected

Definition at line 248 of file object.cpp.

References Aurora::GFF4Struct::getList(), Aurora::GFF4Struct::hasField(), Aurora::GFF4FieldNamesEnum::kGFF4ScriptVarTable, and readVarTable().

Here is the call graph for this function:

◆ setNonLocalizedName()

void Engines::DragonAge2::Object::setNonLocalizedName ( const Common::UString name)

Set the object's non-localized name.

Definition at line 100 of file object.cpp.

References _nonLocalizedName.

◆ setOrientation()

void Engines::DragonAge2::Object::setOrientation ( float  x,
float  y,
float  z,
float  angle 
)
virtual

Set the object's orientation.

Reimplemented in Engines::DragonAge2::Creature, and Engines::DragonAge2::Placeable.

Definition at line 140 of file object.cpp.

References _orientation.

Referenced by Engines::DragonAge2::Waypoint::load(), Engines::DragonAge2::Placeable::setOrientation(), Engines::DragonAge2::Creature::setOrientation(), and syncOrientation().

Here is the caller graph for this function:

◆ setPosition()

void Engines::DragonAge2::Object::setPosition ( float  x,
float  y,
float  z 
)
virtual

Set the object's position within its area.

Reimplemented in Engines::DragonAge2::Creature, and Engines::DragonAge2::Placeable.

Definition at line 134 of file object.cpp.

References _position.

Referenced by Engines::DragonAge2::Waypoint::load(), Engines::DragonAge2::Placeable::setPosition(), Engines::DragonAge2::Creature::setPosition(), and syncPosition().

Here is the caller graph for this function:

◆ show()

void Engines::DragonAge2::Object::show ( )
virtual

Show the object's model(s).

Reimplemented in Engines::DragonAge2::Area, Engines::DragonAge2::Creature, and Engines::DragonAge2::Placeable.

Definition at line 74 of file object.cpp.

◆ syncOrientation()

void Engines::DragonAge2::Object::syncOrientation ( )
protected

Definition at line 154 of file object.cpp.

References getOrientation(), and setOrientation().

Referenced by Engines::DragonAge2::Placeable::load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ syncPosition()

void Engines::DragonAge2::Object::syncPosition ( )
protected

Definition at line 147 of file object.cpp.

References getPosition(), and setPosition().

Referenced by Engines::DragonAge2::Placeable::load().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _conversation

Common::UString Engines::DragonAge2::Object::_conversation
protected

The object's default conversation.

Definition at line 124 of file object.h.

Referenced by getConversation(), and Engines::DragonAge2::Placeable::loadProperties().

◆ _description

Aurora::LocString Engines::DragonAge2::Object::_description
protected

◆ _ids

std::list<uint32> Engines::DragonAge2::Object::_ids
protected

The object's model IDs.

Definition at line 131 of file object.h.

Referenced by getIDs(), and Engines::DragonAge2::Placeable::load().

◆ _name

Aurora::LocString Engines::DragonAge2::Object::_name
protected

◆ _nonLocalizedName

Common::UString Engines::DragonAge2::Object::_nonLocalizedName
protected

The object's non-localized name.

Definition at line 122 of file object.h.

Referenced by getNonLocalizedName(), and setNonLocalizedName().

◆ _orientation

float Engines::DragonAge2::Object::_orientation[4]
protected

The object's orientation.

Definition at line 134 of file object.h.

Referenced by getOrientation(), Object(), and setOrientation().

◆ _position

float Engines::DragonAge2::Object::_position[3]
protected

The object's position.

Definition at line 133 of file object.h.

Referenced by getPosition(), Object(), and setPosition().

◆ _resRef

Common::UString Engines::DragonAge2::Object::_resRef
protected

The object's resource reference.

Definition at line 117 of file object.h.

Referenced by getResRef(), and Engines::DragonAge2::Placeable::load().

◆ _soundSet

Common::UString Engines::DragonAge2::Object::_soundSet
protected

The object's sound set.

Definition at line 126 of file object.h.

◆ _static

bool Engines::DragonAge2::Object::_static
protected

Is the object static?

Definition at line 128 of file object.h.

Referenced by isClickable(), isStatic(), and Engines::DragonAge2::Placeable::loadProperties().

◆ _type

ObjectType Engines::DragonAge2::Object::_type
protected

The object's type.

Definition at line 115 of file object.h.

Referenced by getType().

◆ _usable

bool Engines::DragonAge2::Object::_usable
protected

Is the object usable?

Definition at line 129 of file object.h.

Referenced by isClickable(), isUsable(), and Engines::DragonAge2::Placeable::loadProperties().


The documentation for this class was generated from the following files: