|
xoreos
0.0.5
|
#include <campaign.h>

Public Member Functions | |
| Campaign (::Engines::Console &console) | |
| ~Campaign () | |
| void | clear () |
| Clear the whole context. More... | |
| bool | isLoaded () const |
| Is a campaign currently loaded and ready to run? More... | |
| bool | isRunning () const |
| Is a campaign currently running? More... | |
| void | load (const Common::UString &campaign) |
| Load a campaign. More... | |
| void | loadModule (const Common::UString &module) |
| Load a stand-alone module as a campaign. More... | |
| void | usePC (const Common::UString &utc) |
| Use this character as the player character. More... | |
| void | exit () |
| Exit the currently running campaign. More... | |
| const Aurora::LocString & | getName () const |
| Return the name of the current campaign. More... | |
| const Aurora::LocString & | getDescription () const |
| Return the description of the current campaign. More... | |
| Module & | getModule () |
| Return the currently running module. More... | |
| void | refreshLocalized () |
| Refresh all localized strings. More... | |
| void | enter () |
| Enter the loaded campaign, starting it. More... | |
| void | leave () |
| Leave the running campaign, quitting it. More... | |
| void | addEvent (const Events::Event &event) |
| Add a single event for consideration into the event queue. More... | |
| void | processEventQueue () |
| Process the current event queue. More... | |
Static Public Member Functions | |
| static Common::UString | getName (const Common::UString &campaign) |
| static Common::UString | getDescription (const Common::UString &campaign) |
Private Types | |
| typedef std::list< Events::Event > | EventQueue |
Private Member Functions | |
| void | unload (bool completeUnload=true) |
| Unload the whole shebang. More... | |
| void | unloadPC () |
| void | loadCampaign (const Common::UString &campaign, bool standalone) |
| Load a new campaign. More... | |
| void | changeCampaign (const Common::UString &campaign, bool standalone) |
| Schedule a change to a new campaign. More... | |
| void | replaceCampaign () |
| Actually replace the currently running campaign. More... | |
| void | loadCampaignFile (const Common::UString &campaign) |
| Load the actual campaign resources. More... | |
| void | setupStandaloneModule (const Common::UString &module) |
| Set up the loading of a singular, stand-alone module. More... | |
| void | handleEvents () |
Static Private Member Functions | |
| static Common::UString | getDirectory (const Common::UString &campaign) |
| Return the actual real directory for this campaign. More... | |
| static Common::SeekableReadStream * | openMMD (const Common::UString &campaign) |
| Open the MMD campaign file for this campaign. More... | |
Private Attributes | |
| ::Engines::Console * | _console |
| bool | _hasCampaign |
| Do we have a campaign? More... | |
| bool | _running |
| Are we currently running a campaign? More... | |
| bool | _exit |
| Should we exit the campaign? More... | |
| Aurora::LocString | _name |
| The name of the currently loaded campaign. More... | |
| Aurora::LocString | _description |
| The description of the currently loaded campaign. More... | |
| std::list< Common::UString > | _modules |
| All modules used by the current campaign. More... | |
| Common::UString | _startModule |
| The module the current campaign starts in. More... | |
| Common::ScopedPtr< Module > | _module |
| The current module of the current campaign. More... | |
| Common::ScopedPtr< Creature > | _pc |
| The player character we use. More... | |
| Common::UString | _newCampaign |
| The campaign we should change to. More... | |
| bool | _newCampaignStandalone |
| Is the campaign to change to a stand-alone module? More... | |
| EventQueue | _eventQueue |
Definition at line 50 of file campaign.h.
|
private |
Definition at line 109 of file campaign.h.
| Engines::Witcher::Campaign::Campaign | ( | ::Engines::Console & | console | ) |
Definition at line 50 of file campaign.cpp.
| Engines::Witcher::Campaign::~Campaign | ( | ) |
Definition at line 56 of file campaign.cpp.
References clear().

| void Engines::Witcher::Campaign::addEvent | ( | const Events::Event & | event | ) |
Add a single event for consideration into the event queue.
Definition at line 257 of file campaign.cpp.
References _eventQueue.
|
private |
Schedule a change to a new campaign.
Definition at line 303 of file campaign.cpp.
References _newCampaign, and _newCampaignStandalone.
Referenced by load(), and loadModule().

