67 load(item, uti ? &uti->getTopLevel() : 0);
135 static const char *
const kColorNames[
kColorMAX] = {
136 "Metal1Color" ,
"Metal2Color",
137 "Leather1Color",
"Leather2Color",
138 "Cloth1Color" ,
"Cloth2Color" 169 if (portraitID != 0) {
173 if (!portrait.
empty())
181 static const char *
const kArmorPartNames[] = {
187 "ArmorPart_RFoot" ,
"ArmorPart_LFoot" ,
188 "ArmorPart_RShin" ,
"ArmorPart_LShin" ,
189 "ArmorPart_LThigh",
"ArmorPart_RThigh",
190 "ArmorPart_RFArm" ,
"ArmorPart_LFArm" ,
191 "ArmorPart_RBicep",
"ArmorPart_LBicep",
192 "ArmorPart_RShoul",
"ArmorPart_LShoul",
193 "ArmorPart_RHand" ,
"ArmorPart_LHand" An inventory item in Neverwinter Nights.
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.
virtual void getOrientation(float &x, float &y, float &z, float &angle) const
Return the object's orientation.
uint32 getArmorPart(size_t index) const
Item(const Aurora::GFF3Struct &item)
const Common::UString & getString(size_t column) const
Return the contents of a cell as a string.
void readScripts(const Aurora::GFF3Struct &gff)
A class holding an UTF-8 string.
Common::UString _modelName
The model's resource name.
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.
void reset(PointerType o=0)
Resets the pointer with the new value.
Common::UString _name
The object's display name.
uint64 getUint(const Common::UString &field, uint64 def=0) const
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.
void loadProperties(const Aurora::GFF3Struct &gff)
uint32 getColor(Color color) const
Basic exceptions to throw.
void loadArmorParts(const Aurora::GFF3Struct &gff)
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.
Utility templates and functions.
Handling BioWare's 2DAs (two-dimensional array).
void hide()
Hide the item's model.
virtual void setPosition(float x, float y, float z)
Set the object's position within its area.
Common::UString _description
The object's description.
bool empty() const
Is the string empty?
#define TwoDAReg
Shortcut for accessing the 2da registry.
void show()
Show the item's model.
uint32 _armorParts[kArmorPartMAX]
The item's armor parts.
void warning(const char *s,...)
void unloadModel()
Unload the item's model.
Common::UString _portrait
The object's portrait.
const TwoDARow & getRow(size_t row) const
Get a row.
uint32 _colors[kColorMAX]
The item's colors.
Item template (user), GFF.
static const uint32 kFieldIDInvalid
Common::ScopedPtr< Graphics::Aurora::Model > _model
The item's model.
Common::UString getString(const Common::UString &field, const Common::UString &def="") const
Generic Aurora engines utility functions.
uint32 _baseItem
The index within the baseitem 2DA.
void load(const Aurora::GFF3Struct &item)
Graphics::Aurora::Model * loadModelObject(const Common::UString &resref, const Common::UString &texture)
void loadModel()
Load the item's model.
void loadPortrait(const Aurora::GFF3Struct &gff)
Generic Aurora engines model functions.