|
xoreos
0.0.5
|
An area in Jade Empire, holding all objects and rooms within, as well as general area properties like the current background music and ambient sounds. More...
#include <area.h>


Public Member Functions | |
| Area (Module &module, const Common::UString &resRef) | |
| ~Area () | |
| void | show () |
| void | hide () |
| void | addEvent (const Events::Event &event) |
| Add a single event for consideration into the area event queue. More... | |
| void | processEventQueue () |
| Process the current event queue. More... | |
| void | removeFocus () |
| Forcibly remove the focus from the currently highlighted object. More... | |
Public Member Functions inherited from Engines::Jade::AreaLayout | |
| AreaLayout (const Common::UString &resRef) | |
| virtual | ~AreaLayout () |
| const Common::UString & | getResRef () |
| Return the area's resref (resource ID). More... | |
| void | updateCamera () |
Public Member Functions inherited from Engines::Jade::Object | |
| Object (ObjectType type=kObjectTypeInvalid) | |
| virtual | ~Object () |
| ObjectType | getType () const |
| Return the exact type of the object. More... | |
| virtual void | loadModel () |
| Load the object's model(s). More... | |
| virtual void | unloadModel () |
| Unload the object's model(s). More... | |
| const std::list< uint32 > & | getIDs () const |
| Return the object's model IDs. More... | |
| const Common::UString & | getName () const |
| Return the object's name. More... | |
| const Common::UString & | getDescription () const |
| Return the object's description. More... | |
| const Common::UString & | getConversation () const |
| Return the object's default conversation (DLG). More... | |
| Aurora::NWScript::Object * | getPCSpeaker () const |
| Return the PC currently speaking with this object. More... | |
| void | setPCSpeaker (Aurora::NWScript::Object *pc) |
| Set the PC currently speaking with this object. More... | |
| bool | isStatic () const |
| Is the object static (not manipulable at all)? More... | |
| bool | isUsable () const |
| Can the object be used by the PC? More... | |
| bool | isActive () const |
| Is the object currently active/available/visible? More... | |
| bool | isNoCollide () const |
| Is collision checking disabled? More... | |
| void | setNoCollide (bool noCollide) |
| Enable or disable collision checking. More... | |
| bool | isClickable () const |
| Can the player click the object? More... | |
| Area * | getArea () const |
| Return the area this object is currently in. More... | |
| void | setArea (Area *) |
| Set the area this object is currently in. More... | |
| virtual void | getPosition (float &x, float &y, float &z) const |
| Return the object's position within its area. More... | |
| virtual void | getOrientation (float &x, float &y, float &z, float &angle) const |
| Return the object's orientation. More... | |
| virtual void | setPosition (float x, float y, float z) |
| Set the object's position within its area. More... | |
| virtual void | setOrientation (float x, float y, float z, float angle) |
| Set the object's orientation. More... | |
| Location | getLocation () const |
| Create a Location out of the object's area, position and orientation. More... | |
| virtual void | enter () |
| The cursor entered the object. More... | |
| virtual void | leave () |
| The cursor left the object. More... | |
| virtual void | highlight (bool enabled) |
| (Un)Highlight the object. More... | |
| virtual bool | click (Object *triggerer=0) |
| The object was clicked. More... | |
| Object * | getLastTriggerer () const |
| Return the object that last triggered this object. More... | |
| void | speakString (int32 resref) |
| Speak the specified string. More... | |
| virtual void | playAnimation (const Common::UString &animation="", bool restart=true, int32 loopCount=0) |
| Play an object animation. More... | |
| virtual void | playAnimation (Animation animation) |
| Play a default object animation. More... | |
Public Member Functions inherited from Aurora::NWScript::Object | |
| Object () | |
| uint32 | getID () const |
| const Common::UString & | getTag () const |
Public Member Functions inherited from Aurora::NWScript::VariableContainer | |
| VariableContainer () | |
| virtual | ~VariableContainer () |
| bool | hasVariable (const Common::UString &var) const |
| Variable & | getVariable (const Common::UString &var, Type type=kTypeVoid) |
| const Variable & | getVariable (const Common::UString &var) const |
| void | setVariable (const Common::UString &var, const Variable &value) |
| void | removeVariable (const Common::UString &var) |
| void | clearVariables () |
Public Member Functions inherited from Engines::Jade::ScriptContainer | |
| ScriptContainer () | |
| ~ScriptContainer () | |
| const Common::UString & | getScript (Script script) const |
| bool | hasScript (Script script) const |
| bool | runScript (Script script, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) |
Public Member Functions inherited from Events::Notifyable | |
| Notifyable () | |
| virtual | ~Notifyable () |
Protected Member Functions | |
| void | notifyCameraMoved () |
Protected Member Functions inherited from Engines::Jade::AreaLayout | |
| AreaLayout () | |
Protected Member Functions inherited from Engines::Jade::Object | |
| void | loadPositional (const Aurora::GFF3Struct &gff) |
| Load the object's positional gff struct which contains the position and orientation. More... | |
Protected Member Functions inherited from Engines::Jade::ScriptContainer | |
| void | clearScripts () |
| void | readScripts (const Aurora::GFF3Struct &gff) |
| void | readScripts (const ScriptContainer &container) |
Private Types | |
| typedef Common::PtrList< Object > | ObjectList |
| typedef std::map< uint32, Object * > | ObjectMap |
Private Member Functions | |
| void | clear () |
| void | load () |
| void | loadARE (const Aurora::GFF3Struct &are) |
| void | loadSAV (const Aurora::GFF3Struct &sav) |
| void | loadResources () |
| void | loadObject (Jade::Object &object) |
| void | loadWaypoints (const Aurora::GFF3List &list) |
| void | loadCreatures (const Aurora::GFF3List &list) |
| void | loadPlaceables (const Aurora::GFF3List &list) |
| void | loadTriggers (const Aurora::GFF3List &list) |
| void | checkActive (int x=-1, int y=-1) |
| void | setActive (Jade::Object *object) |
| Jade::Object * | getObjectAt (int x, int y) |
| void | highlightAll (bool enabled) |
| void | click (int x, int y) |
Private Attributes | |
| Module * | _module |
| The module this area is in. More... | |
| ObjectList | _objects |
| List of all objects in the area. More... | |
| ObjectMap | _objectMap |
| Map of all non-static objects in the area. More... | |
| Jade::Object * | _activeObject |
| The currently active (highlighted) object. More... | |
| bool | _highlightAll |
| Are we currently highlighting all objects? More... | |
| std::list< Events::Event > | _eventQueue |
| The event queue. More... | |
| Common::Mutex | _mutex |
| Mutex securing access to the area. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Engines::Jade::ScriptContainer | |
| static bool | runScript (const Common::UString &script, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) |
| static bool | runScript (const Common::UString &script, const Aurora::NWScript::ScriptState &state, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) |
Protected Attributes inherited from Engines::Jade::AreaLayout | |
| Common::UString | _resRef |
| The area's resref (resource ID). More... | |
| Common::UString | _layout |
| The area's layout resref (resource ID). More... | |
| std::list< Common::ChangeID > | _resources |
| The area's resource archives. More... | |
| bool | _visible |
| Is the area currently visible? More... | |
Protected Attributes inherited from Engines::Jade::Object | |
| ObjectType | _type |
| The object's type. More... | |
| Common::UString | _name |
| The object's display name. More... | |
| Common::UString | _description |
| The object's description. More... | |
| Common::UString | _conversation |
| The object's default conversation. More... | |
| bool | _static |
| Is the object static? More... | |
| bool | _usable |
| Is the object usable? More... | |
| bool | _active |
| Is the object currently active/available/visible? More... | |
| bool | _noCollide |
| Is collision checking for the object disabled? More... | |
| std::list< uint32 > | _ids |
| The object's model IDs. More... | |
| Aurora::NWScript::Object * | _pcSpeaker |
| The current PC speaking with the object. More... | |
| Area * | _area |
| The area the object is currently in. More... | |
| Object * | _lastTriggerer |
| The object that last used this object. More... | |
| float | _position [3] |
| The object's position. More... | |
| float | _orientation [4] |
| The object's orientation. More... | |
Protected Attributes inherited from Aurora::NWScript::Object | |
| uint32 | _id |
| Common::UString | _tag |
An area in Jade Empire, holding all objects and rooms within, as well as general area properties like the current background music and ambient sounds.
Note: the coordinate system of the in-world graphics is oriented as viewed from the top down. The negative Z axis goes down into the ground, while the positive Y axis points due north and the positive X axis points due east.
|
private |
|
private |
| Engines::Jade::Area::Area | ( | Module & | module, |
| const Common::UString & | resRef | ||
| ) |
Definition at line 50 of file area.cpp.
References _module, Engines::Jade::AreaLayout::_resRef, Engines::Jade::ObjectContainer::addObject(), clear(), and load().

