43 _module(&module), _state(kStateClosed) {
67 _model->setState(
"closed");
71 _model->setState(
"opened1");
75 _model->setState(
"opened2");
122 _model->drawBound(enabled);
130 return open(triggerer);
142 return close(triggerer);
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.
bool hasScript(Script script) const
bool close(Object *closer)
The closer object closes this door.
State
The state of a door.
void load(const Aurora::GFF3Struct &instance, const Aurora::GFF3Struct *blueprint=0)
Load the situated object from an instance and its blueprint.
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.
void highlight(bool enabled)
(Un)Highlight the door.
Common::ScopedPtr< Graphics::Aurora::Model > _model
The situated object's model.
Module * _module
The module the door is in.
void leave()
The cursor left the door.
State _state
The current state of the door.
Common::UString _linkedToModule
The module the waypoint this door links to is in.
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.
A door in a The Witcher area.
A simple scoped smart pointer template.
bool runScript(Script script, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference())
void load(const Aurora::GFF3Struct &door)
Load from a door instance.
Object * _lastUsedBy
The object that last used this situated object.
void hide()
Hide the door's model.
Utility templates and functions.
Common::UString _soundClosed
The sound the object makes when closed.
void setModelState()
Sync the model's state with the door's state.
void loadObject(const Aurora::GFF3Struct &gff)
Load door-specific properties.
Common::UString _soundLocked
The sound the object makes when locked.
bool empty() const
Is the string empty?
Common::UString _linkedTo
The waypoint tag this door links to.
A waypoint in a The Witcher area.
void show()
Show the door's model.
bool isLocked() const
Is the situated object locked?
void enter()
The cursor entered the door.
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.
The context needed to run a The Witcher module.
Opened in one direction (normally clock-wise).
Opened in the other direction (normally counter-clock-wise).
Door template (user), GFF.
Common::UString getString(const Common::UString &field, const Common::UString &def="") const
Door(Module &module, const Aurora::GFF3Struct &door)
Load from a door instance.
Generic Aurora engines utility functions.
bool isOpen() const
Is the door open?
bool open(Object *opener)
The opener object opens this door.
void hide()
Hide the situated object's model.
void movePC(const Common::UString &area)
Move the player character to this area.
bool click(Object *triggerer=0)
The door was clicked.