|
xoreos
0.0.5
|
#include <campaign.h>


Classes | |
| struct | RIMNode |
| A node in the RIM tree. More... | |
Public Member Functions | |
| const Common::UString & | getUID () const |
| Return the unique ID of this campaign. More... | |
| const Aurora::LocString & | getName () const |
| const Aurora::LocString & | getDescription () const |
| const Common::UString & | getExtendsUID () const |
| Return the UID of the campaign this campaign/content extends, if any. More... | |
| bool | isEnabled () const |
| Is this Campaign enabled? More... | |
| bool | isBioWare () const |
| Is this an original campaign by BioWare? More... | |
| bool | needsAuth () const |
| Does this campaign need authorization from BioWare? More... | |
| const Common::UString & | getAreaRIM (const Common::UString &area) const |
| Return the RIM file containing this area. More... | |
| const std::vector< Common::UString > & | getAreas () const |
| Area * | getCurrentArea () const |
| Return the area the PC is currently in. More... | |
| Creature * | getPC () const |
| Return the currently playing PC. More... | |
| bool | isLoaded () const |
| Is this campaign currently loaded? More... | |
| void | movePC (const Common::UString &area) |
| Move the player character to this area. More... | |
| void | movePC (float x, float y, float z) |
| Move the player character to this position within the current area. More... | |
| void | movePC (const Common::UString &area, float x, float y, float z) |
| Move the player character to this position within this area. More... | |
Public Member Functions inherited from Engines::DragonAge::Object | |
| Object (ObjectType type=kObjectTypeInvalid) | |
| virtual | ~Object () |
| ObjectType | getType () const |
| Return the exact type of the object. More... | |
| virtual void | show () |
| Show the object's model(s). More... | |
| virtual void | hide () |
| Hide the object's model(s). 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 | 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::DragonAge::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 Engines::DragonAge::ObjectContainer | |
| ObjectContainer () | |
| ~ObjectContainer () | |
| void | clearObjects () |
| void | addObject (DragonAge::Object &object) |
| Add an object to this container. More... | |
| void | removeObject (DragonAge::Object &object) |
| Remove an object from this container. More... | |
| ::Aurora::NWScript::Object * | getFirstObjectByType (ObjectType type) const |
| Return the first object of this type. More... | |
| ::Aurora::NWScript::ObjectSearch * | findObjectsByType (ObjectType type) const |
| Return a search context to iterate over all objects of this type. More... | |
Public Member Functions inherited from Aurora::NWScript::ObjectContainer | |
| ObjectContainer () | |
| ~ObjectContainer () | |
| void | clearObjects () |
| void | addObject (Object &object) |
| Add an object to this container. More... | |
| void | removeObject (Object &object) |
| Remove an object from this container. More... | |
| Object * | getObjectByID (uint32 id) const |
| Find a specific object by ID. More... | |
| Object * | getFirstObject () const |
| Return the first object. More... | |
| Object * | getFirstObjectByTag (const Common::UString &tag) const |
| Return the first object with this tag. More... | |
| ObjectSearch * | findObjects () const |
| Return a search context to iterate over all objects. More... | |
| ObjectSearch * | findObjectsByTag (const Common::UString &tag) const |
| Return a search context to iterate over all objects with this tag. More... | |
Private Types | |
| typedef std::map< Common::UString, const RIMNode * > | AreaMap |
| Map of area RIMNodes indexed by the area resref. More... | |
| typedef std::list< Events::Event > | EventQueue |
Private Member Functions | |
| Campaign (Game &game, const Common::UString &cifPath="", const Common::UString &manifestPath="", const Common::UString &addinBase="") | |
| ~Campaign () | |
| void | read (const Common::UString &cifPath, const Common::UString &manifestPath) |
| void | readCIFStatic (const Common::UString &path) |
| RIMNode * | readRIMs (const Aurora::GFF4Struct &node, const RIMNode *parent=0) |
| void | readManifest (const Common::UString &path) |
| void | addAreaName (const RIMNode &node) |
| void | readCIFDynamic (const Common::UString &path) |
| void | loadResources () |
| void | load () |
| Load the campaign for playing. More... | |
| void | unload () |
| Unload the campaign after playing. More... | |
| void | enter (Creature &pc) |
| Enter the campaign, starting it. More... | |
| void | leave () |
| Leave the campaign, ending it. 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 | loadArea () |
| void | unloadArea () |
| bool | changeArea () |
| void | enterArea (bool startArea=false) |
| void | leaveArea () |
| void | handleEvents () |
Private Attributes | |
| Game * | _game |
| Common::UString | _uid |
| Common::UString | _cifPath |
| Common::UString | _addinBase |
| Aurora::LocString | _name |
| Aurora::LocString | _description |
| Common::UString | _extends |
| bool | _enabled |
| bool | _bioware |
| bool | _needsAuth |
| uint32 | _priority |
| uint32 | _format |
| uint32 | _state |
| Common::UString | _entryArea |
| Common::UString | _entryAreaList |
| Common::UString | _entryScript |
| Common::UString | _entryClientScript |
| float | _entryPosition [3] |
| float | _entryOrientation [3] |
| std::vector< Common::UString > | _packages |
| Common::ScopedPtr< RIMNode > | _rimRoot |
| AreaMap | _areaMap |
| std::vector< Common::UString > | _areas |
| bool | _loaded |
| ChangeList | _resources |
| ChangeList | _tlks |
| Creature * | _pc |
| The player character we use. More... | |
| Common::UString | _newArea |
| The new area to enter. More... | |
| Common::ScopedPtr< Area > | _currentArea |
| The current area. More... | |
| EventQueue | _eventQueue |
Friends | |
| class | Campaigns |
| template<typename T > | |
| void | Common::DeallocatorDefault::destroy (T *) |
Definition at line 54 of file campaign.h.
|
private |
Map of area RIMNodes indexed by the area resref.
Definition at line 116 of file campaign.h.
|
private |
Definition at line 118 of file campaign.h.
|
private |
Definition at line 61 of file campaign.cpp.
References _entryOrientation, _entryPosition, and read().

