diff options
-rw-r--r-- | engines/scumm/input.cpp | 6 | ||||
-rw-r--r-- | engines/scumm/intern.h | 2 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 14 | ||||
-rw-r--r-- | engines/scumm/scumm.h | 1 | ||||
-rw-r--r-- | engines/scumm/vars.cpp | 79 |
5 files changed, 53 insertions, 49 deletions
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp index 8424a2053e..d29aeec4ef 100644 --- a/engines/scumm/input.cpp +++ b/engines/scumm/input.cpp @@ -312,11 +312,7 @@ void ScummEngine::processKbd(bool smushMode) { #ifdef _WIN32_WCE if (_lastKeyHit == KEY_ALL_SKIP) { // Skip cutscene - if (smushMode) { - _lastKeyHit = (VAR_CUTSCENEEXIT_KEY != 0xFF) ? (uint)VAR(VAR_CUTSCENEEXIT_KEY) : 27; - } - else - if (vm.cutScenePtr[vm.cutSceneStackPointer]) + if (smushMode || vm.cutScenePtr[vm.cutSceneStackPointer]) _lastKeyHit = (VAR_CUTSCENEEXIT_KEY != 0xFF) ? (uint)VAR(VAR_CUTSCENEEXIT_KEY) : 27; else // Skip talk diff --git a/engines/scumm/intern.h b/engines/scumm/intern.h index 029e347dec..7be7bf3761 100644 --- a/engines/scumm/intern.h +++ b/engines/scumm/intern.h @@ -890,6 +890,7 @@ protected: virtual const char *getOpcodeDesc(byte i); virtual void setupScummVars(); + virtual void initScummVars(); virtual void decodeParseString(int m, int n); virtual void readArrayFromIndexFile(); @@ -940,6 +941,7 @@ protected: void o8_getStringWidth(); + byte VAR_LANGUAGE; }; #endif diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index c6fc1a04b6..e380f9d313 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -434,7 +434,6 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) // // Init all VARS to 0xFF // - VAR_LANGUAGE = 0xFF; VAR_KEYPRESS = 0xFF; VAR_SYNC = 0xFF; VAR_EGO = 0xFF; @@ -923,6 +922,8 @@ ScummEngine_v7::~ScummEngine_v7() { ScummEngine_v8::ScummEngine_v8(OSystem *syst, const DetectorResult &dr) : ScummEngine_v7(syst, dr) { _objectIDMap = 0; + + VAR_LANGUAGE = 0xFF; } ScummEngine_v8::~ScummEngine_v8() { @@ -955,12 +956,13 @@ int ScummEngine::init() { _system->endGFXTransaction(); // On some systems it's not safe to run CD audio games from the CD. - if (_game.features & GF_AUDIOTRACKS) + if (_game.features & GF_AUDIOTRACKS) { checkCD(); - - int cd_num = ConfMan.getInt("cdrom"); - if (cd_num >= 0 && (_game.features & GF_AUDIOTRACKS)) - _system->openCD(cd_num); + + int cd_num = ConfMan.getInt("cdrom"); + if (cd_num >= 0) + _system->openCD(cd_num); + } // Create the sound manager if (_game.heversion > 0) diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index 98db99fccf..1f40edc344 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -1243,7 +1243,6 @@ protected: public: /* Scumm Vars */ - byte VAR_LANGUAGE; byte VAR_KEYPRESS; byte VAR_SYNC; byte VAR_EGO; diff --git a/engines/scumm/vars.cpp b/engines/scumm/vars.cpp index 3ccba043f3..fd81443cc8 100644 --- a/engines/scumm/vars.cpp +++ b/engines/scumm/vars.cpp @@ -572,43 +572,7 @@ void ScummEngine_v5::initScummVars() { void ScummEngine_v7::initScummVars() { ScummEngine::initScummVars(); - if (_game.version == 8) { // FIXME: How do we deal with non-cd installs? - VAR(VAR_CURRENTDISK) = 1; - - switch (_language) { - case Common::EN_ANY: - case Common::EN_USA: - case Common::EN_GRB: - VAR(VAR_LANGUAGE) = 0; - break; - case Common::DE_DEU: - VAR(VAR_LANGUAGE) = 1; - break; - case Common::FR_FRA: - VAR(VAR_LANGUAGE) = 2; - break; - case Common::IT_ITA: - VAR(VAR_LANGUAGE) = 3; - break; - case Common::PT_BRA: - VAR(VAR_LANGUAGE) = 4; - break; - case Common::ES_ESP: - VAR(VAR_LANGUAGE) = 5; - break; - case Common::JA_JPN: - VAR(VAR_LANGUAGE) = 6; - break; - case Common::ZH_TWN: - VAR(VAR_LANGUAGE) = 7; - break; - case Common::KO_KOR: - VAR(VAR_LANGUAGE) = 8; - break; - default: - VAR(VAR_LANGUAGE) = 0; // Default to english - } - } else { + if (_game.version != 8) { VAR(VAR_V6_EMSSPACE) = 10000; VAR(VAR_NUM_GLOBAL_OBJS) = _numGlobalObjects - 1; } @@ -616,6 +580,47 @@ void ScummEngine_v7::initScummVars() { VAR(VAR_DEFAULT_TALK_DELAY) = 60; VAR(VAR_VOICE_MODE) = ConfMan.getBool("subtitles"); } + +void ScummEngine_v8::initScummVars() { + ScummEngine_v7::initScummVars(); + + // FIXME: How do we deal with non-cd installs? + VAR(VAR_CURRENTDISK) = 1; + + switch (_language) { + case Common::EN_ANY: + case Common::EN_USA: + case Common::EN_GRB: + VAR(VAR_LANGUAGE) = 0; + break; + case Common::DE_DEU: + VAR(VAR_LANGUAGE) = 1; + break; + case Common::FR_FRA: + VAR(VAR_LANGUAGE) = 2; + break; + case Common::IT_ITA: + VAR(VAR_LANGUAGE) = 3; + break; + case Common::PT_BRA: + VAR(VAR_LANGUAGE) = 4; + break; + case Common::ES_ESP: + VAR(VAR_LANGUAGE) = 5; + break; + case Common::JA_JPN: + VAR(VAR_LANGUAGE) = 6; + break; + case Common::ZH_TWN: + VAR(VAR_LANGUAGE) = 7; + break; + case Common::KO_KOR: + VAR(VAR_LANGUAGE) = 8; + break; + default: + VAR(VAR_LANGUAGE) = 0; // Default to english + } +} #endif #ifndef DISABLE_HE |