Logo Search packages:      
Sourcecode: scummvm version File versions  Download package

void GameDescriptor::updateDesc ( const char *  extra = 0  ) 

Update the description string by appending (LANG/PLATFORM/EXTRA) to it.

Definition at line 77 of file game.cpp.

                                                 {
      // TODO: The format used here (LANG/PLATFORM/EXTRA) is not set in stone.
      // We may want to change the order (PLATFORM/EXTRA/LANG, anybody?), or
      // the seperator (instead of '/' use ', ' or ' ').
      const bool hasCustomLanguage = (language() != Common::UNK_LANG);
      const bool hasCustomPlatform = (platform() != Common::kPlatformUnknown);
      const bool hasExtraDesc = (extra && extra[0]);

      // Adapt the description string if custom platform/language is set.
      if (hasCustomLanguage || hasCustomPlatform || hasExtraDesc) {
            Common::String descr = description();

            descr += " (";
            if (hasExtraDesc)
                  descr += extra;
            if (hasCustomPlatform) {
                  if (hasExtraDesc)
                        descr += "/";
                  descr += Common::getPlatformDescription(platform());
            }
            if (hasCustomLanguage) {
                  if (hasExtraDesc || hasCustomPlatform)
                        descr += "/";
                  descr += Common::getLanguageDescription(language());
            }
            descr += ")";
            setVal("description", descr);
      }
}


Generated by  Doxygen 1.6.0   Back to index