|
xoreos
0.0.5
|
#include <situated.h>


Public Member Functions | |
| ~Situated () | |
| void | show () |
| Show the situated object's model. More... | |
| void | hide () |
| Hide the situated object's model. More... | |
| bool | isVisible () const |
| Is the situated object's model visible? 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... | |
| const Common::UString & | getConversation () const |
| Get the conversation for this 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... | |
| virtual bool | testCollision (const glm::vec3 &orig, const glm::vec3 &dest) const |
| void | setWalkmeshInvisible (bool invisible) |
| void | playAnimation (const Common::UString &anim, bool restart=true, float length=0.0f, float speed=1.0f) |
Public Member Functions inherited from Engines::KotOR::Object | |
| Object (ObjectType type=kObjectTypeInvalid) | |
| virtual | ~Object () |
| ObjectType | getType () const |
| Return the exact type of the object. More... | |
| virtual void | hideSoft () |
| Hide the object's model(s) if applicable. 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 & | getPortrait () const |
| Return the object's portrait. More... | |
| void | setMaxHitPoints (int maxHP) |
| Set the maximum hit points for the objects. More... | |
| int | getMaxHitPoints () |
| Get the maximum hit points for the objects. More... | |
| void | setCurrentHitPoints (int hitpoints) |
| Set the current hitpoints. More... | |
| int | getCurrentHitPoints () |
| Return the objects current hitpoints. More... | |
| void | setMinOneHitPoints (bool enabled) |
| Set if the object has a minimum of one hp. More... | |
| bool | getMinOneHitPoints () const |
| Get if the object has a minimum of one hp. 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... | |
| void | makeLookAt (float x, float y) |
| void | makeLookAt (Object *target) |
| Room * | getRoom () |
| Get a room the object is in. More... | |
| void | setRoom (Room *room) |
| Set a room the object is in. 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 | 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::KotOR::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::KotOR::ScriptContainer | |
| void | clearScripts () |
| void | readScripts (const Aurora::GFF3Struct &gff, bool clear=true) |
| 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... | |
| Common::UString | _conversation |
| The optional conversation with this situated object. More... | |
| 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... | |
| Walkmesh | _walkmesh |
Protected Attributes inherited from Engines::KotOR::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 | _portrait |
| The object's portrait. More... | |
| bool | _static |
| Is the object static? More... | |
| bool | _usable |
| Is the object usable? More... | |
| int | _currentHitPoints |
| The current hitpoints of the object. More... | |
| int | _maxHitPoints |
| The maximum hitpoints of the object. More... | |
| bool | _minOneHitPoint |
| If the object should have at least one hitpoint. 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... | |
| Sound::ChannelHandle | _sound |
| The currently playing object sound. More... | |
| Room * | _room |
| Room the object is in. More... | |
Protected Attributes inherited from Aurora::NWScript::Object | |
| uint32 | _id |
| Common::UString | _tag |
Private Member Functions | |
| void | loadProperties (const Aurora::GFF3Struct &gff) |
| void | loadPortrait (const Aurora::GFF3Struct &gff) |
| void | loadSounds () |
Additional Inherited Members | |
Static Public Member Functions inherited from Engines::KotOR::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 43 of file situated.h.
| Engines::KotOR::Situated::~Situated | ( | ) |
Definition at line 49 of file situated.cpp.
|
protected |
Definition at line 43 of file situated.cpp.
| const Common::UString & Engines::KotOR::Situated::getConversation | ( | ) | const |
Get the conversation for this object.
Definition at line 117 of file situated.cpp.
References _conversation.
Referenced by Engines::KotOR::Module::clickObject().

| Object * Engines::KotOR::Situated::getLastClosedBy | ( | ) | const |
Return the object that last closed this situated object.
Definition at line 109 of file situated.cpp.
References _lastClosedBy.
Referenced by Engines::KotOR::Functions::getLastClosedBy().

| Object * Engines::KotOR::Situated::getLastOpenedBy | ( | ) | const |
Return the object that last opened this situated object.
Definition at line 105 of file situated.cpp.
References _lastOpenedBy.
Referenced by Engines::KotOR::Functions::getLastOpenedBy().

