diff options
Diffstat (limited to 'engines/hopkins')
-rw-r--r-- | engines/hopkins/hopkins.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index e8168553b5..91b3a17f85 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -2356,21 +2356,29 @@ void HopkinsEngine::loadCredits() { _globals->_creditsPosY = 440; _globals->_creditsStep = 45; byte *bufPtr; + Common::String filename; switch (_globals->_language) { case LANG_EN: - bufPtr = _fileIO->loadFile("CREAN.TXT"); + filename = "CREAN.TXT"; break; case LANG_FR: - bufPtr = _fileIO->loadFile("CREFR.TXT"); + filename = "CREFR.TXT"; break; case LANG_SP: - bufPtr = _fileIO->loadFile("CREES.TXT"); + filename = "CREES.TXT"; break; default: error("Unhandled language"); break; } + if (!_fileIO->fileExists(filename)) { + _globals->_creditsLineNumb = 0; + return; + } + + bufPtr = _fileIO->loadFile(filename); + byte *curPtr = bufPtr; int idxLines = 0; bool loopCond = false; |