|
xoreos
0.0.5
|
An area in Dragon Age II, 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 (Campaign &campaign, const Common::UString &resRef, const Common::UString &env, const Common::UString &rim) | |
| ~Area () | |
| const Common::UString & | getResRef () const |
| const Aurora::LocString & | getName () const |
| void | getEntryLocation (float &posX, float &posY, float &posZ, float &orientX, float &orientY, float &orientZ, float &orientAngle) const |
| Return the position and orientation the PC should enter this area. More... | |
| void | show () |
| Show the object's model(s). More... | |
| void | hide () |
| Hide the object's model(s). More... | |
| 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::DragonAge2::Object | |
| Object (ObjectType type=kObjectTypeInvalid) | |
| virtual | ~Object () |
| ObjectType | getType () const |
| Return the exact type of the object. More... | |
| const std::list< uint32 > & | getIDs () const |
| Return the object's model IDs. More... | |
| const Common::UString & | getResRef () const |
| Return the object's resource reference. More... | |
| const Aurora::LocString & | getName () const |
| Return the object's name. More... | |
| const Aurora::LocString & | getDescription () const |
| Return the object's description. More... | |
| const Common::UString & | getConversation () const |
| Return the object's default conversation (DLG). More... | |
| const Common::UString & | getNonLocalizedName () const |
| Return the object's non-localized name. More... | |
| void | setNonLocalizedName (const Common::UString &name) |
| Set the object's non-localized name. 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 | isClickable () const |
| Can the player click the object? 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... | |
| 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... | |
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::DragonAge2::ScriptContainer | |
| ScriptContainer () | |
| ~ScriptContainer () | |
| const Common::UString & | getScript () const |
| bool | hasScript () const |
| void | enableEvent (EventType event, bool enabled) |
| Enable/Disable the handling of a specific event. More... | |
| void | enableEvents (bool enabled) |
| Enable/Disable the handling of all events. More... | |
| bool | runScript (EventType event, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) |
| bool | runScript (Event &event) |
Public Member Functions inherited from Events::Notifyable | |
| Notifyable () | |
| virtual | ~Notifyable () |
Static Public Member Functions | |
| static Common::UString | getName (const Common::UString &resRef, const Common::UString &rimFile="") |
Static Public Member Functions inherited from Engines::DragonAge2::ScriptContainer | |
| static bool | runScript (const Common::UString &script, EventType event, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) |
| static bool | runScript (const Common::UString &script, EventType event, const Aurora::NWScript::ScriptState &state, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) |
| static bool | runScript (const Common::UString &script, Event &event) |
| static bool | runScript (const Common::UString &script, Event &event, const Aurora::NWScript::ScriptState &state) |
Protected Member Functions | |
| void | notifyCameraMoved () |
Protected Member Functions inherited from Engines::DragonAge2::Object | |
| void | syncPosition () |
| void | syncOrientation () |
| void | readVarTable (const Aurora::GFF3List &varTable) |
| void | readVarTable (const Aurora::GFF3Struct &gff) |
| void | readVarTable (const Aurora::GFF4List &varTable) |
| void | readVarTable (const Aurora::GFF4Struct &gff) |
Protected Member Functions inherited from Engines::DragonAge2::ScriptContainer | |
| void | clearScript () |
| void | readScript (const Aurora::GFF3Struct &gff) |
| void | readScript (const Aurora::GFF4Struct &gff) |
Private Types | |
| typedef Common::PtrVector< Room > | Rooms |
| typedef Common::PtrList< DragonAge2::Object > | Objects |
| typedef std::map< uint32, DragonAge2::Object * > | ObjectMap |
Private Member Functions | |
| void | load (const Common::UString &resRef, const Common::UString &env, const Common::UString &rim) |
| void | loadEnvironment (const Common::UString &resRef) |
| void | loadARE (const Common::UString &resRef) |
| void | loadObject (DragonAge2::Object &object) |
| void | loadWaypoints (const Aurora::GFF3List &list) |
| void | loadPlaceables (const Aurora::GFF3List &list) |
| void | loadCreatures (const Aurora::GFF3List &list) |
| void | checkActive (int x=-1, int y=-1) |
| void | setActive (DragonAge2::Object *object) |
| DragonAge2::Object * | getObjectAt (int x, int y) |
| void | highlightAll (bool enabled) |
| void | click (int x, int y) |
| void | clean () |
Private Attributes | |
| Campaign * | _campaign |
| Common::UString | _resRef |
| uint32 | _environmentID |
| Common::UString | _environmentName |
| Common::UString | _skyDome |
| Common::UString | _startPoint |
| Common::UString | _script |
| Aurora::LocString | _name |
| Rooms | _rooms |
| ChangeList | _resources |
| std::list< Events::Event > | _eventQueue |
| Objects | _objects |
| List of all objects in the area. More... | |
| ObjectMap | _objectMap |
| Map of objects by their model IDs. More... | |
| DragonAge2::Object * | _activeObject |
| The currently active (highlighted) object. More... | |
| bool | _highlightAll |
| Are we currently highlighting all objects? More... | |
| Common::Mutex | _mutex |
Additional Inherited Members | |
Protected Attributes inherited from Engines::DragonAge2::Object | |
| ObjectType | _type |
| The object's type. More... | |
| Common::UString | _resRef |
| The object's resource reference. More... | |
| Aurora::LocString | _name |
| The object's display name. More... | |
| Aurora::LocString | _description |
| The object's description. More... | |
| Common::UString | _nonLocalizedName |
| The object's non-localized name. More... | |
| Common::UString | _conversation |
| The object's default conversation. More... | |
| Common::UString | _soundSet |
| The object's sound set. More... | |
| bool | _static |
| Is the object static? More... | |
| bool | _usable |
| Is the object usable? More... | |
| std::list< uint32 > | _ids |
| The object's model IDs. 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 Dragon Age II, 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 |
|
private |
| Engines::DragonAge2::Area::Area | ( | Campaign & | campaign, |
| const Common::UString & | resRef, | ||
| const Common::UString & | env, | ||
| const Common::UString & | rim | ||
| ) |
Definition at line 69 of file area.cpp.
References Common::StackException::add(), Common::UString::c_str(), clean(), and load().

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