|
private |
Definition at line 79 of file campaign.cpp.
References unload().

|
private |
|
private |
Add a single event for consideration into the area event queue.
Definition at line 482 of file campaign.cpp.
References _eventQueue.
Referenced by Engines::DragonAge::Campaigns::handleEvents().

|
private |
Definition at line 470 of file campaign.cpp.
References _currentArea, _newArea, enterArea(), and loadArea().
Referenced by processEventQueue().


|
private |
Enter the campaign, starting it.
Definition at line 417 of file campaign.cpp.
References _pc, enterArea(), isLoaded(), Engines::DragonAge::kEventTypeEnter, Engines::DragonAge::kEventTypeGameObjectsLoaded, Engines::DragonAge::kEventTypeModuleStart, and Engines::DragonAge::ScriptContainer::runScript().
Referenced by Engines::DragonAge::Campaigns::enter().


|
private |
Definition at line 375 of file campaign.cpp.
References _currentArea, _entryOrientation, _entryPosition, _eventQueue, _pc, CameraMan, Engines::DragonAge::kEventTypeAreaLoadPostLoadExit, Engines::DragonAge::kEventTypeAreaLoadPreLoadExit, Engines::DragonAge::kEventTypeAreaLoadSpecial, Engines::DragonAge::kEventTypeEnter, and status().
Referenced by changeArea(), and enter().


| const Common::UString & Engines::DragonAge::Campaign::getAreaRIM | ( | const Common::UString & | area | ) | const |
Return the RIM file containing this area.
Definition at line 277 of file campaign.cpp.
References _areaMap, and Aurora::kEmptyString.
Referenced by Engines::DragonAge::Console::cmdListAreas().

| const std::vector< Common::UString > & Engines::DragonAge::Campaign::getAreas | ( | ) | const |
Definition at line 287 of file campaign.cpp.
References _areas.
Referenced by Engines::DragonAge::Console::cmdListAreas(), Engines::DragonAge::Console::cmdLoadArea(), and Engines::DragonAge::Console::updateAreas().

