51 _hasCampaign(false), _running(false), _exit(true), _newCampaignStandalone(false) {
177 for (Aurora::GFF3List::const_iterator m = modules.begin(); m != modules.end(); ++m)
178 _modules.push_back((*m)->getString(
"Mod_Name"));
211 e.
add(
"Failed to load campaign's starting module");
227 e.
add(
"Can't load PC \"%s\"", utc.
c_str());
243 _pc->clearVariables();
283 if ((event->key.keysym.sym == SDLK_d) && (event->key.keysym.mod & KMOD_CTRL)) {
void load(const Common::UString &campaign)
Load a campaign.
The context holding a The Witcher campaign.
Handling version V3.2/V3.3 of BioWare's GFFs (generic file format).
#define ResMan
Shortcut for accessing the sound manager.
#define MKTAG(a0, a1, a2, a3)
A wrapper macro used around four character constants, like 'DATA', to ensure portability.
void changeCampaign(const Common::UString &campaign, bool standalone)
Schedule a change to a new campaign.
void add(const char *s,...) GCC_PRINTF(2
Aurora::LocString _name
The name of the currently loaded campaign.
Common::UString _startModule
The module the current campaign starts in.
bool getLocString(const Common::UString &field, LocString &str) const
::Engines::Console * _console
A class holding an UTF-8 string.
const Aurora::LocString & getName() const
Return the name of the current campaign.
The global config manager.
bool _exit
Should we exit the campaign?
bool isLoaded() const
Is a campaign currently loaded and ready to run?
void exit()
Exit the currently running campaign.
void addEvent(const Events::Event &event)
Add a single event for consideration into the event queue.
void processEventQueue()
Process the current event queue.
bool equalsIgnoreCase(const UString &str) const
A simple streaming file reading class.
void clear()
Clear the whole context.
std::list< UString >::const_iterator const_iterator
const GFF3Struct & getTopLevel() const
Returns the top-level struct.
const Common::UString & getString(Language language, LanguageGender gender=kLanguageGenderCurrent) const
Get the string of that language.
Exception that provides a stack of explanations.
void loadCampaign(const Common::UString &campaign, bool standalone)
Load a new campaign.
const Aurora::LocString & getDescription() const
Return the description of the current campaign.
void loadCampaignFile(const Common::UString &campaign)
Load the actual campaign resources.
Keyboard key was pressed.
Module & getModule()
Return the currently running module.
Basic exceptions to throw.
A creature in a The Witcher area.
const char * c_str() const
Return the (utf8 encoded) string data.
bool _running
Are we currently running a campaign?
void refreshLocalized()
Refresh all localized strings.
#define ConfigMan
Shortcut for accessing the config manager.
Utility templates and functions.
Common::ScopedPtr< Module > _module
The current module of the current campaign.
The global events manager.
A GFF (generic file format) V3.2/V3.3 file, found in all Aurora games except Sonic Chronicles: The Da...
void enter()
Enter the loaded campaign, starting it.
void setupStandaloneModule(const Common::UString &module)
Set up the loading of a singular, stand-alone module.
static Common::SeekableReadStream * openMMD(const Common::UString &campaign)
Open the MMD campaign file for this campaign.
Common::ScopedPtr< Creature > _pc
The player character we use.
bool empty() const
Is the string empty?
Generic Aurora engines (debug) console.
bool _newCampaignStandalone
Is the campaign to change to a stand-alone module?
static UString getDirectory(const UString &p)
Return a path's directory.
Aurora::LocString _description
The description of the currently loaded campaign.
void unload(bool completeUnload=true)
Unload the whole shebang.
std::vector< const GFF3Struct * > GFF3List
#define EventMan
Shortcut for accessing the events manager.
Implementing the stream reading interfaces for files.
static Common::UString getDirectory(const Common::UString &campaign)
Return the actual real directory for this campaign.
const GFF3List & getList(const Common::UString &field) const
void replaceCampaign()
Actually replace the currently running campaign.
Campaign(::Engines::Console &console)
static UString relativize(const UString &basePath, const UString &path)
Return the path relative to the base path.
void usePC(const Common::UString &utc)
Use this character as the player character.
The context needed to run a The Witcher module.
bool _hasCampaign
Do we have a campaign?
bool processEvent(const Events::Event &event)
#define CameraMan
Shortcut for accessing the camera manager.
Common::UString getString(const Common::UString &field, const Common::UString &def="") const
Common::UString _newCampaign
The campaign we should change to.
std::list< Common::UString > _modules
All modules used by the current campaign.
bool isRunning() const
Is a campaign currently running?
void leave()
Leave the running campaign, quitting it.
Engine utility class for free-roam camera handling.
void clear()
Clear the string's contents.
static UString getFile(const UString &p)
Return a file name without its path.
Interface for a seekable & readable data stream.
static Common::UString findModule(const Common::UString &module, bool relative)
The global resource manager for Aurora resources.
Utility class for manipulating file paths.
void loadModule(const Common::UString &module)
Load a stand-alone module as a campaign.