| Object * Engines::KotOR::Situated::getLastUsedBy | ( | ) | const |
Return the object that last used this situated object.
Definition at line 113 of file situated.cpp.
References _lastUsedBy.
Referenced by Engines::KotOR::Functions::getLastUsedBy().

|
virtual |
Hide the situated object's model.
Reimplemented from Engines::KotOR::Object.
Definition at line 58 of file situated.cpp.
References _model, _walkmesh, and Graphics::Renderable::hide().
Referenced by Engines::KotOR::Door::hide(), and Engines::KotOR::Placeable::hide().


| bool Engines::KotOR::Situated::isLocked | ( | ) | const |
Is the situated object locked?
Definition at line 97 of file situated.cpp.
References _locked.
Referenced by Engines::KotOR::Placeable::activate(), Engines::KotOR::Placeable::click(), Engines::KotOR::Placeable::deactivate(), Engines::KotOR::Functions::getLocked(), Engines::KotOR::Door::open(), and Engines::KotOR::Placeable::open().

|
pure virtual |
Is the situated object open?
Implemented in Engines::KotOR::Placeable, and Engines::KotOR::Door.
Referenced by Engines::KotOR::Functions::getIsOpen().

|
virtual |
Is the situated object's model visible?
Reimplemented from Engines::KotOR::Object.
Definition at line 64 of file situated.cpp.
References _model.
|
protected |
Load the situated object from an instance and its blueprint.
Definition at line 121 of file situated.cpp.
References _appearanceID, Engines::KotOR::Object::_ids, _model, _modelName, Engines::KotOR::Object::_name, Aurora::NWScript::Object::_tag, Common::UString::c_str(), Common::UString::empty(), Aurora::GFF3Struct::getDouble(), Engines::KotOR::Object::isClickable(), Aurora::kFieldIDInvalid, loadAppearance(), Engines::loadModelObject(), loadObject(), loadProperties(), loadSounds(), Common::rad2deg(), Common::ScopedPtrBase< T, Deallocator >::reset(), setOrientation(), setPosition(), and warning().
Referenced by Engines::KotOR::Placeable::load(), and Engines::KotOR::Door::load().


|
protectedpure virtual |
Load appearance-specific properties.
Implemented in Engines::KotOR::Placeable, and Engines::KotOR::Door.
Referenced by load().

|
protectedpure virtual |
Load object-specific properties.
Implemented in Engines::KotOR::Placeable, and Engines::KotOR::Door.
Referenced by load().

|
private |
Definition at line 209 of file situated.cpp.
References Engines::KotOR::Object::_portrait, Common::UString::empty(), Aurora::TwoDAFile::getRow(), Aurora::TwoDARow::getString(), Aurora::GFF3Struct::getString(), Aurora::GFF3Struct::getUint(), and TwoDAReg.
Referenced by loadProperties().


|
private |
Definition at line 177 of file situated.cpp.
References _appearanceID, _conversation, Engines::KotOR::Object::_description, _locked, Engines::KotOR::Object::_name, Engines::KotOR::Object::_static, Aurora::NWScript::Object::_tag, Engines::KotOR::Object::_usable, Aurora::GFF3Struct::getBool(), Aurora::GFF3Struct::getString(), Aurora::GFF3Struct::getUint(), loadPortrait(), and Engines::KotOR::ScriptContainer::readScripts().
Referenced by load().


|
private |
Definition at line 222 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 |
Reimplemented from Engines::KotOR::Object.
Definition at line 92 of file situated.cpp.
References _model.
|
virtual |
Lock/Unlock the situated object.
Definition at line 101 of file situated.cpp.
References _locked.
Referenced by Engines::KotOR::Functions::setLocked().

|
virtual |
Set the situated object's orientation.
Reimplemented from Engines::KotOR::Object.
Definition at line 76 of file situated.cpp.
References _model, Engines::KotOR::Object::getOrientation(), and Engines::KotOR::Object::setOrientation().
Referenced by load().