| Area * Engines::DragonAge::Campaign::getCurrentArea | ( | ) | const |
Return the area the PC is currently in.
Definition at line 291 of file campaign.cpp.
References _currentArea.
Referenced by Engines::DragonAge::Functions::getArea().

| const Aurora::LocString & Engines::DragonAge::Campaign::getDescription | ( | ) | const |
Definition at line 94 of file campaign.cpp.
References _description.
| const Common::UString & Engines::DragonAge::Campaign::getExtendsUID | ( | ) | const |
Return the UID of the campaign this campaign/content extends, if any.
Definition at line 98 of file campaign.cpp.
References _extends.
Referenced by Engines::DragonAge::Campaigns::addCampaign().

| const Aurora::LocString & Engines::DragonAge::Campaign::getName | ( | ) | const |
Definition at line 90 of file campaign.cpp.
References _name.
Referenced by Engines::DragonAge::Campaigns::loadCampaign().

| Creature * Engines::DragonAge::Campaign::getPC | ( | ) | const |
Return the currently playing PC.
Definition at line 295 of file campaign.cpp.
References _pc.
Referenced by Engines::DragonAge::Area::click(), Engines::DragonAge::Functions::getHero(), and Engines::DragonAge::Functions::isHero().

| const Common::UString & Engines::DragonAge::Campaign::getUID | ( | ) | const |
Return the unique ID of this campaign.
Definition at line 86 of file campaign.cpp.
References _uid.
Referenced by Engines::DragonAge::Campaigns::addCampaign(), Engines::DragonAge::Campaigns::changeCampaign(), and Engines::DragonAge::Campaigns::loadCampaign().

|
private |
Definition at line 498 of file campaign.cpp.
References _currentArea, and _eventQueue.
Referenced by processEventQueue().

| bool Engines::DragonAge::Campaign::isBioWare | ( | ) | const |
Is this an original campaign by BioWare?
Definition at line 269 of file campaign.cpp.
References _bioware.
| bool Engines::DragonAge::Campaign::isEnabled | ( | ) | const |
Is this Campaign enabled?
Definition at line 265 of file campaign.cpp.
References _enabled.
Referenced by Engines::DragonAge::Campaigns::addCampaign().

| bool Engines::DragonAge::Campaign::isLoaded | ( | ) | const |
Is this campaign currently loaded?
Definition at line 299 of file campaign.cpp.
References _loaded.
Referenced by enter(), Engines::DragonAge::Campaigns::isLoaded(), Engines::DragonAge::Campaigns::isRunning(), and processEventQueue().

|
privatevirtual |
Leave the campaign, ending it.
Reimplemented from Engines::DragonAge::Object.
Definition at line 431 of file campaign.cpp.
References _pc, Engines::DragonAge::kEventTypeExit, leaveArea(), and Engines::DragonAge::ScriptContainer::runScript().
Referenced by Engines::DragonAge::Campaigns::leave(), and unload().


|
private |
Definition at line 440 of file campaign.cpp.
References _currentArea, _pc, and Engines::DragonAge::kEventTypeExit.
Referenced by leave(), and unloadArea().

|
private |
Load the campaign for playing.
Definition at line 344 of file campaign.cpp.
References _cifPath, _entryArea, _loaded, _name, _newArea, Aurora::NWScript::Object::_tag, _uid, Common::UString::c_str(), Aurora::LocString::getString(), loadArea(), loadResources(), readCIFDynamic(), and status().
Referenced by Engines::DragonAge::Campaigns::loadCampaign().


|
private |
Definition at line 458 of file campaign.cpp.
References _areaMap, _currentArea, _newArea, Common::UString::c_str(), Common::UString::empty(), and unloadArea().
Referenced by changeArea(), and load().


