diff options
author | Robert Göffringmann | 2003-07-12 05:38:04 +0000 |
---|---|---|
committer | Robert Göffringmann | 2003-07-12 05:38:04 +0000 |
commit | 67a760d10c18f4b0af37fa6a11ff817b2c318e87 (patch) | |
tree | 8f18c284338b01aa78a2973152c95eb5c1a6bf23 | |
parent | cb48b4fca0b6a1fc816ba6cb49f497476ebcd534 (diff) | |
download | scummvm-rg350-67a760d10c18f4b0af37fa6a11ff817b2c318e87.tar.gz scummvm-rg350-67a760d10c18f4b0af37fa6a11ff817b2c318e87.tar.bz2 scummvm-rg350-67a760d10c18f4b0af37fa6a11ff817b2c318e87.zip |
floppy versions don't seem to have all languages in their datafiles.
svn-id: r8927
-rw-r--r-- | sky/disk.cpp | 5 | ||||
-rw-r--r-- | sky/disk.h | 2 | ||||
-rw-r--r-- | sky/sky.cpp | 24 |
3 files changed, 22 insertions, 9 deletions
diff --git a/sky/disk.cpp b/sky/disk.cpp index 97d3e98c17..f0ded23e0a 100644 --- a/sky/disk.cpp +++ b/sky/disk.cpp @@ -89,6 +89,11 @@ void SkyDisk::flushPrefetched(void) { _prefRoot = NULL; } +bool SkyDisk::fileExists(uint16 fileNr) { + + return (getFileInfo(fileNr) != NULL); +} + //load in file file_nr to address dest //if dest == NULL, then allocate memory for this file uint8 *SkyDisk::loadFile(uint16 fileNr, uint8 *dest) { diff --git a/sky/disk.h b/sky/disk.h index 5b1a7e45bd..c69086c5e5 100644 --- a/sky/disk.h +++ b/sky/disk.h @@ -39,6 +39,8 @@ public: ~SkyDisk(void); uint8 *loadFile(uint16 fileNr, uint8 *dest); + bool fileExists(uint16 fileNr); + void prefetchFile(uint16 fileNr); void flushPrefetched(void); diff --git a/sky/sky.cpp b/sky/sky.cpp index 25e51c40a1..0abec1227c 100644 --- a/sky/sky.cpp +++ b/sky/sky.cpp @@ -87,10 +87,6 @@ SkyState::SkyState(GameDetector *detector, OSystem *syst) _debugMode = detector->_debugMode; _debugLevel = detector->_debugLevel; - if (detector->_language > 10) - _systemVars.language = SKY_USA; - else - _systemVars.language = _languageTable[detector->_language]; _detector = detector; _floppyIntro = detector->_floppyIntro; @@ -232,11 +228,11 @@ void SkyState::initialise(void) { _skyMusic = new SkyGmMusic(_detector->createMidi(), _skyDisk, _system); } - // Override global fullscreen setting with any game-specific define - if (g_config->getBool("fullscreen", false)) { - if (!_system->property(OSystem::PROP_GET_FULLSCREEN, 0)) - _system->property(OSystem::PROP_TOGGLE_FULLSCREEN, 0); - } + // Override global fullscreen setting with any game-specific define + if (g_config->getBool("fullscreen", false)) { + if (!_system->property(OSystem::PROP_GET_FULLSCREEN, 0)) + _system->property(OSystem::PROP_TOGGLE_FULLSCREEN, 0); + } if (isCDVersion()) { if (_detector->_noSubtitles) @@ -268,6 +264,16 @@ void SkyState::initialise(void) { if (_systemVars.gameVersion == 288) SkyCompact::patchFor288(); + if (_detector->_language > 10) + _systemVars.language = SKY_USA; + else + _systemVars.language = _languageTable[_detector->_language]; + + if (!_skyDisk->fileExists(60600 + SkyState::_systemVars.language * 8)) { + warning("The language you selected does not exist in your BASS version.\nSwitching to english."); + SkyState::_systemVars.language = SKY_ENGLISH; + } + uint16 result = 0; if (_detector->_save_slot >= 0) result = _skyControl->quickXRestore(_detector->_save_slot); |