aboutsummaryrefslogtreecommitdiff
path: root/engines/game.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2011-10-23 15:14:41 +0100
committerEugene Sandulenko2011-10-23 17:53:13 +0100
commit77c65648b1db8f8b7b245510681eafd856798d26 (patch)
treebe20ba4cc50090f8b4cbfe53acbe7cf94bdd74f1 /engines/game.cpp
parent2efcee52889c7ed1c46e669a3b3d4f0ab2aa1cd2 (diff)
downloadscummvm-rg350-77c65648b1db8f8b7b245510681eafd856798d26.tar.gz
scummvm-rg350-77c65648b1db8f8b7b245510681eafd856798d26.tar.bz2
scummvm-rg350-77c65648b1db8f8b7b245510681eafd856798d26.zip
AD: Swtich GUI options to a char array.
This eliminates nasty limitation of caping number of flags to 31. Current code has limitation of 255 flags, though. Only SCUMM engine is converted, rest do not even compile. Detection of fan talkie MI is broken as it has to be implemented differently.
Diffstat (limited to 'engines/game.cpp')
-rw-r--r--engines/game.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/game.cpp b/engines/game.cpp
index 8ea68bb681..be15240745 100644
--- a/engines/game.cpp
+++ b/engines/game.cpp
@@ -38,29 +38,29 @@ GameDescriptor::GameDescriptor() {
setVal("description", "");
}
-GameDescriptor::GameDescriptor(const PlainGameDescriptor &pgd, uint32 guioptions) {
+GameDescriptor::GameDescriptor(const PlainGameDescriptor &pgd, Common::String guioptions) {
setVal("gameid", pgd.gameid);
setVal("description", pgd.description);
- if (guioptions != 0)
+ if (!guioptions.empty())
setVal("guioptions", Common::getGameGUIOptionsDescription(guioptions));
}
-GameDescriptor::GameDescriptor(const Common::String &g, const Common::String &d, Common::Language l, Common::Platform p, uint32 guioptions, GameSupportLevel gsl) {
+GameDescriptor::GameDescriptor(const Common::String &g, const Common::String &d, Common::Language l, Common::Platform p, Common::String guioptions, GameSupportLevel gsl) {
setVal("gameid", g);
setVal("description", d);
if (l != Common::UNK_LANG)
setVal("language", Common::getLanguageCode(l));
if (p != Common::kPlatformUnknown)
setVal("platform", Common::getPlatformCode(p));
- if (guioptions != 0)
+ if (!guioptions.empty())
setVal("guioptions", Common::getGameGUIOptionsDescription(guioptions));
setSupportLevel(gsl);
}
-void GameDescriptor::setGUIOptions(uint32 guioptions) {
- if (guioptions != 0)
+void GameDescriptor::setGUIOptions(Common::String guioptions) {
+ if (!guioptions.empty())
setVal("guioptions", Common::getGameGUIOptionsDescription(guioptions));
else
erase("guioptions");