xoreos
0.0.5
|
#include <placeable.h>
Public Member Functions | |
Placeable (const Aurora::GFF3Struct &placeable) | |
Load from a placeable instance. More... | |
~Placeable () | |
void | show () |
Show the placeable's model. More... | |
void | hide () |
Hide the placeable's model. More... | |
void | enter () |
The cursor entered the placeable. More... | |
void | leave () |
The cursor left the placeable. More... | |
void | highlight (bool enabled) |
(Un)Highlight the placeable. More... | |
bool | click (Object *triggerer=0) |
The placeable was clicked. More... | |
void | setPosition (float x, float y, float z) |
Set the placeable's position. More... | |
void | setOrientation (float x, float y, float z, float angle) |
Set the placeable's orientation. More... | |
Public Member Functions inherited from Engines::DragonAge::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 & | getResRef () const |
Return the object's resource reference. More... | |
const Aurora::LocString & | getName () const |
Return the object's name. More... | |
const Aurora::LocString & | getDescription () const |
Return the object's description. More... | |
const Common::UString & | getConversation () const |
Return the object's default conversation (DLG). More... | |
const Common::UString & | getNonLocalizedName () 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... | |
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::DragonAge::ScriptContainer | |
ScriptContainer () | |
~ScriptContainer () | |
const Common::UString & | getScript () 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) |
Private Member Functions | |
void | load (const Aurora::GFF3Struct &placeable) |
void | load (const Aurora::GFF3Struct &instance, const Aurora::GFF3Struct *blueprint) |
void | loadProperties (const Aurora::GFF3Struct &gff) |
Private Attributes | |
uint32 | _appearanceID |
The placeable's appearance; index into the Placeables MGDA. More... | |
Common::ScopedPtr< Graphics::Aurora::Model > | _model |
The placeable's model. More... | |
Definition at line 41 of file placeable.h.
Engines::DragonAge::Placeable::Placeable | ( | const Aurora::GFF3Struct & | placeable | ) |
Load from a placeable instance.
Definition at line 43 of file placeable.cpp.
References load().
Engines::DragonAge::Placeable::~Placeable | ( | ) |
Definition at line 49 of file placeable.cpp.
References hide().
|
virtual |
The placeable was clicked.
Reimplemented from Engines::DragonAge::Object.
Definition at line 95 of file placeable.cpp.
References Engines::DragonAge::kEventTypeClick, Engines::DragonAge::kEventTypeUse, and Engines::DragonAge::ScriptContainer::runScript().
|
virtual |
The cursor entered the placeable.
Reimplemented from Engines::DragonAge::Object.
Definition at line 79 of file placeable.cpp.
References Engines::DragonAge::Object::_description, Engines::DragonAge::Object::_name, Aurora::NWScript::Object::_tag, Common::UString::c_str(), Aurora::LocString::getString(), highlight(), and status().
|
virtual |
Hide the placeable's model.
Reimplemented from Engines::DragonAge::Object.
Definition at line 74 of file placeable.cpp.
References _model.
Referenced by ~Placeable().
|
virtual |
(Un)Highlight the placeable.
Reimplemented from Engines::DragonAge::Object.
Definition at line 90 of file placeable.cpp.
References _model.
Referenced by enter(), and leave().
|
virtual |
The cursor left the placeable.
Reimplemented from Engines::DragonAge::Object.
Definition at line 86 of file placeable.cpp.
References highlight().
|
private |
Definition at line 102 of file placeable.cpp.
References Engines::DragonAge::Object::_resRef, Common::UString::empty(), Aurora::GFF3Struct::getString(), Aurora::kFileTypeUTP, Engines::loadOptionalGFF3(), MKTAG, and Common::ScopedPtrBase< T, Deallocator >::reset().
Referenced by Placeable().
|
private |
Definition at line 112 of file placeable.cpp.
References _appearanceID, Engines::DragonAge::Object::_ids, _model, Aurora::NWScript::Object::_tag, Aurora::GDAFile::findRow(), Engines::DragonAge::getMGDA(), Aurora::GDAFile::getString(), Engines::DragonAge::Object::isClickable(), Engines::DragonAge::kWorksheetPlaceables, Engines::loadModelObject(), loadProperties(), Common::ScopedPtrBase< T, Deallocator >::reset(), Engines::DragonAge::Object::syncOrientation(), and Engines::DragonAge::Object::syncPosition().
|
private |
Definition at line 132 of file placeable.cpp.
References _appearanceID, Engines::DragonAge::Object::_conversation, Engines::DragonAge::Object::_description, Engines::DragonAge::Object::_name, Engines::DragonAge::Object::_static, Aurora::NWScript::Object::_tag, Engines::DragonAge::Object::_usable, Engines::DragonAge::ScriptContainer::enableEvents(), Aurora::GFF3Struct::getBool(), Aurora::GFF3Struct::getDouble(), Aurora::GFF3Struct::getLocString(), Aurora::GFF3Struct::getString(), Aurora::GFF3Struct::getUint(), Aurora::GFF3Struct::hasField(), Common::rad2deg(), Engines::DragonAge::ScriptContainer::readScript(), Engines::DragonAge::Object::readVarTable(), setOrientation(), and setPosition().
Referenced by load().
|
virtual |
Set the placeable's orientation.
Reimplemented from Engines::DragonAge::Object.
Definition at line 61 of file placeable.cpp.
References _model, Engines::DragonAge::Object::getOrientation(), and Engines::DragonAge::Object::setOrientation().
Referenced by loadProperties().
|
virtual |
Set the placeable's position.
Reimplemented from Engines::DragonAge::Object.
Definition at line 53 of file placeable.cpp.
References _model, Engines::DragonAge::Object::getPosition(), and Engines::DragonAge::Object::setPosition().
Referenced by loadProperties().
|
virtual |
Show the placeable's model.
Reimplemented from Engines::DragonAge::Object.
Definition at line 69 of file placeable.cpp.
References _model.
|
private |
The placeable's appearance; index into the Placeables MGDA.
Definition at line 73 of file placeable.h.
Referenced by load(), and loadProperties().
|
private |
The placeable's model.
Definition at line 75 of file placeable.h.
Referenced by hide(), highlight(), load(), setOrientation(), setPosition(), and show().