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

#include <creature.h>

Inheritance diagram for Engines::Witcher::Creature:
Inheritance graph
[legend]
Collaboration diagram for Engines::Witcher::Creature:
Collaboration graph
[legend]

Public Member Functions

 Creature (const Common::UString &utc)
 Load from a creature template. More...
 
 ~Creature ()
 
bool isPC () const
 Is the creature a player character? More...
 
- Public Member Functions inherited from Engines::Witcher::Object
 Object (ObjectType type=kObjectTypeInvalid)
 
virtual ~Object ()
 
ObjectType getType () const
 Return the exact type of the object. More...
 
virtual void refreshLocalized ()
 Refresh all localized strings. 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::UStringgetUniqueID () const
 Return the object's globally unique ID. More...
 
const Aurora::LocStringgetName () const
 Return the object's name. More...
 
const Aurora::LocStringgetDescription () const
 Return the object's description. More...
 
const Common::UStringgetConversation () const
 Return the object's default conversation (DLG). 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...
 
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...
 
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::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::Witcher::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 Common::UString &utc)
 
void load (const Aurora::GFF3Struct &utc)
 

Private Attributes

bool _isPC
 Is the creature a PC? More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Engines::Witcher::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::Witcher::ScriptContainer
void clearScripts ()
 
void readScripts (const Aurora::GFF3Struct &gff)
 
void readScripts (const ScriptContainer &container)
 
- Protected Attributes inherited from Engines::Witcher::Object
ObjectType _type
 The object's type. More...
 
Common::UString _uniqueID
 A globally unique ID. More...
 
Aurora::LocString _name
 The object's name. More...
 
Aurora::LocString _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...
 
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
 

Detailed Description

Definition at line 38 of file creature.h.

Constructor & Destructor Documentation

◆ Creature()

Engines::Witcher::Creature::Creature ( const Common::UString utc)

Load from a creature template.

Definition at line 37 of file creature.cpp.

References load().

Here is the call graph for this function:

◆ ~Creature()

Engines::Witcher::Creature::~Creature ( )

Definition at line 43 of file creature.cpp.

Member Function Documentation

◆ isPC()

bool Engines::Witcher::Creature::isPC ( ) const

Is the creature a player character?

Definition at line 46 of file creature.cpp.

References _isPC.

Referenced by Engines::Witcher::ObjectContainer::toPC().

Here is the caller graph for this function:

◆ load() [1/2]

void Engines::Witcher::Creature::load ( const Common::UString utc)
private

Definition at line 50 of file creature.cpp.

References Aurora::GFF3File::getTopLevel(), Aurora::kFileTypeUTC, and MKTAG.

Referenced by Creature().

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

◆ load() [2/2]

void Engines::Witcher::Creature::load ( const Aurora::GFF3Struct utc)
private

Member Data Documentation

◆ _isPC

bool Engines::Witcher::Creature::_isPC
private

Is the creature a PC?

Definition at line 49 of file creature.h.

Referenced by isPC(), and load().


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