| void Engines::Witcher::Campaign::clear | ( | ) |
Clear the whole context.
Definition at line 63 of file campaign.cpp.
References unload().
Referenced by loadCampaign(), and ~Campaign().


| void Engines::Witcher::Campaign::enter | ( | ) |
Enter the loaded campaign, starting it.
Definition at line 236 of file campaign.cpp.
References _exit, _hasCampaign, _module, _pc, and _running.
Referenced by replaceCampaign().

| void Engines::Witcher::Campaign::exit | ( | ) |
| const Aurora::LocString & Engines::Witcher::Campaign::getDescription | ( | ) | const |
Return the description of the current campaign.
Definition at line 71 of file campaign.cpp.
References _description.
|
static |
Definition at line 335 of file campaign.cpp.
References Aurora::GFF3Struct::getString(), Aurora::GFF3File::getTopLevel(), MKTAG, and openMMD().

|
staticprivate |
Return the actual real directory for this campaign.
Definition at line 152 of file campaign.cpp.
References Common::UString::c_str(), ConfigMan, Common::UString::equalsIgnoreCase(), Common::FilePath::getDirectory(), Common::FilePath::getFile(), Common::FilePath::relativize(), and ResMan.
Referenced by loadCampaignFile().


| Module & Engines::Witcher::Campaign::getModule | ( | ) |
Return the currently running module.
Definition at line 75 of file campaign.cpp.
References _module.
| const Aurora::LocString & Engines::Witcher::Campaign::getName | ( | ) | const |
Return the name of the current campaign.
Definition at line 67 of file campaign.cpp.
References _name.
Referenced by Engines::Witcher::Console::cmdListCampaigns().

|
static |
Definition at line 323 of file campaign.cpp.
References Aurora::GFF3Struct::getString(), Aurora::GFF3File::getTopLevel(), MKTAG, and openMMD().

|
private |
Definition at line 273 of file campaign.cpp.
References _console, _eventQueue, _module, CameraMan, FreeRoamCam, Engines::Console::isVisible(), Events::kEventKeyDown, Engines::Console::processEvent(), and Engines::Console::show().
Referenced by processEventQueue().


| bool Engines::Witcher::Campaign::isLoaded | ( | ) | const |
Is a campaign currently loaded and ready to run?
Definition at line 81 of file campaign.cpp.
References _hasCampaign, _module, and _pc.
| bool Engines::Witcher::Campaign::isRunning | ( | ) | const |
Is a campaign currently running?
Definition at line 85 of file campaign.cpp.
References _exit, _module, _running, and EventMan.
Referenced by load(), loadModule(), and processEventQueue().

| void Engines::Witcher::Campaign::leave | ( | ) |
Leave the running campaign, quitting it.
Definition at line 250 of file campaign.cpp.
| void Engines::Witcher::Campaign::load | ( | const Common::UString & | campaign | ) |
Load a campaign.
Definition at line 115 of file campaign.cpp.
References changeCampaign(), isRunning(), and loadCampaign().
Referenced by Engines::Witcher::Console::cmdLoadCampaign().


|
private |
Load a new campaign.
Definition at line 198 of file campaign.cpp.
References _hasCampaign, _module, _startModule, Common::StackException::add(), clear(), loadCampaignFile(), setupStandaloneModule(), and unload().
Referenced by load(), loadModule(), and replaceCampaign().


|
private |
Load the actual campaign resources.
Definition at line 165 of file campaign.cpp.
References _description, _modules, _name, _startModule, Common::StackException::add(), Common::UString::c_str(), Common::UString::empty(), getDirectory(), Aurora::GFF3Struct::getList(), Aurora::GFF3Struct::getLocString(), Aurora::LocString::getString(), Aurora::GFF3Struct::getString(), Aurora::GFF3File::getTopLevel(), MKTAG, and openMMD().
Referenced by loadCampaign().


