25 #ifndef ENGINES_NWN_OBJECT_H 26 #define ENGINES_NWN_OBJECT_H 76 const std::list<uint32> &
getIDs()
const;
115 virtual void getPosition(
float &x,
float &y,
float &z)
const;
117 virtual void getOrientation(
float &x,
float &y,
float &z,
float &angle)
const;
120 virtual void setPosition(
float x,
float y,
float z);
122 virtual void setOrientation(
float x,
float y,
float z,
float angle);
129 virtual void enter();
130 virtual void leave();
157 float length = 0.0f,
float speed = 1.0f);
160 float length = 0.0f,
float speed = 1.0f);
220 #endif // ENGINES_NWN_OBJECT_H const Common::UString & getPortrait() const
Return the object's portrait.
virtual void unloadModel()
Unload the object's model(s).
void destroyTooltip()
Destroy all tooltips on this object.
bool showSpeechTooltip(const Common::UString &line)
Create and show a tooltip with a line the object speaks.
virtual void getOrientation(float &x, float &y, float &z, float &angle) const
Return the object's orientation.
virtual bool createTooltip(Tooltip::Type type)
Create an empty tooltip.
bool isUsable() const
Can the object be used by the PC?
bool beginConversation(Object *triggerer)
Begin a conversation between the triggerer and this object.
bool createFeedbackTooltip()
Create a tooltip with the name and/or portrait of the object.
A class holding an UTF-8 string.
const Common::UString & getConversation() const
Return the object's default conversation (DLG).
bool isClickable() const
Can the player click the object?
virtual void setOrientation(float x, float y, float z, float angle)
Set the object's orientation.
const Common::UString & getName() const
Return the object's name.
Class to hold a sound set.
Common::UString _name
The object's display name.
Location getLocation() const
Create a Location out of the object's area, position and orientation.
Aurora::NWScript::Object * _pcSpeaker
The current PC speaking with the object.
Area * getArea() const
Return the area this object is currently in.
Basic Neverwinter Nights type definitions.
virtual bool click(Object *triggerer=0)
The object was clicked.
const Common::UString & getDescription() const
Return the object's description.
An area in Neverwinter Nights, holding all objects and room tiles within, as well as general area pro...
bool isStatic() const
Is the object static (not manipulable at all)?
virtual void speakString(const Common::UString &string, uint32 volume)
Speak the specified string.
A simple scoped smart pointer template.
virtual void enter()
The cursor entered the object.
virtual void playAnimation(const Common::UString &animation="", bool restart=true, float length=0.0f, float speed=1.0f)
Play an object animation.
std::list< uint32 > _ids
The object's model IDs.
virtual void getPosition(float &x, float &y, float &z) const
Return the object's position within its area.
float _orientation[4]
The object's orientation.
Common::ScopedPtr< Tooltip > _tooltip
The tooltip displayed over the object.
virtual void setPosition(float x, float y, float z)
Set the object's position within its area.
Common::UString _description
The object's description.
Area * _area
The area the object is currently in.
bool showFeedbackTooltip()
Create and show a tooltip with the name and/or portrait of the object.
Aurora::NWScript::Object * getPCSpeaker() const
Return the PC currently speaking with this object.
bool _static
Is the object static?
void playSound(const Common::UString &sound, bool pitchVariance=false)
Play an object sound.
Low-level type definitions to handle fixed width types portably.
bool createSpeechTooltip(const Common::UString &line)
Create a tooltip with a line the object should speak.
virtual void setArea(Area *)
Set the area this object is currently in.
ObjectType _type
The object's type.
void speakOneLiner(Common::UString conv, Object *tokenTarget=0)
Speak an one-liner from the specified conversation file.
ObjectType
Object type, matches the bitfield in nwscript.nss.
Common::UString _portrait
The object's portrait.
void stopSound()
Stop the current object sound.
uint32 _soundSet
The object's sound set, as an index into soundset.2da.
virtual void leave()
The cursor left the object.
virtual void loadModel()
Load the object's model(s).
A handle to a sound channel.
virtual void highlight(bool enabled)
(Un)Highlight the object.
bool _usable
Is the object usable?
virtual void show()
Show the object's model(s).
A location within a Neverwinter Nights area.
Common::ScopedPtr< Aurora::SSFFile > _ssf
The object's sound set.
const Aurora::SSFFile * getSSF()
Return the object's sound set.
void setPCSpeaker(Aurora::NWScript::Object *pc)
Set the PC currently speaking with this object.
An object containing scripts.
Sound::ChannelHandle _sound
The currently playing object sound.
float _position[3]
The object's position.
ObjectType getType() const
Return the exact type of the object.
Common::UString _conversation
The object's default conversation.
void loadSSF()
Load the object's sound set.
void hideTooltip()
Hide the tooltip again.
virtual void hide()
Hide the object's model(s).
const std::list< uint32 > & getIDs() const
Return the object's model IDs.