41 _state(kStateDefault), _hasInventory(false) {
65 _model->setState(
"default");
125 _model->drawBound(enabled);
152 return close(triggerer);
154 return open(triggerer);
bool isActivated() const
Is the placeable activated?
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.
Common::UString _soundUsed
The sound the object makes when used.
void hide()
Hide the placeable's model.
void load(const Aurora::GFF3Struct &instance, const Aurora::GFF3Struct *blueprint=0)
Load the situated object from an instance and its blueprint.
bool deactivate(Object *closer)
The user object deactivates this placeable.
bool _hasInventory
Does this placeable have an inventory?
bool getBool(const Common::UString &field, bool def=false) const
A class holding an UTF-8 string.
void playSound(const Common::UString &sound, bool pitchVariance=false)
Play an object sound.
An object within a Witcher area.
void reset(PointerType o=0)
Resets the pointer with the new value.
Common::ScopedPtr< Graphics::Aurora::Model > _model
The situated object's model.
State _state
The current state of the placeable.
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.
Placeable(const Aurora::GFF3Struct &placeable)
Load from a placeable instance.
bool close(Object *closer)
The closer object closes this placeable.
bool isOpen() const
Is the placeable open?
A simple scoped smart pointer template.
bool open(Object *opener)
The opener object opens this placeable.
bool runScript(Script script, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference())
Object * _lastUsedBy
The object that last used this situated object.
Utility templates and functions.
Common::UString _soundClosed
The sound the object makes when closed.
Placeable template (user), GFF.
void enter()
The cursor entered the placeable.
Common::UString _soundLocked
The sound the object makes when locked.
void load(const Aurora::GFF3Struct &placeable)
Load from a placeable instance.
bool empty() const
Is the string empty?
bool isLocked() const
Is the situated object locked?
void highlight(bool enabled)
(Un)Highlight the placeable.
void show()
Show the placeable's model.
State
The state of a placeable.
Object * _lastOpenedBy
The object that last opened this situated object.
void show()
Show the situated object's model.
Object * _lastClosedBy
The object that last closed this situated object.
Common::UString _soundOpened
The sound the object makes when opened.
Common::UString getString(const Common::UString &field, const Common::UString &def="") const
Generic Aurora engines utility functions.
void loadObject(const Aurora::GFF3Struct &gff)
Load placeable-specific properties.
bool click(Object *triggerer=0)
The placeable was clicked.
void leave()
The cursor left the placeable.
bool activate(Object *opener)
The user object activates this placeable.
void hide()
Hide the situated object's model.
A placeable object in a The Witcher area.
void setModelState()
Sync the model's state with the placeable's state.