本文整理汇总了C++中ExtraGuiOptions类的典型用法代码示例。如果您正苦于以下问题:C++ ExtraGuiOptions类的具体用法?C++ ExtraGuiOptions怎么用?C++ ExtraGuiOptions使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ExtraGuiOptions类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getExtraGuiOptions
const ExtraGuiOptions NeverhoodMetaEngine::getExtraGuiOptions(const Common::String &target) const {
ExtraGuiOptions options;
options.push_back(neverhoodExtraGuiOption1);
options.push_back(neverhoodExtraGuiOption2);
options.push_back(neverhoodExtraGuiOption3);
return options;
}
示例2: ExtraGuiOptions
const ExtraGuiOptions AdvancedMetaEngine::getExtraGuiOptions(const Common::String &target) const {
if (!_extraGuiOptions)
return ExtraGuiOptions();
ExtraGuiOptions options;
// If there isn't any target specified, return all available GUI options.
// Only used when an engine starts in order to set option defaults.
if (target.empty()) {
for (const ADExtraGuiOptionsMap *entry = _extraGuiOptions; entry->guioFlag; ++entry)
options.push_back(entry->option);
return options;
}
// Query the GUI options
const Common::String guiOptionsString = ConfMan.get("guioptions", target);
const Common::String guiOptions = parseGameGUIOptions(guiOptionsString);
// Add all the applying extra GUI options.
for (const ADExtraGuiOptionsMap *entry = _extraGuiOptions; entry->guioFlag; ++entry) {
if (guiOptions.contains(entry->guioFlag))
options.push_back(entry->option);
}
return options;
}
示例3: getExtraGuiOptions
const ExtraGuiOptions SkyMetaEngine::getExtraGuiOptions(const Common::String &target) const {
Common::String guiOptions;
ExtraGuiOptions options;
if (target.empty()) {
options.push_back(skyExtraGuiOption);
return options;
}
if (ConfMan.hasKey("guioptions", target)) {
guiOptions = ConfMan.get("guioptions", target);
guiOptions = parseGameGUIOptions(guiOptions);
}
if (!guiOptions.contains(GUIO_NOSPEECH))
options.push_back(skyExtraGuiOption);
return options;
}
示例4: getExtraGuiOptions
const ExtraGuiOptions ToltecsMetaEngine::getExtraGuiOptions(const Common::String &target) const {
ExtraGuiOptions options;
options.push_back(toltecsExtraGuiOption);
return options;
}
示例5: runGame
// TODO: specify the possible return values here
static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const Common::String &edebuglevels) {
// Determine the game data path, for validation and error messages
Common::FSNode dir(ConfMan.get("path"));
Common::Error err = Common::kNoError;
Engine *engine = 0;
// Verify that the game path refers to an actual directory
if (!(dir.exists() && dir.isDirectory()))
err = Common::kPathNotDirectory;
// Create the game engine
if (err.getCode() == Common::kNoError)
err = (*plugin)->createInstance(&system, &engine);
// Check for errors
if (!engine || err.getCode() != Common::kNoError) {
// Print a warning; note that scummvm_main will also
// display an error dialog, so we don't have to do this here.
warning("%s failed to instantiate engine: %s (target '%s', path '%s')",
plugin->getName(),
err.getDesc().c_str(),
ConfMan.getActiveDomainName().c_str(),
dir.getPath().c_str()
);
// Autoadded is set only when no path was provided and
// the game is run from command line.
//
// Thus, we remove this garbage entry
//
// Fixes bug #1544799
if (ConfMan.hasKey("autoadded")) {
ConfMan.removeGameDomain(ConfMan.getActiveDomainName().c_str());
}
return err;
}
// Set the window caption to the game name
Common::String caption(ConfMan.get("description"));
if (caption.empty()) {
caption = EngineMan.findGame(ConfMan.get("gameid")).description();
}
if (caption.empty())
caption = ConfMan.getActiveDomainName(); // Use the domain (=target) name
if (!caption.empty()) {
system.setWindowCaption(caption.c_str());
}
//
// Setup various paths in the SearchManager
//
// Add the game path to the directory search list
engine->initializePath(dir);
// Add extrapath (if any) to the directory search list
if (ConfMan.hasKey("extrapath")) {
dir = Common::FSNode(ConfMan.get("extrapath"));
SearchMan.addDirectory(dir.getPath(), dir);
}
// If a second extrapath is specified on the app domain level, add that as well.
// However, since the default hasKey() and get() check the app domain level,
// verify that it's not already there before adding it. The search manager will
// check for that too, so this check is mostly to avoid a warning message.
if (ConfMan.hasKey("extrapath", Common::ConfigManager::kApplicationDomain)) {
Common::String extraPath = ConfMan.get("extrapath", Common::ConfigManager::kApplicationDomain);
if (!SearchMan.hasArchive(extraPath)) {
dir = Common::FSNode(extraPath);
SearchMan.addDirectory(dir.getPath(), dir);
}
}
// On creation the engine should have set up all debug levels so we can use
// the command line arguments here
Common::StringTokenizer tokenizer(edebuglevels, " ,");
while (!tokenizer.empty()) {
Common::String token = tokenizer.nextToken();
if (token.equalsIgnoreCase("all"))
DebugMan.enableAllDebugChannels();
else if (!DebugMan.enableDebugChannel(token))
warning(_("Engine does not support debug level '%s'"), token.c_str());
}
// Initialize any game-specific keymaps
engine->initKeymap();
// Set default values for all of the custom engine options
const ExtraGuiOptions engineOptions = (*plugin)->getExtraGuiOptions(Common::String());
for (uint i = 0; i < engineOptions.size(); i++) {
ConfMan.registerDefault(engineOptions[i].configOption, engineOptions[i].defaultState);
}
// Inform backend that the engine is about to be run
system.engineInit();
//.........这里部分代码省略.........
示例6:
const ExtraGuiOptions Sword2MetaEngine::getExtraGuiOptions(const Common::String &target) const {
ExtraGuiOptions options;
options.push_back(sword2ExtraGuiOption);
return options;
}
示例7: getExtraGuiOptions
const ExtraGuiOptions DrasculaMetaEngine::getExtraGuiOptions(const Common::String &target) const {
ExtraGuiOptions options;
options.push_back(drasculaExtraGuiOption);
return options;
}
示例8: getExtraGuiOptions
const ExtraGuiOptions AgiMetaEngine::getExtraGuiOptions(const Common::String &target) const {
ExtraGuiOptions options;
options.push_back(agiExtraGuiOption);
return options;
}