xoreos
0.0.5
|
#include <situated.h>
Public Member Functions | |
~Situated () | |
void | loadModel () |
Load the situated object's model. More... | |
void | unloadModel () |
Unload the situated object's model. More... | |
void | show () |
Show the situated object's model. More... | |
void | hide () |
Hide the situated object's model. More... | |
virtual bool | isOpen () const =0 |
Is the situated object open? More... | |
bool | isLocked () const |
Is the situated object locked? More... | |
virtual void | setLocked (bool locked) |
Lock/Unlock the situated object. More... | |
Object * | getLastOpenedBy () const |
Return the object that last opened this situated object. More... | |
Object * | getLastClosedBy () const |
Return the object that last closed this situated object. More... | |
Object * | getLastUsedBy () const |
Return the object that last used this situated object. More... | |
void | setPosition (float x, float y, float z) |
Set the situated object's position. More... | |
void | setOrientation (float x, float y, float z, float angle) |
Set the situated object's orientation. More... | |
Public Member Functions inherited from Engines::NWN2::Object | |
Object (ObjectType type=kObjectTypeInvalid) | |
virtual | ~Object () |
ObjectType | getType () const |
Return the exact type of the object. More... | |
const std::list< uint32 > & | getIDs () const |
Return the object's model IDs. More... | |
const Common::UString & | getName () const |
Return the object's name. More... | |
const Common::UString & | getDescription () const |
Return the object's description. More... | |
const Common::UString & | getConversation () const |
Return the object's default conversation (DLG). More... | |
const Aurora::SSFFile * | getSSF () |
Return the object's sound set. 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... | |
Area * | getArea () const |
Return the area this object is currently in. More... | |
void | setArea (Area *) |
Set the area this object is currently in. 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... | |
Location | getLocation () const |
Create a Location out of the object's area, position and 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... | |
void | speakString (const Common::UString &string, uint32 volume) |
Speak the specified string. More... | |
void | speakOneLiner (Common::UString conv, Object *tokenTarget=0) |
Speak an one-liner from the specified conversation file. More... | |
void | stopSound () |
Stop the current object sound. More... | |
void | playSound (const Common::UString &sound, bool pitchVariance=false) |
Play an object sound. More... | |
Public Member Functions inherited from Aurora::NWScript::Object | |
Object () | |
uint32 | getID () const |
const Common::UString & | getTag () const |
Public Member Functions inherited from Aurora::NWScript::VariableContainer | |
VariableContainer () | |
virtual | ~VariableContainer () |
bool | hasVariable (const Common::UString &var) const |
Variable & | getVariable (const Common::UString &var, Type type=kTypeVoid) |
const Variable & | getVariable (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::NWN2::ScriptContainer | |
ScriptContainer () | |
~ScriptContainer () | |
const Common::UString & | getScript (Script script) const |
bool | hasScript (Script script) const |
bool | runScript (Script script, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) |
Protected Member Functions | |
Situated (ObjectType type) | |
void | load (const Aurora::GFF3Struct &instance, const Aurora::GFF3Struct *blueprint=0) |
Load the situated object from an instance and its blueprint. More... | |
virtual void | loadObject (const Aurora::GFF3Struct &gff)=0 |
Load object-specific properties. More... | |
virtual void | loadAppearance ()=0 |
Load appearance-specific properties. More... | |
Protected Member Functions inherited from Engines::NWN2::Object | |
void | loadSSF () |
Load the object's sound set. More... | |
void | readVarTable (const Aurora::GFF3List &varTable) |
Read the object's variable table. More... | |
void | readVarTable (const Aurora::GFF3Struct &gff) |
Protected Member Functions inherited from Engines::NWN2::ScriptContainer | |
void | clearScripts () |
void | readScripts (const Aurora::GFF3Struct &gff) |
void | readScripts (const ScriptContainer &container) |
Protected Attributes | |
Common::UString | _modelName |
The model's resource name. More... | |
uint32 | _appearanceID |
The index within the situated appearance 2DA. More... | |
uint32 | _soundAppType |
The index within the situated sounds 2DA. More... | |
bool | _locked |
Is the situated object locked? More... | |
Common::UString | _soundOpened |
The sound the object makes when opened. More... | |
Common::UString | _soundClosed |
The sound the object makes when closed. More... | |
Common::UString | _soundDestroyed |
The sound the object makes when destroyed. More... | |
Common::UString | _soundUsed |
The sound the object makes when used. More... | |
Common::UString | _soundLocked |
The sound the object makes when locked. More... | |
float | _tint [3][4] |
Object * | _lastOpenedBy |
The object that last opened this situated object. More... | |
Object * | _lastClosedBy |
The object that last closed this situated object. More... | |
Object * | _lastUsedBy |
The object that last used this situated object. More... | |
Common::ScopedPtr< Graphics::Aurora::Model > | _model |
The situated object's model. More... | |
Protected Attributes inherited from Engines::NWN2::Object | |
ObjectType | _type |
The object's type. More... | |
Common::UString | _name |
The object's display name. More... | |
Common::UString | _description |
The object's description. More... | |
Common::UString | _conversation |
The object's default conversation. More... | |
uint32 | _soundSet |
The object's sound set, as an index into soundset.2da. More... | |
Common::ScopedPtr< Aurora::SSFFile > | _ssf |
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... | |
Area * | _area |
The area the object is currently in. More... | |
float | _position [3] |
The object's position. More... | |
float | _orientation [4] |
The object's orientation. More... | |
Sound::ChannelHandle | _sound |
The currently playing object sound. More... | |
Protected Attributes inherited from Aurora::NWScript::Object | |
uint32 | _id |
Common::UString | _tag |
Private Member Functions | |
void | loadProperties (const Aurora::GFF3Struct &gff) |
void | loadSounds () |
Additional Inherited Members | |
Static Public Member Functions inherited from Engines::NWN2::ScriptContainer | |
static bool | runScript (const Common::UString &script, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) |
static bool | runScript (const Common::UString &script, const Aurora::NWScript::ScriptState &state, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) |
Definition at line 40 of file situated.h.
Engines::NWN2::Situated::~Situated | ( | ) |
Definition at line 56 of file situated.cpp.
|
protected |
Definition at line 47 of file situated.cpp.
References _tint.
Object * Engines::NWN2::Situated::getLastClosedBy | ( | ) | const |
Return the object that last closed this situated object.
Definition at line 139 of file situated.cpp.
References _lastClosedBy.
Referenced by Engines::NWN2::Functions::getLastClosedBy().
Object * Engines::NWN2::Situated::getLastOpenedBy | ( | ) | const |
Return the object that last opened this situated object.
Definition at line 135 of file situated.cpp.
References _lastOpenedBy.
Referenced by Engines::NWN2::Functions::getLastOpenedBy().
Object * Engines::NWN2::Situated::getLastUsedBy | ( | ) | const |
Return the object that last used this situated object.
Definition at line 143 of file situated.cpp.
References _lastUsedBy.
Referenced by Engines::NWN2::Functions::getLastUsedBy().
|
virtual |
Hide the situated object's model.
Reimplemented from Engines::NWN2::Object.
Definition at line 106 of file situated.cpp.
References _model.
Referenced by Engines::NWN2::Placeable::hide(), Engines::NWN2::Door::hide(), and unloadModel().
bool Engines::NWN2::Situated::isLocked | ( | ) | const |
Is the situated object locked?
Definition at line 127 of file situated.cpp.
References _locked.
Referenced by Engines::NWN2::Placeable::activate(), Engines::NWN2::Placeable::click(), Engines::NWN2::Placeable::deactivate(), Engines::NWN2::Functions::getLocked(), Engines::NWN2::Placeable::open(), Engines::NWN2::Door::open(), and Engines::NWN2::Door::setLocked().
|
pure virtual |
Is the situated object open?
Implemented in Engines::NWN2::Door, and Engines::NWN2::Placeable.
Referenced by Engines::NWN2::Functions::getIsOpen().
|
protected |
Load the situated object from an instance and its blueprint.
Definition at line 147 of file situated.cpp.
References _appearanceID, Aurora::GFF3Struct::getDouble(), Aurora::GFF3Struct::getStruct(), Aurora::GFF3Struct::hasField(), Aurora::kFieldIDInvalid, loadAppearance(), loadObject(), loadProperties(), loadSounds(), Common::rad2deg(), setOrientation(), and setPosition().
Referenced by Engines::NWN2::Placeable::load(), and Engines::NWN2::Door::load().
|
protectedpure virtual |
Load appearance-specific properties.
Implemented in Engines::NWN2::Placeable, and Engines::NWN2::Door.
Referenced by load().
|
virtual |
Load the situated object's model.
Reimplemented from Engines::NWN2::Object.
Definition at line 59 of file situated.cpp.
References Engines::NWN2::Object::_ids, _model, _modelName, Engines::NWN2::Object::_name, Aurora::NWScript::Object::_tag, _tint, Common::UString::c_str(), ConfigMan, Common::UString::empty(), Engines::NWN2::Object::getOrientation(), Engines::NWN2::Object::getPosition(), Engines::NWN2::Object::isClickable(), Engines::loadModelObject(), Common::ScopedPtrBase< T, Deallocator >::reset(), setOrientation(), setPosition(), and warning().
|
protectedpure virtual |
Load object-specific properties.
Implemented in Engines::NWN2::Placeable, and Engines::NWN2::Door.
Referenced by load().
|
private |
Definition at line 208 of file situated.cpp.
References _appearanceID, Engines::NWN2::Object::_conversation, Engines::NWN2::Object::_description, _locked, Engines::NWN2::Object::_name, Engines::NWN2::Object::_static, Aurora::NWScript::Object::_tag, _tint, Engines::NWN2::Object::_usable, Aurora::GFF3Struct::getBool(), Aurora::GFF3Struct::getString(), Aurora::GFF3Struct::getUint(), Engines::NWN2::ScriptContainer::readScripts(), Engines::NWN2::readTint(), and Engines::NWN2::Object::readVarTable().
Referenced by load().
|
private |
Definition at line 241 of file situated.cpp.
References _soundAppType, _soundClosed, _soundDestroyed, _soundLocked, _soundOpened, _soundUsed, Aurora::TwoDAFile::getRow(), Aurora::TwoDARow::getString(), Aurora::kFieldIDInvalid, and TwoDAReg.
Referenced by load().
|
virtual |
Lock/Unlock the situated object.
Reimplemented in Engines::NWN2::Door.
Definition at line 131 of file situated.cpp.
References _locked.
Referenced by Engines::NWN2::Door::setLocked(), and Engines::NWN2::Functions::setLocked().
|
virtual |
Set the situated object's orientation.
Reimplemented from Engines::NWN2::Object.
Definition at line 119 of file situated.cpp.
References _model, Engines::NWN2::Object::getOrientation(), and Engines::NWN2::Object::setOrientation().
Referenced by load(), and loadModel().
|
virtual |
Set the situated object's position.
Reimplemented from Engines::NWN2::Object.
Definition at line 111 of file situated.cpp.
References _model, Engines::NWN2::Object::getPosition(), and Engines::NWN2::Object::setPosition().
Referenced by load(), and loadModel().
|
virtual |
Show the situated object's model.
Reimplemented from Engines::NWN2::Object.
Definition at line 101 of file situated.cpp.
References _model.
Referenced by Engines::NWN2::Placeable::show(), and Engines::NWN2::Door::show().
|
virtual |
Unload the situated object's model.
Reimplemented from Engines::NWN2::Object.
Definition at line 95 of file situated.cpp.
References _model, hide(), and Common::ScopedPtrBase< T, Deallocator >::reset().
|
protected |
The index within the situated appearance 2DA.
Definition at line 77 of file situated.h.
Referenced by load(), Engines::NWN2::Door::loadAppearance(), Engines::NWN2::Placeable::loadAppearance(), and loadProperties().
|
protected |
The object that last closed this situated object.
Definition at line 91 of file situated.h.
Referenced by Engines::NWN2::Placeable::close(), Engines::NWN2::Door::close(), and getLastClosedBy().
|
protected |
The object that last opened this situated object.
Definition at line 90 of file situated.h.
Referenced by getLastOpenedBy(), Engines::NWN2::Placeable::open(), and Engines::NWN2::Door::open().
|
protected |
The object that last used this situated object.
Definition at line 92 of file situated.h.
Referenced by Engines::NWN2::Door::click(), Engines::NWN2::Placeable::click(), and getLastUsedBy().
|
protected |
Is the situated object locked?
Definition at line 80 of file situated.h.
Referenced by isLocked(), loadProperties(), and setLocked().
|
protected |
The situated object's model.
Definition at line 94 of file situated.h.
Referenced by hide(), Engines::NWN2::Door::highlight(), Engines::NWN2::Placeable::highlight(), loadModel(), Engines::NWN2::Placeable::setModelState(), Engines::NWN2::Door::setModelState(), setOrientation(), setPosition(), show(), and unloadModel().
|
protected |
The model's resource name.
Definition at line 75 of file situated.h.
Referenced by Engines::NWN2::Door::loadAppearance(), Engines::NWN2::Placeable::loadAppearance(), and loadModel().
|
protected |
The index within the situated sounds 2DA.
Definition at line 78 of file situated.h.
Referenced by Engines::NWN2::Placeable::loadAppearance(), Engines::NWN2::Door::loadAppearance(), and loadSounds().
|
protected |
The sound the object makes when closed.
Definition at line 83 of file situated.h.
Referenced by Engines::NWN2::Placeable::close(), Engines::NWN2::Door::close(), and loadSounds().
|
protected |
The sound the object makes when destroyed.
Definition at line 84 of file situated.h.
Referenced by loadSounds().
|
protected |
The sound the object makes when locked.
Definition at line 86 of file situated.h.
Referenced by Engines::NWN2::Placeable::activate(), Engines::NWN2::Placeable::click(), Engines::NWN2::Placeable::deactivate(), loadSounds(), Engines::NWN2::Placeable::open(), and Engines::NWN2::Door::open().
|
protected |
The sound the object makes when opened.
Definition at line 82 of file situated.h.
Referenced by loadSounds(), Engines::NWN2::Placeable::open(), and Engines::NWN2::Door::open().
|
protected |
The sound the object makes when used.
Definition at line 85 of file situated.h.
Referenced by Engines::NWN2::Placeable::activate(), Engines::NWN2::Placeable::deactivate(), and loadSounds().
|
protected |
Definition at line 88 of file situated.h.
Referenced by loadModel(), loadProperties(), and Situated().