| Engines::Jade::Area::~Area | ( | ) |
Definition at line 66 of file area.cpp.
References _module, clear(), hide(), removeFocus(), and Engines::Jade::ObjectContainer::removeObject().

| void Engines::Jade::Area::addEvent | ( | const Events::Event & | event | ) |
Add a single event for consideration into the area event queue.
Definition at line 233 of file area.cpp.
References _eventQueue.
|
private |
Definition at line 289 of file area.cpp.
References _highlightAll, _mutex, CursorMan, getObjectAt(), and setActive().
Referenced by notifyCameraMoved(), and processEventQueue().


|
privatevirtual |
Reimplemented from Engines::Jade::AreaLayout.
Definition at line 86 of file area.cpp.
References _module, _objects, Common::PtrList< T, Deallocator >::clear(), Engines::Jade::AreaLayout::clear(), and Engines::Jade::ObjectContainer::removeObject().
Referenced by Area(), and ~Area().


|
private |
Definition at line 301 of file area.cpp.
References _module, _mutex, Engines::Jade::Object::click(), getObjectAt(), and Engines::Jade::Module::getPC().
Referenced by processEventQueue().


|
private |
Definition at line 264 of file area.cpp.
References _objectMap, Graphics::Renderable::getID(), and GfxMan.
Referenced by checkActive(), and click().


