aboutsummaryrefslogtreecommitdiff
path: root/common/config-file.cpp
diff options
context:
space:
mode:
authorJames Brown2002-10-28 09:03:02 +0000
committerJames Brown2002-10-28 09:03:02 +0000
commit959a9acf1456f2b39a3b8a20779c71a2637754d2 (patch)
treed9bf3ded96371a8e958d17ce772a8b5b831aa067 /common/config-file.cpp
parent2e027179e030600a58ee84cd52780b201f817232 (diff)
downloadscummvm-rg350-959a9acf1456f2b39a3b8a20779c71a2637754d2.tar.gz
scummvm-rg350-959a9acf1456f2b39a3b8a20779c71a2637754d2.tar.bz2
scummvm-rg350-959a9acf1456f2b39a3b8a20779c71a2637754d2.zip
Add support for aliased scummvm config entries.
Eg: [germandott] path=/games/german/dott gameid=tentacle description=the german version of DOTT I havn't finished the Launcher changes to show aliased entries yet, as I need to parse the whole domainmap to do so. svn-id: r5341
Diffstat (limited to 'common/config-file.cpp')
-rw-r--r--common/config-file.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/common/config-file.cpp b/common/config-file.cpp
index d772dff812..699c959eb0 100644
--- a/common/config-file.cpp
+++ b/common/config-file.cpp
@@ -238,3 +238,28 @@ void Config::set_writing(bool w)
{
willwrite = w;
}
+
+const int Config::count_domains() {
+ int count = 0;
+ DomainMap::Iterator d, end(domains.end());
+ for (d = domains.begin(); d != end; ++d)
+ count++;
+
+ return 0;
+}
+
+int Config::get_domains(char (*ptr)[100]) {
+ int index = 0;
+ DomainMap::Iterator d, end(domains.end());
+ for (d = domains.begin(); d != end; ++d) {
+ //printf("Key %d is %s\n", index, d->_key.c_str());
+ strcpy(ptr[index], d->_key.c_str());
+ index++;
+
+ if (index>99)
+ return 99;
+ }
+
+ return index;
+}
+