diff options
author | Tarek Soliman | 2011-04-25 15:26:38 -0500 |
---|---|---|
committer | Tarek Soliman | 2011-06-16 13:37:13 -0500 |
commit | 4d0bba314d3b584f15d1d50e59d8f1b8c9a39161 (patch) | |
tree | b6daa3b7cc5fff831af5aba08c389748b5871d3d /engines/game.cpp | |
parent | 71759eab534512e7a4df557f12ffadb0062a56ad (diff) | |
download | scummvm-rg350-4d0bba314d3b584f15d1d50e59d8f1b8c9a39161.tar.gz scummvm-rg350-4d0bba314d3b584f15d1d50e59d8f1b8c9a39161.tar.bz2 scummvm-rg350-4d0bba314d3b584f15d1d50e59d8f1b8c9a39161.zip |
ENGINES: Warn user about games marked with ADGF_UNSTABLE flags
ADGF_UNSTABLE is always warned about.
ADGF_TESTING is only warned about when running
configure with --enable-relase.
Both warnings are subject to the enable_wip_game_warning
config option.
Diffstat (limited to 'engines/game.cpp')
-rw-r--r-- | engines/game.cpp | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/engines/game.cpp b/engines/game.cpp index c6d9905b52..cbd5a802c6 100644 --- a/engines/game.cpp +++ b/engines/game.cpp @@ -46,7 +46,7 @@ GameDescriptor::GameDescriptor(const PlainGameDescriptor &pgd, uint32 guioptions setVal("guioptions", Common::getGameGUIOptionsDescription(guioptions)); } -GameDescriptor::GameDescriptor(const Common::String &g, const Common::String &d, Common::Language l, Common::Platform p, uint32 guioptions) { +GameDescriptor::GameDescriptor(const Common::String &g, const Common::String &d, Common::Language l, Common::Platform p, uint32 guioptions, GameSupportLevel gsl) { setVal("gameid", g); setVal("description", d); if (l != Common::UNK_LANG) @@ -55,6 +55,8 @@ GameDescriptor::GameDescriptor(const Common::String &g, const Common::String &d, setVal("platform", Common::getPlatformCode(p)); if (guioptions != 0) setVal("guioptions", Common::getGameGUIOptionsDescription(guioptions)); + + setSupportLevel(gsl); } void GameDescriptor::setGUIOptions(uint32 guioptions) { @@ -97,3 +99,30 @@ void GameDescriptor::updateDesc(const char *extra) { setVal("description", descr); } } + +GameSupportLevel GameDescriptor::getSupportLevel() { + GameSupportLevel gsl = kStableGame; + if (contains("gsl")) { + Common::String gslString = getVal("gsl"); + if (gslString.equals("unstable")) + gsl = kUnstableGame; + else if (gslString.equals("testing")) + gsl = kTestingGame; + } + return gsl; +} + +void GameDescriptor::setSupportLevel(GameSupportLevel gsl) { + switch (gsl) { + case kUnstableGame: + setVal("gsl", "unstable"); + break; + case kTestingGame: + setVal("gsl", "testing"); + break; + case kStableGame: + // Fall Through intended + default: + erase("gsl"); + } +} |