aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sky/disk.cpp5
-rw-r--r--sky/disk.h2
-rw-r--r--sky/sky.cpp24
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);