|
private |
Definition at line 303 of file campaign.cpp.
References _addinBase, _game, _packages, _resources, _tlks, Common::UString::empty(), Engines::DragonAge::kTextureQualityHigh, Engines::DragonAge::Game::loadResources(), Engines::DragonAge::Game::loadTalkTables(), and Engines::DragonAge::Game::loadTexturePack().
Referenced by load().


| void Engines::DragonAge::Campaign::movePC | ( | const Common::UString & | area | ) |
Move the player character to this area.
Definition at line 507 of file campaign.cpp.
References _newArea.
Referenced by Engines::DragonAge::Console::cmdLoadArea(), and movePC().

| void Engines::DragonAge::Campaign::movePC | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Move the player character to this position within the current area.
Definition at line 511 of file campaign.cpp.
References _pc, CameraMan, and Engines::DragonAge::Creature::setPosition().

| void Engines::DragonAge::Campaign::movePC | ( | const Common::UString & | area, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Move the player character to this position within this area.
Definition at line 520 of file campaign.cpp.
References movePC().

| bool Engines::DragonAge::Campaign::needsAuth | ( | ) | const |
Does this campaign need authorization from BioWare?
Definition at line 273 of file campaign.cpp.
References _needsAuth.
|
private |
Process the current event queue.
Definition at line 486 of file campaign.cpp.
References changeArea(), handleEvents(), and isLoaded().
Referenced by Engines::DragonAge::Campaigns::handleEvents().


|
private |
Definition at line 102 of file campaign.cpp.
References _enabled, _entryArea, _extends, _format, _needsAuth, _state, _uid, Common::UString::empty(), Common::FilePath::getStem(), readCIFStatic(), and readManifest().
Referenced by Campaign().


|
private |
Definition at line 326 of file campaign.cpp.
References _rimRoot, Common::debugTag(), Engines::DragonAge::ScriptContainer::enableEvents(), Engines::DragonAge::kCIFID, Aurora::GFF4FieldNamesEnum::kGFF4RimTreeRootNode, Engines::DragonAge::kVersion01, readRIMs(), Engines::DragonAge::ScriptContainer::readScript(), and Engines::DragonAge::Object::readVarTable().
Referenced by load().


|
private |
Definition at line 139 of file campaign.cpp.
References _description, _entryArea, _entryAreaList, _entryClientScript, _entryOrientation, _entryPosition, _entryScript, _name, _packages, Common::debugTag(), Engines::DragonAge::kCIFID, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFDescriptionCSCZ, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFDescriptionDEDE, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFDescriptionENUS, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFDescriptionESES, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFDescriptionFRFR, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFDescriptionHUHU, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFDescriptionITIT, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFDescriptionPLPL, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFDescriptionRURU, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFDisplayNameCSCZ, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFDisplayNameDEDE, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFDisplayNameENUS, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFDisplayNameESES, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFDisplayNameFRFR, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFDisplayNameHUHU, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFDisplayNameITIT, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFDisplayNamePLPL, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFDisplayNameRURU, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFEntryArea, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFEntryAreaList, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFEntryClientScript, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFEntryOrientation, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFEntryPosition, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFEntryScript, Aurora::GFF4FieldNamesEnum::kGFF4CampaignCIFPackagesList, Aurora::kLanguageCzech, Aurora::kLanguageEnglish, Aurora::kLanguageFrench, Aurora::kLanguageGerman, Aurora::kLanguageHungarian, Aurora::kLanguageItalian, Aurora::kLanguagePolish, Aurora::kLanguageRussian, Aurora::kLanguageSpanish, Engines::DragonAge::kVersion01, and Aurora::LocString::setString().
Referenced by read().


|
private |
Definition at line 219 of file campaign.cpp.
References _bioware, _enabled, _extends, _format, _needsAuth, _priority, _state, Aurora::NWScript::Object::_tag, _uid, Common::UString::c_str(), Common::UString::empty(), Common::XMLNode::findChild(), Common::XMLNode::getName(), Common::XMLNode::getProperty(), Common::XMLParser::getRoot(), and Common::parseString().
Referenced by read().


|
private |
|
private |
Unload the campaign after playing.
Definition at line 356 of file campaign.cpp.
References _areaMap, _areas, _currentArea, _game, _loaded, _resources, _rimRoot, _tlks, Engines::DragonAge::ObjectContainer::clearObjects(), Engines::deindexResources(), leave(), TwoDAReg, and Engines::DragonAge::Game::unloadTalkTables().
Referenced by Engines::DragonAge::Campaigns::clean(), Engines::DragonAge::Campaigns::unload(), and ~Campaign().


|
private |
Definition at line 450 of file campaign.cpp.
References _currentArea, Engines::DragonAge::ObjectContainer::clearObjects(), and leaveArea().
Referenced by loadArea().


|
friend |
Definition at line 212 of file campaign.h.
|
friend |
|
private |
Definition at line 126 of file campaign.h.
Referenced by loadResources().
|
private |
Definition at line 152 of file campaign.h.
Referenced by getAreaRIM(), loadArea(), and unload().
|
private |
Definition at line 154 of file campaign.h.
Referenced by getAreas(), and unload().
|
private |
Definition at line 134 of file campaign.h.
Referenced by isBioWare(), and readManifest().
|
private |
Definition at line 125 of file campaign.h.
Referenced by load().
|
private |
The current area.
Definition at line 165 of file campaign.h.
Referenced by changeArea(), enterArea(), getCurrentArea(), handleEvents(), leaveArea(), loadArea(), unload(), and unloadArea().
|
private |
Definition at line 129 of file campaign.h.
Referenced by getDescription(), and readCIFStatic().
|
private |
Definition at line 133 of file campaign.h.
Referenced by isEnabled(), read(), and readManifest().
|
private |
Definition at line 141 of file campaign.h.
Referenced by load(), read(), and readCIFStatic().
|
private |
Definition at line 142 of file campaign.h.
Referenced by readCIFStatic().
|
private |
Definition at line 144 of file campaign.h.
Referenced by readCIFStatic().
|
private |
Definition at line 147 of file campaign.h.
Referenced by Campaign(), enterArea(), and readCIFStatic().
|
private |
Definition at line 146 of file campaign.h.
Referenced by Campaign(), enterArea(), and readCIFStatic().
|
private |
Definition at line 143 of file campaign.h.
Referenced by readCIFStatic().
|
private |
Definition at line 167 of file campaign.h.
Referenced by addEvent(), enterArea(), and handleEvents().
|
private |
Definition at line 131 of file campaign.h.
Referenced by getExtendsUID(), read(), and readManifest().
|
private |
Definition at line 138 of file campaign.h.
Referenced by read(), and readManifest().
|
private |
Definition at line 121 of file campaign.h.
Referenced by loadResources(), and unload().
|
private |
Definition at line 156 of file campaign.h.
Referenced by isLoaded(), load(), and unload().
|
private |
Definition at line 128 of file campaign.h.
Referenced by getName(), load(), and readCIFStatic().
|
private |
Definition at line 135 of file campaign.h.
Referenced by needsAuth(), read(), and readManifest().
|
private |
The new area to enter.
Definition at line 164 of file campaign.h.
Referenced by changeArea(), load(), loadArea(), and movePC().
|
private |
Definition at line 149 of file campaign.h.
Referenced by loadResources(), and readCIFStatic().
|
private |
The player character we use.
Definition at line 162 of file campaign.h.
Referenced by enter(), enterArea(), getPC(), leave(), leaveArea(), and movePC().
|
private |
Definition at line 137 of file campaign.h.
Referenced by readManifest().
|
private |
Definition at line 158 of file campaign.h.
Referenced by loadResources(), and unload().
|
private |
Definition at line 151 of file campaign.h.
Referenced by readCIFDynamic(), and unload().
|
private |
Definition at line 139 of file campaign.h.
Referenced by read(), and readManifest().
|
private |
Definition at line 159 of file campaign.h.
Referenced by loadResources(), and unload().
|
private |
Definition at line 123 of file campaign.h.
Referenced by getUID(), load(), read(), and readManifest().
1.8.14