94 _model->setPosition(x, y, z);
102 _model->setOrientation(x, y, z, angle);
112 load(creature, utc ? &utc->getTopLevel() : 0);
141 float bearingX = instance.
getDouble(
"XOrientation");
142 float bearingY = instance.
getDouble(
"YOrientation");
180 if (portraitID != 0) {
184 if (!portrait.
empty())
197 warning(
"TODO: Model \"%s\": ModelType \"%s\" (\"%s\")",
226 const int headNormalID = appearance.
getInt(
"normalhead");
227 const int headBackupID = appearance.
getInt(
"backuphead");
231 if (headNormalID >= 0)
233 else if (headBackupID >= 0)
260 _model->attachModel(
"headhook", headModel);
264 _name =
"Fakoo McFakeston";
295 _model->drawBound(enabled);
329 _model->playDefaultAnimation();
351 _model->playAnimation(anim, restart, length, speed);
376 _model->addDefaultAnimation(
"cpause1", 100);
378 _model->addDefaultAnimation(
"pause1", 100);
Common::UString _conversation
Class to hold the two-dimensional array of a 2DA file.
Handling version V3.2/V3.3 of BioWare's GFFs (generic file format).
#define MKTAG(a0, a1, a2, a3)
A wrapper macro used around four character constants, like 'DATA', to ensure portability.
void setPosition(float x, float y, float z)
Set the creature's position.
void playDefaultAnimation()
void playAnimation(const Common::UString &anim, bool restart=true, float length=0.0f, float speed=1.0f)
Play a named animation.
A creature in a Star Wars: Knights of the Old Republic II - The Sith Lords area.
void highlight(bool enabled)
(Un)Highlight the creature.
bool isPartyMember() const
virtual void getPosition(float &x, float &y, float &z) const
Return the object's position within its area.
const Common::UString & getString(size_t column) const
Return the contents of a cell as a string.
bool getBool(const Common::UString &field, bool def=false) const
A class holding an UTF-8 string.
bool isVisible() const
Is the creature's model visible?
void reset(PointerType o=0)
Resets the pointer with the new value.
bool beginsWith(const UString &with) const
void loadBody(PartModels &parts)
The KotOR 2 character generation info.
virtual void setPosition(float x, float y, float z)
Set the object's position within its area.
void loadHead(PartModels &parts)
uint64 getUint(const Common::UString &field, uint64 def=0) const
bool _usable
Is the object usable?
void createPC(const CharacterGenerationInfo &info)
Create a player character creature.
void playAnimation(const Common::UString &anim, bool restart=true, float length=0.0f, float speed=1.0f)
void getPosition(float &x, float &y, float &z) const
Get the position of the node.
Aurora::GFF3File * loadOptionalGFF3(const Common::UString &gff3, Aurora::FileType type, uint32 id, bool repairNWNPremium)
Load a GFF3, but return 0 instead of throwing on error.
virtual void getOrientation(float &x, float &y, float &z, float &angle) const
Return the object's orientation.
Utility templates and functions for working with strings and streams.
void playDefaultAnimation()
void load(const Aurora::GFF3Struct &creature)
void loadProperties(const Aurora::GFF3Struct &gff)
void enter()
The cursor entered the creature.
Basic exceptions to throw.
bool isClickable() const
Can the player click the object?
const char * c_str() const
Return the (utf8 encoded) string data.
void leave()
The cursor left the creature.
void playHeadAnimation(const Common::UString &anim, bool restart=true, float length=0.0f, float speed=1.0f)
static UString format(const char *s,...) GCC_PRINTF(1
Print formatted data into an UString object, similar to sprintf().
std::list< uint32 > _ids
The object's model IDs.
Common::UString _name
The object's display name.
Utility templates and functions.
double getDouble(const Common::UString &field, double def=0.0) const
Common::UString _portrait
The object's portrait.
Handling BioWare's 2DAs (two-dimensional array).
bool _isPC
Is the creature a PC?
void info(const char *s,...)
bool runScript(Script script, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference())
A node within a 3D model.
void getPartModels(PartModels &parts, uint32 state='a')
float getCameraHeight() const
Parts of a creature's body.
bool empty() const
Is the string empty?
#define TwoDAReg
Shortcut for accessing the 2da registry.
Common::UString _modelType
const Common::UString & getConversation() const
void warning(const char *s,...)
int32 getInt(size_t column) const
Return the contents of a cell as an int.
AnimationChannel * getAnimationChannel(AnimationChannelName name)
const TwoDARow & getRow(size_t row) const
Get a row.
uint32 _appearance
The creature's general appearance.
bool isPC() const
Is the creature a player character?
static const uint32 kFieldIDInvalid
virtual void setOrientation(float x, float y, float z, float angle)
Set the object's orientation.
bool _static
Is the object static?
Common::UString bodyTexture
void hide()
Hide the creature's model.
Common::UString getString(const Common::UString &field, const Common::UString &def="") const
static float rad2deg(float rad)
Common::ScopedPtr< Graphics::Aurora::Model > _model
The creature's model.
Generic Aurora engines utility functions.
void readScripts(const Aurora::GFF3Struct &gff)
void setOrientation(float x, float y, float z, float angle)
Set the creature's orientation.
void createFakePC()
Create a fake player character creature for testing purposes.
Creature()
Create a dummy creature instance.
bool hasScript(Script script) const
Graphics::Aurora::Model * loadModelObject(const Common::UString &resref, const Common::UString &texture)
void show()
Show the creature's model.
Creature template (user), GFF.
bool click(Object *triggerer=0)
The creature was clicked.
Common::UString _description
The object's description.
void setDefaultAnimations()
void loadPortrait(const Aurora::GFF3Struct &gff)
void playDefaultHeadAnimation()
Generic Aurora engines model functions.