25 #ifndef ENGINES_KOTOR_OBJECT_H 26 #define ENGINES_KOTOR_OBJECT_H 63 const std::list<uint32> &
getIDs()
const;
97 virtual void getPosition(
float &x,
float &y,
float &z)
const;
99 virtual void getOrientation(
float &x,
float &y,
float &z,
float &angle)
const;
102 virtual void setPosition(
float x,
float y,
float z);
104 virtual void setOrientation(
float x,
float y,
float z,
float angle);
116 virtual void enter();
117 virtual void leave();
168 #endif // ENGINES_KOTOR_OBJECT_H
virtual void hide()
Hide the object's model(s).
void stopSound()
Stop the current object sound.
Room * _room
Room the object is in.
bool _static
Is the object static?
Sound::ChannelHandle _sound
The currently playing object sound.
A class holding an UTF-8 string.
const Common::UString & getPortrait() const
Return the object's portrait.
virtual void playAnimation(const Common::UString &anim, bool restart=true, float length=0.0f, float speed=1.0f)
ObjectType
Object type, matches the bitfield in nwscript.nss.
Common::UString _description
The object's description.
bool isStatic() const
Is the object static (not manipulable at all)?
ObjectType getType() const
Return the exact type of the object.
virtual void hideSoft()
Hide the object's model(s) if applicable.
virtual void show()
Show the object's model(s).
void setCurrentHitPoints(int hitpoints)
Set the current hitpoints.
int getCurrentHitPoints()
Return the objects current hitpoints.
Common::UString _portrait
The object's portrait.
const Common::UString & getName() const
Return the object's name.
bool isClickable() const
Can the player click the object?
Common::UString _name
The object's display name.
float _position[3]
The object's position.
Room * getRoom()
Get a room the object is in.
virtual bool isVisible() const
Is the object's model(s) visible?
ObjectType _type
The object's type.
virtual void setOrientation(float x, float y, float z, float angle)
Set the object's orientation.
bool getMinOneHitPoints() const
Get if the object has a minimum of one hp.
float _orientation[4]
The object's orientation.
int getMaxHitPoints()
Get the maximum hit points for the objects.
void setMinOneHitPoints(bool enabled)
Set if the object has a minimum of one hp.
Low-level type definitions to handle fixed width types portably.
const std::list< uint32 > & getIDs() const
Return the object's model IDs.
int _currentHitPoints
The current hitpoints of the object.
virtual void getOrientation(float &x, float &y, float &z, float &angle) const
Return the object's orientation.
bool isUsable() const
Can the object be used by the PC?
bool _minOneHitPoint
If the object should have at least one hitpoint.
void playSound(const Common::UString &sound, bool pitchVariance=false)
Play an object sound.
virtual void enter()
The cursor entered the object.
std::list< uint32 > _ids
The object's model IDs.
virtual bool click(Object *triggerer=0)
The object was clicked.
int _maxHitPoints
The maximum hitpoints of the object.
virtual void setPosition(float x, float y, float z)
Set the object's position within its area.
void makeLookAt(float x, float y)
A handle to a sound channel.
virtual void leave()
The cursor left the object.
An object containing scripts.
void setRoom(Room *room)
Set a room the object is in.
void setMaxHitPoints(int maxHP)
Set the maximum hit points for the objects.
virtual void getPosition(float &x, float &y, float &z) const
Return the object's position within its area.
bool _usable
Is the object usable?
virtual void highlight(bool enabled)
(Un)Highlight the object.
const Common::UString & getDescription() const
Return the object's description.
Basic Star Wars: Knights of the Old Republic type definitions.