|
private |
Definition at line 98 of file area.cpp.
References _campaign, _objects, _resources, Engines::deindexResources(), and Engines::DragonAge2::ObjectContainer::removeObject().
Referenced by Area(), and ~Area().


|
private |
Definition at line 358 of file area.cpp.
References _campaign, _mutex, Engines::DragonAge2::Object::click(), getObjectAt(), and Engines::DragonAge2::Campaign::getPC().
Referenced by processEventQueue().


| void Engines::DragonAge2::Area::getEntryLocation | ( | float & | posX, |
| float & | posY, | ||
| float & | posZ, | ||
| float & | orientX, | ||
| float & | orientY, | ||
| float & | orientZ, | ||
| float & | orientAngle | ||
| ) | const |
Return the position and orientation the PC should enter this area.
Definition at line 262 of file area.cpp.
References _campaign, _startPoint, Aurora::NWScript::ObjectContainer::getFirstObject(), Aurora::NWScript::ObjectContainer::getFirstObjectByTag(), Engines::DragonAge2::ObjectContainer::getFirstObjectByType(), Engines::DragonAge2::Object::getPosition(), Engines::DragonAge2::kObjectTypeWaypoint, and Engines::DragonAge2::ObjectContainer::toObject().

| const Aurora::LocString & Engines::DragonAge2::Area::getName | ( | ) | const |
Definition at line 94 of file area.cpp.
References _name.
Referenced by Engines::DragonAge2::Console::cmdListAreas().

