[Scummvm-cvs-logs] CVS: scummvm/sky disk.cpp,1.39,1.40 disk.h,1.7,1.8 sky.cpp,1.91,1.92

Robert G?ffringmann lavosspawn at users.sourceforge.net
Fri Jul 11 22:39:02 CEST 2003


Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv17364/sky

Modified Files:
	disk.cpp disk.h sky.cpp 
Log Message:
floppy versions don't seem to have all languages in their datafiles.

Index: disk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/disk.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- disk.cpp	11 Jul 2003 18:56:57 -0000	1.39
+++ disk.cpp	12 Jul 2003 05:38:04 -0000	1.40
@@ -89,6 +89,11 @@
 	_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) {

Index: disk.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/disk.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- disk.h	27 Jun 2003 02:54:05 -0000	1.7
+++ disk.h	12 Jul 2003 05:38:04 -0000	1.8
@@ -39,6 +39,8 @@
 	~SkyDisk(void);
 
 	uint8 *loadFile(uint16 fileNr, uint8 *dest);
+	bool fileExists(uint16 fileNr);
+
 	void prefetchFile(uint16 fileNr);
 	void flushPrefetched(void);
 

Index: sky.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sky.cpp,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -d -r1.91 -r1.92
--- sky.cpp	12 Jul 2003 05:26:23 -0000	1.91
+++ sky.cpp	12 Jul 2003 05:38:04 -0000	1.92
@@ -87,10 +87,6 @@
 	
 	_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 @@
 			_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)
@@ -267,6 +263,16 @@
 
 	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)





More information about the Scummvm-git-logs mailing list