|
virtual |
Set the situated object's position.
Reimplemented from Engines::KotOR::Object.
Definition at line 68 of file situated.cpp.
References _model, Engines::KotOR::Object::getPosition(), and Engines::KotOR::Object::setPosition().
Referenced by load().


| void Engines::KotOR::Situated::setWalkmeshInvisible | ( | bool | invisible | ) |
Definition at line 88 of file situated.cpp.
References _walkmesh, and Graphics::Aurora::Walkmesh::setInvisible().

|
virtual |
Show the situated object's model.
Reimplemented from Engines::KotOR::Object.
Definition at line 52 of file situated.cpp.
References _model, _walkmesh, and Graphics::Renderable::show().

|
virtual |
Reimplemented in Engines::KotOR::Door.
Definition at line 84 of file situated.cpp.
References _walkmesh, and Graphics::Aurora::Walkmesh::testCollision().

|
protected |
The index within the situated appearance 2DA.
Definition at line 91 of file situated.h.
Referenced by load(), Engines::KotOR::Door::loadAppearance(), Engines::KotOR::Placeable::loadAppearance(), and loadProperties().
|
protected |
The optional conversation with this situated object.
Definition at line 102 of file situated.h.
Referenced by getConversation(), and loadProperties().
|
protected |
The object that last closed this situated object.
Definition at line 105 of file situated.h.
Referenced by Engines::KotOR::Door::close(), Engines::KotOR::Placeable::close(), and getLastClosedBy().
|
protected |
The object that last opened this situated object.
Definition at line 104 of file situated.h.
Referenced by getLastOpenedBy(), Engines::KotOR::Door::open(), and Engines::KotOR::Placeable::open().
|
protected |
The object that last used this situated object.
Definition at line 106 of file situated.h.
Referenced by Engines::KotOR::Door::click(), Engines::KotOR::Placeable::click(), and getLastUsedBy().
|
protected |
Is the situated object locked?
Definition at line 94 of file situated.h.
Referenced by isLocked(), loadProperties(), and setLocked().
|
protected |
The situated object's model.
Definition at line 108 of file situated.h.
Referenced by Engines::KotOR::Door::close(), hide(), Engines::KotOR::Door::highlight(), Engines::KotOR::Placeable::highlight(), isVisible(), load(), Engines::KotOR::Door::open(), playAnimation(), setOrientation(), setPosition(), and show().
|
protected |
The model's resource name.
Definition at line 89 of file situated.h.
Referenced by Engines::KotOR::Placeable::load(), Engines::KotOR::Door::load(), load(), Engines::KotOR::Placeable::loadAppearance(), and Engines::KotOR::Door::loadAppearance().
|
protected |
The index within the situated sounds 2DA.
Definition at line 92 of file situated.h.
Referenced by Engines::KotOR::Placeable::loadAppearance(), Engines::KotOR::Door::loadAppearance(), and loadSounds().
|
protected |
The sound the object makes when closed.
Definition at line 97 of file situated.h.
Referenced by Engines::KotOR::Door::close(), Engines::KotOR::Placeable::close(), and loadSounds().
|
protected |
The sound the object makes when destroyed.
Definition at line 98 of file situated.h.
Referenced by loadSounds().
|
protected |
The sound the object makes when locked.
Definition at line 100 of file situated.h.
Referenced by Engines::KotOR::Placeable::activate(), Engines::KotOR::Placeable::click(), Engines::KotOR::Placeable::deactivate(), loadSounds(), Engines::KotOR::Door::open(), and Engines::KotOR::Placeable::open().
|
protected |
The sound the object makes when opened.
Definition at line 96 of file situated.h.
Referenced by loadSounds(), Engines::KotOR::Door::open(), and Engines::KotOR::Placeable::open().
|
protected |
The sound the object makes when used.
Definition at line 99 of file situated.h.
Referenced by Engines::KotOR::Placeable::activate(), Engines::KotOR::Placeable::deactivate(), and loadSounds().
|
protected |
Definition at line 110 of file situated.h.
Referenced by hide(), Engines::KotOR::Placeable::load(), Engines::KotOR::Door::load(), setWalkmeshInvisible(), show(), Engines::KotOR::Door::testCollision(), and testCollision().
1.8.14