svn-id: r32751
This commit is contained in:
Johannes Schickel 2008-06-22 12:36:38 +00:00
parent 3be9449e67
commit 12d7a5e679

View File

@ -454,26 +454,22 @@ void KyraEngine_HoF::loadBookBkgd() {
void KyraEngine_HoF::showBookPage() {
char filename[16];
sprintf(filename, "PAGE%.01X.", _bookCurPage);
strcat(filename, _languageExtension[_lang]);
sprintf(filename, "PAGE%.01X.%s", _bookCurPage, _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");
sprintf(filename, "PAGE%.01X.TXT", _bookCurPage);
leftPage = _res->fileData(filename, 0);
}
int leftPageY = _bookPageYOffset[_bookCurPage];
sprintf(filename, "PAGE%.01X.", _bookCurPage+1);
strcat(filename, _languageExtension[_lang]);
sprintf(filename, "PAGE%.01X.%s", _bookCurPage+1, _languageExtension[_lang]);
uint8 *rightPage = 0;
if (_bookCurPage != _bookMaxPage) {
rightPage = _res->fileData(filename, 0);
if (!rightPage) {
sprintf(filename, "PAGE%.01X.", _bookCurPage);
strcat(filename, "TXT");
sprintf(filename, "PAGE%.01X.TXT", _bookCurPage);
rightPage = _res->fileData(filename, 0);
}
}