[Scummvm-cvs-logs] SF.net SVN: scummvm: [32750] scummvm/trunk/engines/kyra

athrxx at users.sourceforge.net athrxx at users.sourceforge.net
Sun Jun 22 14:31:07 CEST 2008


Revision: 32750
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32750&view=rev
Author:   athrxx
Date:     2008-06-22 05:31:05 -0700 (Sun, 22 Jun 2008)

Log Message:
-----------
this should fix bug #1997149: KYRA2: no text in spellbook

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/gui_hof.cpp
    scummvm/trunk/engines/kyra/kyra_hof.cpp

Modified: scummvm/trunk/engines/kyra/gui_hof.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui_hof.cpp	2008-06-22 10:38:46 UTC (rev 32749)
+++ scummvm/trunk/engines/kyra/gui_hof.cpp	2008-06-22 12:31:05 UTC (rev 32750)
@@ -455,13 +455,29 @@
 	char filename[16];
 
 	sprintf(filename, "PAGE%.01X.", _bookCurPage);
-	strcat(filename, (_flags.isTalkie || _flags.platform == Common::kPlatformFMTowns || _lang) ? _languageExtension[_lang] : "TXT");
+	strcat(filename, _languageExtension[_lang]);
 	uint8 *leftPage = _res->fileData(filename, 0);
+	if (!leftPage) {
+		// some floppy version use a TXT extension
+		sprintf(filename, "PAGE%.01X.", _bookCurPage);
+		strcat(filename, "TXT");
+		leftPage = _res->fileData(filename, 0);
+	}
+
 	int leftPageY = _bookPageYOffset[_bookCurPage];
 
 	sprintf(filename, "PAGE%.01X.", _bookCurPage+1);
-	strcat(filename, (_flags.isTalkie || _flags.platform == Common::kPlatformFMTowns || _lang) ? _languageExtension[_lang] : "TXT");
-	uint8 *rightPage = (_bookCurPage != _bookMaxPage) ? _res->fileData(filename, 0) : 0;
+	strcat(filename, _languageExtension[_lang]);
+	uint8 *rightPage = 0;
+	if (_bookCurPage != _bookMaxPage) {
+		rightPage = _res->fileData(filename, 0);
+		if (!rightPage) {
+			sprintf(filename, "PAGE%.01X.", _bookCurPage);
+			strcat(filename, "TXT");
+			rightPage = _res->fileData(filename, 0);
+		}
+	}
+	
 	int rightPageY = _bookPageYOffset[_bookCurPage+1];
 
 	_screen->hideMouse();

Modified: scummvm/trunk/engines/kyra/kyra_hof.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_hof.cpp	2008-06-22 10:38:46 UTC (rev 32749)
+++ scummvm/trunk/engines/kyra/kyra_hof.cpp	2008-06-22 12:31:05 UTC (rev 32750)
@@ -296,6 +296,9 @@
 			_res->loadFileList("FILEDATA.FDT");
 		else
 			_res->loadFileList(_ingamePakList, _ingamePakListSize);
+
+		if (_flags.platform == Common::kPlatformPC98)
+			_res->loadPakFile("AUDIO.PAK");
 	}
 
 	_menuDirectlyToLoad = (_menuChoice == 3) ? true : false;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list