| void Engines::Witcher::Campaign::loadModule | ( | const Common::UString & | module | ) |
Load a stand-alone module as a campaign.
Definition at line 127 of file campaign.cpp.
References changeCampaign(), isRunning(), and loadCampaign().
Referenced by Engines::Witcher::Console::cmdLoadModule().


|
staticprivate |
Open the MMD campaign file for this campaign.
Definition at line 139 of file campaign.cpp.
References Common::UString::c_str(), ConfigMan, Common::UString::equalsIgnoreCase(), and Common::FilePath::getFile().
Referenced by getDescription(), getName(), and loadCampaignFile().


| void Engines::Witcher::Campaign::processEventQueue | ( | ) |
Process the current event queue.
Definition at line 261 of file campaign.cpp.
References handleEvents(), isRunning(), and replaceCampaign().

| void Engines::Witcher::Campaign::refreshLocalized | ( | ) |
|
private |
Actually replace the currently running campaign.
Definition at line 308 of file campaign.cpp.
References _newCampaign, _newCampaignStandalone, Common::UString::empty(), enter(), and loadCampaign().
Referenced by processEventQueue().


|
private |
Set up the loading of a singular, stand-alone module.
Definition at line 189 of file campaign.cpp.
References _modules, _startModule, Common::UString::c_str(), Common::UString::empty(), and Engines::Witcher::Module::findModule().
Referenced by loadCampaign().


|
private |
Unload the whole shebang.
| completeUnload | Also unload the PC true: completely quit the module false: the PC can be transferred to a new module. |
Definition at line 89 of file campaign.cpp.
References _description, _eventQueue, _exit, _hasCampaign, _module, _modules, _name, _newCampaign, _newCampaignStandalone, _running, _startModule, Aurora::LocString::clear(), Common::UString::clear(), and unloadPC().
Referenced by clear(), and loadCampaign().


|
private |
Definition at line 111 of file campaign.cpp.
References _pc.
Referenced by unload(), and usePC().

| void Engines::Witcher::Campaign::usePC | ( | const Common::UString & | utc | ) |
Use this character as the player character.
Definition at line 218 of file campaign.cpp.
References _pc, Common::StackException::add(), Common::UString::c_str(), Common::UString::empty(), and unloadPC().

|
private |
Definition at line 112 of file campaign.h.
Referenced by Campaign(), and handleEvents().
|
private |
The description of the currently loaded campaign.
Definition at line 121 of file campaign.h.
Referenced by getDescription(), loadCampaignFile(), and unload().
|
private |
Definition at line 139 of file campaign.h.
Referenced by addEvent(), handleEvents(), and unload().
|
private |
Should we exit the campaign?
Definition at line 116 of file campaign.h.
Referenced by enter(), exit(), isRunning(), leave(), and unload().
|
private |
Do we have a campaign?
Definition at line 114 of file campaign.h.
Referenced by enter(), isLoaded(), loadCampaign(), and unload().
|
private |
The current module of the current campaign.
Definition at line 129 of file campaign.h.
Referenced by Campaign(), enter(), getModule(), handleEvents(), isLoaded(), isRunning(), leave(), loadCampaign(), refreshLocalized(), and unload().
|
private |
All modules used by the current campaign.
Definition at line 124 of file campaign.h.
Referenced by loadCampaignFile(), setupStandaloneModule(), and unload().
|
private |
The name of the currently loaded campaign.
Definition at line 119 of file campaign.h.
Referenced by getName(), loadCampaignFile(), and unload().
|
private |
The campaign we should change to.
Definition at line 135 of file campaign.h.
Referenced by changeCampaign(), replaceCampaign(), and unload().
|
private |
Is the campaign to change to a stand-alone module?
Definition at line 137 of file campaign.h.
Referenced by changeCampaign(), replaceCampaign(), and unload().
|
private |
The player character we use.
Definition at line 132 of file campaign.h.
Referenced by enter(), isLoaded(), unloadPC(), and usePC().
|
private |
Are we currently running a campaign?
Definition at line 115 of file campaign.h.
Referenced by enter(), isRunning(), leave(), and unload().
|
private |
The module the current campaign starts in.
Definition at line 126 of file campaign.h.
Referenced by loadCampaign(), loadCampaignFile(), setupStandaloneModule(), and unload().
1.8.14