xoreos
0.0.5
|
#include <waypoint.h>
Public Member Functions | |
Waypoint (const Aurora::GFF3Struct &waypoint) | |
Load from a waypoint instance. More... | |
~Waypoint () | |
bool | hasMapNote () const |
Does this waypoint have a map note? More... | |
bool | enabledMapNote () const |
Is this waypoint's map note currently enabled? More... | |
void | enableMapNote (bool enabled) |
Enable/Disable the waypoint's map note. More... | |
Common::UString | getMapNote () const |
Return the waypoint's map note text. More... | |
Public Member Functions inherited from Engines::KotOR2::Object | |
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... | |
virtual void | hideSoft () |
Hide the object's model(s) if applicable. More... | |
virtual bool | isVisible () const |
Is the object's model(s) visible? 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... | |
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... | |
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... | |
virtual void | playAnimation (const Common::UString &anim, bool restart=true, float length=0.0f, float speed=1.0f) |
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::KotOR2::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()) |
Private Member Functions | |
void | load (const Aurora::GFF3Struct &waypoint) |
Load from a waypoint instance. More... | |
void | load (const Aurora::GFF3Struct &instance, const Aurora::GFF3Struct *blueprint) |
Load the waypoint from an instance and its blueprint. More... | |
void | loadProperties (const Aurora::GFF3Struct &gff) |
Load general waypoint properties. More... | |
Private Attributes | |
bool | _hasMapNote |
Does this waypoint have a map note? More... | |
bool | _enabledMapNote |
Is this waypoint's map note enabled? More... | |
Common::UString | _mapNote |
The waypoint's map note text. More... | |
Definition at line 40 of file waypoint.h.
Engines::KotOR2::Waypoint::Waypoint | ( | const Aurora::GFF3Struct & | waypoint | ) |
Load from a waypoint instance.
Definition at line 39 of file waypoint.cpp.
References load().
Engines::KotOR2::Waypoint::~Waypoint | ( | ) |
Definition at line 45 of file waypoint.cpp.
References Engines::KotOR2::Object::hide().
bool Engines::KotOR2::Waypoint::enabledMapNote | ( | ) | const |
Is this waypoint's map note currently enabled?
Definition at line 63 of file waypoint.cpp.
References _enabledMapNote, and _hasMapNote.
void Engines::KotOR2::Waypoint::enableMapNote | ( | bool | enabled | ) |
Enable/Disable the waypoint's map note.
Definition at line 67 of file waypoint.cpp.
References _enabledMapNote.
Common::UString Engines::KotOR2::Waypoint::getMapNote | ( | ) | const |
Return the waypoint's map note text.
Definition at line 71 of file waypoint.cpp.
References _mapNote.
bool Engines::KotOR2::Waypoint::hasMapNote | ( | ) | const |
Does this waypoint have a map note?
Definition at line 59 of file waypoint.cpp.
References _hasMapNote.
|
private |
Load from a waypoint instance.
Definition at line 49 of file waypoint.cpp.
References Common::UString::empty(), Aurora::GFF3Struct::getString(), Aurora::kFileTypeUTW, Engines::loadOptionalGFF3(), MKTAG, and Common::ScopedPtrBase< T, Deallocator >::reset().
Referenced by Waypoint().
|
private |
Load the waypoint from an instance and its blueprint.
Definition at line 75 of file waypoint.cpp.
References Aurora::GFF3Struct::getDouble(), loadProperties(), Common::rad2deg(), Engines::KotOR2::Object::setOrientation(), and Engines::KotOR2::Object::setPosition().
|
private |
Load general waypoint properties.
Definition at line 96 of file waypoint.cpp.
References _enabledMapNote, _hasMapNote, _mapNote, Aurora::NWScript::Object::_tag, Aurora::GFF3Struct::getBool(), Aurora::GFF3Struct::getString(), and Engines::KotOR2::ScriptContainer::readScripts().
Referenced by load().
|
private |
Is this waypoint's map note enabled?
Definition at line 61 of file waypoint.h.
Referenced by enabledMapNote(), enableMapNote(), and loadProperties().
|
private |
Does this waypoint have a map note?
Definition at line 60 of file waypoint.h.
Referenced by enabledMapNote(), hasMapNote(), and loadProperties().
|
private |
The waypoint's map note text.
Definition at line 64 of file waypoint.h.
Referenced by getMapNote(), and loadProperties().