54 _pcSpeaker(0), _area(0) {
275 warning(
"TODO: Object::playAnimation(\"%s\", %s, %f, %f",
276 animation.
c_str(), restart ?
"true" :
"false", length, speed);
280 warning(
"TODO: Object::playAnimation(%d, %s, %f, %f",
281 (
int) animation, restart ?
"true" :
"false", length, speed);
303 _tooltip->addLine(line, 1.0f, 1.0f, 1.0f, 1.0f);
const Common::UString & getPortrait() const
Return the object's portrait.
virtual void unloadModel()
Unload the object's model(s).
Class to hold the two-dimensional array of a 2DA file.
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.
Handling BioWare's SSFs (sound set file).
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.
const Common::UString & getString(size_t column) const
Return the contents of a cell as a string.
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?
void setTriggerer(Object *obj)
virtual void setOrientation(float x, float y, float z, float angle)
Set the object's orientation.
void reset(PointerType o=0)
Resets the pointer with the new value.
const Common::UString & getName() const
Return the object's name.
Class to hold a sound set.
Context of an NWScript function.
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.
Utility functions for generating unique IDs.
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.
const Common::UString & getString(Language language, LanguageGender gender=kLanguageGenderCurrent) const
Get the string of that language.
void setArea(Area *area)
Set the location's area.
void setCaller(Object *obj)
The NWScript function manager.
Common::UString sound
ResRef of the sound to play while speaking this entry.
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.
void exceptionDispatcherWarning(const char *s,...)
Exception dispatcher that prints the exception as a warning, and adds another reason on top...
const Line * getOneLiner() const
Return the first active non-branching entry.
Basic exceptions to throw.
const char * c_str() const
Return the (utf8 encoded) string data.
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.
Utility templates and functions.
Handling BioWare's 2DAs (two-dimensional array).
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.
The global sound manager, handling all sound output.
bool empty() const
Is the string empty?
#define TwoDAReg
Shortcut for accessing the 2da registry.
bool createSpeechTooltip(const Common::UString &line)
Create a tooltip with a line the object should speak.
#define SoundMan
Shortcut for accessing the sound manager.
void setPosition(float x, float y, float z)
Set the location's position.
virtual void setArea(Area *)
Set the area this object is currently in.
void warning(const char *s,...)
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.
Sound::ChannelHandle playSound(const Common::UString &sound, Sound::SoundType soundType, bool loop, float volume, bool pitchVariance)
Play this sound resource.
Common::UString _portrait
The object's portrait.
An object in a Neverwinter Nights area.
void stopSound()
Stop the current object sound.
PointerType get() const
Returns the plain pointer value.
uint32 _soundSet
The object's sound set, as an index into soundset.2da.
const TwoDARow & getRow(size_t row) const
Get a row.
void setFacing(float facing)
Set the location's orientation.
virtual void leave()
The cursor left the object.
virtual void loadModel()
Load the object's model(s).
static const uint32 kFieldIDInvalid
void status(const char *s,...)
virtual void highlight(bool enabled)
(Un)Highlight the object.
bool _usable
Is the object usable?
virtual void show()
Show the object's model(s).
Common::ScopedPtr< Aurora::SSFFile > _ssf
The object's sound set.
Generic Aurora engines utility functions.
const Aurora::SSFFile * getSSF()
Return the object's sound set.
void setPCSpeaker(Aurora::NWScript::Object *pc)
Set the PC currently speaking with this object.
Manager for tokens in Aurora engines text strings.
Sound::ChannelHandle _sound
The currently playing object sound.
NWScript utility functions.
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.
Handling BioWare's DLGs (dialog / conversation files).
void loadSSF()
Load the object's sound set.
void hideTooltip()
Hide the tooltip again.
virtual void hide()
Hide the object's model(s).
uint32 generateIDNumber()
const std::list< uint32 > & getIDs() const
Return the object's model IDs.
LocString text
The actual text of the entry.