27 #include <boost/bind.hpp> 40 namespace DragonAge2 {
47 "Usage: listareas\nList all areas in the current campaign");
49 "Usage: loadarea <name>\nLoad and show a specific area in the current campaign");
51 "Usage: listcampaigns\nList all playable campaigns");
53 "Usage: loadcampaign <name>\nLoad and run a specific campaign");
81 std::vector<Common::UString> campaignTags;
84 for (Campaigns::PlayableCampaigns::const_iterator c = campaigns.begin(); c != campaigns.end(); ++c)
85 campaignTags.push_back((*c)->getUID());
96 const std::vector<Common::UString> &areas = campaign->
getAreas();
98 for (std::vector<Common::UString>::const_iterator a = areas.begin(); a != areas.end(); ++a) {
115 const std::vector<Common::UString> &areas = campaign->
getAreas();
117 for (std::vector<Common::UString>::const_iterator a = areas.begin(); a != areas.end(); ++a) {
118 if (a->equalsIgnoreCase(cl.
args)) {
133 for (Campaigns::PlayableCampaigns::const_iterator c = campaigns.begin(); c != campaigns.end(); ++c)
134 printf(
"%s (\"%s\")", (*c)->getUID().c_str(), (*c)->getName().getString().c_str());
146 for (Campaigns::PlayableCampaigns::const_iterator c = campaigns.begin(); c != campaigns.end(); ++c) {
147 if ((*c)->getUID().equalsIgnoreCase(cl.
args)) {
149 campaignsCtx.
load(**c);
const PlayableCampaigns & getCampaigns() const
Return all playable campaigns.
void cmdListCampaigns(const CommandLine &cl)
Campaigns & getCampaigns()
Return the campaigns context.
void cmdListAreas(const CommandLine &cl)
A class holding an UTF-8 string.
void cmdLoadCampaign(const CommandLine &cl)
The context holding a Dragon Age II area.
Console(DragonAge2Engine &engine)
Engine class handling Dragon Age II.
The context handling the gameplay in Dragon Age II.
const Common::UString & getAreaRIM(const Common::UString &area) const
Return the RIM file containing this area.
DragonAge2Engine * _engine
const char * c_str() const
Return the (utf8 encoded) string data.
Basic Aurora graphics types.
const char * kSystemFontMono
Identifier used for the monospaced system font.
bool empty() const
Is the string empty?
Game & getGame()
Return the context running the actual game.
void cmdLoadArea(const CommandLine &cl)
Campaign * getCurrentCampaign() const
Return the currently running campaign.
The context holding a Dragon Age II campaign.
void load(const Campaign &campaign)
Load a campaign.
The context managing and running the Dragon Age II campaigns.
const std::vector< Common::UString > & getAreas() const
void movePC(const Common::UString &area)
Move the player character to this area.
void printf(const char *s,...) GCC_PRINTF(2
virtual void updateCaches()
void printCommandHelp(const Common::UString &cmd)
void setArguments(const Common::UString &cmd, const std::vector< Common::UString > &args)
const Aurora::LocString & getName() const
bool registerCommand(const Common::UString &cmd, const CommandCallback &callback, const Common::UString &help)
Dragon Age II (debug) console.