xoreos  0.0.5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Engines::Jade::Trigger Class Reference

#include <trigger.h>

Inheritance diagram for Engines::Jade::Trigger:
Inheritance graph
[legend]
Collaboration diagram for Engines::Jade::Trigger:
Collaboration graph
[legend]

Public Member Functions

 Trigger (const Aurora::GFF3Struct &trigger)
 Load from a trigger instance. More...
 
 ~Trigger ()
 
bool isOneShot () const
 Does this trigger only fire once? More...
 
bool isTrap () const
 Does this trigger represent a trap? More...
 
bool isDetectable () const
 Is this trigger detectable? More...
 
bool isDisarmable () const
 Is this trigger disarmable? More...
 
bool isFlagged () const
 Is this trigger flagged? More...
 
bool isAreaTrans () const
 Does this trigger represent an area transition? More...
 
bool isHenchmenData () const
 Does this trigger have henchmen data? More...
 
Common::UString getTransitionText () const
 Return the trigger's transition text. More...
 
- Public Member Functions inherited from Engines::Jade::Object
 Object (ObjectType type=kObjectTypeInvalid)
 
virtual ~Object ()
 
ObjectType getType () const
 Return the exact type of the object. More...
 
virtual void loadModel ()
 Load the object's model(s). More...
 
virtual void unloadModel ()
 Unload the object's model(s). 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::UStringgetName () const
 Return the object's name. More...
 
const Common::UStringgetDescription () const
 Return the object's description. More...
 
const Common::UStringgetConversation () const
 Return the object's default conversation (DLG). More...
 
Aurora::NWScript::ObjectgetPCSpeaker () const
 Return the PC currently speaking with this object. More...
 
void setPCSpeaker (Aurora::NWScript::Object *pc)
 Set the PC currently speaking with this object. 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 isActive () const
 Is the object currently active/available/visible? More...
 
bool isNoCollide () const
 Is collision checking disabled? More...
 
void setNoCollide (bool noCollide)
 Enable or disable collision checking. More...
 
bool isClickable () const
 Can the player click the object? More...
 
AreagetArea () 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...
 
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...
 
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...
 
ObjectgetLastTriggerer () const
 Return the object that last triggered this object. More...
 
void speakString (int32 resref)
 Speak the specified string. More...
 
virtual void playAnimation (const Common::UString &animation="", bool restart=true, int32 loopCount=0)
 Play an object animation. More...
 
virtual void playAnimation (Animation animation)
 Play a default object animation. 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::Jade::ScriptContainer
 ScriptContainer ()
 
 ~ScriptContainer ()
 
const Common::UStringgetScript (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 &trigger)
 Load from a trigger instance. More...
 
void loadBlueprint (const Aurora::GFF3Struct &gff)
 Load the trigger blueprint properties. More...
 
void loadInstance (const Aurora::GFF3Struct &gff)
 Load the trigger instance properties. More...
 

Private Attributes

bool _isOneShot
 Does this trigger only fire once? More...
 
bool _isTrap
 Does this trigger represent a trap? More...
 
bool _isDetectable
 Is this trigger detectable? More...
 
bool _isDisarmable
 Is this trigger disarmable? More...
 
bool _isFlagged
 Is this trigger flagged? More...
 
bool _isAreaTrans
 Does this trigger represent an area transition? More...
 
bool _isHenchmenData
 Does this trigger have henchmen data? More...
 
bool _isCombatArea
 Does this trigger lead to combat? More...
 
bool _isCombatActive
 Does this trigger have henchmen data? More...
 
int _loadScreen
 The loading screen used. More...
 
Common::UString _transitionText
 The trigger's transition text. More...
 
Graphics::VertexBuffer _vertexBuffer
 Geometry outline vertex buffer. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Engines::Jade::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())
 
- Protected Member Functions inherited from Engines::Jade::Object
void loadPositional (const Aurora::GFF3Struct &gff)
 Load the object's positional gff struct which contains the position and orientation. More...
 
- Protected Member Functions inherited from Engines::Jade::ScriptContainer
void clearScripts ()
 
void readScripts (const Aurora::GFF3Struct &gff)
 
void readScripts (const ScriptContainer &container)
 
- Protected Attributes inherited from Engines::Jade::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...
 
bool _static
 Is the object static? More...
 
bool _usable
 Is the object usable? More...
 
bool _active
 Is the object currently active/available/visible? More...
 
bool _noCollide
 Is collision checking for the object disabled? More...
 
std::list< uint32_ids
 The object's model IDs. More...
 
Aurora::NWScript::Object_pcSpeaker
 The current PC speaking with the object. More...
 
Area_area
 The area the object is currently in. More...
 
Object_lastTriggerer
 The object that last used this object. 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
 

Detailed Description

Definition at line 42 of file trigger.h.

Constructor & Destructor Documentation

◆ Trigger()

Engines::Jade::Trigger::Trigger ( const Aurora::GFF3Struct trigger)

Load from a trigger instance.

Definition at line 41 of file trigger.cpp.

References load().

Here is the call graph for this function:

◆ ~Trigger()

Engines::Jade::Trigger::~Trigger ( )

Definition at line 46 of file trigger.cpp.

Member Function Documentation

◆ getTransitionText()

Common::UString Engines::Jade::Trigger::getTransitionText ( ) const

Return the trigger's transition text.

Definition at line 77 of file trigger.cpp.

References _transitionText.

◆ isAreaTrans()