|
static |
Definition at line 233 of file area.cpp.
References Common::UString::empty(), Aurora::Archive::findResource(), Aurora::RIMFile::getResource(), Engines::DragonAge2::kAREID, Aurora::kFileTypeARE, Aurora::kFileTypeRIM, and ResMan.

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


| const Common::UString & Engines::DragonAge2::Area::getResRef | ( | ) | const |
|
virtual |
Hide the object's model(s).
Reimplemented from Engines::DragonAge2::Object.
Definition at line 220 of file area.cpp.
References _objects, _rooms, GfxMan, and removeFocus().
Referenced by ~Area().


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

|
private |
Definition at line 108 of file area.cpp.
References _resources, Engines::indexOptionalArchive(), loadARE(), and loadEnvironment().
Referenced by Area().


|
private |
Definition at line 149 of file area.cpp.
References _name, Aurora::NWScript::Object::_tag, Engines::DragonAge2::ScriptContainer::enableEvents(), Engines::DragonAge2::kAREID, Aurora::kFileTypeARE, loadCreatures(), loadPlaceables(), loadWaypoints(), Engines::DragonAge2::ScriptContainer::readScript(), and Engines::DragonAge2::Object::readVarTable().
Referenced by load().


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


|
private |
Definition at line 115 of file area.cpp.
References _environmentID, _environmentName, _resources, _rooms, _skyDome, _startPoint, Common::debugTag(), Common::UString::empty(), EventMan, Engines::indexOptionalArchive(), Engines::DragonAge2::kARLID, Aurora::kFileTypeARL, Aurora::GFF4FieldNamesEnum::kGFF4EnvAreaID, Aurora::GFF4FieldNamesEnum::kGFF4EnvAreaLayoutName, Aurora::GFF4FieldNamesEnum::kGFF4EnvAreaName, Aurora::GFF4FieldNamesEnum::kGFF4EnvAreaRoomList, Aurora::GFF4FieldNamesEnum::kGFF4EnvAreaSkydomeModel, Aurora::GFF4FieldNamesEnum::kGFF4EnvAreaStartPointName, Engines::DragonAge2::kROOMID, and Engines::DragonAge2::kVersion40.
Referenced by load().


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


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


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


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

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

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


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


|
virtual |
Show the object's model(s).
Reimplemented from Engines::DragonAge2::Object.
Definition at line 207 of file area.cpp.
References _eventQueue, _objects, _rooms, and GfxMan.
|
private |
The currently active (highlighted) object.
Definition at line 124 of file area.h.
Referenced by removeFocus(), and setActive().
|
private |
Definition at line 102 of file area.h.
Referenced by clean(), click(), getEntryLocation(), and loadObject().
|
private |
Definition at line 106 of file area.h.
Referenced by loadEnvironment().
|
private |
Definition at line 107 of file area.h.
Referenced by loadEnvironment().
|
private |
Definition at line 118 of file area.h.
Referenced by addEvent(), processEventQueue(), and show().
|
private |
Are we currently highlighting all objects?
Definition at line 126 of file area.h.
Referenced by checkActive(), and highlightAll().
|
private |
Definition at line 128 of file area.h.
Referenced by checkActive(), and click().
|
private |
|
private |
Map of objects by their model IDs.
Definition at line 121 of file area.h.
Referenced by getObjectAt(), highlightAll(), and loadObject().
|
private |
|
private |
Definition at line 117 of file area.h.
Referenced by clean(), load(), and loadEnvironment().
|
private |
Definition at line 104 of file area.h.
Referenced by getResRef().
|
private |
Definition at line 115 of file area.h.
Referenced by hide(), loadEnvironment(), and show().
|
private |
|
private |
Definition at line 108 of file area.h.
Referenced by loadEnvironment().
|
private |
Definition at line 110 of file area.h.
Referenced by getEntryLocation(), and loadEnvironment().
1.8.14