diff options
author | Max Horn | 2006-04-11 22:31:47 +0000 |
---|---|---|
committer | Max Horn | 2006-04-11 22:31:47 +0000 |
commit | 2044ee1c0d45ee8914a3735b96c028996cc2fb08 (patch) | |
tree | 5e5e0f573076bcb4a2a0a13e53cfd7677b125f3b | |
parent | 0c75d7d1c01b36ba0f13f9cf1d53307841a5f26e (diff) | |
download | scummvm-rg350-2044ee1c0d45ee8914a3735b96c028996cc2fb08.tar.gz scummvm-rg350-2044ee1c0d45ee8914a3735b96c028996cc2fb08.tar.bz2 scummvm-rg350-2044ee1c0d45ee8914a3735b96c028996cc2fb08.zip |
Don't hardcode specific values for our language enums, as nothing should depend on them -- any code that is broken by this change was wrong to start with and must be fixed accordingly
svn-id: r21812
-rw-r--r-- | common/util.cpp | 2 | ||||
-rw-r--r-- | common/util.h | 76 |
2 files changed, 38 insertions, 40 deletions
diff --git a/common/util.cpp b/common/util.cpp index 94a71a8795..d07a242f97 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -112,6 +112,7 @@ uint RandomSource::getRandomNumberRng(uint min, uint max) { const LanguageDescription g_languages[] = { {"en", "English", EN_ANY}, // Generic English (when only one game version exist) {"us", "English (US)", EN_USA}, + {"gb", "English (GB)", EN_GRB}, {"de", "German", DE_DEU}, {"fr", "French", FR_FRA}, {"it", "Italian", IT_ITA}, @@ -120,7 +121,6 @@ const LanguageDescription g_languages[] = { {"jp", "Japanese", JA_JPN}, {"zh", "Chinese (Taiwan)", ZH_TWN}, {"kr", "Korean", KO_KOR}, - {"gb", "English (GB)", EN_GRB}, {"se", "Swedish", SE_SWE}, {"hb", "Hebrew", HB_ISR}, {"ru", "Russian", RU_RUS}, diff --git a/common/util.h b/common/util.h index 6d3fa12666..83ba73c30f 100644 --- a/common/util.h +++ b/common/util.h @@ -84,31 +84,30 @@ public: }; /** - * List of language ids. - * @note The order and mappings of the values 0..8 are *required* to stay the - * way they are now, as scripts in COMI rely on them. So don't touch them. - * I am working on removing this restriction. + * List of game language. */ enum Language { - UNK_LANG = -1, // Use default language (i.e. none specified) - EN_ANY = 0, // Generic English (when only one game version exist) - EN_USA = 1, - DE_DEU = 2, - FR_FRA = 3, - IT_ITA = 4, - PT_BRA = 5, - ES_ESP = 6, - JA_JPN = 7, - ZH_TWN = 8, - KO_KOR = 9, - SE_SWE = 10, - EN_GRB = 11, - HB_ISR = 20, - RU_RUS = 21, - CZ_CZE = 22, - NL_NLD = 23, - NB_NOR = 24, - PL_POL = 25 + EN_ANY, // Generic English (when only one game version exist) + EN_USA, + EN_GRB, + + DE_DEU, + FR_FRA, + IT_ITA, + PT_BRA, + ES_ESP, + JA_JPN, + ZH_TWN, + KO_KOR, + SE_SWE, + HB_ISR, + RU_RUS, + CZ_CZE, + NL_NLD, + NB_NOR, + PL_POL, + + UNK_LANG = -1 // Use default language (i.e. none specified) }; struct LanguageDescription { @@ -132,22 +131,21 @@ extern const char *getLanguageDescription(Language id); * game in question. */ enum Platform { - kPlatformUnknown = -1, - kPlatformPC = 0, - kPlatformAmiga = 1, - kPlatformAtariST = 2, - kPlatformMacintosh = 3, - kPlatformFMTowns = 4, - kPlatformWindows = 5, - kPlatformNES = 6, - kPlatformC64 = 7, - kPlatformLinux = 8, - kPlatformAcorn = 9, - kPlatformSegaCD = 10, - kPlatform3DO = 11 -/* - kPlatformPCEngine -*/ + kPlatformPC, + kPlatformAmiga, + kPlatformAtariST, + kPlatformMacintosh, + kPlatformFMTowns, + kPlatformWindows, + kPlatformNES, + kPlatformC64, + kPlatformLinux, + kPlatformAcorn, + kPlatformSegaCD, + kPlatform3DO, +// kPlatformPCEngine, + + kPlatformUnknown = -1 }; struct PlatformDescription { |