|
virtual |
Reimplemented from Engines::Jade::AreaLayout.
Definition at line 115 of file area.cpp.
References _objects, Engines::Jade::AreaLayout::_visible, GfxMan, Engines::Jade::AreaLayout::hide(), and removeFocus().
Referenced by ~Area().


|
private |
Definition at line 311 of file area.cpp.
References _highlightAll, and _objectMap.
Referenced by processEventQueue().

|
privatevirtual |
Reimplemented from Engines::Jade::AreaLayout.
Definition at line 76 of file area.cpp.
References Engines::Jade::AreaLayout::_resRef, Aurora::GFF3File::getTopLevel(), Aurora::kFileTypeARE, Aurora::kFileTypeSAV, Engines::Jade::AreaLayout::load(), loadARE(), loadSAV(), and MKTAG.
Referenced by Area().


|
private |
Definition at line 132 of file area.cpp.
References Engines::Jade::AreaLayout::_layout, Aurora::GFF3Struct::getString(), and Engines::Jade::ScriptContainer::readScripts().
Referenced by load().


|
private |
Definition at line 209 of file area.cpp.
References loadObject().
Referenced by loadSAV().


|
private |
Definition at line 189 of file area.cpp.
References _module, _objectMap, _objects, Engines::Jade::ObjectContainer::addObject(), and Engines::Jade::Object::isStatic().
Referenced by loadCreatures(), loadPlaceables(), loadTriggers(), and loadWaypoints().


|
private |
Definition at line 217 of file area.cpp.
References loadObject().
Referenced by loadSAV().


|
privatevirtual |
Reimplemented from Engines::Jade::AreaLayout.
Definition at line 179 of file area.cpp.
References Engines::Jade::AreaLayout::_layout, Engines::Jade::AreaLayout::_resources, Engines::Jade::AreaLayout::_resRef, and Engines::indexMandatoryArchive().

|
private |
Definition at line 139 of file area.cpp.
References Aurora::GFF3Struct::getList(), Aurora::GFF3Struct::getStruct(), Aurora::GFF3Struct::hasField(), loadCreatures(), loadPlaceables(), loadTriggers(), and loadWaypoints().
Referenced by load().


|
private |
Definition at line 225 of file area.cpp.
References loadObject().
Referenced by loadSAV().


|
private |
Definition at line 201 of file area.cpp.
References loadObject().
Referenced by loadSAV().


|
protectedvirtual |
Reimplemented from Events::Notifyable.
Definition at line 329 of file area.cpp.
References checkActive().

| void Engines::Jade::Area::processEventQueue | ( | ) |
Process the current event queue.
Definition at line 237 of file area.cpp.
References _eventQueue, checkActive(), click(), highlightAll(), Events::kEventKeyDown, Events::kEventKeyUp, Events::kEventMouseDown, and Events::kEventMouseMove.

| void Engines::Jade::Area::removeFocus | ( | ) |
Forcibly remove the focus from the currently highlighted object.
Definition at line 322 of file area.cpp.
References _activeObject, and Engines::Jade::Object::leave().
Referenced by hide(), and ~Area().


|
private |
Definition at line 276 of file area.cpp.
References _activeObject, Engines::Jade::Object::enter(), and Engines::Jade::Object::leave().
Referenced by checkActive().


|
virtual |
Reimplemented from Engines::Jade::AreaLayout.
Definition at line 96 of file area.cpp.
References _objects, Engines::Jade::AreaLayout::_visible, GfxMan, Engines::Jade::kScriptOnSpawn, and Engines::Jade::AreaLayout::show().

|
private |
The currently active (highlighted) object.
Definition at line 94 of file area.h.
Referenced by removeFocus(), and setActive().
|
private |
The event queue.
Definition at line 98 of file area.h.
Referenced by addEvent(), and processEventQueue().
|
private |
Are we currently highlighting all objects?
Definition at line 96 of file area.h.
Referenced by checkActive(), and highlightAll().
|
private |
|
private |
Mutex securing access to the area.
Definition at line 100 of file area.h.
Referenced by checkActive(), and click().
|
private |
Map of all non-static objects in the area.
Definition at line 91 of file area.h.
Referenced by getObjectAt(), highlightAll(), and loadObject().
|
private |
1.8.14