bool Engines::Jade::Trigger::isAreaTrans ( ) const

Does this trigger represent an area transition?

Definition at line 69 of file trigger.cpp.

References _isAreaTrans.

◆ isDetectable()

bool Engines::Jade::Trigger::isDetectable ( ) const

Is this trigger detectable?

Definition at line 57 of file trigger.cpp.

References _isDetectable.

◆ isDisarmable()

bool Engines::Jade::Trigger::isDisarmable ( ) const

Is this trigger disarmable?

Definition at line 61 of file trigger.cpp.

References _isDisarmable.

◆ isFlagged()

bool Engines::Jade::Trigger::isFlagged ( ) const

Is this trigger flagged?

Definition at line 65 of file trigger.cpp.

References _isFlagged.

◆ isHenchmenData()

bool Engines::Jade::Trigger::isHenchmenData ( ) const

Does this trigger have henchmen data?

Definition at line 73 of file trigger.cpp.

References _isHenchmenData.

◆ isOneShot()

bool Engines::Jade::Trigger::isOneShot ( ) const

Does this trigger only fire once?

Definition at line 49 of file trigger.cpp.

References _isOneShot.

◆ isTrap()

bool Engines::Jade::Trigger::isTrap ( ) const

Does this trigger represent a trap?

Definition at line 53 of file trigger.cpp.

References _isTrap.

◆ load()

void Engines::Jade::Trigger::load ( const Aurora::GFF3Struct trigger)
private

Load from a trigger instance.

Definition at line 81 of file trigger.cpp.

References Common::StackException::add(), Common::UString::c_str(), Common::UString::empty(), Aurora::GFF3Struct::getString(), Aurora::kFileTypeTRG, loadBlueprint(), loadInstance(), and MKTAG.

Referenced by Trigger().

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

◆ loadBlueprint()

void Engines::Jade::Trigger::loadBlueprint ( const Aurora::GFF3Struct gff)
private

Load the trigger blueprint properties.

Definition at line 100 of file trigger.cpp.

References _isAreaTrans, _isDetectable, _isDisarmable, _isFlagged, _isHenchmenData, _isOneShot, _isTrap, _loadScreen, _transitionText, Aurora::GFF3Struct::getBool(), Aurora::GFF3Struct::getString(), Aurora::GFF3Struct::getUint(), and Engines::Jade::ScriptContainer::readScripts().

Referenced by load().

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

◆ loadInstance()

void Engines::Jade::Trigger::loadInstance ( const Aurora::GFF3Struct gff)
private

Load the trigger instance properties.

Definition at line 117 of file trigger.cpp.

References Aurora::NWScript::Object::_tag, _vertexBuffer, Graphics::VertexBuffer::getData(), Aurora::GFF3Struct::getList(), Aurora::GFF3Struct::getString(), Engines::Jade::Object::loadPositional(), Graphics::VertexBuffer::setVertexDeclLinear(), and Graphics::VPOSITION.

Referenced by load().

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

Member Data Documentation

◆ _isAreaTrans

bool Engines::Jade::Trigger::_isAreaTrans
private

Does this trigger represent an area transition?

Definition at line 73 of file trigger.h.

Referenced by isAreaTrans(), and loadBlueprint().

◆ _isCombatActive

bool Engines::Jade::Trigger::_isCombatActive
private

Does this trigger have henchmen data?

Definition at line 76 of file trigger.h.

◆ _isCombatArea

bool Engines::Jade::Trigger::_isCombatArea
private

Does this trigger lead to combat?

Definition at line 75 of file trigger.h.

◆ _isDetectable

bool Engines::Jade::Trigger::_isDetectable
private

Is this trigger detectable?

Definition at line 70 of file trigger.h.

Referenced by isDetectable(), and loadBlueprint().

◆ _isDisarmable

bool Engines::Jade::Trigger::_isDisarmable
private

Is this trigger disarmable?

Definition at line 71 of file trigger.h.

Referenced by isDisarmable(), and loadBlueprint().

◆ _isFlagged

bool Engines::Jade::Trigger::_isFlagged
private

Is this trigger flagged?

Definition at line 72 of file trigger.h.

Referenced by isFlagged(), and loadBlueprint().

◆ _isHenchmenData

bool Engines::Jade::Trigger::_isHenchmenData
private

Does this trigger have henchmen data?

Definition at line 74 of file trigger.h.

Referenced by isHenchmenData(), and loadBlueprint().

◆ _isOneShot

bool Engines::Jade::Trigger::_isOneShot
private

Does this trigger only fire once?

Definition at line 68 of file trigger.h.

Referenced by isOneShot(), and loadBlueprint().

◆ _isTrap

bool Engines::Jade::Trigger::_isTrap
private

Does this trigger represent a trap?

Definition at line 69 of file trigger.h.

Referenced by isTrap(), and loadBlueprint().

◆ _loadScreen

int Engines::Jade::Trigger::_loadScreen
private

The loading screen used.

Definition at line 78 of file trigger.h.

Referenced by loadBlueprint().

◆ _transitionText

Common::UString Engines::Jade::Trigger::_transitionText
private

The trigger's transition text.

Definition at line 80 of file trigger.h.

Referenced by getTransitionText(), and loadBlueprint().

◆ _vertexBuffer

Graphics::VertexBuffer Engines::Jade::Trigger::_vertexBuffer
private

Geometry outline vertex buffer.

Definition at line 82 of file trigger.h.

Referenced by loadInstance().


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